1 #ifndef AMREX_DISTFCNELEMENT_H_
2 #define AMREX_DISTFCNELEMENT_H_
3 #include <AMReX_Config.H>
21 static int solve_thomas (
const std::vector<amrex::Real> &a,
22 std::vector<amrex::Real> &b,
23 const std::vector<amrex::Real> &c,
24 std::vector<amrex::Real> &d,
25 std::vector<amrex::Real> &X);
45 amrex::Real x0, amrex::Real x1,
46 amrex::Real y0, amrex::Real y1,
72 void calc_D(
bool clamped_bc =
false);
78 static amrex::Real
eval(amrex::Real t, amrex::Real y0, amrex::Real y1,
79 amrex::Real D0, amrex::Real D1);
80 static void dxbydt(amrex::Real t, amrex::Real y0, amrex::Real y1,
81 amrex::Real D0, amrex::Real D1, amrex::Real& dyf,
85 amrex::Real x0, amrex::Real x1,
86 amrex::Real Dx0, amrex::Real Dx1,
87 amrex::Real y0, amrex::Real y1,
88 amrex::Real Dy0, amrex::Real Dy1,
93 amrex::Real x0, amrex::Real x1,
94 amrex::Real Dx0, amrex::Real Dx1,
95 amrex::Real y0, amrex::Real y1,
96 amrex::Real Dy0, amrex::Real Dy1,
107 std::vector<amrex::Real>
Dx;
108 std::vector<amrex::Real>
Dy;
Definition: AMReX_distFcnElement.H:29
std::vector< amrex::Real > control_points_y
Definition: AMReX_distFcnElement.H:52
amrex::Real cpside(amrex::RealVect pt, amrex::RealVect &cp) const override
Definition: AMReX_distFcnElement.cpp:354
std::vector< amrex::Real > control_points_x
Definition: AMReX_distFcnElement.H:51
LineDistFcnElement2d()=default
distFcnElement2d * newDistFcnElement2d() const override
Definition: AMReX_distFcnElement.cpp:444
static void single_seg_cpdist(amrex::RealVect pt, amrex::Real x0, amrex::Real x1, amrex::Real y0, amrex::Real y1, amrex::RealVect &cp, amrex::Real &dist)
Definition: AMReX_distFcnElement.cpp:413
void set_control_points(std::vector< amrex::RealVect > pts)
Definition: AMReX_distFcnElement.cpp:406
~LineDistFcnElement2d() override=default
void print_control_points()
Definition: AMReX_distFcnElement.cpp:436
amrex::Real cpdist(amrex::RealVect pt, amrex::RealVect &cp) const override
Definition: AMReX_distFcnElement.cpp:334
A Real vector in SpaceDim-dimensional space.
Definition: AMReX_RealVect.H:32
Definition: AMReX_distFcnElement.H:58
distFcnElement2d * newDistFcnElement2d() const override
Definition: AMReX_distFcnElement.cpp:43
SplineDistFcnElement2d()=default
static amrex::Real dist(amrex::RealVect pt, amrex::Real x0, amrex::Real x1, amrex::Real Dx0, amrex::Real Dx1, amrex::Real y0, amrex::Real y1, amrex::Real Dy0, amrex::Real Dy1, amrex::Real &t, amrex::RealVect &spt)
Definition: AMReX_distFcnElement.cpp:64
std::vector< amrex::Real > control_points_y
Definition: AMReX_distFcnElement.H:102
static void single_spline_cpdist(amrex::RealVect pt, amrex::Real x0, amrex::Real x1, amrex::Real Dx0, amrex::Real Dx1, amrex::Real y0, amrex::Real y1, amrex::Real Dy0, amrex::Real Dy1, amrex::Real &t, amrex::RealVect &cp, amrex::Real &dist)
Definition: AMReX_distFcnElement.cpp:171
amrex::Real cpside(amrex::RealVect pt, amrex::RealVect &cp) const override
Definition: AMReX_distFcnElement.cpp:107
void print_control_points() const
Definition: AMReX_distFcnElement.cpp:300
void set_control_points(std::vector< amrex::RealVect > pts)
Definition: AMReX_distFcnElement.cpp:285
amrex::Real cpdist(amrex::RealVect pt, amrex::RealVect &cp) const override
Definition: AMReX_distFcnElement.cpp:85
void print_spline() const
Definition: AMReX_distFcnElement.cpp:312
std::vector< amrex::Real > Dx
Definition: AMReX_distFcnElement.H:107
amrex::RealVect bc_pt_start
Definition: AMReX_distFcnElement.H:104
~SplineDistFcnElement2d() override=default
std::vector< amrex::Real > Dy
Definition: AMReX_distFcnElement.H:108
static void dxbydt(amrex::Real t, amrex::Real y0, amrex::Real y1, amrex::Real D0, amrex::Real D1, amrex::Real &dyf, amrex::Real &d2yf)
Definition: AMReX_distFcnElement.cpp:212
std::vector< amrex::Real > control_points_x
Definition: AMReX_distFcnElement.H:101
amrex::RealVect bc_pt_end
Definition: AMReX_distFcnElement.H:105
void calc_D(bool clamped_bc=false)
Definition: AMReX_distFcnElement.cpp:226
static amrex::Real eval(amrex::Real t, amrex::Real y0, amrex::Real y1, amrex::Real D0, amrex::Real D1)
Definition: AMReX_distFcnElement.cpp:54
void set_bc_points(amrex::RealVect start, amrex::RealVect end)
Definition: AMReX_distFcnElement.cpp:293
Definition: AMReX_distFcnElement.H:11
virtual ~distFcnElement2d()=default
virtual amrex::Real cpdist(amrex::RealVect pt, amrex::RealVect &cp) const =0
virtual distFcnElement2d * newDistFcnElement2d() const =0
static int solve_thomas(const std::vector< amrex::Real > &a, std::vector< amrex::Real > &b, const std::vector< amrex::Real > &c, std::vector< amrex::Real > &d, std::vector< amrex::Real > &X)
Definition: AMReX_distFcnElement.cpp:9
distFcnElement2d()=default
Constructor.
virtual amrex::Real cpside(amrex::RealVect pt, amrex::RealVect &cp) const =0
Definition: AMReX_Amr.cpp:49
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 end(BoxND< dim > const &box) noexcept
Definition: AMReX_Box.H:1890