|
| v0.14.0
|
Go to the documentation of this file.
10 #include <SaveVertexDofOnTag.hpp>
12 using namespace MoFEM;
14 static char help[] =
"...\n\n";
16 int main(
int argc,
char *argv[]) {
23 PetscBool flg_file = PETSC_FALSE;
24 char field_name_param[255] =
"RHO";
25 CHKERR 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_NULL);
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");
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
#define MYPCOMM_INDEX
default communicator number PCOMM
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 Finalize()
Checks for options to be called at the conclusion of the program.
int main(int argc, char *argv[])
Deprecated interface functions.
DeprecatedCoreInterface Interface
#define CHKERR
Inline error check.
implementation of Data Operators for Forces and Sources
constexpr auto field_name
virtual const Field_multiIndex * get_fields() const =0
Get the fields object.
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.
#define CATCH_ERRORS
Catch errors.
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
virtual MoFEMErrorCode build_fields(int verb=DEFAULT_VERBOSITY)=0
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.