v0.16.0
Loading...
Searching...
No Matches
MatGenericElastic.cpp
Go to the documentation of this file.
1#include <MoFEM.hpp>
2
3using namespace MoFEM;
4
5#include "MatOps.hpp"
7
8namespace MatOps {
10GenericElastic::GenericElastic(boost::shared_ptr<MatOpsData> mat_ops_data_ptr,
11 int tag)
12 : PhysicalEquations(mat_ops_data_ptr, tag) {}
13
19
22 (void)fe_ptr;
23 (void)gg;
25}
26
29 matOpsDataPtr->insertCommonData("grad", MatrixDouble());
30 matOpsDataPtr->insertCommonData("P", MatrixDouble());
31 matOpsDataPtr->insertCommonData("P_dF", MatrixDouble());
32 matOpsDataPtr->insertActiveData("F", MatrixDouble());
33 matOpsDataPtr->insertDependentData("P", MatrixDouble());
34 matOpsDataPtr->insertDependentDerivativesData("P_dF", MatrixDouble());
36}
37
38template <int DIM> struct GenericElasticImpl : public GenericElastic {
41 createOp(boost::shared_ptr<PhysicalEquations> physical_ptr, bool eval_stress,
42 bool eval_tangent, bool update) {
45 physical_ptr, eval_stress, eval_tangent, update);
46 }
47};
48
49template <>
50boost::shared_ptr<PhysicalEquations>
52 boost::shared_ptr<MatOpsData> mat_ops_data_ptr, int tag) {
53 return boost::make_shared<GenericElasticImpl<3>>(mat_ops_data_ptr, tag);
54}
55
56template <>
57boost::shared_ptr<PhysicalEquations>
59 boost::shared_ptr<MatOpsData> mat_ops_data_ptr, int tag) {
60 return boost::make_shared<GenericElasticImpl<2>>(mat_ops_data_ptr, tag);
61}
62
63} // namespace MatOps
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
boost::shared_ptr< PhysicalEquations > createMatOpsPhysicalEquationsPtr< GenericElastic, MODEL_3D >(boost::shared_ptr< MatOpsData > mat_ops_data_ptr, int tag)
boost::shared_ptr< PhysicalEquations > createMatOpsPhysicalEquationsPtr< GenericElastic, MODEL_2D_PLANE_STRAIN >(boost::shared_ptr< MatOpsData > mat_ops_data_ptr, int tag)
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
UBlasMatrix< double > MatrixDouble
Definition Types.hpp:77
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
ForcesAndSourcesCore::UserDataOperator * createOp(boost::shared_ptr< PhysicalEquations > physical_ptr, bool eval_stress, bool eval_tangent, bool update)
MoFEMErrorCode getOptions(MoFEM::Interface *m_field_ptr=nullptr) override
MoFEMErrorCode setParams(FEMethod *fe_ptr, int gg) override
GenericElastic(boost::shared_ptr< MatOpsData > mat_ops_data_ptr, int tag=-1)
MoFEMErrorCode recordTape() override
boost::shared_ptr< MatOpsData > matOpsDataPtr
Definition MatOps.hpp:154
Deprecated interface functions.
Structure for user loop methods on finite elements.