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

Specialization for 3D volume elements in 3D problems with 3D 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 > space, 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 3D volume elements.
 

Detailed Description

Specialization for 3D volume elements in 3D problems with 3D space.

This specialization adds high-order operators for 3D volume elements operating in 3D problems within 3D coordinate space. This is the most common case for solid mechanics, heat transfer, and other 3D finite element applications involving volumetric elements like tetrahedra, hexahedra, and prisms.

Definition at line 793 of file HODataOperators.hpp.

Constructor & Destructor Documentation

◆ AddHOOps()

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

Member Function Documentation

◆ add()

MoFEMErrorCode AddHOOps< 3, 3, 3 >::add ( boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pipeline,
std::vector< FieldSpace space,
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 3D volume elements.

Parameters
pipelinePipeline to add operators to
spaceVector 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 1067 of file HODataOperators.cpp.

1071 {
1073
1074 if (!jac)
1075 jac = boost::make_shared<MatrixDouble>();
1076 if (!det)
1077 det = boost::make_shared<VectorDouble>();
1078 if (!inv_jac)
1079 inv_jac = boost::make_shared<MatrixDouble>();
1080
1081 if (geom_field_name.empty()) {
1082
1083 pipeline.push_back(new OpCalculateHOJac<3>(jac));
1084
1085 } else {
1086
1087 pipeline.push_back(new OpCalculateHOCoords<3>(geom_field_name));
1088 pipeline.push_back(
1089 new OpCalculateVectorFieldGradient<3, 3>(geom_field_name, jac));
1090 }
1091
1092 pipeline.push_back(new OpInvertMatrix<3>(jac, det, inv_jac));
1093 pipeline.push_back(new OpSetHOWeights(det));
1094
1095 for (auto s : spaces) {
1096 switch (s) {
1097 case NOSPACE:
1098 break;
1099 case H1:
1100 pipeline.push_back(new OpSetHOInvJacToScalarBases<3>(H1, inv_jac));
1101 break;
1102 case HCURL:
1103 pipeline.push_back(new OpSetHOCovariantPiolaTransform(HCURL, inv_jac));
1104 pipeline.push_back(new OpSetHOInvJacVectorBase(HCURL, inv_jac));
1105 break;
1106 case HDIV:
1107 pipeline.push_back(
1108 new OpSetHOContravariantPiolaTransform(HDIV, det, jac));
1109 break;
1110 case L2:
1111 pipeline.push_back(new OpSetHOInvJacToScalarBases<3>(L2, inv_jac));
1112 break;
1113 default:
1114 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
1115 "Space %s not yet implemented", FieldSpaceNames[s]);
1116 break;
1117 }
1118 }
1119
1121}
@ 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()

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