16int main(
int argc,
char *argv[]) {
24 char mesh_out_file[255] =
"out.h5m";
26 PetscOptionsBegin(PETSC_COMM_WORLD,
"",
"Prism surface",
"none");
27 CHKERR PetscOptionsString(
"-my_file",
"mesh file name",
"",
"mesh.h5m",
29 CHKERR PetscOptionsString(
"-output_file",
"output mesh file name",
"",
30 "out.h5m", mesh_out_file, 255, PETSC_NULLPTR);
35 "error -my_file (mesh file needed)");
37 moab::Core mb_instance;
38 moab::Interface &moab = mb_instance;
39 ParallelComm *pcomm = ParallelComm::get_pcomm(&moab,
MYPCOMM_INDEX);
41 pcomm =
new ParallelComm(&moab, PETSC_COMM_WORLD);
54 const std::string extrude_block_name =
"EXTRUDE_PRISMS";
56 if (it->getName().compare(0, extrude_block_name.length(),
57 extrude_block_name) == 0) {
58 std::vector<double> thickness;
59 CHKERR it->getAttributes(thickness);
60 if (thickness.size() != 2)
62 "Data inconsistency");
64 CHKERR m_field.
get_moab().get_entities_by_type(it->meshset, MBTRI, tris,
70 block_prisms, thickness[0], thickness[1]);
76 std::cout <<
"Extrude block " << it->getMeshsetId() <<
" set prisms "
77 << block_prisms.size() << endl;
81 CHKERR moab.write_file(mesh_out_file);
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.