v0.16.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
MatOps::MatNeohookeanGeneric< M > Struct Template Reference
Inheritance diagram for MatOps::MatNeohookeanGeneric< M >:
[legend]
Collaboration diagram for MatOps::MatNeohookeanGeneric< M >:
[legend]

Public Types

using A = M
 

Public Member Functions

MoFEMErrorCode getOptions (MoFEM::Interface *m_field_ptr=nullptr) override
 

Protected Attributes

double C10 = 1
 
double K = 1
 
std::vector< doubledefaultMaterialParameters = {C10, K}
 

Detailed Description

template<typename M>
struct MatOps::MatNeohookeanGeneric< M >

Definition at line 25 of file MatNeohookean.cpp.

Member Typedef Documentation

◆ A

template<typename M >
using MatOps::MatNeohookeanGeneric< M >::A = M

Definition at line 26 of file MatNeohookean.cpp.

Member Function Documentation

◆ getOptions()

template<typename M >
MoFEMErrorCode MatOps::MatNeohookeanGeneric< M >::getOptions ( MoFEM::Interface m_field_ptr = nullptr)
inlineoverride

Definition at line 29 of file MatNeohookean.cpp.

29 {
31
32 MOFEM_LOG_CHANNEL("WORLD");
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
41 MOFEM_TAG_AND_LOG("WORLD", Sev::inform, Options::defaultLogTag)
42 << " C10 = " << C10 << " K = " << K;
44
45 std::string block_name = "MAT_NEOHOOKEAN";
46
47 for (auto &m :
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 = [&]() {
63 Range ents;
64 CHK_MOAB_THROW(m_field_ptr->get_moab().get_entities_by_handle(
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
73 MOFEM_TAG_AND_LOG("WORLD", Sev::inform, Options::blockLogTag)
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
Definition definitions.h:31
#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

Member Data Documentation

◆ C10

template<typename M >
double MatOps::MatNeohookeanGeneric< M >::C10 = 1
protected

Definition at line 81 of file MatNeohookean.cpp.

◆ defaultMaterialParameters

template<typename M >
std::vector<double> MatOps::MatNeohookeanGeneric< M >::defaultMaterialParameters = {C10, K}
protected

Definition at line 83 of file MatNeohookean.cpp.

83{C10, K};

◆ K

template<typename M >
double MatOps::MatNeohookeanGeneric< M >::K = 1
protected

Definition at line 82 of file MatNeohookean.cpp.


The documentation for this struct was generated from the following file: