|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Polygon helper used to accumulate cut-cell face geometry. More...
#include <ERF_EBPolygon.H>

Public Member Functions | |
| AMREX_GPU_HOST_DEVICE | polygon_ (amrex::RealVect a_point, amrex::RealVect a_normal) |
| Construct a cell-face polygon clipped by an EB plane. More... | |
| AMREX_GPU_HOST_DEVICE | polygon_ () |
| Construct an empty EB-boundary polygon. More... | |
| AMREX_GPU_HOST_DEVICE void | add_vertex (amrex::RealVect const &a_v) |
| Add a unique vertex to the polygon. More... | |
| AMREX_GPU_HOST_DEVICE int | get_num_vertices () |
| Return the number of stored vertices. More... | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | set_area (amrex::Real const &a_area) |
| Set the polygon area directly. More... | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | define () |
| Finalize polygon ordering and compute its area. More... | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int | ok () const noexcept |
| Return whether the polygon has been defined with a valid area state. More... | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real | area () const noexcept |
| Return the polygon area. More... | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real | distance (amrex::RealVect const &a_point) const noexcept |
| Return the perpendicular distance from this polygon to a point. More... | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::RealVect | get_centroid () const noexcept |
| Return the polygon centroid from its sub-triangulation. More... | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::RealVect | normal () const noexcept |
| Return the unit normal vector of the polygon plane. More... | |
| void | report (int const a_id, amrex::RealVect a_v0) |
| Print a diagnostic report for the polygon on CPU builds. More... | |
| void | debug (int const a_id) |
| Print polygon vertices with a face identifier. More... | |
| void | debug () |
| Print polygon vertices without a face identifier. More... | |
Private Attributes | |
| int const | m_cell_face |
| amrex::RealVect const | m_eb_point |
| amrex::RealVect const | m_eb_normal |
| int | m_defined |
| int | m_num_vertices |
| amrex::Real | m_area |
| int | m_sorted |
| amrex::Array< amrex::RealVect, m_max_vertices > | m_vertices |
| amrex::GpuArray< amrex::Real, m_max_vertices > | m_theta |
| amrex::RealVect | m_zdir |
Static Private Attributes | |
| static constexpr int | m_max_vertices = 6 |
Polygon helper used to accumulate cut-cell face geometry.
The polygon stores up to six vertices, sorts them in a local plane, and computes area, centroid, distance, and normal data used by eb_cut_cell_.
|
inline |
Construct a cell-face polygon clipped by an EB plane.
| a_point | Point on the EB plane. |
| a_normal | Unit normal for the EB plane. |
|
inline |
Construct an empty EB-boundary polygon.
|
inline |
Add a unique vertex to the polygon.
| a_v | Vertex coordinates. |
Referenced by eb_cut_cell_::calc_edge_intersections(), and eb_cut_cell_::set_covered_regular_cell_vertices().

|
inlinenoexcept |
Return the polygon area.
Referenced by eb_cut_cell_::areaBoun(), eb_cut_cell_::centVol(), get_centroid(), and eb_cut_cell_::volume().


|
inline |
Print polygon vertices without a face identifier.
|
inline |
Print polygon vertices with a face identifier.
| a_id | Face identifier used in the diagnostic output. |
|
inline |
Finalize polygon ordering and compute its area.
Vertices are sorted counter-clockwise in the polygon plane before area is computed by a triangle fan.

|
inlinenoexcept |
Return the perpendicular distance from this polygon to a point.
| a_point | Point used in the distance calculation. |
Referenced by report(), and eb_cut_cell_::volume().


|
inlinenoexcept |
Return the polygon centroid from its sub-triangulation.
Referenced by eb_cut_cell_::centBoun(), eb_cut_cell_::centVol(), define(), and report().


|
inline |
Return the number of stored vertices.
|
inlinenoexcept |
Return the unit normal vector of the polygon plane.
|
inlinenoexcept |
|
inline |
Print a diagnostic report for the polygon on CPU builds.
| a_id | Face identifier used in the diagnostic output. |
| a_v0 | Reference point used to compute the reported distance. |

|
inline |
Set the polygon area directly.
| a_area | Area value assigned to the polygon. |
Referenced by eb_cut_cell_::set_regular().

|
private |
Referenced by area(), define(), ok(), report(), and set_area().
|
private |
Referenced by define().
|
private |
Referenced by define(), distance(), and ok().
|
private |
Referenced by define().
|
private |
Referenced by define().
|
staticconstexprprivate |
Referenced by add_vertex().
|
private |
Referenced by add_vertex(), debug(), define(), get_centroid(), get_num_vertices(), and report().
|
private |
Referenced by define().
|
private |
Referenced by define().
|
private |
Referenced by add_vertex(), debug(), define(), distance(), get_centroid(), and report().
|
private |
Referenced by define(), distance(), and normal().