20 {
22
24
25 PetscOptionsBegin(PETSC_COMM_WORLD, "stvenant_", "", "none");
26 CHKERR PetscOptionsScalar(
"-young_modulus",
"Young modulus",
"",
E, &
E,
27 PETSC_NULLPTR);
28 CHKERR PetscOptionsScalar(
"-poisson_ratio",
"poisson ratio",
"",
nu, &
nu,
29 PETSC_NULLPTR);
30 PetscOptionsEnd();
31
33 "Default StVenantKirchhoff parameters:")
34 <<
" E = " <<
E <<
" nu = " <<
nu;
36
37 std::string block_name = "MAT_STVENANTKIRCHHOFF";
38
40
41 m_field_ptr->getInterface<MeshsetsManager>()->
42
43 getCubitMeshsetPtr(
44 std::regex((boost::format(
"%s(.*)") % block_name).str()))
45
46 ) {
47
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");
53 }
54 auto get_block_ents = [&]() {
57 m->meshset, ents,
true),
58 "can not get block entities");
59 return ents;
60 };
61
63 {get_block_ents(), {block_data[0], block_data[1]}});
64
66 << *
m <<
" E = " << block_data[0] <<
" nu = " << block_data[1];
67 }
68
70 };
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
#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< 'm', 3 > m
std::vector< double > defaultMaterialParameters
std::vector< std::pair< Range, std::vector< double > > > paramVecByRange
virtual moab::Interface & get_moab()=0