51 {
52
54
55 try {
56
57 moab::Core mb_instance;
58 moab::Interface &moab = mb_instance;
59 int rank;
60 MPI_Comm_rank(PETSC_COMM_WORLD, &rank);
61
62 PetscBool flg = PETSC_TRUE;
66 if (flg != PETSC_TRUE) {
67 SETERRQ(PETSC_COMM_SELF, 1, "*** ERROR -my_file (MESH FILE NEEDED)");
68 }
69
70 ParallelComm *pcomm = ParallelComm::get_pcomm(&moab,
MYPCOMM_INDEX);
71 if (pcomm == NULL)
72 pcomm = new ParallelComm(&moab, PETSC_COMM_WORLD);
73
74 const char *option;
75 option = "";
79
80
83
84
86 ref_level.set(0);
88 0, 3, ref_level);
89
90
91
92
95 &flg);
96 if (flg != PETSC_TRUE) {
98 }
99
100
102
104 CHKERR ufe.addFiniteElements(
"FLUXES",
"VALUES");
105
106
111 Skinner skin(&moab);
113 CHKERR skin.find_skin(0, tets,
false, skin_faces);
115 "MIX_BCVALUE");
116
117 CHKERR ufe.buildProblem(ref_level);
118 CHKERR ufe.createMatrices();
119 CHKERR ufe.solveLinearProblem();
120 CHKERR ufe.calculateResidual();
121 CHKERR ufe.evaluateError();
122
123 double nrm2_F;
124 CHKERR VecNorm(ufe.F, NORM_2, &nrm2_F);
125
126 const double eps = 1e-8;
129 "problem with residual");
130 }
131
132 CHKERR ufe.destroyMatrices();
133
134 }
136
138
139 return 0;
140}
#define BARRIER_PCOMM_RANK_END(PCMB)
set barrier start Run code in sequence, starting from process 0, and ends on last process.
#define CATCH_ERRORS
Catch errors.
#define MYPCOMM_INDEX
default communicator number PCOMM
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
@ MOFEM_ATOM_TEST_INVALID
#define BARRIER_PCOMM_RANK_START(PCMB)
set barrier start Run code in sequence, starting from process 0, and ends on last process.
#define CHKERR
Inline error check.
virtual MoFEMErrorCode add_ents_to_finite_element_by_type(const EntityHandle entities, const EntityType type, const std::string &name, const bool recursive=true)=0
add entities to finite element
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
PetscErrorCode PetscOptionsGetInt(PetscOptions *, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
PetscErrorCode PetscOptionsGetString(PetscOptions *, const char pre[], const char name[], char str[], size_t size, PetscBool *set)
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 refernce to pointer of interface.
Application of mix transport data structure.