10#include <SaveVertexDofOnTag.hpp> 
   14static char help[] = 
"...\n\n";
 
   16int main(
int argc, 
char *argv[]) {
 
   23    PetscBool flg_file = PETSC_FALSE;
 
   24    char field_name_param[255] = 
"RHO";
 
   25    PetscOptionsBegin(PETSC_COMM_WORLD, 
"", 
"Field to vertices options", 
"none");
 
   26    CHKERR PetscOptionsString(
"-my_file", 
"mesh file name", 
"", 
"mesh.h5m",
 
   28    CHKERR PetscOptionsString(
"-my_field", 
"field name", 
"", 
"FIELD",
 
   29                              field_name_param, 255, PETSC_NULLPTR);
 
   34    moab::Core mb_instance;
 
   35    moab::Interface &moab = mb_instance;
 
   36    ParallelComm *pcomm = ParallelComm::get_pcomm(&moab, 
MYPCOMM_INDEX);
 
   38      pcomm = 
new ParallelComm(&moab, PETSC_COMM_WORLD);
 
   47    if (flg_file != PETSC_TRUE) {
 
   49              "*** ERROR -my_file (MESH FILE NEEDED)");
 
   57    bool field_flg = 
false;
 
   59    for(
auto field : (*fields_ptr)) {
 
   60      bool check_space = field->getSpace() == 
H1;
 
   61      if(field->getName() == 
field_name && check_space) field_flg = 
true;
 
   65              "*** ERROR -my_field (FIELD (in H1 space) is NOT FOUND)");
 
   72    PetscPrintf(PETSC_COMM_WORLD, 
"\nDone. Saving files... \n");
 
   76        bit_level0, 
BitRefLevel().set(), MBTET, 
"out_mesh.vtk", 
"VTK", 
"");
 
   77    CHKERR moab.write_file(
"out.h5m");
 
 
#define CATCH_ERRORS
Catch errors.
#define MYPCOMM_INDEX
default communicator number PCOMM
#define CHKERR
Inline error check.
virtual const Field_multiIndex * get_fields() const =0
Get the fields object.
virtual MoFEMErrorCode build_fields(int verb=DEFAULT_VERBOSITY)=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.
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
implementation of Data Operators for Forces and Sources
constexpr auto field_name
Save field DOFS on vertices/tags.
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Deprecated interface functions.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.