v0.15.5
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
MoFEM::AddHOOps< 2, 2, 2 > Struct Reference

Specialization for 2D face elements in 2D problems with 2D space. More...

#include "src/finite_elements/HODataOperators.hpp"

Public Member Functions

 AddHOOps ()=delete
 

Static Public Member Functions

static MoFEMErrorCode add (boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, std::vector< FieldSpace > spaces, std::string geom_field_name="", boost::shared_ptr< MatrixDouble > jac=nullptr, boost::shared_ptr< VectorDouble > det=nullptr, boost::shared_ptr< MatrixDouble > inv_jac=nullptr)
 Add high-order operators to the pipeline for 2D face elements.
 

Detailed Description

Specialization for 2D face elements in 2D problems with 2D space.

This specialization adds high-order operators for 2D face elements operating in 2D problems within 2D coordinate space. Commonly used for planar face elements in 2D finite element analysis.

Definition at line 651 of file HODataOperators.hpp.

Constructor & Destructor Documentation

◆ AddHOOps()

MoFEM::AddHOOps< 2, 2, 2 >::AddHOOps ( )
delete

Member Function Documentation

◆ add()

MoFEMErrorCode MoFEM::AddHOOps< 2, 2, 2 >::add ( boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pipeline,
std::vector< FieldSpace spaces,
std::string  geom_field_name = "",
boost::shared_ptr< MatrixDouble jac = nullptr,
boost::shared_ptr< VectorDouble det = nullptr,
boost::shared_ptr< MatrixDouble inv_jac = nullptr 
)
static

Add high-order operators to the pipeline for 2D face elements.

Parameters
pipelinePipeline to add operators to
spacesVector of field spaces to be handled
geom_field_nameName of the geometry field (default: empty string)
jacShared pointer to Jacobian matrix. If provided, values will be set by this function. If null, Jacobian will be handled internally.
detShared pointer to determinant vector. If provided, values will be set by this function. If null, determinant will be handled internally.
inv_jacShared pointer to inverse Jacobian matrix. If provided, values will be set by this function. If null, inverse Jacobian will be handled internally.
Returns
MoFEMErrorCode Error code indicating success or failure

Definition at line 862 of file HODataOperators.cpp.

867 {
869
870 if (!jac_ptr)
871 jac_ptr = boost::make_shared<MatrixDouble>();
872 if (!det_ptr)
873 det_ptr = boost::make_shared<VectorDouble>();
874 if (!inv_jac_ptr)
875 inv_jac_ptr = boost::make_shared<MatrixDouble>();
876
877 if (geom_field_name.empty()) {
878
879 pipeline.push_back(new OpCalculateHOJac<2>(jac_ptr));
880
881 } else {
882
883 pipeline.push_back(new OpCalculateHOCoords<2>(geom_field_name));
884 pipeline.push_back(
885 new OpCalculateVectorFieldGradient<2, 2>(geom_field_name, jac_ptr));
886 pipeline.push_back(new OpGetHONormalsOnFace<2>(geom_field_name));
887 }
888
889 pipeline.push_back(new OpInvertMatrix<2>(jac_ptr, det_ptr, inv_jac_ptr));
890 pipeline.push_back(new OpSetHOWeightsOnFace());
891
892 for (auto s : spaces) {
893 switch (s) {
894 case NOSPACE:
895 break;
896 case H1:
897 case L2:
898 pipeline.push_back(new OpSetHOInvJacToScalarBases<2>(s, inv_jac_ptr));
899 break;
900 case HCURL:
901 pipeline.push_back(new OpSetCovariantPiolaTransformOnFace2D(inv_jac_ptr));
902 pipeline.push_back(new OpSetInvJacHcurlFace(inv_jac_ptr));
903 break;
904 case HDIV:
905 pipeline.push_back(new OpMakeHdivFromHcurl());
906 pipeline.push_back(new OpSetContravariantPiolaTransformOnFace2D(jac_ptr));
907 pipeline.push_back(new OpSetInvJacHcurlFace(inv_jac_ptr));
908 break;
909 default:
910 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
911 "Space %s not yet implemented", FieldSpaceNames[s]);
912 }
913 }
914
916}
@ L2
field with C-1 continuity
Definition definitions.h:88
@ H1
continuous field
Definition definitions.h:85
@ NOSPACE
Definition definitions.h:83
@ HCURL
field with continuous tangents
Definition definitions.h:86
@ HDIV
field with continuous normal traction
Definition definitions.h:87
static const char *const FieldSpaceNames[]
Definition definitions.h:92
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_NOT_IMPLEMENTED
Definition definitions.h:32
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
OpSetInvJacHcurlFaceImpl< 2 > OpSetInvJacHcurlFace
OpSetCovariantPiolaTransformOnFace2DImpl< 2 > OpSetCovariantPiolaTransformOnFace2D
OpSetContravariantPiolaTransformOnFace2DImpl< 2 > OpSetContravariantPiolaTransformOnFace2D

The documentation for this struct was generated from the following files: