25 PetscOptionsBegin(PETSC_COMM_WORLD,
"mooneyrivlin_",
"",
"none");
28 CHKERR PetscOptionsScalar(
"-beta",
"Beta",
"",
beta, &
beta, PETSC_NULLPTR);
42 std::string block_name =
"MAT_MOONEY_RIVLIN";
46 m_field_ptr->getInterface<MeshsetsManager>()->
49 std::regex((boost::format(
"%s(.*)") % block_name).str()))
53 std::vector<double> block_data;
54 CHKERR m->getAttributes(block_data);
55 if (block_data.size() < 4) {
57 "Expected that block has four attributes (alpha, "
58 "beta, lambda, epsilon), but given " +
59 std::to_string(block_data.size()));
61 auto get_block_ents = [&]() {
64 m->meshset, ents,
true),
65 "can not get block entities");
71 {block_data[0], block_data[1], block_data[2], block_data[3]}});
74 << *
m <<
" alpha = " << block_data[0] <<
" beta = " << block_data[1]
75 <<
" lambda = " << block_data[2] <<
" epsilon = " << block_data[3];
83 const auto ent = fe_ptr->getFEEntityHandle();
85 if (std::find(range.begin(), range.end(), ent) != range.end()) {
86 set_param_vec(
A::tAg, param_vec.size(), param_vec.data());
109 auto t_F = getFTensor2FromPtr<DIM, DIM>(
111 auto t_P = getFTensor2FromPtr<DIM, DIM>(
136 auto p_alpha = mkparam(
alpha);
137 auto p_beta = mkparam(
beta);
138 auto p_lambda = mkparam(
lambda);
139 auto p_epsilon = mkparam(
epsilon);
141 ta_F(
i,
J) <<= t_F(
i,
J);
147 det_aF = determinantTensor(ta_F);
148 CHKERR invertTensor(ta_F, det_aF, ta_invF);
150 ta_Cof(
i,
I) = det_aF * ta_invF(
I,
i);
152 A = ta_F(
k, K) * ta_F(
k, K);
153 B = ta_Cof(
k, K) * ta_Cof(
k, K);
156 ta_BCof(
i,
I) = 4 *
beta * (
B * ta_Cof(
i,
I));
157 ta_Bj = (-12 *
alpha - 24 *
beta) / det_aF +
161 ta_P(
i,
I) = ta_BF(
i,
I);
162 ta_P(
i,
I) += (levi_civita(
i,
j,
k) * ta_BCof(
j,
J)) *
163 (levi_civita(
I,
J, K) * ta_F(
k, K));
164 ta_P(
i,
I) += ta_Cof(
i,
I) * ta_Bj;
167 ta_P(
i,
I) >>= t_P(
i,
I);
184boost::shared_ptr<PhysicalEquations>
186 boost::shared_ptr<MatOpsData> mat_ops_data_ptr,
int tag) {
187 return boost::make_shared<MatMooneyRivlinWriggersEq63<3>>(mat_ops_data_ptr,
192boost::shared_ptr<PhysicalEquations>
195 boost::shared_ptr<MatOpsData> mat_ops_data_ptr,
int tag) {
196 return boost::make_shared<MatMooneyRivlinWriggersEq63<2>>(mat_ops_data_ptr,
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
#define FTENSOR_INDEX(DIM, I)
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'J', DIM1 > J
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
boost::shared_ptr< PhysicalEquations > createMatOpsPhysicalEquationsPtr< ELASTICITY::MOONEYRIVLINWRIGGERSEQ63, MODEL_3D >(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)
constexpr IntegrationType I
FTensor::Index< 'm', 3 > m
static bool useDeformationGradient
MoFEMErrorCode getOptions(MoFEM::Interface *m_field_ptr=nullptr) override
MoFEMErrorCode recordTape() override
MoFEMErrorCode setParams(FEMethod *fe_ptr, int gg) override
std::vector< double > defaultMaterialParameters
std::vector< std::pair< Range, std::vector< double > > > paramVecByRange
boost::shared_ptr< MatOpsData > matOpsDataPtr
Deprecated interface functions.