5 static char help[] =
"...\n\n";
7 int main(
int argc,
char *argv[]) {
14 ParallelComm *pcomm = ParallelComm::get_pcomm(&moab,
MYPCOMM_INDEX);
16 pcomm =
new ParallelComm(&moab, PETSC_COMM_WORLD);
24 char mesh_out_file[255] =
"out.h5m";
28 ierr = PetscOptionsBegin(PETSC_COMM_WORLD,
"",
"none",
"none");
31 CHKERR PetscOptionsString(
"-file_name",
"mesh file name",
"",
"mesh.h5m",
33 CHKERR PetscOptionsString(
"-output_file",
"output mesh file name",
"",
34 mesh_out_file, mesh_out_file, 255, PETSC_NULL);
35 CHKERR PetscOptionsInt(
"-dim",
"mesh dimension",
"", dim, &dim, PETSC_NULL);
38 ierr = PetscOptionsEnd();
41 if (flg_file != PETSC_TRUE)
42 SETERRQ(PETSC_COMM_SELF, 1,
43 "*** ERROR -my_file (-file_name) (MESH FILE NEEDED)");
46 MOFEM_LOG(
"WORLD", Sev::inform) <<
"Out file " << mesh_out_file;
47 MOFEM_LOG(
"WORLD", Sev::inform) <<
"Mesh dimension " << dim;
54 CHKERR moab.get_entities_by_dimension(0, dim, ents);
55 MOFEM_LOG(
"WORLD", Sev::verbose) <<
"Ents:\n" << ents;
57 Skinner skinner(&moab);
58 CHKERR skinner.find_skin(0, ents,
false, skin);
59 MOFEM_LOG(
"WORLD", Sev::verbose) <<
"Skin:\n" << skin;
62 CHKERR moab.create_meshset(MESHSET_SET, set);
63 CHKERR moab.add_entities(set, skin);
65 CHKERR moab.write_file(mesh_out_file,
"MOAB",
"", &set, 1);