25 PetscOptionsBegin(PETSC_COMM_WORLD,
"stvenant_",
"",
"none");
26 CHKERR PetscOptionsScalar(
"-young_modulus",
"Young modulus",
"",
E, &
E,
28 CHKERR PetscOptionsScalar(
"-poisson_ratio",
"poisson ratio",
"",
nu, &
nu,
33 "Default StVenantKirchhoff parameters:")
34 <<
" E = " <<
E <<
" nu = " <<
nu;
37 std::string block_name =
"MAT_STVENANTKIRCHHOFF";
41 m_field_ptr->getInterface<MeshsetsManager>()->
44 std::regex((boost::format(
"%s(.*)") % block_name).str()))
48 std::vector<double> block_data;
49 CHKERR m->getAttributes(block_data);
50 if (block_data.size() < 2) {
52 "Expected that block has two attribute");
54 auto get_block_ents = [&]() {
57 m->meshset, ents,
true),
58 "can not get block entities");
63 {get_block_ents(), {block_data[0], block_data[1]}});
66 << *
m <<
" E = " << block_data[0] <<
" nu = " << block_data[1];
74 const auto ent = fe_ptr->getFEEntityHandle();
76 if (std::find(range.begin(), range.end(), ent) != range.end()) {
77 set_param_vec(
A::tAg, param_vec.size(), param_vec.data());
101 auto t_F = getFTensor2FromPtr<DIM, DIM>(
103 auto t_P = getFTensor2FromPtr<DIM, DIM>(
124 auto p_E = mkparam(
E);
125 auto p_nu = mkparam(
nu);
131 ((1. + nu_value) * (1. - 2. * nu_value));
140 auto lambda = calc_lambda(p_E, p_nu);
141 auto mu = calc_mu(p_E, p_nu);
143 ta_F(
i,
J) <<= t_F(
i,
J);
149 ta_C(
I,
J) = ta_F(
i,
I) * ta_F(
i,
J);
156 ta_P(
i,
J) = ta_F(
i,
I) * ta_S(
I,
J);
158 ta_P(
i,
I) >>= t_P(
i,
I);
172boost::shared_ptr<PhysicalEquations>
174 boost::shared_ptr<MatOpsData> mat_ops_data_ptr,
int tag) {
175 return boost::make_shared<MatStVenantKirchhoff<3>>(mat_ops_data_ptr, tag);
179boost::shared_ptr<PhysicalEquations>
182 boost::shared_ptr<MatOpsData> mat_ops_data_ptr,
int tag) {
183 return boost::make_shared<MatStVenantKirchhoff<2>>(mat_ops_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 > createMatOpsPhysicalEquationsPtr< ELASTICITY::STVENANTKIRCHHOFF, 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
std::vector< double > defaultMaterialParameters
MoFEMErrorCode setParams(FEMethod *fe_ptr, int gg) override
MoFEMErrorCode recordTape() override
MoFEMErrorCode getOptions(MoFEM::Interface *m_field_ptr=nullptr) override
std::vector< std::pair< Range, std::vector< double > > > paramVecByRange
boost::shared_ptr< MatOpsData > matOpsDataPtr
Deprecated interface functions.
double young_modulus
Young modulus.
double poisson_ratio
Poisson ratio.