12int main(
int argc,
char *argv[]) {
17 moab::Core mb_instance;
18 moab::Interface &moab = mb_instance;
20 char mesh_file_name[255];
21 char mesh_out_file[255] =
"out.h5m";
22 PetscBool flg_file = PETSC_FALSE;
23 PetscOptionsBegin(PETSC_COMM_WORLD,
"",
"none",
"none");
24 CHKERR PetscOptionsString(
"-my_file",
"mesh file name",
"",
"mesh.h5m",
25 mesh_file_name, 255, &flg_file);
26 CHKERR PetscOptionsString(
"-file_name",
"mesh file name",
"",
"mesh.h5m",
27 mesh_file_name, 255, &flg_file);
28 CHKERR PetscOptionsString(
"-output_file",
"output mesh file name",
"",
29 "out.h5m", mesh_out_file, 255, PETSC_NULLPTR);
34 CHKERR moab.load_file(mesh_file_name, 0, option);
36 ParallelComm *pcomm = ParallelComm::get_pcomm(&moab,
MYPCOMM_INDEX);
38 pcomm =
new ParallelComm(&moab, PETSC_COMM_WORLD);
46 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.