9741 Range adj_side_elems;
9743 bit, &face, 1, 3, adj_side_elems, moab::Interface::INTERSECT,
QUIET);
9744 adj_side_elems = adj_side_elems.subset_by_type(MBTET);
9745 if (adj_side_elems.empty()) {
9746 Range adj_tets_on_surface;
9750 bit_tet_on_surface, &face, 1, 3, adj_tets_on_surface,
9751 moab::Interface::INTERSECT, 0);
9752 adj_side_elems.insert(*adj_tets_on_surface.begin());
9754 if (adj_side_elems.size() != 1) {
9755 adj_side_elems.clear();
9757 bit, &face, 1, 3, adj_side_elems, moab::Interface::INTERSECT,
9759 Range::iterator it = adj_side_elems.begin();
9760 for (; it != adj_side_elems.end(); it++) {
9762 CHKERR m_field.
get_moab().get_connectivity(&*it, 1, nodes,
true);
9763 PetscPrintf(PETSC_COMM_WORLD,
"Connectivity %lu %lu %lu %lu\n", nodes[0],
9764 nodes[1], nodes[2], nodes[3]);
9767 MPI_Comm_rank(m_field.
get_comm(), &rank);
9770 CHKERR m_field.
get_moab().create_meshset(MESHSET_SET, out_meshset);
9771 CHKERR m_field.
get_moab().add_entities(out_meshset, adj_side_elems);
9773 CHKERR m_field.
get_moab().write_file(
"debug_error.vtk",
"VTK",
"",
9778 "Expect 1 tet but is %u", adj_side_elems.size());
9781 if (side_elem != 0) {
9782 int side_number, sense, offset;
9783 CHKERR m_field.
get_moab().side_number(side_elem, face, side_number, sense,
9790 Tag th_interface_side;
9794 CHKERR m_field.
get_moab().tag_get_data(th_interface_side, &face, 1, &side);