24 PetscOptionsBegin(PETSC_COMM_WORLD,
"neo_hookean_",
"",
"none");
25 CHKERR PetscOptionsScalar(
"-c10",
"C10",
"",
C10, &
C10, PETSC_NULLPTR);
26 CHKERR PetscOptionsScalar(
"-K",
"Bulk modulus K",
"",
K, &
K, PETSC_NULLPTR);
30 <<
" C10 = " <<
C10 <<
" K = " <<
K;
33 std::string block_name =
"MAT_NEOHOOKEAN";
37 m_field_ptr->getInterface<MeshsetsManager>()->
40 std::regex((boost::format(
"%s(.*)") % block_name).str()))
44 std::vector<double> block_data;
45 CHKERR m->getAttributes(block_data);
46 if (block_data.size() < 2) {
48 "Expected that block has two attribute");
50 auto get_block_ents = [&]() {
53 m->meshset, ents,
true),
54 "can not get block entities");
59 {get_block_ents(), {block_data[0], block_data[1]}});
62 << *
m <<
" C10 = " << block_data[0] <<
" K = " << block_data[1];
70 if (std::find(range.begin(), range.end(), ent) != range.end()) {
71 set_param_vec(
A::tAg, param_vec.size(), param_vec.data());
86 MatrixDouble(DIM * DIM, DIM * DIM));
91 "P_dF", MatrixDouble(DIM * DIM, DIM * DIM));
93 auto t_F = getFTensor2FromPtr<DIM, DIM>(
95 auto t_P = getFTensor2FromPtr<DIM, DIM>(
114 auto p_c10 = mkparam(
C10);
115 auto p_K = mkparam(
K);
117 ta_F(
i,
J) <<= t_F(
i,
J);
121 det_aF = determinantTensor(ta_F);
122 CHKERR invertTensor(ta_F, det_aF, ta_invF);
124 ta_P(
i,
I) = 2. * p_c10 * (ta_F(
i,
I) - ta_invF(
i,
I)) +
125 p_K * log(det_aF) * ta_invF(
i,
I);
127 ta_P(
i,
I) >>= t_P(
i,
I);
141boost::shared_ptr<PhysicalEquations>
143 boost::shared_ptr<ADolCData> adolc_data_ptr,
int tag) {
144 return boost::make_shared<AdolCNeohookean<3>>(adolc_data_ptr, tag);
148boost::shared_ptr<PhysicalEquations>
150 boost::shared_ptr<ADolCData> adolc_data_ptr,
int tag) {
151 return boost::make_shared<AdolCNeohookean<2>>(adolc_data_ptr, tag);
#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
boost::shared_ptr< PhysicalEquations > createAdolCPhysicalEquationsPtr< ELASTICITY::NEOHOOKEAN, MODEL_3D >(boost::shared_ptr< ADolCData > adolc_data_ptr, int tag)
boost::shared_ptr< PhysicalEquations > createAdolCPhysicalEquationsPtr< ELASTICITY::NEOHOOKEAN, MODEL_2D_PLANE_STRAIN >(boost::shared_ptr< ADolCData > adolc_data_ptr, int tag)
constexpr IntegrationType I
FTensor::Index< 'm', 3 > m
MoFEMErrorCode setParams(EntityHandle ent, int gg) override
std::vector< double > defaultMaterialParameters
MoFEMErrorCode getOptions(MoFEM::Interface *m_field_ptr=nullptr) override
MoFEMErrorCode recordTape() override
std::vector< std::pair< Range, std::vector< double > > > paramVecByRange
boost::shared_ptr< ADolCData > adolcDataPtr
Deprecated interface functions.