Enumerations | |
enum | SegmentVertices { SEGMENT_VERTEX_0 = 0, SEGMENT_VERTEX_1 = 1, SEGMENT_VERTEX_NONE = 7 } |
Enum for the possible vertices on a segment used in lineLineIntersect2D() More... | |
Functions | |
bool | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 * | 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 * | getActiveNeighbor (const Elem *elem, const unsigned short side, const Point &point) |
Get the active neighbor on side of elem that contains point. More... | |
bool | 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 | 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 | 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 | 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 | 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 | 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 | 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 | isTraceableElem (const Elem *elem) |
bool | isAdaptivityTraceableElem (const Elem *elem) |
unsigned short | atVertex (const Elem *elem, const Point &point) |
Determines if a point is at a vertex of an element. More... | |
unsigned short | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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... | |
bool | 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) |
void | 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) |
void | 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 | 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) |
const Elem * | childContainingPointOnSide (const Elem *elem, const Point &point, const unsigned short side) |
const Elem * | getActiveNeighbor (const Elem *elem, const unsigned short side, const Point &point) |
bool | 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) |
bool | 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) |
bool | isTraceableElem (const Elem *elem) |
bool | isAdaptivityTraceableElem (const Elem *elem) |
unsigned short | atVertex (const Elem *elem, const Point &point) |
template<typename T > | |
bool | withinEdgeTempl (const Elem *elem, const Point &point, ElemExtrema &extrema, const Real tolerance) |
bool | withinEdge (const Elem *elem, const Point &point, ElemExtrema &extrema, const Real tolerance) |
unsigned short | atVertexOnSide (const Elem *elem, const Point &point, const unsigned short side) |
template<typename T > | |
std::enable_if<!std::is_base_of< Edge, T >::value, unsigned short >::type | atVertexOnSideTempl (const Elem *elem, const Point &point, const unsigned short side) |
template<typename T > | |
std::enable_if< std::is_base_of< Edge, T >::value, unsigned short >::type | atVertexOnSideTempl (const Elem *elem, const Point &point, const unsigned short side) |
bool | withinEdgeOnSide (const Elem *const elem, const Point &point, const unsigned short side, ElemExtrema &extrema) |
template<typename T > | |
std::enable_if< std::is_base_of< Cell, T >::value, bool >::type | withinEdgeOnSideTempl (const Elem *const elem, const Point &point, const unsigned short side, ElemExtrema &extrema) |
bool | withinExtremaOnSide (const Elem *const elem, const Point &point, const unsigned short side, const unsigned int dim, ElemExtrema &extrema) |
bool | isWithinSegment (const Point &segment1, const Point &segment2, const Point &point, const Real tolerance) |
bool | isWithinSegment (const Point &segment1, const Point &segment2, const Real segment_length, const Point &point, const Real tolerance) |
bool | onBoundingBoxBoundary (const BoundingBox &bbox, const Point &point, const unsigned int dim, const Real tolerance) |
Variables | |
const std::set< int > | TRACEABLE_ELEMTYPES |
The element types that are traceable. More... | |
const std::set< int > | ADAPTIVITY_TRACEABLE_ELEMTYPES = {QUAD4, HEX8, TRI3, TET4, EDGE2} |
The element types that are traceable with adaptivity. More... | |
const Real | TRACE_TOLERANCE = 1e-8 |
The standard tolerance to use in tracing. More... | |
const Real | LOOSE_TRACE_TOLERANCE = 1e-5 |
Looser tolerance for use in error checking in difficult situations. More... | |
const int | INVALID_INT = std::numeric_limits<int>::max() |
Value for an invalid integer. More... | |
Enum for the possible vertices on a segment used in lineLineIntersect2D()
Enumerator | |
---|---|
SEGMENT_VERTEX_0 | |
SEGMENT_VERTEX_1 | |
SEGMENT_VERTEX_NONE |
Definition at line 58 of file TraceRayTools.h.
Definition at line 563 of file TraceRayTools.C.
unsigned short TraceRayTools::atVertex | ( | const Elem * | elem, |
const Point & | point | ||
) |
Determines if a point is at a vertex of an element.
elem | The element |
point | The point |
Referenced by TraceRay::applyOnInternalBoundary(), TEST(), and TraceRay::trace().
unsigned short TraceRayTools::atVertexOnSide | ( | const Elem * | elem, |
const Point & | point, | ||
const unsigned short | side | ||
) |
Definition at line 628 of file TraceRayTools.C.
Referenced by withinExtremaOnSide().
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.
elem | The element |
point | The point |
side | The side |
Referenced by TEST(), and TraceRay::trace().
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 | ||
) |
Definition at line 671 of file TraceRayTools.C.
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 | ||
) |
Definition at line 686 of file TraceRayTools.C.
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.
SFINAE here makes this method available for only 2D/3D elem types (not edges)
The template argument should be the first order type of the elem - this is used to access the vertex mappings for said element without calling any virtuals
elem | The element |
point | The point |
side | The side |
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.
SFINAE here makes this method available for only 1D elem types (edges)
The template argument should be the first order type of the elem - this is used to access the vertex mappings for said element without calling any virtuals
elem | The element |
point | The point |
side | The side |
const Elem* TraceRayTools::childContainingPointOnSide | ( | const Elem * | elem, |
const Point & | point, | ||
const unsigned short | side | ||
) |
Definition at line 329 of file TraceRayTools.C.
Referenced by getActiveNeighbor().
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
.
elem | The parent element |
point | The point that is in elem |
side | The side that point is on in elem |
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 | ||
) |
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 | ||
) |
Definition at line 254 of file TraceRayTools.C.
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 | ||
) |
Definition at line 234 of file TraceRayTools.h.
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.
Instead uses a statically allocated set and accepts a functor for the rejection/acceptance of an element.
Returns the active neighbors that fit the criteria of keep_functor. Does not the return the current element (elem)
elem | The element for which we are searching for the neighbors |
neighbor_set | The set to fill the neighbors into |
untested_set | Set for internal use |
next_untested_set | Set for internal use |
active_neighbor_children | Vector to use in the search |
keep_functor | The functor that is used to accept or reject an element |
Definition at line 179 of file TraceRayTools.h.
Referenced by findEdgeNeighbors(), findNodeNeighbors(), and findPointNeighbors().
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::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 | ||
) |
Definition at line 179 of file TraceRayTools.C.
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 | ||
) |
Definition at line 118 of file TraceRayTools.C.
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.
elem | The element |
p | The point |
neighbor_set | The set to fill the neighbors into |
untested_set | Set for internal use |
next_untested_set | Set for internal use |
active_neighbor_children | Temporary vector for use in the search |
Referenced by TraceRay::getPointNeighbors(), and TEST().
const Elem* TraceRayTools::getActiveNeighbor | ( | const Elem * | elem, |
const unsigned short | side, | ||
const Point & | point | ||
) |
Definition at line 355 of file TraceRayTools.C.
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.
elem | The element |
side | The side of elem that point is on |
point | The point on the side you want the neighbor for |
Referenced by TraceRay::trace().
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 | ||
) |
Definition at line 476 of file TraceRayTools.C.
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:
v01 v11 o-----—o | | | | o-----—o v00 v10
Uses intersectTriangle() to check the possible intersection with the two triangles that make up the quad
start | Start point of the ray |
direction | Direction of the ray |
elem | The elem that contains the quad face (used to get the vertex points) |
v00 | Vertex index on elem that represents v00 in the method description |
v10 | Vertex index on elem that represents v10 in the method description |
v11 | Vertex index on elem that represents v11 in the method description |
v01 | Vertex index on elem that represents v01 in the method description |
intersection_distance | If intersected, storage for the intersection distance |
intersected_extrema | If a vertex/edge is intersected, will be filled with the intersection |
Referenced by sideIntersectedByLine().
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 | ||
) |
Definition at line 367 of file TraceRayTools.C.
Referenced by intersectQuad().
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.
Adapted from: webserver2.tecgraf.puc-rio.br/~mgattass/cg/trbRR/Fast%20MinimumStorage%20RayTriangle%20Intersection.pdf
start | Start point of the ray |
direction | Direction of the ray |
elem | The elem that contains the triangular face (used to get the vertex points) |
v0 | Vertex index on elem that is the zeroth vertex of the triangular face |
v1 | Vertex index on elem that is the first vertex of the triangular face |
v2 | Vertex index on elem that is the second vertex of the triangular face |
intersection_distance | If intersected, storage for the intersection distance |
intersected_extrema | If a vertex/edge is intersected, will be filled with the intersection |
Referenced by sideIntersectedByLine().
bool TraceRayTools::isAdaptivityTraceableElem | ( | const Elem * | elem | ) |
Definition at line 557 of file TraceRayTools.C.
bool TraceRayTools::isAdaptivityTraceableElem | ( | const Elem * | elem | ) |
Referenced by RayTracingStudy::traceableMeshChecks().
bool TraceRayTools::isTraceableElem | ( | const Elem * | elem | ) |
Definition at line 551 of file TraceRayTools.C.
bool TraceRayTools::isTraceableElem | ( | const Elem * | elem | ) |
Referenced by RayTracingStudy::traceableMeshChecks().
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.
segment1 | The first point on the segment |
segment2 | The second point on the segment |
point | The point |
tolerance | The tolerance to use |
Referenced by findEdgeNeighborsWithinEdgeInternal(), BoundingBoxIntersectionHelper::intersection(), and TEST().
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.
segment1 | The first point on the segment |
segment2 | The second point on the segment |
segment_length | The segment length (for optimization if it's already computed) |
point | The point |
tolerance | The tolerance to use |
bool TraceRayTools::isWithinSegment | ( | const Point & | segment1, |
const Point & | segment2, | ||
const Point & | point, | ||
const Real | tolerance | ||
) |
Definition at line 779 of file TraceRayTools.C.
bool TraceRayTools::isWithinSegment | ( | const Point & | segment1, |
const Point & | segment2, | ||
const Real | segment_length, | ||
const Point & | point, | ||
const Real | tolerance | ||
) |
Definition at line 791 of file TraceRayTools.C.
Referenced by isWithinSegment(), withinEdgeOnSideTempl(), and withinEdgeTempl().
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 | ||
) |
Definition at line 48 of file TraceRayTools.C.
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.
From: https://stackoverflow.com/a/565282
start | The start point, u0 |
direction | The direction used to define u1 |
length | The length used to define u1 |
v0 | The point v0 |
v1 | The point v1 |
intersection_point | To be filled with the point of intersection |
intersection_distance | To be filled with the distance of intersection |
segment_vertex | To be filled with the intersected vertex, if any |
Referenced by sideIntersectedByLine().
|
inline |
Returns the number of nodes on a side for an Elem that is not a Pyramid or Prism.
Definition at line 897 of file TraceRayTools.h.
|
inline |
Returns the number of nodes on a side on a Pyramid elem.
Definition at line 907 of file TraceRayTools.h.
|
inline |
Returns the number of nodes on a side on a Prism elem.
Definition at line 917 of file TraceRayTools.h.
bool TraceRayTools::onBoundingBoxBoundary | ( | const BoundingBox & | bbox, |
const Point & | point, | ||
const unsigned int | dim, | ||
const Real | tolerance | ||
) |
Definition at line 811 of file TraceRayTools.C.
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
.
Checks dim
dimensions.
Referenced by TraceRay::trace().
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.
elem | The element to check |
start_point | Start point of the segment |
direction | Direction of the segment |
side | The side of elem to check |
max_length | A length that is longer than the length of the line segment |
intersection_point | If intersected, storage for the intersection point |
intersection_distance | If intersected, storage for the intersection distance |
intersected_extrema | If a vertex/edge is intersected, will be filled with the intersection |
Definition at line 564 of file TraceRayTools.h.
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.
elem | The element to check |
start_point | Start point of the segment |
direction | Direction of the segment |
side | The side of elem to check |
intersection_point | If intersected, storage for the intersection point |
intersection_distance | If intersected, storage for the intersection distance |
intersected_extrema | If a vertex/edge is intersected, will be filled with the intersection |
Definition at line 625 of file TraceRayTools.h.
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.
elem | The element to check |
start_point | Start point of the segment |
direction | Direction of the segment |
side | The side of elem to check |
max_length | A length that is longer than the length of the line segment |
intersection_point | If intersected, storage for the intersection point |
intersection_distance | If intersected, storage for the intersection distance |
intersected_vertex | If a vertex is intersected, storage for said intersection |
intersected_extrema | If a vertex/edge is intersected, will be filled with the intersection |
Definition at line 682 of file TraceRayTools.h.
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.
elem | The element to check |
start_point | Start point of the segment |
direction | Direction of the segment |
side | The side of elem to check |
max_length | A length that is longer than the length of the line segment |
intersection_point | If intersected, storage for the intersection point |
intersection_distance | If intersected, storage for the intersection distance |
intersected_vertex | If a vertex is intersected, storage for said intersection |
intersected_extrema | If a vertex/edge is intersected, will be filled with the intersection |
Definition at line 738 of file TraceRayTools.h.
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.
elem | The element to check |
start_point | Start point of the segment |
direction | Direction of the segment |
side | The side of elem to check |
max_length | A length that is longer than the length of the line segment |
intersection_point | If intersected, storage for the intersection point |
intersection_distance | If intersected, storage for the intersection distance |
intersected_vertex | If a vertex is intersected, storage for said intersection |
intersected_extrema | If a vertex/edge is intersected, will be filled with the intersection |
Definition at line 809 of file TraceRayTools.h.
bool TraceRayTools::withinEdge | ( | const Elem * | elem, |
const Point & | point, | ||
ElemExtrema & | extrema, | ||
const Real | tolerance | ||
) |
Definition at line 595 of file TraceRayTools.C.
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.
elem | The element |
point | The point |
extrema | To be filled with the local vertex IDs that contain the edge the point is within, if any |
tolerance | The tolerance to use |
Referenced by TEST(), and TraceRay::trace().
bool TraceRayTools::withinEdgeOnSide | ( | const Elem *const | elem, |
const Point & | point, | ||
const unsigned short | side, | ||
ElemExtrema & | extrema | ||
) |
Definition at line 699 of file TraceRayTools.C.
Referenced by withinExtremaOnSide().
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.
elem | The element |
point | The point |
side | The side |
extrema | To be filled with the local vertex IDs that contain the edge the point is within, if any |
Referenced by TEST(), and TraceRay::trace().
std::enable_if<std::is_base_of<Cell, T>::value, bool>::type TraceRayTools::withinEdgeOnSideTempl | ( | const Elem *const | elem, |
const Point & | point, | ||
const unsigned short | side, | ||
ElemExtrema & | extrema | ||
) |
Definition at line 733 of file TraceRayTools.C.
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.
SFINAE here makes this method available for only 3D elem types (Cell)
The template argument should be the first order type of the elem - this is used to access the vertex mappings for said element without calling any virtuals
elem | The element |
point | The point |
side | The side |
extrema | To be filled with the local vertex IDs that contain the edge the point is within, if any |
SFINAE here makes this method available for only 1D/2D elem types (not Cell), which do not have edges, therefore this function errors.
Definition at line 1045 of file TraceRayTools.h.
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.
SFINAE here makes this method available for only 1D/2D elem types (not Cell), which do not have edges, therefore this function errors.
Definition at line 1045 of file TraceRayTools.h.
bool TraceRayTools::withinEdgeTempl | ( | const Elem * | elem, |
const Point & | point, | ||
ElemExtrema & | extrema, | ||
const Real | tolerance | ||
) |
Definition at line 574 of file TraceRayTools.C.
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.
The template argument should be a derived element type that corresponds to the elem->type(), and is used to obtain edge/node mapping without using virtuals.
elem | The element |
point | The point |
extrema | To be filled with the local vertex IDs that contain the edge the point is within, if any |
tolerance | The tolerance to use |
bool TraceRayTools::withinExtremaOnSide | ( | const Elem *const | elem, |
const Point & | point, | ||
const unsigned short | side, | ||
const unsigned int | dim, | ||
ElemExtrema & | extrema | ||
) |
Definition at line 760 of file TraceRayTools.C.
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.
elem | The element |
point | The point |
side | The side |
dim | The element dimension |
extrema | To be filled with the extrema if any are found |
Referenced by TraceRay::applyOnExternalBoundary(), TraceRay::applyOnInternalBoundary(), and TraceRay::findExternalBoundarySide().
const std::set< int > TraceRayTools::ADAPTIVITY_TRACEABLE_ELEMTYPES = {QUAD4, HEX8, TRI3, TET4, EDGE2} |
The element types that are traceable with adaptivity.
Definition at line 45 of file TraceRayTools.C.
Referenced by isAdaptivityTraceableElem().
Value for an invalid integer.
Definition at line 53 of file TraceRayTools.h.
const Real TraceRayTools::LOOSE_TRACE_TOLERANCE = 1e-5 |
Looser tolerance for use in error checking in difficult situations.
Definition at line 50 of file TraceRayTools.h.
Referenced by atVertexOnSideTempl(), TraceRay::exitsElem(), TraceRay::moveThroughNeighbor(), TraceRay::onSegment(), TraceRay::onTrajectoryChanged(), TraceRay::trace(), and withinEdgeOnSideTempl().
const Real TraceRayTools::TRACE_TOLERANCE = 1e-8 |
The standard tolerance to use in tracing.
Definition at line 48 of file TraceRayTools.h.
Referenced by TraceRay::applyOnExternalBoundary(), TraceRay::applyOnInternalBoundary(), atVertex(), atVertexOnSideTempl(), TraceRay::exitsElem(), TraceRay::findExternalBoundarySide(), intersectTriangle(), isWithinSegment(), lineLineIntersect2D(), MeshCut2DRankTwoTensorNucleation::lineLineIntersect2D(), sideIntersectedByLine(), RayTracingStudy::sideIsIncoming(), and TraceRay::trace().
const std::set< int > TraceRayTools::TRACEABLE_ELEMTYPES |
The element types that are traceable.
Definition at line 42 of file TraceRayTools.C.
Referenced by isTraceableElem(), and TEST().