499 {
501 try {
502 moab::Core moab;
507
508 CHKERR meshsets_manager->addMeshset(
BLOCKSET, 1001,
"MAT_NEOHOOKEAN");
509 CHKERR meshsets_manager->setMeshsetFromFile();
510 const auto block =
512 if (block.size() != 2 || !block.count("c10") || !block.count("k"))
514 "Atom requires MAT_NEOHOOKEAN JSON block 1001 with c10,k");
517 CHKERR checkNear(parameters.c10, 1.7, 1.e-14,
"reference C10");
518 CHKERR checkNear(parameters.bulkModulus, 8.5, 1.e-14,
"reference K");
519 PetscReal fd_step = 0., tolerance = 0.;
521 &fd_step, nullptr);
523 &tolerance, nullptr);
524 if (!std::isfinite(fd_step) || fd_step <= 0. || !std::isfinite(tolerance) ||
525 tolerance <= 0.)
527 "Atom requires positive finite JSON finite-difference settings");
528 CHKERR checkReference(parameters, tolerance);
529 CHKERR checkReference({parameters.c10, 0.1}, tolerance);
530 CHKERR checkSpectralStates(parameters, fd_step, tolerance);
531 CHKERR checkForwardReferences(parameters, fd_step, tolerance);
532 CHKERR checkLargeStress(parameters, tolerance);
533 CHKERR checkSmallDeviator(parameters, tolerance);
534 CHKERR checkEnergyScaling(tolerance);
535 CHKERR checkConditioning(parameters, tolerance);
536 CHKERR checkInvalidInputs(parameters);
538 PETSC_COMM_WORLD,
539 "Neo-Hookean auxiliary logarithmic stress atom passed\n");
540 }
543 return 0;
544}
#define CATCH_ERRORS
Catch errors.
@ MOFEM_ATOM_TEST_INVALID
#define CHKERR
Inline error check.
PetscErrorCode PetscOptionsGetReal(PetscOptions *, const char pre[], const char name[], PetscReal *dval, PetscBool *set)
static MoFEMErrorCode validateParameters(const Parameters ¶meters)
Check finite, strictly positive C10, K and representable mu = 2*C10.
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Deprecated interface functions.
std::map< std::string, double > getParamsFromBlockset(const std::string &type_name, int meshset_id) const
Interface for managing meshsets containing materials and boundary conditions.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.