21 char umat_library[PETSC_MAX_PATH_LEN] =
"./umat.so";
23 "-umat_library", umat_library,
24 sizeof(umat_library), PETSC_NULLPTR);
26 if (std::filesystem::exists(std::filesystem::path(umat_library))) {
29 createMatOpsPhysicalEquationsPtr<UMAT, modelType>(
35 CHKERR m.second->getOptions(m_field_ptr);
41 for (
auto &rp :
m.second->paramVecByRange) {
53 bool has_ranges =
false;
56 has_ranges = has_ranges || !tag_range.second.empty();
62 CHKERR m.second->setParams(fe_ptr, gg);
70 CHKERR m.second->setParams(fe_ptr, gg);
76 "Meta elastic material parameters not found for entity %lu",
77 static_cast<unsigned long>(ent));
117 createMatOpsPhysicalEquationsPtr<ELASTICITY::NEOHOOKEAN, modelType>(
129 "MooneyRivlinWriggersEq63"))
146std::map<int, boost::shared_ptr<PhysicalEquations>> &
148 auto meta_elastic_3d_ptr =
149 boost::dynamic_pointer_cast<MatMetaElastic<3>>(meta_ptr);
150 if (meta_elastic_3d_ptr) {
151 return meta_elastic_3d_ptr->getMetaElasticMap();
153 auto meta_elastic_2d_ptr =
154 boost::dynamic_pointer_cast<MatMetaElastic<2>>(meta_ptr);
155 if (meta_elastic_2d_ptr) {
156 return meta_elastic_2d_ptr->getMetaElasticMap();
160 "Provided PhysicalEquations pointer is not of type MatMetaElastic");
161 static std::map<int, boost::shared_ptr<PhysicalEquations>> empty_map;
166boost::shared_ptr<PhysicalEquations>
168 boost::shared_ptr<MatOpsData> mat_ops_data_ptr,
int tag) {
169 return boost::make_shared<MatMetaElastic<3>>(mat_ops_data_ptr, tag);
173boost::shared_ptr<PhysicalEquations>
175 boost::shared_ptr<MatOpsData> mat_ops_data_ptr,
int tag) {
176 return boost::make_shared<MatMetaElastic<2>>(mat_ops_data_ptr, tag);
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_OPERATION_UNSUCCESSFUL
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
std::map< int, boost::shared_ptr< PhysicalEquations > > & getMetaElasticMap(boost::shared_ptr< PhysicalEquations > meta_ptr)
boost::shared_ptr< PhysicalEquations > createMatOpsPhysicalEquationsPtr< ELASTICITY::META, MODEL_2D_PLANE_STRAIN >(boost::shared_ptr< MatOpsData > mat_ops_data_ptr, int tag)
boost::shared_ptr< PhysicalEquations > createMatOpsPhysicalEquationsPtr(boost::shared_ptr< MatOpsData > mat_ops_data_ptr, int tag)
boost::shared_ptr< PhysicalEquations > createMatOpsPhysicalEquationsPtr< ELASTICITY::META, MODEL_3D >(boost::shared_ptr< MatOpsData > mat_ops_data_ptr, int tag)
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
PetscErrorCode PetscOptionsGetString(PetscOptions *, const char pre[], const char name[], char str[], size_t size, PetscBool *set)
FTensor::Index< 'm', 3 > m
boost::shared_ptr< std::map< int, Range > > tagVsRangePtr
boost::shared_ptr< MatOpsData > matOpsDataPtr
Deprecated interface functions.
Structure for user loop methods on finite elements.
EntityHandle getFEEntityHandle() const
Get the entity handle of the current finite element.