libMesh / libmesh

libMesh github repository
http://libmesh.github.io
GNU Lesser General Public License v2.1
648 stars 285 forks source link

Three-component LAGRANGE_VEC in 2D #1672

Open lindsayad opened 6 years ago

lindsayad commented 6 years ago

Initial discussion here. @jwpeterson, @cticenhour, and I have already discussed this a bit. The third component would use the same 2D basis functions as the first two components, e.g. the code for the shape method should look something like:

  Real value = FE<2,LAGRANGE>::shape( type, order, i/2, p );

  switch( i%3 )
    {
    case 0:
      return libMesh::RealGradient( value );

    case 1:
      return libMesh::RealGradient( Real(0), value );

    case 2:
      return libMesh::RealGradient( Real(0), Real(0), value );

    default:
      libmesh_error_msg("i%3 must be either 0, 1, or 2!");
    }

It would be the user's responsibility to provide derivatives with respect to the third component based on their physics, e.g. the known spatial dependence on the third spatial coordinate.

roystgnr commented 6 years ago

I assume we just want to call this LAGRANGE_3VEC or something new rather than adding some auxilliary way to decide whether a LAGRANGE_VEC should have more components or not?

lindsayad commented 6 years ago

Yes, I was thinking it should be something new

On Thu, Apr 26, 2018 at 1:58 PM, roystgnr notifications@github.com wrote:

I assume we just want to call this LAGRANGE_3VEC or something new rather than adding some auxilliary way to decide whether a LAGRANGE_VEC should have more components or not?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/libMesh/libmesh/issues/1672#issuecomment-384770255, or mute the thread https://github.com/notifications/unsubscribe-auth/AJxgcEbe4214o4wvMS7oEG8YNyCQpPwXks5tsibWgaJpZM4Tm_uO .