v0.16.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
MatOps::MatNeohookean< DIM > Struct Template Reference
Inheritance diagram for MatOps::MatNeohookean< DIM >:
[legend]
Collaboration diagram for MatOps::MatNeohookean< DIM >:
[legend]

Public Types

using A = MatNeohookeanGeneric< MatElasticImpl< DIM > >
 
- Public Types inherited from MatOps::MatNeohookeanGeneric< MatElasticImpl< DIM > >
using A = MatElasticImpl< DIM >
 
- Public Types inherited from MatOps::PhysicalEquations
using HookFunction = std::function< MoFEMErrorCode(boost::shared_ptr< MatOpsData >, int, EntityHandle, int)>
 

Public Member Functions

MoFEMErrorCode setParams (FEMethod *fe_ptr, int gg) override
 
MoFEMErrorCode recordTape () override
 
- Public Member Functions inherited from MatOps::MatNeohookeanGeneric< MatElasticImpl< DIM > >
MoFEMErrorCode getOptions (MoFEM::Interface *m_field_ptr=nullptr) override
 
- Public Member Functions inherited from MatOps::MatElasticImpl< DIM >
ForcesAndSourcesCore::UserDataOperator * createOp (boost::shared_ptr< PhysicalEquations > physical_ptr, bool eval_stress, bool eval_tangent, bool update) override
 
ForcesAndSourcesCore::UserDataOperator * createOp (boost::shared_ptr< PhysicalEquations > physical_ptr, bool eval_stress, bool eval_tangent, bool update)
 
ForcesAndSourcesCore::UserDataOperator * createOp (boost::shared_ptr< PhysicalEquations > physical_ptr, bool eval_stress, bool eval_tangent, bool update)
 
- Public Member Functions inherited from MatOps::MatElastic
 PhysicalEquations ()=delete
 
 PhysicalEquations (boost::shared_ptr< MatOpsData > mat_ops_data_ptr, int tag, boost::shared_ptr< std::map< int, Range > > tag_vs_range_ptr=nullptr)
 
- Public Member Functions inherited from MatOps::PhysicalEquations
 PhysicalEquations ()=delete
 
 PhysicalEquations (boost::shared_ptr< MatOpsData > mat_ops_data_ptr, int tag, boost::shared_ptr< std::map< int, Range > > tag_vs_range_ptr=nullptr)
 
virtual ~PhysicalEquations ()=default
 
virtual MoFEMErrorCode evaluateVariable (int tag, EntityHandle entity, int gg)
 
virtual MoFEMErrorCode evaluateDerivatives (int tag, EntityHandle entity, int gg)
 
virtual MoFEMErrorCode updateState (int tag, EntityHandle entity, int gg)
 

Additional Inherited Members

- Public Attributes inherited from MatOps::PhysicalEquations
HookFunction hookEvaluateVariable = AdolCEvaluation::evaluateVariable
 
HookFunction hookEvaluateDerivatives = AdolCEvaluation::evaluateDerivatives
 
HookFunction hookUpdateState = AdolCEvaluation::evaluateVariable
 
int tAg
 
boost::shared_ptr< std::map< int, Range > > tagVsRangePtr
 
std::vector< std::pair< Range, std::vector< double > > > paramVecByRange
 
boost::shared_ptr< MatOpsDatamatOpsDataPtr
 
- Static Public Attributes inherited from MatOps::MatElastic
static bool useDeformationGradient
 
- Protected Attributes inherited from MatOps::MatNeohookeanGeneric< MatElasticImpl< DIM > >
double C10
 
double K
 
std::vector< doubledefaultMaterialParameters
 

Detailed Description

template<int DIM>
struct MatOps::MatNeohookean< DIM >

Definition at line 87 of file MatNeohookean.cpp.

Member Typedef Documentation

◆ A

template<int DIM>
using MatOps::MatNeohookean< DIM >::A = MatNeohookeanGeneric<MatElasticImpl<DIM> >

Definition at line 88 of file MatNeohookean.cpp.

Member Function Documentation

◆ recordTape()

template<int DIM>
MoFEMErrorCode MatOps::MatNeohookean< DIM >::recordTape ( )
inlineoverridevirtual

Implements MatOps::PhysicalEquations.

Definition at line 105 of file MatNeohookean.cpp.

105 {
107
108 A::matOpsDataPtr->insertCommonData("grad", MatrixDouble());
109 A::matOpsDataPtr->insertCommonData("P", MatrixDouble());
110 A::matOpsDataPtr->insertCommonData("P_dF", MatrixDouble());
111
112 A::matOpsDataPtr->insertActiveData("F", MatrixDouble());
113 A::matOpsDataPtr->insertDependentData("P", MatrixDouble());
114 A::matOpsDataPtr->insertDependentDerivativesData("P_dF", MatrixDouble());
115
116 A::matOpsDataPtr->getActiveDataPtr("F")->resize(DIM, DIM, false);
117 A::matOpsDataPtr->getDependentDataPtr("P")->resize(DIM, DIM, false);
118
119 auto t_F = getFTensor2FromPtr<DIM, DIM>(
120 A::matOpsDataPtr->getActiveDataPtr("F")->data().data());
121 auto t_P = getFTensor2FromPtr<DIM, DIM>(
122 A::matOpsDataPtr->getDependentDataPtr("P")->data().data());
123
125
126 FTENSOR_INDEX(DIM, i);
127 FTENSOR_INDEX(DIM, j);
128 FTENSOR_INDEX(DIM, I);
129 FTENSOR_INDEX(DIM, J);
130
131 t_F(i, J) = 0;
132
135
136 adouble det_aF;
138
139 trace_on(A::tAg);
140 auto p_c10 = mkparam(this->C10);
141 auto p_K = mkparam(this->K);
142
143 ta_F(i, J) <<= t_F(i, J);
144 // assume that gradient from approximated displacement, that why we add diagonal
146 ta_F(i, J) += t_kd(i, J);
147 }
148
149 det_aF = determinantTensor(ta_F);
150 CHKERR invertTensor(ta_F, det_aF, ta_invF);
151
152 ta_P(i, I) = 2. * p_c10 * (ta_F(i, I) - ta_invF(i, I)) +
153 p_K * log(det_aF) * ta_invF(i, I);
154
155 ta_P(i, I) >>= t_P(i, I);
156
157 trace_off();
158
160 }
#define FTENSOR_INDEX(DIM, I)
Kronecker Delta class.
#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()
#define CHKERR
Inline error check.
constexpr auto t_kd
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'J', DIM1 > J
Definition level_set.cpp:30
FTensor::Index< 'j', 3 > j
UBlasMatrix< double > MatrixDouble
Definition Types.hpp:77
constexpr IntegrationType I
static bool useDeformationGradient
boost::shared_ptr< MatOpsData > matOpsDataPtr
Definition MatOps.hpp:154

◆ setParams()

template<int DIM>
MoFEMErrorCode MatOps::MatNeohookean< DIM >::setParams ( FEMethod fe_ptr,
int  gg 
)
inlineoverridevirtual

Implements MatOps::PhysicalEquations.

Definition at line 91 of file MatNeohookean.cpp.

91 {
92 (void)gg;
93 const auto ent = fe_ptr->getFEEntityHandle();
94 for (auto &[range, param_vec] : A::paramVecByRange) {
95 if (std::find(range.begin(), range.end(), ent) != range.end()) {
96 set_param_vec(A::tAg, param_vec.size(), param_vec.data());
97 return 0;
98 }
99 }
100 set_param_vec(A::tAg, this->defaultMaterialParameters.size(),
101 this->defaultMaterialParameters.data());
102 return 0;
103 }
MatNeohookeanGeneric< MatElasticImpl< DIM > > A
std::vector< std::pair< Range, std::vector< double > > > paramVecByRange
Definition MatOps.hpp:152

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