1 #ifndef ERF_PhysBCFunct_H_
2 #define ERF_PhysBCFunct_H_
4 #include <AMReX_Config.H>
6 #include <AMReX_BCRec.H>
7 #include <AMReX_Geometry.H>
8 #include <AMReX_MultiFab.H>
9 #include <AMReX_ArrayLim.H>
10 #include <AMReX_FilCC_C.H>
11 #include <AMReX_FilND_C.H>
12 #include <AMReX_FilFC_C.H>
13 #include "AMReX_TypeTraits.H"
14 #include "AMReX_Orientation.H"
27 const amrex::Geometry& geom,
const amrex::Vector<amrex::BCRec>& domain_bcs_type,
28 const amrex::Gpu::DeviceVector<amrex::BCRec>& domain_bcs_type_d,
29 amrex::Array<amrex::Array<amrex::Real,AMREX_SPACEDIM*2>,AMREX_SPACEDIM+
NBCVAR_max> bc_extdir_vals,
30 amrex::Array<amrex::Array<amrex::Real,AMREX_SPACEDIM*2>,AMREX_SPACEDIM+
NBCVAR_max> bc_neumann_vals,
31 std::unique_ptr<amrex::MultiFab>& z_phys_nd,
32 const bool use_real_bcs)
54 void operator() (amrex::MultiFab& mf,
int icomp,
int ncomp,
55 amrex::IntVect
const& nghost,
const amrex::Real time,
int bccomp_cons,
56 bool do_fb =
true,
bool do_terrain_adjustment =
true);
59 const amrex::Box& bx,
const amrex::Box& domain,
60 int icomp,
int ncomp, amrex::IntVect ng);
62 const amrex::Box& bx,
const amrex::Box& domain,
63 const amrex::Array4<amrex::Real const>& z_nd,
64 const amrex::GpuArray<amrex::Real,AMREX_SPACEDIM> dxInv,
65 int icomp,
int ncomp,
bool do_terrain_adjustment =
true);
82 const amrex::Vector<amrex::BCRec>& domain_bcs_type,
83 const amrex::Gpu::DeviceVector<amrex::BCRec>& domain_bcs_type_d,
84 amrex::Array<amrex::Array<amrex::Real,AMREX_SPACEDIM*2>,AMREX_SPACEDIM+
NBCVAR_max> bc_extdir_vals,
85 amrex::Array<amrex::Array<amrex::Real,AMREX_SPACEDIM*2>,AMREX_SPACEDIM+
NBCVAR_max> bc_neumann_vals,
86 std::unique_ptr<amrex::MultiFab>& z_phys_nd,
87 const bool use_real_bcs,
88 amrex::Real* u_bc_data)
109 void operator() (amrex::MultiFab& mf,
int icomp,
int ncomp,
110 amrex::IntVect
const& nghost,
const amrex::Real time,
int bccomp,
114 const amrex::Box& bx,
const amrex::Box& domain,
117 const amrex::Box& bx,
const amrex::Box& domain,
118 const amrex::Array4<amrex::Real const>& z_nd,
119 const amrex::GpuArray<amrex::Real,AMREX_SPACEDIM> dxInv,
121 const amrex::Real time);
139 const amrex::Vector<amrex::BCRec>& domain_bcs_type,
140 const amrex::Gpu::DeviceVector<amrex::BCRec>& domain_bcs_type_d,
141 amrex::Array<amrex::Array<amrex::Real,AMREX_SPACEDIM*2>,AMREX_SPACEDIM+
NBCVAR_max> bc_extdir_vals,
142 amrex::Array<amrex::Array<amrex::Real,AMREX_SPACEDIM*2>,AMREX_SPACEDIM+
NBCVAR_max> bc_neumann_vals,
143 std::unique_ptr<amrex::MultiFab>& z_phys_nd,
144 const bool use_real_bcs,
145 amrex::Real* v_bc_data)
168 void operator() (amrex::MultiFab& mf,
int icomp,
int ncomp,
169 amrex::IntVect
const& nghost,
const amrex::Real time,
int bccomp,
173 const amrex::Box& bx,
const amrex::Box& domain,
176 const amrex::Box& bx,
const amrex::Box& domain,
177 const amrex::Array4<amrex::Real const>& z_nd,
178 const amrex::GpuArray<amrex::Real,AMREX_SPACEDIM> dxInv,
197 const amrex::Vector<amrex::BCRec>& domain_bcs_type,
198 const amrex::Gpu::DeviceVector<amrex::BCRec>& domain_bcs_type_d,
199 amrex::Array<amrex::Array<amrex::Real,AMREX_SPACEDIM*2>,AMREX_SPACEDIM+
NBCVAR_max> bc_extdir_vals,
200 amrex::Array<amrex::Array<amrex::Real,AMREX_SPACEDIM*2>,AMREX_SPACEDIM+
NBCVAR_max> bc_neumann_vals,
201 const TerrainType& terrain_type, std::unique_ptr<amrex::MultiFab>& z_phys_nd,
202 const bool use_real_bcs,
203 amrex::Real* w_bc_data)
228 amrex::IntVect
const& nghost,
const amrex::Real time,
int bccomp,
232 const amrex::Array4<amrex::Real const>& xvel_arr,
233 const amrex::Array4<amrex::Real const>& yvel_arr,
234 const amrex::Box& bx,
const amrex::Box& domain,
235 const amrex::Array4<amrex::Real const>& z_nd,
236 const amrex::GpuArray<amrex::Real,AMREX_SPACEDIM> dxInv,
239 const amrex::Array4<amrex::Real const>& xvel_arr,
240 const amrex::Array4<amrex::Real const>& yvel_arr,
241 const amrex::Box& bx,
const amrex::Box& domain,
242 const amrex::Array4<amrex::Real const>& z_nd,
243 const amrex::GpuArray<amrex::Real,AMREX_SPACEDIM> dxInv,
244 int bccomp_u,
int bccomp_v,
int bccomp_w,
245 TerrainType terrain_type);
264 const amrex::Geometry& geom,
const amrex::Vector<amrex::BCRec>& domain_bcs_type,
265 const amrex::Gpu::DeviceVector<amrex::BCRec>& domain_bcs_type_d,
284 void operator() (amrex::MultiFab& mf,
int icomp,
int ncomp, amrex::IntVect
const& nghost);
287 const amrex::Box& bx,
const amrex::Box& domain,
288 int ncomp,
const amrex::IntVect& nghost);
290 const amrex::Box& bx,
const amrex::Box& domain,
291 int ncomp,
const amrex::IntVect& nghost);
#define NBCVAR_max
Definition: ERF_IndexDefines.H:29
Definition: ERF_PhysBCFunct.H:261
amrex::Gpu::DeviceVector< amrex::BCRec > m_domain_bcs_type_d
Definition: ERF_PhysBCFunct.H:298
void impose_vertical_basestate_bcs(const amrex::Array4< amrex::Real > &dest_arr, const amrex::Box &bx, const amrex::Box &domain, int ncomp, const amrex::IntVect &nghost)
Definition: ERF_BoundaryConditionsBaseState.cpp:246
ERFPhysBCFunct_base(const int lev, const amrex::Geometry &geom, const amrex::Vector< amrex::BCRec > &domain_bcs_type, const amrex::Gpu::DeviceVector< amrex::BCRec > &domain_bcs_type_d, bool moving_terrain)
Definition: ERF_PhysBCFunct.H:263
int m_lev
Definition: ERF_PhysBCFunct.H:294
amrex::Geometry m_geom
Definition: ERF_PhysBCFunct.H:295
bool m_moving_terrain
Definition: ERF_PhysBCFunct.H:296
void impose_lateral_basestate_bcs(const amrex::Array4< amrex::Real > &dest_arr, const amrex::Box &bx, const amrex::Box &domain, int ncomp, const amrex::IntVect &nghost)
Definition: ERF_BoundaryConditionsBaseState.cpp:15
void operator()(amrex::MultiFab &mf, int icomp, int ncomp, amrex::IntVect const &nghost)
Definition: ERF_PhysBCFunct.cpp:311
amrex::Vector< amrex::BCRec > m_domain_bcs_type
Definition: ERF_PhysBCFunct.H:297
~ERFPhysBCFunct_base()
Definition: ERF_PhysBCFunct.H:273
Definition: ERF_PhysBCFunct.H:24
bool m_use_real_bcs
Definition: ERF_PhysBCFunct.H:75
amrex::Geometry m_geom
Definition: ERF_PhysBCFunct.H:69
void impose_vertical_cons_bcs(const amrex::Array4< amrex::Real > &dest_arr, const amrex::Box &bx, const amrex::Box &domain, const amrex::Array4< amrex::Real const > &z_nd, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > dxInv, int icomp, int ncomp, bool do_terrain_adjustment=true)
Definition: ERF_BoundaryConditionsCons.cpp:272
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > m_bc_extdir_vals
Definition: ERF_PhysBCFunct.H:72
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > m_bc_neumann_vals
Definition: ERF_PhysBCFunct.H:73
ERFPhysBCFunct_cons(const int lev, const amrex::Geometry &geom, const amrex::Vector< amrex::BCRec > &domain_bcs_type, const amrex::Gpu::DeviceVector< amrex::BCRec > &domain_bcs_type_d, amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > bc_extdir_vals, amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > bc_neumann_vals, std::unique_ptr< amrex::MultiFab > &z_phys_nd, const bool use_real_bcs)
Definition: ERF_PhysBCFunct.H:26
amrex::Gpu::DeviceVector< amrex::BCRec > m_domain_bcs_type_d
Definition: ERF_PhysBCFunct.H:71
amrex::Vector< amrex::BCRec > m_domain_bcs_type
Definition: ERF_PhysBCFunct.H:70
~ERFPhysBCFunct_cons()
Definition: ERF_PhysBCFunct.H:42
void impose_lateral_cons_bcs(const amrex::Array4< amrex::Real > &dest_arr, const amrex::Box &bx, const amrex::Box &domain, int icomp, int ncomp, amrex::IntVect ng)
Definition: ERF_BoundaryConditionsCons.cpp:17
void operator()(amrex::MultiFab &mf, int icomp, int ncomp, amrex::IntVect const &nghost, const amrex::Real time, int bccomp_cons, bool do_fb=true, bool do_terrain_adjustment=true)
Definition: ERF_PhysBCFunct.cpp:16
amrex::MultiFab * m_z_phys_nd
Definition: ERF_PhysBCFunct.H:74
int m_lev
Definition: ERF_PhysBCFunct.H:68
Definition: ERF_PhysBCFunct.H:79
ERFPhysBCFunct_u(const int lev, const amrex::Geometry &geom, const amrex::Vector< amrex::BCRec > &domain_bcs_type, const amrex::Gpu::DeviceVector< amrex::BCRec > &domain_bcs_type_d, amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > bc_extdir_vals, amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > bc_neumann_vals, std::unique_ptr< amrex::MultiFab > &z_phys_nd, const bool use_real_bcs, amrex::Real *u_bc_data)
Definition: ERF_PhysBCFunct.H:81
amrex::Geometry m_geom
Definition: ERF_PhysBCFunct.H:125
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > m_bc_extdir_vals
Definition: ERF_PhysBCFunct.H:128
amrex::Gpu::DeviceVector< amrex::BCRec > m_domain_bcs_type_d
Definition: ERF_PhysBCFunct.H:127
bool m_use_real_bcs
Definition: ERF_PhysBCFunct.H:131
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > m_bc_neumann_vals
Definition: ERF_PhysBCFunct.H:129
amrex::Real * m_u_bc_data
Definition: ERF_PhysBCFunct.H:132
int m_lev
Definition: ERF_PhysBCFunct.H:124
void operator()(amrex::MultiFab &mf, int icomp, int ncomp, amrex::IntVect const &nghost, const amrex::Real time, int bccomp, bool do_fb)
Definition: ERF_PhysBCFunct.cpp:86
amrex::Vector< amrex::BCRec > m_domain_bcs_type
Definition: ERF_PhysBCFunct.H:126
void impose_lateral_xvel_bcs(const amrex::Array4< amrex::Real > &dest_arr, const amrex::Box &bx, const amrex::Box &domain, int bccomp)
Definition: ERF_BoundaryConditionsXvel.cpp:15
~ERFPhysBCFunct_u()
Definition: ERF_PhysBCFunct.H:99
amrex::MultiFab * m_z_phys_nd
Definition: ERF_PhysBCFunct.H:130
void impose_vertical_xvel_bcs(const amrex::Array4< amrex::Real > &dest_arr, const amrex::Box &bx, const amrex::Box &domain, const amrex::Array4< amrex::Real const > &z_nd, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > dxInv, int bccomp, const amrex::Real time)
Definition: ERF_BoundaryConditionsXvel.cpp:166
Definition: ERF_PhysBCFunct.H:136
amrex::Geometry m_geom
Definition: ERF_PhysBCFunct.H:183
amrex::Gpu::DeviceVector< amrex::BCRec > m_domain_bcs_type_d
Definition: ERF_PhysBCFunct.H:185
amrex::Real * m_v_bc_data
Definition: ERF_PhysBCFunct.H:190
int m_lev
Definition: ERF_PhysBCFunct.H:182
~ERFPhysBCFunct_v()
Definition: ERF_PhysBCFunct.H:156
ERFPhysBCFunct_v(const int lev, const amrex::Geometry &geom, const amrex::Vector< amrex::BCRec > &domain_bcs_type, const amrex::Gpu::DeviceVector< amrex::BCRec > &domain_bcs_type_d, amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > bc_extdir_vals, amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > bc_neumann_vals, std::unique_ptr< amrex::MultiFab > &z_phys_nd, const bool use_real_bcs, amrex::Real *v_bc_data)
Definition: ERF_PhysBCFunct.H:138
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > m_bc_neumann_vals
Definition: ERF_PhysBCFunct.H:187
void impose_vertical_yvel_bcs(const amrex::Array4< amrex::Real > &dest_arr, const amrex::Box &bx, const amrex::Box &domain, const amrex::Array4< amrex::Real const > &z_nd, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > dxInv, int bccomp)
Definition: ERF_BoundaryConditionsYvel.cpp:167
bool m_use_real_bcs
Definition: ERF_PhysBCFunct.H:189
void impose_lateral_yvel_bcs(const amrex::Array4< amrex::Real > &dest_arr, const amrex::Box &bx, const amrex::Box &domain, int bccomp)
Definition: ERF_BoundaryConditionsYvel.cpp:14
amrex::Vector< amrex::BCRec > m_domain_bcs_type
Definition: ERF_PhysBCFunct.H:184
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > m_bc_extdir_vals
Definition: ERF_PhysBCFunct.H:186
void operator()(amrex::MultiFab &mf, int icomp, int ncomp, amrex::IntVect const &nghost, const amrex::Real time, int bccomp, bool do_fb)
Definition: ERF_PhysBCFunct.cpp:158
amrex::MultiFab * m_z_phys_nd
Definition: ERF_PhysBCFunct.H:188
Definition: ERF_PhysBCFunct.H:194
amrex::Vector< amrex::BCRec > m_domain_bcs_type
Definition: ERF_PhysBCFunct.H:250
amrex::Geometry m_geom
Definition: ERF_PhysBCFunct.H:249
int m_lev
Definition: ERF_PhysBCFunct.H:248
amrex::Real * m_w_bc_data
Definition: ERF_PhysBCFunct.H:257
void operator()(amrex::MultiFab &mf, amrex::MultiFab &xvel, amrex::MultiFab &yvel, amrex::IntVect const &nghost, const amrex::Real time, int bccomp, bool do_fb)
Definition: ERF_PhysBCFunct.cpp:228
bool m_use_real_bcs
Definition: ERF_PhysBCFunct.H:256
amrex::Gpu::DeviceVector< amrex::BCRec > m_domain_bcs_type_d
Definition: ERF_PhysBCFunct.H:251
void impose_vertical_zvel_bcs(const amrex::Array4< amrex::Real > &dest_arr, const amrex::Array4< amrex::Real const > &xvel_arr, const amrex::Array4< amrex::Real const > &yvel_arr, const amrex::Box &bx, const amrex::Box &domain, const amrex::Array4< amrex::Real const > &z_nd, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > dxInv, int bccomp_u, int bccomp_v, int bccomp_w, TerrainType terrain_type)
Definition: ERF_BoundaryConditionsZvel.cpp:162
TerrainType m_terrain_type
Definition: ERF_PhysBCFunct.H:254
ERFPhysBCFunct_w(const int lev, const amrex::Geometry &geom, const amrex::Vector< amrex::BCRec > &domain_bcs_type, const amrex::Gpu::DeviceVector< amrex::BCRec > &domain_bcs_type_d, amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > bc_extdir_vals, amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > bc_neumann_vals, const TerrainType &terrain_type, std::unique_ptr< amrex::MultiFab > &z_phys_nd, const bool use_real_bcs, amrex::Real *w_bc_data)
Definition: ERF_PhysBCFunct.H:196
void impose_lateral_zvel_bcs(const amrex::Array4< amrex::Real > &dest_arr, const amrex::Array4< amrex::Real const > &xvel_arr, const amrex::Array4< amrex::Real const > &yvel_arr, const amrex::Box &bx, const amrex::Box &domain, const amrex::Array4< amrex::Real const > &z_nd, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > dxInv, int bccomp)
Definition: ERF_BoundaryConditionsZvel.cpp:16
amrex::MultiFab * m_z_phys_nd
Definition: ERF_PhysBCFunct.H:255
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > m_bc_neumann_vals
Definition: ERF_PhysBCFunct.H:253
~ERFPhysBCFunct_w()
Definition: ERF_PhysBCFunct.H:215
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > m_bc_extdir_vals
Definition: ERF_PhysBCFunct.H:252
@ xvel
Definition: ERF_IndexDefines.H:130
@ yvel
Definition: ERF_IndexDefines.H:131