121 {
123
124 const auto json_params =
125 m_field.
getInterface<JsonConfigManager>()->getParamsFromBlockset(
126 "MAT_NEOHOOKEAN", block_id);
127 std::vector<double> params;
128 if (!json_params.empty()) {
129 if (json_params.size() != 2 ||
130 json_params.find("c10") == json_params.end() ||
131 json_params.find("k") == json_params.end()) {
133 "Neohookean JSON block %s needs exactly C10 and K attributes",
134 block_name.c_str());
135 }
136 params = {json_params.at("c10"), json_params.at("k")};
137 } else {
138 if (block_data.size() < 2) {
140 "Neohookean block %s has %d attributes; expected C10 and K",
141 block_name.c_str(), static_cast<int>(block_data.size()));
142 }
143 params = {block_data[0], block_data[1]};
144 }
145
147 block_name.c_str());
148
149 A::paramVecByRange.push_back({block_entities, params});
150
152 << block_name << " C10 = " << params[0] << " K = " << params[1]
155
157 }
#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.