#include <SaveVertexDofOnTag.hpp>
static char help[] =
"...\n\n";
int main(
int argc,
char *argv[]) {
try {
PetscBool flg_file = PETSC_FALSE;
char field_name_param[255] = "RHO";
CHKERR PetscOptionsBegin(PETSC_COMM_WORLD,
"",
"Field to vertices options",
"none");
CHKERR PetscOptionsString(
"-my_file",
"mesh file name",
"",
"mesh.h5m",
CHKERR PetscOptionsString(
"-my_field",
"field name",
"",
"FIELD",
field_name_param, 255, PETSC_NULL);
ParallelComm *pcomm = ParallelComm::get_pcomm(&moab,
MYPCOMM_INDEX);
if (pcomm == NULL)
pcomm = new ParallelComm(&moab, PETSC_COMM_WORLD);
const char *option;
option = "";
if (flg_file != PETSC_TRUE) {
"*** ERROR -my_file (MESH FILE NEEDED)");
}
bit_level0.set(0);
0, 3, bit_level0);
bool field_flg = false;
for(auto field : (*fields_ptr)) {
bool check_space = field->getSpace() ==
H1;
if(field->getName() ==
field_name && check_space) field_flg =
true;
}
if (!field_flg) {
"*** ERROR -my_field (FIELD (in H1 space) is NOT FOUND)");
}
PetscPrintf(PETSC_COMM_WORLD, "\nDone. Saving files... \n");
bit_level0,
BitRefLevel().set(), MBTET,
"out_mesh.vtk",
"VTK",
"");
CHKERR moab.write_file(
"out.h5m");
}
return 0;
}
virtual MoFEMErrorCode loop_dofs(const Problem *problem_ptr, const std::string &field_name, RowColData rc, DofMethod &method, int lower_rank, int upper_rank, int verb=DEFAULT_VERBOSITY)=0
Make a loop over dofs.
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.