static char help[] =
"...\n\n";
int main(
int argc,
char *argv[]) {
try {
moab::Core mb_instance;
moab::Interface &moab = mb_instance;
int rank;
MPI_Comm_rank(PETSC_COMM_WORLD, &rank);
PetscBool flg = PETSC_TRUE;
#if PETSC_VERSION_GE(3, 6, 4)
255, &flg);
#else
CHKERR PetscOptionsGetString(PETSC_NULL, PETSC_NULL,
"-my_file",
#endif
if (flg != PETSC_TRUE) {
SETERRQ(PETSC_COMM_SELF, 1, "*** ERROR -my_file (MESH FILE NEEDED)");
}
const char *option;
option = "";
BitRefLevel bit_level0;
bit_level0.set(0);
0, 3, bit_level0);
int ii = 1;
for (; ii < 2; ii++) {
BitRefLevel bit_level1;
bit_level1.set(ii);
->getEntitiesByTypeAndRefLevel(bit_level0, BitRefLevel().set(),
MBEDGE, edges);
Range::iterator eit = edges.begin();
int num_nodes;
CHKERR moab.get_connectivity(*eit, conn, num_nodes,
true);
bit_level0);
CHKERR moab.create_meshset(MESHSET_SET, meshset_level1);
->getEntitiesByTypeAndRefLevel(bit_level1, BitRefLevel().set(), MBTET,
meshset_level1);
std::ostringstream ss;
ss << "node_merger_" << ii << ".vtk";
CHKERR moab.write_file(ss.str().c_str(),
"VTK",
"", &meshset_level1, 1);
bit_level0 = bit_level1;
}
BitRefLevel().set(ii - 1), BitRefLevel().set(), MBTET, tets);
std::cout << tets << std::endl;
if (tets.size() != 10) {
"diffrent number of tets than expected = %u", tets.size());
}
}
return 0;
}
#define CATCH_ERRORS
Catch errors.
@ MOFEM_ATOM_TEST_INVALID
#define CHKERR
Inline error check.
implementation of Data Operators for Forces and Sources
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.