Extrude prisms from surface elements block.
More...
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
Extrude prisms from surface elements block.
Definition in file extrude_prisms.cpp.
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 16 of file extrude_prisms.cpp.
24 char mesh_out_file[255] =
"out.h5m";
26 CHKERR 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_NULL);
31 ierr = PetscOptionsEnd();
36 "error -my_file (mesh file needed)");
40 ParallelComm *pcomm = ParallelComm::get_pcomm(&moab,
MYPCOMM_INDEX);
42 pcomm =
new ParallelComm(&moab, PETSC_COMM_WORLD);
55 const std::string extrude_block_name =
"EXTRUDE_PRISMS";
57 if (it->getName().compare(0, extrude_block_name.length(),
58 extrude_block_name) == 0) {
59 std::vector<double> thickness;
60 CHKERR it->getAttributes(thickness);
61 if (thickness.size() != 2)
63 "Data inconsistency");
65 CHKERR m_field.
get_moab().get_entities_by_type(it->meshset, MBTRI, tris,
69 tris, PrismsFromSurfaceInterface::NO_SWAP, block_prisms);
71 block_prisms, thickness[0], thickness[1]);
77 std::cout <<
"Extrude block " << it->getMeshsetId() <<
" set prisms "
78 << block_prisms.size() << endl;
82 CHKERR moab.write_file(mesh_out_file);
◆ help
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.