Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
AMReX_EB2_IF_Plane.H
Go to the documentation of this file.
1#ifndef AMREX_EB2_IF_PLANE_H_
2#define AMREX_EB2_IF_PLANE_H_
3#include <AMReX_Config.H>
4
5#include <AMReX_Array.H>
6#include <AMReX_EB2_IF_Base.H>
7
14namespace amrex::EB2 {
15
16// For all implicit functions, >0: body; =0: boundary; <0: fluid
17
19 : GPUable
20{
21public:
22
24 PlaneIF (const RealArray& a_point, const RealArray& a_normal, bool a_inside = true)
25 : m_point(makeXDim3(a_point)),
26 m_normal(makeXDim3(a_normal)),
27 m_sign( a_inside ? 1.0 : -1.0 )
28 {}
29
33 {
37 }
38
40 [[nodiscard]] AMREX_FORCE_INLINE Real operator() (const RealArray& p) const noexcept
41 {
42 return this->operator()(AMREX_D_DECL(p[0],p[1],p[2]));
43 }
44
45protected:
46
49 //
51
52};
53
54}
55
56#endif
#define AMREX_FORCE_INLINE
Definition AMReX_Extension.H:119
#define AMREX_GPU_HOST_DEVICE
Definition AMReX_GpuQualifiers.H:20
#define AMREX_D_TERM(a, b, c)
Definition AMReX_SPACE.H:172
#define AMREX_D_DECL(a, b, c)
Definition AMReX_SPACE.H:171
Definition AMReX_EB2_IF_Plane.H:20
Real m_sign
Definition AMReX_EB2_IF_Plane.H:50
__host__ __device__ Real operator()(Real x, Real y, Real z) const noexcept
Evaluate the implicit function at explicit coordinates.
Definition AMReX_EB2_IF_Plane.H:32
PlaneIF(const RealArray &a_point, const RealArray &a_normal, bool a_inside=true)
Build a plane through a_point with outward normal a_normal.
Definition AMReX_EB2_IF_Plane.H:24
XDim3 m_point
Definition AMReX_EB2_IF_Plane.H:47
XDim3 m_normal
Definition AMReX_EB2_IF_Plane.H:48
amrex_real Real
Floating Point Type for Fields.
Definition AMReX_REAL.H:79
Definition AMReX_FabArrayBase.H:33
XDim3 makeXDim3(const Array< Real, 3 > &a) noexcept
Definition AMReX_Array.H:1092
Array< Real, 3 > RealArray
Definition AMReX_Array.H:28
Marker base that denotes an implicit function callable on device kernels.
Definition AMReX_EB2_IF_Base.H:19
Definition AMReX_Dim3.H:13
Real x
Definition AMReX_Dim3.H:13
Real z
Definition AMReX_Dim3.H:13
Real y
Definition AMReX_Dim3.H:13