#include <ERF_EBPolygon.H>
|
AMREX_GPU_HOST_DEVICE | polygon_ (amrex::RealVect a_point, amrex::RealVect a_normal) |
|
AMREX_GPU_HOST_DEVICE | polygon_ () |
|
AMREX_GPU_HOST_DEVICE void | add_vertex (amrex::RealVect const &a_v) |
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | set_area (amrex::Real const &a_area) |
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | define () |
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int | ok () const noexcept |
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real | area () const noexcept |
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real | distance (amrex::RealVect const &a_point) const noexcept |
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::RealVect | get_centroid () const noexcept |
|
void | report (int const a_id, amrex::RealVect a_v0) |
|
◆ polygon_() [1/2]
AMREX_GPU_HOST_DEVICE polygon_::polygon_ |
( |
amrex::RealVect |
a_point, |
|
|
amrex::RealVect |
a_normal |
|
) |
| |
|
inline |
23 ,
m_vertex({amrex::RealVect(0.), amrex::RealVect(0.), amrex::RealVect(0.),
24 amrex::RealVect(0.), amrex::RealVect(0.), amrex::RealVect(0.)})
int m_defined
Definition: ERF_EBPolygon.H:180
amrex::Real m_area
Definition: ERF_EBPolygon.H:184
int const m_cell_face
Definition: ERF_EBPolygon.H:175
int m_sorted
Definition: ERF_EBPolygon.H:186
int m_vertices
Definition: ERF_EBPolygon.H:182
amrex::Array< amrex::RealVect, m_max_vertices > m_vertex
Definition: ERF_EBPolygon.H:188
amrex::RealVect const m_eb_normal
Definition: ERF_EBPolygon.H:178
amrex::RealVect const m_eb_point
Definition: ERF_EBPolygon.H:177
amrex::RealVect m_zdir
Definition: ERF_EBPolygon.H:192
◆ polygon_() [2/2]
AMREX_GPU_HOST_DEVICE polygon_::polygon_ |
( |
| ) |
|
|
inline |
37 ,
m_vertex({amrex::RealVect(0.), amrex::RealVect(0.), amrex::RealVect(0.),
38 amrex::RealVect(0.), amrex::RealVect(0.), amrex::RealVect(0.)})
◆ add_vertex()
AMREX_GPU_HOST_DEVICE void polygon_::add_vertex |
( |
amrex::RealVect const & |
a_v | ) |
|
|
inline |
◆ area()
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real polygon_::area |
( |
| ) |
const |
|
inlinenoexcept |
124 AMREX_ALWAYS_ASSERT(
ok() );
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int ok() const noexcept
Definition: ERF_EBPolygon.H:119
Referenced by eb_cut_cell_::volume().
◆ define()
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void polygon_::define |
( |
| ) |
|
|
inline |
76 amrex::Array<amrex::RealVect,m_max_vertices> vertex_cent;
82 m_zdir = vertex_cent[0].crossProduct(vertex_cent[i]);
83 if ( !amrex::almostEqual(
m_zdir.vectorLength(),0.) ) {
break; }
85 AMREX_ALWAYS_ASSERT(!amrex::almostEqual(
m_zdir.vectorLength(), 0.));
91 m_theta[i] = std::atan2(
m_zdir.dotProduct( vertex_cent[0].crossProduct(vertex_cent[i]) ),
92 vertex_cent[0].dotProduct(vertex_cent[i]));
103 amrex::Swap(vertex_cent[j], vertex_cent[j+1]);
112 amrex::RealVect vi_cross_vj = vertex_cent[i].crossProduct(vertex_cent[j]);
113 m_area += 0.5*vi_cross_vj.vectorLength();
115 AMREX_ALWAYS_ASSERT(
m_area > 0. );
constexpr amrex::Real PI
Definition: ERF_Constants.H:6
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::RealVect get_centroid() const noexcept
Definition: ERF_EBPolygon.H:138
amrex::GpuArray< amrex::Real, m_max_vertices > m_theta
Definition: ERF_EBPolygon.H:190
Referenced by eb_cut_cell_::eb_cut_cell_().
◆ distance()
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real polygon_::distance |
( |
amrex::RealVect const & |
a_point | ) |
const |
|
inlinenoexcept |
◆ get_centroid()
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::RealVect polygon_::get_centroid |
( |
| ) |
const |
|
inlinenoexcept |
◆ ok()
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int polygon_::ok |
( |
| ) |
const |
|
inlinenoexcept |
◆ report()
void polygon_::report |
( |
int const |
a_id, |
|
|
amrex::RealVect |
a_v0 |
|
) |
| |
|
inline |
151 #ifndef AMREX_USE_GPU
153 amrex::Print() <<
"Face " << a_id
154 <<
" -------------------------------------------\n"
155 <<
"\nok? " << (
ok() ?
"yes" :
"no") <<
"\n\n";
157 amrex::Print() <<
"v" << i <<
": " <<
m_vertex[i] <<
'\n';
159 amrex::Print() <<
"\nvc: " <<
" " << centroid <<
"\n";
161 amrex::Real
const dist =
distance( a_v0 );
164 amrex::Print() <<
"\narea: " <<
m_area
165 <<
"\ndistance: " << dist
166 <<
"\nvolume: " << dist*
m_area
167 <<
"\n==================================================\n\n";
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real distance(amrex::RealVect const &a_point) const noexcept
Definition: ERF_EBPolygon.H:130
◆ set_area()
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void polygon_::set_area |
( |
amrex::Real const & |
a_area | ) |
|
|
inline |
◆ m_area
amrex::Real polygon_::m_area |
|
private |
◆ m_cell_face
int const polygon_::m_cell_face |
|
private |
◆ m_defined
◆ m_eb_normal
amrex::RealVect const polygon_::m_eb_normal |
|
private |
◆ m_eb_point
amrex::RealVect const polygon_::m_eb_point |
|
private |
◆ m_max_vertices
constexpr int polygon_::m_max_vertices = 6 |
|
staticconstexprprivate |
◆ m_sorted
◆ m_theta
◆ m_vertex
◆ m_vertices
◆ m_zdir
amrex::RealVect polygon_::m_zdir |
|
private |
The documentation for this class was generated from the following file: