114 {
116
117 const auto json_params =
118 m_field.
getInterface<JsonConfigManager>()->getParamsFromBlockset(
119 "MAT_NEOHOOKEAN", block_id);
120 std::vector<double> params;
121 if (!json_params.empty()) {
122 if (json_params.size() != 2 ||
123 json_params.find("c10") == json_params.end() ||
124 json_params.find("k") == json_params.end()) {
126 "Neohookean JSON block %s needs exactly C10 and K attributes",
127 block_name.c_str());
128 }
129 params = {json_params.at("c10"), json_params.at("k")};
130 } else {
131 if (block_data.size() < 2) {
133 "Neohookean block %s has %d attributes; expected C10 and K",
134 block_name.c_str(), static_cast<int>(block_data.size()));
135 }
136 params = {block_data[0], block_data[1]};
137 }
138
140
141 A::paramVecByRange.push_back({block_entities, params});
142
144 << block_name << " C10 = " << params[0] << " K = " << params[1]
147
149 }
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
static double getShearModulus(const double c10)
static MoFEMErrorCode validateMaterialParameters(const double c10, const double K, const char *source)
static double getAbaqusD1(const double K)
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.