20 {
22
24
25 PetscOptionsBegin(PETSC_COMM_WORLD, "mooneyrivlin_", "", "none");
27 PETSC_NULLPTR);
28 CHKERR PetscOptionsScalar(
"-beta",
"Beta",
"",
beta, &
beta, PETSC_NULLPTR);
29
31 PETSC_NULLPTR);
32
34 PETSC_NULLPTR);
35 PetscOptionsEnd();
36
41
42 std::string block_name = "MAT_MOONEY_RIVLIN";
43
45
46 m_field_ptr->getInterface<MeshsetsManager>()->
47
48 getCubitMeshsetPtr(
49 std::regex((boost::format(
"%s(.*)") % block_name).str()))
50
51 ) {
52
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()));
60 }
61 auto get_block_ents = [&]() {
64 m->meshset, ents,
true),
65 "can not get block entities");
66 return ents;
67 };
68
70 {get_block_ents(),
71 {block_data[0], block_data[1], block_data[2], block_data[3]}});
72
74 << *
m <<
" alpha = " << block_data[0] <<
" beta = " << block_data[1]
75 << " lambda = " << block_data[2] << " epsilon = " << block_data[3];
76 }
77
79 };
#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