#include <Intx2Mesh.hpp>
Inheritance diagram for moab::Intx2Mesh:
Collaboration diagram for moab::Intx2Mesh:Protected Attributes | |
| Interface * | mb |
| EntityHandle | mbs1 |
| EntityHandle | mbs2 |
| Range | rs1 |
| Range | rs2 |
| EntityHandle | outSet |
| Tag | gid |
| Tag | TgtFlagTag |
| Range | TgtEdges |
| Tag | tgtParentTag |
| Tag | srcParentTag |
| Tag | countTag |
| Tag | srcNeighTag |
| Tag | tgtNeighTag |
| Tag | neighTgtEdgeTag |
| Tag | orgSendProcTag |
| Tag | imaskTag |
| for coverage mesh, will store the original sender More... | |
| const EntityHandle * | tgtConn |
| const EntityHandle * | srcConn |
| CartVect | tgtCoords [MAXEDGES] |
| CartVect | srcCoords [MAXEDGES] |
| double | tgtCoords2D [MAXEDGES2] |
| double | srcCoords2D [MAXEDGES2] |
| std::vector< std::vector< EntityHandle > * > | extraNodesVec |
| double | epsilon_1 |
| double | epsilon_area |
| std::vector< double > | allBoxes |
| double | box_error |
| EntityHandle | localRoot |
| Range | localEnts |
| unsigned int | my_rank |
| int | max_edges_1 |
| int | max_edges_2 |
| int | counting |
Definition at line 55 of file Intx2Mesh.hpp.
| moab::Intx2Mesh::Intx2Mesh | ( | Interface * | mbimpl | ) |
Definition at line 42 of file Intx2Mesh.cpp.
References gid, and moab::Interface::globalId_tag().
|
virtual |
Definition at line 57 of file Intx2Mesh.cpp.
| void moab::Intx2Mesh::clean | ( | ) |
Definition at line 1000 of file Intx2Mesh.cpp.
References moab::Range::begin(), counting, moab::Range::end(), extraNodesVec, mb, moab::Interface::tag_delete(), TgtEdges, and TgtFlagTag.
Referenced by intersect_meshes(), and intersect_meshes_kdtree().
|
pure virtual |
Implemented in moab::IntxRllCssphere, moab::Intx2MeshOnSphere, and moab::Intx2MeshInPlane.
Referenced by intersect_meshes(), and intersect_meshes_kdtree().
| void moab::Intx2Mesh::correct_polygon | ( | EntityHandle * | foundIds, |
| int & | nP | ||
| ) |
Definition at line 1018 of file Intx2Mesh.cpp.
Referenced by moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), and moab::IntxRllCssphere::findNodes().
| ErrorCode moab::Intx2Mesh::create_departure_mesh_2nd_alg | ( | EntityHandle & | euler_set, |
| EntityHandle & | covering_lagr_set | ||
| ) |
| ErrorCode moab::Intx2Mesh::create_departure_mesh_3rd_alg | ( | EntityHandle & | lagr_set, |
| EntityHandle & | covering_set | ||
| ) |
|
virtual |
Definition at line 107 of file Intx2Mesh.cpp.
References moab::Range::begin(), countTag, DetermineOrderedNeighbors(), moab::Range::end(), extraNodesVec, moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), moab::Interface::INTERSECT, max_edges_1, max_edges_2, mb, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_BIT, MB_TYPE_HANDLE, MB_TYPE_INTEGER, mbs1, mbs2, neighTgtEdgeTag, rs2, moab::Range::size(), srcNeighTag, srcParentTag, moab::Interface::tag_delete(), moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), tgtConn, TgtEdges, TgtFlagTag, tgtNeighTag, tgtParentTag, and moab::Interface::UNION.
Referenced by intersect_meshes().
| ErrorCode moab::Intx2Mesh::DetermineOrderedNeighbors | ( | EntityHandle | inputSet, |
| int | max_edges, | ||
| Tag & | neighTag | ||
| ) |
Definition at line 194 of file Intx2Mesh.cpp.
References moab::Range::begin(), moab::Interface::contains_entities(), moab::Range::end(), moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), moab::Interface::get_entities_by_dimension(), moab::Interface::INTERSECT, moab::Interface::list_entities(), mb, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_HANDLE, moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by createTags().
Definition at line 981 of file Intx2Mesh.cpp.
References moab::Range::begin(), moab::Range::end(), imaskTag, moab::Range::insert(), mb, MB_CHK_SET_ERR, MB_SUCCESS, moab::Range::size(), moab::subtract(), and moab::Interface::tag_get_data().
Referenced by intersect_meshes(), and intersect_meshes_kdtree().
|
virtual |
Definition at line 99 of file Intx2Mesh.cpp.
References FindMaxEdgesInSet(), max_edges_1, max_edges_2, MB_CHK_SET_ERR, and MB_SUCCESS.
Referenced by moab::TempestRemapper::ConstructCoveringSet(), and main().
|
virtual |
Definition at line 69 of file Intx2Mesh.cpp.
References moab::Range::begin(), moab::Range::end(), moab::Interface::get_connectivity(), moab::Interface::get_entities_by_dimension(), mb, MB_CHK_SET_ERR, and MB_SUCCESS.
Referenced by FindMaxEdges().
|
pure virtual |
Implemented in moab::IntxRllCssphere, moab::Intx2MeshOnSphere, and moab::Intx2MeshInPlane.
Referenced by intersect_meshes(), and intersect_meshes_kdtree().
| ErrorCode moab::Intx2Mesh::intersect_meshes | ( | EntityHandle | mbs1, |
| EntityHandle | mbs2, | ||
| EntityHandle & | outputSet | ||
| ) |
Definition at line 555 of file Intx2Mesh.cpp.
References moab::Range::begin(), moab::AdaptiveKDTree::build_tree(), clean(), moab::Range::clear(), computeIntersectionBetweenTgtAndSrc(), counting, createTags(), moab::AdaptiveKDTree::distance_search(), moab::Range::empty(), moab::Range::end(), epsilon_1, moab::Range::erase(), ErrorCode, filterByMask(), findNodes(), moab::Range::front(), moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Interface::get_entities_by_dimension(), gid, moab::Interface::id_from_handle(), imaskTag, moab::Range::index(), moab::Range::insert(), moab::intersect(), MAXEDGES, mb, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, mbs1, mbs2, moab::Range::merge(), my_rank, outSet, moab::AdaptiveKDTree::parse_options(), moab::Range::pop_front(), moab::Range::rbegin(), moab::Range::rend(), rs1, rs2, setup_tgt_cell(), moab::Range::size(), srcNeighTag, moab::subtract(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), TgtFlagTag, tgtNeighTag, and moab::Interface::write_mesh().
Referenced by moab::TempestRemapper::ComputeOverlapMesh(), and main().
| ErrorCode moab::Intx2Mesh::intersect_meshes_kdtree | ( | EntityHandle | mbset1, |
| EntityHandle | mbset2, | ||
| EntityHandle & | outputSet | ||
| ) |
Slow KD-tree-based mesh intersection routine (no advancing-front).
Overview:
outSet via findNodes.intersect_meshes.Inputs/Assumptions:
mbset1 (source) fully covers mbset2 (target) on the sphere.High-level Steps: 1) Cache 2D entities of source (rs1) and target (rs2). Optionally filter by GRID_IMASK tag to exclude masked-out elements. 2) Precompute and tag target-edge adjacency (__tgtEdgeNeighbors) for quick access when locating/creating intersection points on target boundaries. 3) Estimate tolerances: compute maximum source edge length to derive KD-tree search tolerance and box overlap epsilon; reduce across ranks under MPI. 4) Build an AdaptiveKDTree on the source faces with spherical options (PLANE_SET=1;SPLITS_PER_DIR=2;SPHERICAL;RADIUS=1.0;). 5) For each target face:
av_len.kd.distance_search within radius av_len to collect nearby KD-tree leaves; accumulate their contained 2D source faces into close_source_cells.computeIntersectionBetweenTgtAndSrc to compute polygon intersection points and area; if area > 0, call findNodes to create nodes/polygons in outSet.resolve_intersection_sharing. 7) Cleanup transient state and return.Complexity Notes:
av_len) aims to limit candidates; worst-case behavior can still approach quadratic if meshes overlap densely.Key Data/Tags:
tgtParentTag, srcParentTag, countTag maintain provenance and counters for created intersection entities; they are (re)created in this routine.__tgtEdgeNeighbors stores per-target-face edge handles to speed boundary ops.Error handling:
ErrorCode propagation.Definition at line 322 of file Intx2Mesh.cpp.
References moab::Range::begin(), box_error, moab::AdaptiveKDTree::build_tree(), clean(), moab::Range::clear(), computeIntersectionBetweenTgtAndSrc(), counting, countTag, moab::AdaptiveKDTree::distance_search(), edge_length(), moab::Range::empty(), moab::Range::end(), epsilon_1, ErrorCode, extraNodesVec, filterByMask(), findNodes(), moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Interface::get_entities_by_dimension(), gid, moab::Interface::id_from_handle(), imaskTag, moab::index, moab::Interface::INTERSECT, max_edges_1, max_edges_2, MAXEDGES, mb, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_HANDLE, MB_TYPE_INTEGER, mbs1, mbs2, moab::Range::merge(), my_rank, neighTgtEdgeTag, outSet, moab::AdaptiveKDTree::parse_options(), rs1, rs2, setup_tgt_cell(), moab::Range::size(), srcParentTag, moab::Interface::tag_delete(), moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), tgtConn, TgtEdges, tgtParentTag, moab::tolerance, and moab::Interface::UNION.
Referenced by moab::TempestRemapper::ComputeOverlapMesh(), and main().
|
inline |
Definition at line 138 of file Intx2Mesh.hpp.
References box_error.
Referenced by moab::TempestRemapper::ConstructCoveringSet(), and main().
|
inline |
Definition at line 121 of file Intx2Mesh.hpp.
References epsilon_1, and epsilon_area.
Referenced by moab::TempestRemapper::ConstructCoveringSet(), and main().
|
pure virtual |
Implemented in moab::IntxRllCssphere, moab::Intx2MeshOnSphere, and moab::Intx2MeshInPlane.
Referenced by intersect_meshes(), and intersect_meshes_kdtree().
|
protected |
Definition at line 249 of file Intx2Mesh.hpp.
|
protected |
|
protected |
Definition at line 265 of file Intx2Mesh.hpp.
Referenced by clean(), moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), intersect_meshes(), and intersect_meshes_kdtree().
|
protected |
Definition at line 216 of file Intx2Mesh.hpp.
Referenced by createTags(), moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), and intersect_meshes_kdtree().
|
protected |
Definition at line 246 of file Intx2Mesh.hpp.
Referenced by moab::Intx2MeshInPlane::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), intersect_meshes(), intersect_meshes_kdtree(), and set_error_tolerance().
|
protected |
Definition at line 247 of file Intx2Mesh.hpp.
Referenced by moab::Intx2MeshInPlane::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc(), and set_error_tolerance().
|
protected |
Definition at line 244 of file Intx2Mesh.hpp.
Referenced by clean(), createTags(), moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), and intersect_meshes_kdtree().
|
protected |
Definition at line 205 of file Intx2Mesh.hpp.
Referenced by moab::Intx2MeshEdges::EdgeSplits(), moab::Intx2MeshOnSphere::findNodes(), intersect_meshes(), intersect_meshes_kdtree(), Intx2Mesh(), and moab::Intx2MeshOnSphere::update_tracer_data().
|
protected |
for coverage mesh, will store the original sender
Definition at line 226 of file Intx2Mesh.hpp.
Referenced by filterByMask(), intersect_meshes(), and intersect_meshes_kdtree().
|
protected |
Definition at line 253 of file Intx2Mesh.hpp.
|
protected |
Definition at line 252 of file Intx2Mesh.hpp.
|
protected |
Definition at line 263 of file Intx2Mesh.hpp.
Referenced by moab::TempestRemapper::ConstructCoveringSet(), createTags(), FindMaxEdges(), and intersect_meshes_kdtree().
|
protected |
Definition at line 264 of file Intx2Mesh.hpp.
Referenced by moab::TempestRemapper::ConstructCoveringSet(), createTags(), FindMaxEdges(), and intersect_meshes_kdtree().
|
protected |
Definition at line 197 of file Intx2Mesh.hpp.
Referenced by clean(), moab::Intx2MeshInPlane::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc(), createTags(), DetermineOrderedNeighbors(), moab::Intx2MeshEdges::EdgeSplits(), filterByMask(), FindMaxEdgesInSet(), moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), intersect_meshes(), intersect_meshes_kdtree(), moab::Intx2MeshEdges::orderSubEdges(), moab::Intx2MeshInPlane::setup_tgt_cell(), moab::Intx2MeshOnSphere::setup_tgt_cell(), moab::IntxRllCssphere::setup_tgt_cell(), and moab::Intx2MeshOnSphere::update_tracer_data().
|
protected |
Definition at line 199 of file Intx2Mesh.hpp.
Referenced by createTags(), intersect_meshes(), and intersect_meshes_kdtree().
|
protected |
Definition at line 200 of file Intx2Mesh.hpp.
Referenced by createTags(), moab::Intx2MeshEdges::EdgeSplits(), intersect_meshes(), and intersect_meshes_kdtree().
|
protected |
Definition at line 254 of file Intx2Mesh.hpp.
Referenced by moab::Intx2MeshOnSphere::findNodes(), intersect_meshes(), intersect_meshes_kdtree(), and moab::Intx2MeshOnSphere::update_tracer_data().
|
protected |
Definition at line 223 of file Intx2Mesh.hpp.
Referenced by createTags(), moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), and intersect_meshes_kdtree().
|
protected |
Definition at line 225 of file Intx2Mesh.hpp.
Referenced by moab::Intx2MeshOnSphere::findNodes().
|
protected |
Definition at line 204 of file Intx2Mesh.hpp.
Referenced by moab::Intx2MeshEdges::EdgeSplits(), moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), intersect_meshes(), and intersect_meshes_kdtree().
|
protected |
Definition at line 201 of file Intx2Mesh.hpp.
Referenced by moab::Intx2MeshInPlane::findNodes(), moab::IntxRllCssphere::findNodes(), intersect_meshes(), intersect_meshes_kdtree(), and moab::Intx2MeshOnSphere::update_tracer_data().
|
protected |
Definition at line 202 of file Intx2Mesh.hpp.
Referenced by createTags(), moab::Intx2MeshInPlane::findNodes(), moab::IntxRllCssphere::findNodes(), intersect_meshes(), intersect_meshes_kdtree(), and moab::Intx2MeshOnSphere::update_tracer_data().
|
protected |
Definition at line 231 of file Intx2Mesh.hpp.
Referenced by moab::Intx2MeshInPlane::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), and moab::IntxRllCssphere::findNodes().
Definition at line 233 of file Intx2Mesh.hpp.
Referenced by moab::Intx2MeshInPlane::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), and moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc().
|
protected |
Definition at line 235 of file Intx2Mesh.hpp.
Referenced by moab::Intx2MeshInPlane::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), and moab::IntxRllCssphere::findNodes().
|
protected |
Definition at line 218 of file Intx2Mesh.hpp.
Referenced by createTags(), and intersect_meshes().
|
protected |
Definition at line 215 of file Intx2Mesh.hpp.
Referenced by createTags(), moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), intersect_meshes_kdtree(), and moab::Intx2MeshOnSphere::update_tracer_data().
|
protected |
Definition at line 230 of file Intx2Mesh.hpp.
Referenced by createTags(), moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), intersect_meshes_kdtree(), moab::Intx2MeshInPlane::setup_tgt_cell(), moab::Intx2MeshOnSphere::setup_tgt_cell(), and moab::IntxRllCssphere::setup_tgt_cell().
Definition at line 232 of file Intx2Mesh.hpp.
Referenced by moab::Intx2MeshInPlane::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshInPlane::setup_tgt_cell(), moab::Intx2MeshOnSphere::setup_tgt_cell(), and moab::IntxRllCssphere::setup_tgt_cell().
|
protected |
Definition at line 234 of file Intx2Mesh.hpp.
Referenced by moab::Intx2MeshInPlane::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), moab::Intx2MeshInPlane::setup_tgt_cell(), moab::Intx2MeshOnSphere::setup_tgt_cell(), and moab::IntxRllCssphere::setup_tgt_cell().
|
protected |
Definition at line 210 of file Intx2Mesh.hpp.
Referenced by clean(), createTags(), moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), and intersect_meshes_kdtree().
|
protected |
Definition at line 208 of file Intx2Mesh.hpp.
Referenced by clean(), createTags(), and intersect_meshes().
|
protected |
Definition at line 220 of file Intx2Mesh.hpp.
Referenced by createTags(), and intersect_meshes().
|
protected |
Definition at line 214 of file Intx2Mesh.hpp.
Referenced by createTags(), moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), intersect_meshes_kdtree(), and moab::Intx2MeshOnSphere::update_tracer_data().