https://mooseframework.inl.gov
Namespaces | Enumerations | Functions | Variables
TraceRayTools.h File Reference

Go to the source code of this file.

Namespaces

 libMesh
 The following methods are specializations for using the Parallel::packed_range_* routines for a vector of Rays.
 
 TraceRayTools
 

Enumerations

enum  TraceRayTools::SegmentVertices { TraceRayTools::SEGMENT_VERTEX_0 = 0, TraceRayTools::SEGMENT_VERTEX_1 = 1, TraceRayTools::SEGMENT_VERTEX_NONE = 7 }
 Enum for the possible vertices on a segment used in lineLineIntersect2D() More...
 

Functions

bool TraceRayTools::lineLineIntersect2D (const Point &start, const Point &direction, const Real length, const Point &v0, const Point &v1, Point &intersection_point, Real &intersection_distance, SegmentVertices &segment_vertex #ifdef DEBUG_RAY_INTERSECTIONS, const bool debug #endif)
 Checks for the intersection of the line u0 -> u1 with the line v0 -> v1, where u0 = start and u1 = start + direction * length. More...
 
bool TraceRayTools::isWithinSegment (const Point &segment1, const Point &segment2, const Point &point, const Real tolerance=TRACE_TOLERANCE)
 Checks whether or not a point is within a line segment. More...
 
bool TraceRayTools::isWithinSegment (const Point &segment1, const Point &segment2, const Real segment_length, const Point &point, const Real tolerance=TRACE_TOLERANCE)
 Checks whether or not a point is within a line segment. More...
 
void TraceRayTools::findPointNeighbors (const Elem *const elem, const Point &point, MooseUtils::StaticallyAllocatedSet< const Elem *, MAX_POINT_NEIGHBORS > &neighbor_set, MooseUtils::StaticallyAllocatedSet< const Elem *, MAX_POINT_NEIGHBORS > &untested_set, MooseUtils::StaticallyAllocatedSet< const Elem *, MAX_POINT_NEIGHBORS > &next_untested_set, std::vector< const Elem *> active_neighbor_children, std::vector< NeighborInfo > &info)
 Rewrite of the find_point_neighbors function in libMesh, instead using a statically allocated set: returns the active point neighbors at p within elem. More...
 
void TraceRayTools::findNodeNeighbors (const Elem *const elem, const Node *const node, MooseUtils::StaticallyAllocatedSet< const Elem *, MAX_POINT_NEIGHBORS > &neighbor_set, MooseUtils::StaticallyAllocatedSet< const Elem *, MAX_POINT_NEIGHBORS > &untested_set, MooseUtils::StaticallyAllocatedSet< const Elem *, MAX_POINT_NEIGHBORS > &next_untested_set, std::vector< const Elem *> active_neighbor_children, std::vector< NeighborInfo > &info)
 
void TraceRayTools::findEdgeNeighbors (const Elem *const elem, const Node *const node1, const Node *const node2, MooseUtils::StaticallyAllocatedSet< const Elem *, MAX_POINT_NEIGHBORS > &neighbor_set, MooseUtils::StaticallyAllocatedSet< const Elem *, MAX_POINT_NEIGHBORS > &untested_set, MooseUtils::StaticallyAllocatedSet< const Elem *, MAX_POINT_NEIGHBORS > &next_untested_set, std::vector< const Elem *> active_neighbor_children, std::vector< NeighborInfo > &info)
 
template<typename KeepFunctor >
void TraceRayTools::findNeighbors (const Elem *const elem, MooseUtils::StaticallyAllocatedSet< const Elem *, MAX_POINT_NEIGHBORS > &neighbor_set, MooseUtils::StaticallyAllocatedSet< const Elem *, MAX_POINT_NEIGHBORS > &untested_set, MooseUtils::StaticallyAllocatedSet< const Elem *, MAX_POINT_NEIGHBORS > &next_untested_set, std::vector< const Elem *> active_neighbor_children, KeepFunctor &keep_functor)
 More generalized form of the find_point_neighbors function in libMesh. More...
 
template<typename T >
bool TraceRayTools::findEdgeNeighborsWithinEdgeInternal (const Elem *const candidate, const Elem *const elem, const Node *const vertex1, const Node *const vertex2, const Real edge_length, std::vector< NeighborInfo > &info)
 
const Elem * TraceRayTools::childContainingPointOnSide (const Elem *elem, const Point &point, const unsigned short side)
 Find the child of an elem that contains a point on a specified side of elem. More...
 
const Elem * TraceRayTools::getActiveNeighbor (const Elem *elem, const unsigned short side, const Point &point)
 Get the active neighbor on side of elem that contains point. More...
 
bool TraceRayTools::intersectTriangle (const Point &start, const Point &direction, const Elem *const elem, const unsigned short v0, const unsigned short v1, const unsigned short v2, Real &intersection_distance, ElemExtrema &intersected_extrema, const Real hmax #ifdef DEBUG_RAY_INTERSECTIONS, const bool debug #endif)
 Checks for the intersection of a ray and a triangular face. More...
 
bool TraceRayTools::intersectQuad (const Point &start, const Point &direction, const Elem *const elem, const unsigned short v00, const unsigned short v10, const unsigned short v11, const unsigned short v01, Real &intersection_distance, ElemExtrema &intersected_extrema, const Real hmax #ifdef DEBUG_RAY_INTERSECTIONS, const bool debug #endif)
 Checks for the intersection of a ray and a quadrilateral, numbered as such: More...
 
template<typename T >
std::enable_if< std::is_base_of< libMesh::Face, T >::value, bool >::type TraceRayTools::sideIntersectedByLine (const Elem *elem, const Point &start_point, const Point &direction, const unsigned short side, const Real max_length, Point &intersection_point, Real &intersection_distance, ElemExtrema &intersected_extrema, const Real #ifdef DEBUG_RAY_INTERSECTIONS, const bool debug #endif)
 SFINAE typed object for checking the intersection of a line segment with the face of a Face typed element, i.e., the intersection with the edge of a 2D element. More...
 
template<typename T >
std::enable_if< std::is_base_of< Hex, T >::value, bool >::type TraceRayTools::sideIntersectedByLine (const Elem *elem, const Point &start_point, const Point &direction, const unsigned short side, const Real, Point &intersection_point, Real &intersection_distance, ElemExtrema &intersected_extrema, const Real hmax #ifdef DEBUG_RAY_INTERSECTIONS, const bool debug #endif)
 SFINAE typed object for checking the intersection of a line segment with the face of a Hex typed element. More...
 
template<typename T >
std::enable_if< std::is_base_of< Tet, T >::value, bool >::type TraceRayTools::sideIntersectedByLine (const Elem *elem, const Point &start_point, const Point &direction, const unsigned short side, const Real, Point &intersection_point, Real &intersection_distance, ElemExtrema &intersected_extrema, const Real hmax #ifdef DEBUG_RAY_INTERSECTIONS, const bool debug #endif)
 SFINAE typed object for checking the intersection of a line segment with the face of a Tet typed element. More...
 
template<typename T >
std::enable_if< std::is_base_of< libMesh::Pyramid, T >::value, bool >::type TraceRayTools::sideIntersectedByLine (const Elem *elem, const Point &start_point, const Point &direction, const unsigned short side, const Real, Point &intersection_point, Real &intersection_distance, ElemExtrema &intersected_extrema, const Real hmax #ifdef DEBUG_RAY_INTERSECTIONS, const bool debug #endif)
 SFINAE typed object for checking the intersection of a line segment with the face of a Pyramid typed element. More...
 
template<typename T >
std::enable_if< std::is_base_of< libMesh::Prism, T >::value, bool >::type TraceRayTools::sideIntersectedByLine (const Elem *elem, const Point &start_point, const Point &direction, const unsigned short side, const Real, Point &intersection_point, Real &intersection_distance, ElemExtrema &intersected_extrema, const Real hmax #ifdef DEBUG_RAY_INTERSECTIONS, const bool debug #endif)
 SFINAE typed object for checking the intersection of a line segment with the face of a Prism typed element. More...
 
bool TraceRayTools::isTraceableElem (const Elem *elem)
 
bool TraceRayTools::isAdaptivityTraceableElem (const Elem *elem)
 
unsigned short TraceRayTools::atVertex (const Elem *elem, const Point &point)
 Determines if a point is at a vertex of an element. More...
 
unsigned short TraceRayTools::atVertexOnSide (const Elem *elem, const Point &point, const unsigned short side)
 Determines if a point is at a vertex on the side of en element. More...
 
template<typename T >
std::enable_if<!std::is_base_of< libMesh::Pyramid, T >::value &&!std::is_base_of< libMesh::Prism, T >::value, unsigned short >::type TraceRayTools::nodesPerSide (const unsigned short)
 Returns the number of nodes on a side for an Elem that is not a Pyramid or Prism. More...
 
template<typename T >
std::enable_if< std::is_base_of< Pyramid, T >::value, unsigned short >::type TraceRayTools::nodesPerSide (const unsigned short side)
 Returns the number of nodes on a side on a Pyramid elem. More...
 
template<typename T >
std::enable_if< std::is_base_of< libMesh::Prism, T >::value, unsigned short >::type TraceRayTools::nodesPerSide (const unsigned short side)
 Returns the number of nodes on a side on a Prism elem. More...
 
template<typename T >
std::enable_if<!std::is_base_of< Edge, T >::value, unsigned short >::type TraceRayTools::atVertexOnSideTempl (const Elem *elem, const Point &point, const unsigned short side)
 Determines if a point is at a vertex on the side of an element. More...
 
template<typename T >
std::enable_if< std::is_base_of< Edge, T >::value, unsigned short >::type TraceRayTools::atVertexOnSideTempl (const Elem *elem, const Point &point, const unsigned short side)
 Determines if a point is at a vertex on the side of an element. More...
 
template<typename T >
bool TraceRayTools::withinEdgeTempl (const Elem *elem, const Point &point, ElemExtrema &extrema, const Real tolerance=TRACE_TOLERANCE)
 Determines if a point is within edge on an element. More...
 
bool TraceRayTools::withinEdge (const Elem *elem, const Point &point, ElemExtrema &extrema, const Real tolerance=TRACE_TOLERANCE)
 Determines if a point is within an edge on an element. More...
 
bool TraceRayTools::withinEdgeOnSide (const Elem *const elem, const Point &point, const unsigned short side, ElemExtrema &extrema)
 Determines if a point is within an edge on the side of an element. More...
 
bool TraceRayTools::withinExtremaOnSide (const Elem *const elem, const Point &point, const unsigned short side, const unsigned int dim, ElemExtrema &extrema)
 Determines if a point is within an Elem's extrema (at vertex/within edge) on a side. More...
 
template<typename T >
std::enable_if< std::is_base_of< libMesh::Cell, T >::value, bool >::type TraceRayTools::withinEdgeOnSideTempl (const Elem *const elem, const Point &point, const unsigned short side, ElemExtrema &extrema)
 Determines if a point is within an edge on the side of an element. More...
 
template<typename T >
std::enable_if<!std::is_base_of< libMesh::Cell, T >::value, bool >::type TraceRayTools::withinEdgeOnSideTempl (const Elem *const, const Point &, const unsigned short, ElemExtrema &)
 Determines if a point is within an edge on the side of an element. More...
 
bool TraceRayTools::onBoundingBoxBoundary (const BoundingBox &bbox, const Point &point, const unsigned int dim, const Real tolerance)
 Whether or not point is on the boundary (min/max) of bbox. More...
 

Variables

const std::set< intTraceRayTools::TRACEABLE_ELEMTYPES
 The element types that are traceable. More...
 
const std::set< intTraceRayTools::ADAPTIVITY_TRACEABLE_ELEMTYPES = {QUAD4, HEX8, TRI3, TET4, EDGE2}
 The element types that are traceable with adaptivity. More...
 
const Real TraceRayTools::TRACE_TOLERANCE = 1e-8
 The standard tolerance to use in tracing. More...
 
const Real TraceRayTools::LOOSE_TRACE_TOLERANCE = 1e-5
 Looser tolerance for use in error checking in difficult situations. More...
 
const int TraceRayTools::INVALID_INT = std::numeric_limits<int>::max()
 Value for an invalid integer. More...