15static char help[] =
"...\n\n";
18int main(
int argc,
char *argv[]) {
24 moab::Core mb_instance;
25 moab::Interface &moab = mb_instance;
27 MPI_Comm_rank(PETSC_COMM_WORLD, &rank);
30 PetscBool flg = PETSC_TRUE;
32#if PETSC_VERSION_GE(3, 6, 4)
39 if (flg != PETSC_TRUE) {
40 SETERRQ(PETSC_COMM_SELF, 1,
"*** ERROR -my_file (MESH FILE NEEDED)");
61 for (; ii < 2; ii++) {
69 ->getEntitiesByTypeAndRefLevel(bit_level0,
BitRefLevel().set(),
71 Range::iterator eit = edges.begin();
75 CHKERR moab.get_connectivity(*eit, conn, num_nodes,
true);
80 CHKERR moab.create_meshset(MESHSET_SET, meshset_level1);
82 ->getEntitiesByTypeAndRefLevel(bit_level1,
BitRefLevel().set(), MBTET,
85 std::ostringstream ss;
86 ss <<
"node_merger_" << ii <<
".vtk";
89 CHKERR moab.write_file(ss.str().c_str(),
"VTK",
"", &meshset_level1, 1);
90 bit_level0 = bit_level1;
97 std::cout << tets << std::endl;
98 if (tets.size() != 10) {
100 "diffrent number of tets than expected = %u", tets.size());
#define CATCH_ERRORS
Catch errors.
@ MOFEM_ATOM_TEST_INVALID
#define CHKERR
Inline error check.
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
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.
Merge node by collapsing edge between them.
MoFEMErrorCode mergeNodes(EntityHandle father, EntityHandle mother, Range &out_tets, Range *tets_ptr=NULL, const bool only_if_improve_quality=false, const double move=0, const int line_search=0, Tag th=NULL, const int verb=0)
merge nodes which sharing edge
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.