29 {
31
33
34 using Options = MatNeohookeanOptions<A>;
35
36 PetscOptionsBegin(PETSC_COMM_WORLD, Options::optionsPrefix, "", "none");
37 CHKERR PetscOptionsScalar(
"-c10",
"C10",
"",
C10, &
C10, PETSC_NULLPTR);
38 CHKERR PetscOptionsScalar(
"-K",
"Bulk modulus K",
"",
K, &
K, PETSC_NULLPTR);
39 PetscOptionsEnd();
40
42 <<
" C10 = " <<
C10 <<
" K = " <<
K;
44
45 std::string block_name = "MAT_NEOHOOKEAN";
46
48
49 m_field_ptr->getInterface<MeshsetsManager>()->
50
51 getCubitMeshsetPtr(
52 std::regex((boost::format(
"%s(.*)") % block_name).str()))
53
54 ) {
55
56 std::vector<double> block_data;
57 CHKERR m->getAttributes(block_data);
58 if (block_data.size() < 2) {
60 "Expected that block has two attribute");
61 }
62 auto get_block_ents = [&]() {
65 m->meshset, ents,
true),
66 "can not get block entities");
67 return ents;
68 };
69
70 A::paramVecByRange.push_back(
71 {get_block_ents(), {block_data[0], block_data[1]}});
72
74 << *
m <<
" C10 = " << block_data[0] <<
" K = " << block_data[1];
75 }
76
78 };
#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
virtual moab::Interface & get_moab()=0