#include <IntxUtils.hpp>
Classes | |
| struct | SphereCoords |
Static Public Member Functions | |
| static double | dist2 (double *a, double *b) |
| static double | area2D (double *a, double *b, double *c) |
| static int | borderPointsOfXinY2 (double *X, int nX, double *Y, int nY, double *P, int *side, double epsilon_area) |
| static int | SortAndRemoveDoubles2 (double *P, int &nP, double epsilon) |
| static ErrorCode | EdgeIntersections2 (double *blue, int nsBlue, double *red, int nsRed, int *markb, int *markr, double *points, int &nPoints) |
| static ErrorCode | EdgeIntxRllCs (double *blue, CartVect *bluec, int *blueEdgeType, int nsBlue, double *red, CartVect *redc, int nsRed, int *markb, int *markr, int plane, double Radius, double *points, int &nPoints) |
| static void | decide_gnomonic_plane (const CartVect &pos, int &oPlane) |
| static ErrorCode | gnomonic_projection (const CartVect &pos, double R, int plane, double &c1, double &c2) |
| static ErrorCode | gnomonic_projection_generalized (const CartVect &pos, const CartVect axis[3], double &c1, double &c2) |
| static ErrorCode | global_gnomonic_projection_general (Interface *mb, EntityHandle inSet, CartVect P, EntityHandle &outSet) |
| static ErrorCode | reverse_gnomonic_projection (const double &c1, const double &c2, double R, int plane, CartVect &pos) |
| static void | gnomonic_unroll (double &c1, double &c2, double R, int plane) |
| static ErrorCode | global_gnomonic_projection (Interface *mb, EntityHandle inSet, double R, bool centers_only, EntityHandle &outSet) |
| static ErrorCode | gnomonic_projection_plane_at_point (CartVect P, CartVect &u, CartVect &v) |
| static void | transform_coordinates (double *avg_position, int projection_type) |
| static SphereCoords | cart_to_spherical (CartVect &) |
| static CartVect | spherical_to_cart (SphereCoords &) |
| static ErrorCode | ScaleToRadius (Interface *mb, EntityHandle set, double R) |
| static double | distance_on_great_circle (CartVect &p1, CartVect &p2) |
| static ErrorCode | enforce_convexity (Interface *mb, EntityHandle set, int rank=0) |
| Enforces convexity for a given set of polygons. More... | |
| static double | oriented_spherical_angle (const double *A, const double *B, const double *C) |
| static ErrorCode | fix_degenerate_quads (Interface *mb, EntityHandle set) |
| static double | distance_on_sphere (double la1, double te1, double la2, double te2) |
| static ErrorCode | intersect_great_circle_arcs (double *A, double *B, double *C, double *D, double R, double *E) |
| static ErrorCode | intersect_great_circle_arc_with_clat_arc (double *A, double *B, double *C, double *D, double R, double *E, int &np) |
| static int | borderPointsOfCSinRLL (CartVect *redc, double *red2dc, int nsRed, CartVect *bluec, int nsBlue, int *blueEdgeType, double *P, int *side, double epsil) |
| static ErrorCode | deep_copy_set_with_quads (Interface *mb, EntityHandle source_set, EntityHandle dest_set) |
| static ErrorCode | remove_duplicate_vertices (Interface *mb, EntityHandle file_set, double merge_tol, std::vector< Tag > &tagList) |
| static ErrorCode | remove_padded_vertices (Interface *mb, EntityHandle file_set, std::vector< Tag > &tagList) |
| static ErrorCode | max_diagonal (Interface *mb, Range cells, int max_edges, double &diagonal) |
Definition at line 15 of file IntxUtils.hpp.
|
inlinestatic |
Definition at line 25 of file IntxUtils.hpp.
Referenced by moab::Intx2MeshInPlane::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshEdges::EdgeSplits(), moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), moab::IntxAreaUtils::positive_orientation(), moab::Intx2MeshInPlane::setup_tgt_cell(), moab::Intx2MeshOnSphere::setup_tgt_cell(), and moab::IntxRllCssphere::setup_tgt_cell().
|
static |
Definition at line 2200 of file IntxUtils.cpp.
Referenced by moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc().
|
static |
Computes the border points of X in Y2.
| X | The array of points representing X. |
| nX | The number of points in X. |
| Y | The array of points representing Y. |
| nY | The number of points in Y. |
| P | The array to store the border points of X in Y2. |
| side | The array to store the side information for each point in X. |
| epsilon_area | The epsilon value for area comparison. |
Definition at line 66 of file IntxUtils.cpp.
Referenced by moab::Intx2MeshInPlane::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), and moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc().
|
static |
Definition at line 1072 of file IntxUtils.cpp.
References moab::IntxUtils::SphereCoords::lat, moab::CartVect::length(), moab::IntxUtils::SphereCoords::lon, and moab::IntxUtils::SphereCoords::R.
Referenced by distance_on_great_circle(), and main().
|
static |
Definition at line 410 of file IntxUtils.cpp.
Referenced by moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshEdges::EdgeSplits(), global_gnomonic_projection(), gnomonic_projection_plane_at_point(), moab::Intx2MeshOnSphere::setup_tgt_cell(), moab::IntxRllCssphere::setup_tgt_cell(), transform_coordinates(), and moab::BoundBox::update_box_spherical_elem().
|
static |
Definition at line 2255 of file IntxUtils.cpp.
References moab::Range::begin(), CORRTAGNAME, moab::dum, moab::Range::end(), moab::ReadUtilIface::get_element_connect(), moab::ReadUtilIface::get_node_coords(), mb, MB_CHK_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_HANDLE, MBQUAD, moab::Range::size(), and moab::ReadUtilIface::update_adjacencies().
|
inlinestatic |
Definition at line 19 of file IntxUtils.hpp.
Referenced by moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), and SortAndRemoveDoubles2().
Definition at line 1546 of file IntxUtils.cpp.
References cart_to_spherical(), moab::IntxUtils::SphereCoords::lat, moab::IntxUtils::SphereCoords::lon, and moab::IntxUtils::SphereCoords::R.
|
static |
Definition at line 1791 of file IntxUtils.cpp.
|
static |
Computes the edge intersections of two elements.
| blue | The array of points representing the blue element. |
| nsBlue | The number of points in the blue element. |
| red | The array of points representing the red element. |
| nsRed | The number of points in the red element. |
| markb | The array to mark the intersecting edges of the blue element. |
| markr | The array to mark the intersecting edges of the red element. |
| points | The array to store the intersection points. |
| nPoints | The number of intersection points found. |
Definition at line 221 of file IntxUtils.cpp.
References MAXEDGES, and MB_SUCCESS.
Referenced by moab::Intx2MeshInPlane::computeIntersectionBetweenTgtAndSrc(), and moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc().
|
static |
Computes the edge intersections between a RLL and CS quad.
Note: Special function.
| blue | The array of points representing the blue element. |
| bluec | The array of Cartesian coordinates for the blue element. |
| blueEdgeType | The array of edge types for the blue element. |
| nsBlue | The number of points in the blue element. |
| red | The array of points representing the red element. |
| redc | The array of Cartesian coordinates for the red element. |
| nsRed | The number of points in the red element. |
| markb | The array to mark the intersecting edges of the blue element. |
| markr | The array to mark the intersecting edges of the red element. |
| plane | The plane of intersection. |
| R | The radius of the sphere. |
| points | The array to store the intersection points. |
| nPoints | The number of intersection points found. |
Definition at line 305 of file IntxUtils.cpp.
References moab::CartVect::array(), moab::E, gnomonic_projection(), intersect_great_circle_arc_with_clat_arc(), MB_SUCCESS, and moab::R.
Referenced by moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc().
|
static |
Enforces convexity for a given set of polygons.
This function checks each polygon in the input set and computes the angles of each vertex. If a reflex angle is found, the polygon is broken into triangles and added back to the set. This process continues until all polygons in the set are convex.
| mb | The interface to the MOAB instance. |
| lset | The handle of the input set containing the polygons. |
| my_rank | The rank of the local process. |
Definition at line 1568 of file IntxUtils.cpp.
References moab::angle(), moab::Range::begin(), CORRTAGNAME, moab::Range::end(), MAXEDGES, mb, MB_CHK_ERR, MB_SUCCESS, MB_TAG_DENSE, MB_TYPE_HANDLE, MBPOLYGON, MBTRI, and oriented_spherical_angle().
Referenced by main().
|
static |
Definition at line 1708 of file IntxUtils.cpp.
References moab::Range::begin(), moab::Range::end(), mb, MB_CHK_ERR, MB_SUCCESS, MBQUAD, and MBTRI.
Referenced by moab::TempestRemapper::ComputeOverlapMesh(), and main().
|
static |
Definition at line 840 of file IntxUtils.cpp.
References moab::CartVect::array(), moab::Range::begin(), center(), decide_gnomonic_plane(), moab::Range::empty(), moab::Range::end(), ErrorCode, gnomonic_projection(), gnomonic_unroll(), moab::Range::insert(), mb, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, MBENTITYSET, MBPOLYGON, MESHSET_SET, moab::R, ScaleToRadius(), and moab::Interface::UNION.
|
static |
Definition at line 716 of file IntxUtils.cpp.
References moab::CartVect::array(), moab::Range::begin(), moab::Range::empty(), moab::Range::end(), ErrorCode, gnomonic_projection_generalized(), gnomonic_projection_plane_at_point(), mb, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, MBENTITYSET, MBPOLYGON, MESHSET_SET, ScaleToRadius(), and moab::Interface::UNION.
Referenced by main().
|
static |
Definition at line 559 of file IntxUtils.cpp.
References MB_SUCCESS, and moab::R.
Referenced by moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc(), EdgeIntxRllCs(), moab::Intx2MeshEdges::EdgeSplits(), global_gnomonic_projection(), moab::Intx2MeshOnSphere::setup_tgt_cell(), moab::IntxRllCssphere::setup_tgt_cell(), transform_coordinates(), and moab::BoundBox::update_box_spherical_elem().
|
static |
Definition at line 542 of file IntxUtils.cpp.
References moab::angle(), and MB_SUCCESS.
Referenced by global_gnomonic_projection_general().
|
static |
Definition at line 454 of file IntxUtils.cpp.
References decide_gnomonic_plane(), moab::CartVect::length(), MB_CHK_SET_ERR, MB_SUCCESS, and moab::CartVect::normalize().
Referenced by global_gnomonic_projection_general().
|
static |
Definition at line 677 of file IntxUtils.cpp.
References moab::R.
Referenced by global_gnomonic_projection(), and transform_coordinates().
|
static |
Definition at line 1887 of file IntxUtils.cpp.
References moab::E, moab::CartVect::length_squared(), length_squared(), MB_SUCCESS, moab::R, and moab::verify().
Referenced by EdgeIntxRllCs().
|
static |
Definition at line 1800 of file IntxUtils.cpp.
References moab::E, moab::CartVect::length_squared(), MB_SUCCESS, moab::CartVect::normalize(), and moab::R.
|
static |
Definition at line 2441 of file IntxUtils.cpp.
References moab::Range::begin(), moab::Range::end(), length_squared(), mb, MB_CHK_SET_ERR, and MB_SUCCESS.
|
static |
Definition at line 1160 of file IntxUtils.cpp.
References moab::angle().
Referenced by moab::IntxAreaUtils::area_spherical_polygon_girard(), and enforce_convexity().
|
static |
Definition at line 2344 of file IntxUtils.cpp.
References mb, MB_CHK_ERR, MB_SUCCESS, moab::MergeMesh::merge_all(), and remove_padded_vertices().
Referenced by iMOAB_MergeVertices().
|
static |
Definition at line 2364 of file IntxUtils.cpp.
References moab::Range::begin(), moab::Range::end(), moab::index, moab::Range::insert(), mb, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, MBPOLYGON, MBQUAD, and MBTRI.
Referenced by moab::NCHelperDomain::create_mesh(), moab::NCHelperScrip::create_mesh(), and remove_duplicate_vertices().
|
static |
Definition at line 615 of file IntxUtils.cpp.
References MB_SUCCESS, and moab::R.
Referenced by moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), and moab::BoundBox::update_box_spherical_elem().
|
static |
Definition at line 1117 of file IntxUtils.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, moab::CartVect::length(), mb, MB_SUCCESS, MBVERTEX, and moab::R.
Referenced by CreateTempestMesh(), global_gnomonic_projection(), global_gnomonic_projection_general(), and main().
|
static |
Sorts and removes duplicate points in the given array.
Note: nP might be modified too, we will remove duplicates if found
| P | The array of points to be sorted and checked for duplicates. |
| nP | The number of points in P. |
| epsilon_1 | The epsilon value for distance comparison. |
Definition at line 129 of file IntxUtils.cpp.
References moab::angleAndIndex::angle, moab::angleCompare(), dist2(), moab::angleAndIndex::index, and MAXEDGES.
Referenced by moab::Intx2MeshInPlane::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), and moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc().
|
static |
Definition at line 1108 of file IntxUtils.cpp.
References moab::IntxUtils::SphereCoords::lat, moab::IntxUtils::SphereCoords::lon, and moab::IntxUtils::SphereCoords::R.
Referenced by main().
|
static |
Definition at line 1016 of file IntxUtils.cpp.
References decide_gnomonic_plane(), gnomonic_projection(), gnomonic_unroll(), and moab::R.