19 {
21
23
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);
27 PetscOptionsEnd();
28
30 <<
" C10 = " <<
C10 <<
" K = " <<
K;
32
33 std::string block_name = "MAT_NEOHOOKEAN";
34
36
37 m_field_ptr->getInterface<MeshsetsManager>()->
38
39 getCubitMeshsetPtr(
40 std::regex((
boost::format(
"%s(.*)") % block_name).str()))
41
42 ) {
43
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");
49 }
50 auto get_block_ents = [&]() {
53 m->meshset, ents,
true),
54 "can not get block entities");
55 return ents;
56 };
57
59 {get_block_ents(), {block_data[0], block_data[1]}});
60
62 << *
m <<
" C10 = " << block_data[0] <<
" K = " << block_data[1];
63 }
64
66 };
#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