#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 | 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 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) |
Definition at line 16 of file IntxUtils.hpp.
|
inlinestatic |
Definition at line 26 of file IntxUtils.hpp.
Referenced by moab::Intx2MeshInPlane::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc(), 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 1918 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 67 of file IntxUtils.cpp.
Referenced by moab::Intx2MeshInPlane::computeIntersectionBetweenTgtAndSrc(), moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), and moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc().
|
static |
Definition at line 788 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().
|
static |
Definition at line 411 of file IntxUtils.cpp.
Referenced by moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), 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 1973 of file IntxUtils.cpp.
References moab::Range::begin(), CORRTAGNAME, moab::dum, moab::Range::end(), ErrorCode, 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 20 of file IntxUtils.hpp.
Referenced by moab::Intx2MeshInPlane::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::IntxRllCssphere::findNodes(), and SortAndRemoveDoubles2().
Definition at line 1263 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 1509 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 222 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 306 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 1285 of file IntxUtils.cpp.
References moab::angle(), moab::Range::begin(), CORRTAGNAME, moab::Range::end(), ErrorCode, MAXEDGES, mb, MB_CHK_ERR, MB_SUCCESS, MB_TAG_DENSE, MB_TAG_NOT_FOUND, MB_TYPE_HANDLE, MB_TYPE_INTEGER, MBPOLYGON, MBTRI, and oriented_spherical_angle().
Referenced by main().
|
static |
Definition at line 1426 of file IntxUtils.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, mb, MB_CHK_ERR, MB_SUCCESS, MBQUAD, and MBTRI.
Referenced by moab::TempestRemapper::ComputeOverlapMesh(), and main().
|
static |
Definition at line 611 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_SUCCESS, MBENTITYSET, MESHSET_SET, moab::R, ScaleToRadius(), and moab::Interface::UNION.
|
static |
Definition at line 456 of file IntxUtils.cpp.
References MB_SUCCESS, and moab::R.
Referenced by moab::Intx2MeshOnSphere::computeIntersectionBetweenTgtAndSrc(), moab::IntxRllCssphere::computeIntersectionBetweenTgtAndSrc(), EdgeIntxRllCs(), 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 574 of file IntxUtils.cpp.
References moab::R.
Referenced by global_gnomonic_projection(), and transform_coordinates().
|
static |
Definition at line 1605 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 1518 of file IntxUtils.cpp.
References moab::E, moab::CartVect::length_squared(), MB_SUCCESS, moab::CartVect::normalize(), and moab::R.
|
static |
Definition at line 876 of file IntxUtils.cpp.
References moab::angle().
Referenced by moab::IntxAreaUtils::area_spherical_polygon_girard(), and enforce_convexity().
|
static |
Definition at line 2062 of file IntxUtils.cpp.
References ErrorCode, mb, MB_CHK_ERR, MB_SUCCESS, moab::MergeMesh::merge_all(), and remove_padded_vertices().
|
static |
Definition at line 2082 of file IntxUtils.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, 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 512 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 833 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(), 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 130 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 824 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 733 of file IntxUtils.cpp.
References decide_gnomonic_plane(), gnomonic_projection(), gnomonic_unroll(), and moab::R.