7 {
9 "Displacement block name parsing\n");
10 try {
11 moab::Core moab_core;
19 CHKERR meshsets->setMeshsetFromFile();
20 CHKERR config->applyMeshsets();
21
23
26 false);
27 const auto &blocks = bc_manager->getBcMapByBlockName();
28 const auto all_it = blocks.find("_P_FIX_ALL_FIX_Z_5");
29 const auto z_it = blocks.find("_P_FIX_Z_FIX_ALL_6");
30 if (all_it == blocks.end() || z_it == blocks.end() ||
31 !all_it->second->dispBcPtr || !z_it->second->dispBcPtr)
33 "Missing displacement BC data for generated JSON names");
34 const auto &all = all_it->second->dispBcPtr->data;
35 const auto &z = z_it->second->dispBcPtr->data;
36 if (all.flag1 != 1 || all.flag2 != 1 || all.flag3 != 1 ||
37 all.value1 != 1.0 || all.value2 != 2.0 || all.value3 != 3.0)
38 SETERRQ(
40 "FIX_ALL must constrain x, y and z despite the FIX_Z source name");
41 if (z.flag1 != 0 || z.flag2 != 0 || z.flag3 != 1 || z.value3 != 6.0)
43 "FIX_Z must constrain only z despite the FIX_ALL source name");
44 }
47 return 0;
48}
#define CATCH_ERRORS
Catch errors.
@ MOFEM_ATOM_TEST_INVALID
#define CHKERR
Inline error check.
MoFEMErrorCode addMeshset(const CubitBCType cubit_bc_type, const int ms_id, const std::string name="")
Add CUBIT meshset to manager.
MoFEMErrorCode pushMarkDOFsOnEntities(const std::string problem_name, const std::string block_name, const std::string field_name, int lo, int hi, bool get_low_dim_ents=true)
Mark DOFs on block entities for boundary conditions.
Template specialization for displacement boundary conditions.
Boundary condition manager for finite element problem setup.
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.
MoFEMErrorCode getSubInterfaceOptions()
Interface for managing meshsets containing materials and boundary conditions.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.