ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERFPhysBCFunct_u Class Reference

#include <ERF_PhysBCFunct.H>

Collaboration diagram for ERFPhysBCFunct_u:

Public Member Functions

 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+NVAR_max > bc_extdir_vals, amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NVAR_max > bc_neumann_vals, std::unique_ptr< amrex::MultiFab > &z_phys_nd, const bool use_real_bcs)
 
 ~ERFPhysBCFunct_u ()
 
void operator() (amrex::MultiFab &mf, int icomp, int ncomp, amrex::IntVect const &nghost, const amrex::Real time, int bccomp)
 
void impose_lateral_xvel_bcs (const amrex::Array4< amrex::Real > &dest_arr, const amrex::Box &bx, const amrex::Box &domain, int bccomp)
 
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)
 

Private Attributes

int m_lev
 
amrex::Geometry m_geom
 
amrex::Vector< amrex::BCRec > m_domain_bcs_type
 
amrex::Gpu::DeviceVector< amrex::BCRec > m_domain_bcs_type_d
 
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NVAR_maxm_bc_extdir_vals
 
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NVAR_maxm_bc_neumann_vals
 
amrex::MultiFab * m_z_phys_nd
 
bool m_use_real_bcs
 

Constructor & Destructor Documentation

◆ ERFPhysBCFunct_u()

ERFPhysBCFunct_u::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+NVAR_max bc_extdir_vals,
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NVAR_max bc_neumann_vals,
std::unique_ptr< amrex::MultiFab > &  z_phys_nd,
const bool  use_real_bcs 
)
inline
87  : m_lev(lev), m_geom(geom),
88  m_domain_bcs_type(domain_bcs_type),
89  m_domain_bcs_type_d(domain_bcs_type_d),
90  m_bc_extdir_vals(bc_extdir_vals),
91  m_bc_neumann_vals(bc_neumann_vals),
92  m_z_phys_nd(z_phys_nd.get()),
93  m_use_real_bcs(use_real_bcs)
94  {}
amrex::Geometry m_geom
Definition: ERF_PhysBCFunct.H:121
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NVAR_max > m_bc_extdir_vals
Definition: ERF_PhysBCFunct.H:124
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NVAR_max > m_bc_neumann_vals
Definition: ERF_PhysBCFunct.H:125
amrex::Gpu::DeviceVector< amrex::BCRec > m_domain_bcs_type_d
Definition: ERF_PhysBCFunct.H:123
bool m_use_real_bcs
Definition: ERF_PhysBCFunct.H:127
int m_lev
Definition: ERF_PhysBCFunct.H:120
amrex::Vector< amrex::BCRec > m_domain_bcs_type
Definition: ERF_PhysBCFunct.H:122
amrex::MultiFab * m_z_phys_nd
Definition: ERF_PhysBCFunct.H:126

◆ ~ERFPhysBCFunct_u()

ERFPhysBCFunct_u::~ERFPhysBCFunct_u ( )
inline
96 {}

Member Function Documentation

◆ impose_lateral_xvel_bcs()

void ERFPhysBCFunct_u::impose_lateral_xvel_bcs ( const amrex::Array4< amrex::Real > &  dest_arr,
const amrex::Box &  bx,
const amrex::Box &  domain,
int  bccomp 
)
19 {
20  BL_PROFILE_VAR("impose_lateral_xvel_bcs()",impose_lateral_xvel_bcs);
21  const auto& dom_lo = lbound(domain);
22  const auto& dom_hi = ubound(domain);
23 
24  // xlo: ori = 0
25  // ylo: ori = 1
26  // zlo: ori = 2
27  // xhi: ori = 3
28  // yhi: ori = 4
29  // zhi: ori = 5
30 
31  // Based on BCRec for the domain, we need to make BCRec for this Box
32  // bccomp is used as starting index for m_domain_bcs_type
33  // 0 is used as starting index for bcrs
34  int ncomp = 1;
35  Vector<BCRec> bcrs(ncomp);
36  setBC(enclosedCells(bx), domain, bccomp, 0, ncomp, m_domain_bcs_type, bcrs);
37 
38  Gpu::DeviceVector<BCRec> bcrs_d(ncomp);
39  Gpu::copyAsync(Gpu::hostToDevice, bcrs.begin(), bcrs.end(), bcrs_d.begin());
40  const BCRec* bc_ptr = bcrs_d.data();
41 
42  GpuArray<GpuArray<Real, AMREX_SPACEDIM*2>,AMREX_SPACEDIM+NVAR_max> l_bc_extdir_vals_d;
43 
44  for (int i = 0; i < ncomp; i++)
45  for (int ori = 0; ori < 2*AMREX_SPACEDIM; ori++)
46  l_bc_extdir_vals_d[i][ori] = m_bc_extdir_vals[bccomp+i][ori];
47 
48  GeometryData const& geomdata = m_geom.data();
49  bool is_periodic_in_x = geomdata.isPeriodic(0);
50  bool is_periodic_in_y = geomdata.isPeriodic(1);
51 
52  // First do all ext_dir bcs
53  if (!is_periodic_in_x)
54  {
55  Box bx_xlo(bx); bx_xlo.setBig (0,dom_lo.x-1);
56  Box bx_xhi(bx); bx_xhi.setSmall(0,dom_hi.x+2);
57  Box bx_xlo_face(bx); bx_xlo_face.setSmall(0,dom_lo.x ); bx_xlo_face.setBig(0,dom_lo.x );
58  Box bx_xhi_face(bx); bx_xhi_face.setSmall(0,dom_hi.x+1); bx_xhi_face.setBig(0,dom_hi.x+1);
59  ParallelFor(
60  bx_xlo, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n)
61  {
62  int iflip = dom_lo.x - i;
63  if (bc_ptr[n].lo(0) == ERFBCType::ext_dir) {
64  dest_arr(i,j,k) = l_bc_extdir_vals_d[n][0];
65  } else if (bc_ptr[n].lo(0) == ERFBCType::foextrap) {
66  dest_arr(i,j,k) = dest_arr(dom_lo.x,j,k);
67  } else if (bc_ptr[n].lo(0) == ERFBCType::open) {
68  dest_arr(i,j,k) = dest_arr(dom_lo.x,j,k);
69  } else if (bc_ptr[n].lo(0) == ERFBCType::reflect_even) {
70  dest_arr(i,j,k) = dest_arr(iflip,j,k);
71  } else if (bc_ptr[n].lo(0) == ERFBCType::reflect_odd) {
72  dest_arr(i,j,k) = -dest_arr(iflip,j,k);
73  } else if (bc_ptr[n].lo(0) == ERFBCType::neumann_int) {
74  dest_arr(i,j,k) = (4.0*dest_arr(dom_lo.x+1,j,k) - dest_arr(dom_lo.x+2,j,k))/3.0;
75  }
76  },
77  // We only set the values on the domain faces themselves if EXT_DIR
78  bx_xlo_face, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n)
79  {
80  if (bc_ptr[n].lo(0) == ERFBCType::ext_dir) {
81  dest_arr(i,j,k) = l_bc_extdir_vals_d[n][0];
82  } else if (bc_ptr[n].lo(0) == ERFBCType::neumann_int) {
83  dest_arr(i,j,k) = (4.0*dest_arr(dom_lo.x+1,j,k) - dest_arr(dom_lo.x+2,j,k))/3.0;
84  }
85  }
86  );
87  ParallelFor(
88  bx_xhi, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n)
89  {
90  int iflip = 2*(dom_hi.x + 1) - i;
91  if (bc_ptr[n].hi(0) == ERFBCType::ext_dir) {
92  dest_arr(i,j,k) = l_bc_extdir_vals_d[n][3];
93  } else if (bc_ptr[n].hi(0) == ERFBCType::foextrap) {
94  dest_arr(i,j,k) = dest_arr(dom_hi.x+1,j,k);
95  } else if (bc_ptr[n].hi(0) == ERFBCType::open) {
96  dest_arr(i,j,k) = dest_arr(dom_hi.x+1,j,k);
97  } else if (bc_ptr[n].hi(0) == ERFBCType::reflect_even) {
98  dest_arr(i,j,k) = dest_arr(iflip,j,k);
99  } else if (bc_ptr[n].hi(0) == ERFBCType::reflect_odd) {
100  dest_arr(i,j,k) = -dest_arr(iflip,j,k);
101  } else if (bc_ptr[n].hi(0) == ERFBCType::neumann_int) {
102  dest_arr(i,j,k) = (4.0*dest_arr(dom_hi.x,j,k) - dest_arr(dom_hi.x-1,j,k))/3.0;
103  }
104  },
105  // We only set the values on the domain faces themselves if EXT_DIR
106  bx_xhi_face, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n)
107  {
108  if (bc_ptr[n].hi(0) == ERFBCType::ext_dir) {
109  dest_arr(i,j,k) = l_bc_extdir_vals_d[n][3];
110  } else if (bc_ptr[n].hi(0) == ERFBCType::neumann_int) {
111  dest_arr(i,j,k) = (4.0*dest_arr(dom_hi.x,j,k) - dest_arr(dom_hi.x-1,j,k))/3.0;
112  }
113  }
114  );
115  } // not periodic in x
116 
117  if (!is_periodic_in_y)
118  {
119  // Populate ghost cells on lo-y and hi-y domain boundaries
120  Box bx_ylo(bx); bx_ylo.setBig (1,dom_lo.y-1);
121  Box bx_yhi(bx); bx_yhi.setSmall(1,dom_hi.y+1);
122  ParallelFor(
123  bx_ylo, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) {
124  int jflip = dom_lo.y - 1 - j;
125  if (bc_ptr[n].lo(1) == ERFBCType::ext_dir) {
126  dest_arr(i,j,k) = l_bc_extdir_vals_d[n][1];
127  } else if (bc_ptr[n].lo(1) == ERFBCType::foextrap) {
128  dest_arr(i,j,k) = dest_arr(i,dom_lo.y,k);
129  } else if (bc_ptr[n].lo(1) == ERFBCType::open) {
130  dest_arr(i,j,k) = dest_arr(i,dom_lo.y,k);
131  } else if (bc_ptr[n].lo(1) == ERFBCType::reflect_even) {
132  dest_arr(i,j,k) = dest_arr(i,jflip,k);
133  } else if (bc_ptr[n].lo(1) == ERFBCType::reflect_odd) {
134  dest_arr(i,j,k) = -dest_arr(i,jflip,k);
135  }
136  },
137  bx_yhi, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) {
138  int jflip = 2*dom_hi.y + 1 - j;
139  if (bc_ptr[n].hi(1) == ERFBCType::ext_dir) {
140  dest_arr(i,j,k) = l_bc_extdir_vals_d[n][4];
141  } else if (bc_ptr[n].hi(1) == ERFBCType::foextrap) {
142  dest_arr(i,j,k) = dest_arr(i,dom_hi.y,k);
143  } else if (bc_ptr[n].hi(1) == ERFBCType::open) {
144  dest_arr(i,j,k) = dest_arr(i,dom_hi.y,k);
145  } else if (bc_ptr[n].hi(1) == ERFBCType::reflect_even) {
146  dest_arr(i,j,k) = dest_arr(i,jflip,k);
147  } else if (bc_ptr[n].hi(1) == ERFBCType::reflect_odd) {
148  dest_arr(i,j,k) = -dest_arr(i,jflip,k);
149  }
150  }
151  );
152  } // not periodic in y
153 
154  Gpu::streamSynchronize();
155 }
#define NVAR_max
Definition: IndexDefines.H:27
void impose_lateral_xvel_bcs(const amrex::Array4< amrex::Real > &dest_arr, const amrex::Box &bx, const amrex::Box &domain, int bccomp)
Definition: BoundaryConditions_xvel.cpp:17
@ open
Definition: IndexDefines.H:157
@ reflect_odd
Definition: IndexDefines.H:148
@ foextrap
Definition: IndexDefines.H:151
@ ext_dir
Definition: IndexDefines.H:152
@ neumann_int
Definition: IndexDefines.H:156
@ reflect_even
Definition: IndexDefines.H:150

◆ impose_vertical_xvel_bcs()

void ERFPhysBCFunct_u::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 
)
177 {
178  BL_PROFILE_VAR("impose_vertical_xvel_bcs()",impose_vertical_xvel_bcs);
179  const auto& dom_lo = lbound(domain);
180  const auto& dom_hi = ubound(domain);
181 
182  GeometryData const& geomdata = m_geom.data();
183 
184  // Based on BCRec for the domain, we need to make BCRec for this Box
185  // bccomp is used as starting index for m_domain_bcs_type
186  // 0 is used as starting index for bcrs
187  int ncomp = 1;
188  Vector<BCRec> bcrs(ncomp);
189  setBC(enclosedCells(bx), domain, bccomp, 0, ncomp, m_domain_bcs_type, bcrs);
190 
191  Gpu::DeviceVector<BCRec> bcrs_d(ncomp);
192  Gpu::copyAsync(Gpu::hostToDevice, bcrs.begin(), bcrs.end(), bcrs_d.begin());
193  const BCRec* bc_ptr = bcrs_d.data();
194 
195  GpuArray<GpuArray<Real, AMREX_SPACEDIM*2>,AMREX_SPACEDIM+NVAR_max> l_bc_extdir_vals_d;
196 
197  for (int i = 0; i < ncomp; i++)
198  for (int ori = 0; ori < 2*AMREX_SPACEDIM; ori++)
199  l_bc_extdir_vals_d[i][ori] = m_bc_extdir_vals[bccomp+i][ori];
200 
201  {
202  // Populate ghost cells on lo-z and hi-z domain boundaries
203  Box bx_zlo(bx); bx_zlo.setBig (2,dom_lo.z-1);
204  Box bx_zhi(bx); bx_zhi.setSmall(2,dom_hi.z+1);
205  ParallelFor(
206  bx_zlo, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) {
207  int kflip = dom_lo.z - 1 - k;
208  if (bc_ptr[n].lo(2) == ERFBCType::ext_dir) {
209  #ifdef ERF_USE_TERRAIN_VELOCITY
210  dest_arr(i,j,k) = prob->compute_terrain_velocity(time);
211  #else
212  dest_arr(i,j,k) = l_bc_extdir_vals_d[n][2];
213  #endif
214  } else if (bc_ptr[n].lo(2) == ERFBCType::foextrap) {
215  dest_arr(i,j,k) = dest_arr(i,j,dom_lo.z);
216  } else if (bc_ptr[n].lo(2) == ERFBCType::open) {
217  dest_arr(i,j,k) = dest_arr(i,j,dom_lo.z);
218  } else if (bc_ptr[n].lo(2) == ERFBCType::reflect_even) {
219  dest_arr(i,j,k) = dest_arr(i,j,kflip);
220  } else if (bc_ptr[n].lo(2) == ERFBCType::reflect_odd) {
221  dest_arr(i,j,k) = -dest_arr(i,j,kflip);
222  }
223  },
224  bx_zhi, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) {
225  int kflip = 2*dom_hi.z + 1 - k;
226  if (bc_ptr[n].hi(2) == ERFBCType::ext_dir) {
227  dest_arr(i,j,k) = l_bc_extdir_vals_d[n][5];
228  } else if (bc_ptr[n].hi(2) == ERFBCType::foextrap) {
229  dest_arr(i,j,k) = dest_arr(i,j,dom_hi.z);
230  } else if (bc_ptr[n].hi(2) == ERFBCType::open) {
231  dest_arr(i,j,k) = dest_arr(i,j,dom_hi.z);
232  } else if (bc_ptr[n].hi(2) == ERFBCType::reflect_even) {
233  dest_arr(i,j,k) = dest_arr(i,j,kflip);
234  } else if (bc_ptr[n].hi(2) == ERFBCType::reflect_odd) {
235  dest_arr(i,j,k) = -dest_arr(i,j,kflip);
236  }
237  }
238  );
239  } // z
240 
241  if (m_z_phys_nd) {
242  const auto& bx_lo = lbound(bx);
243  const auto& bx_hi = ubound(bx);
244  // Neumann conditions (d<var>/dn = 0) must be aware of the surface normal with terrain.
245  // An additional source term arises from d<var>/dx & d<var>/dy & met_h_xi/eta/zeta.
246  //=====================================================================================
247  // Only modify scalars, U, or V
248  // Loop over each component
249  for (int n = 0; n < ncomp; n++) {
250  // Hit for Neumann condition at kmin
251  if(bcrs[n].lo(2) == ERFBCType::foextrap) {
252  // Loop over ghost cells in bottom XY-plane (valid box)
253  Box xybx = bx;
254  xybx.setBig(2,-1);
255  xybx.setSmall(2,bx.smallEnd()[2]);
256  int k0 = 0;
257 
258  // Get the dz cell size
259  Real dz = geomdata.CellSize(2);
260 
261  // Fill all the Neumann srcs with terrain
262  ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int k)
263  {
264  // Clip indices for ghost-cells
265  int ii = amrex::min(amrex::max(i,dom_lo.x),dom_hi.x);
266  int jj = amrex::min(amrex::max(j,dom_lo.y),dom_hi.y);
267 
268  // Get metrics
269  Real met_h_xi = Compute_h_xi_AtIface (ii, jj, k0, dxInv, z_phys_nd);
270  Real met_h_eta = Compute_h_eta_AtIface (ii, jj, k0, dxInv, z_phys_nd);
271  Real met_h_zeta = Compute_h_zeta_AtIface(ii, jj, k0, dxInv, z_phys_nd);
272 
273  // GradX at IJK location inside domain -- this relies on the assumption that we have
274  // used foextrap for cell-centered quantities outside the domain to define the gradient as zero
275  Real GradVarx, GradVary;
276  if (i < dom_lo.x-1 || i > dom_hi.x+1)
277  GradVarx = 0.0;
278  else if (i+1 > bx_hi.x)
279  GradVarx = dxInv[0] * (dest_arr(i ,j,k0) - dest_arr(i-1,j,k0));
280  else if (i-1 < bx_lo.x)
281  GradVarx = dxInv[0] * (dest_arr(i+1,j,k0) - dest_arr(i ,j,k0));
282  else
283  GradVarx = 0.5 * dxInv[0] * (dest_arr(i+1,j,k0) - dest_arr(i-1,j,k0));
284 
285  // GradY at IJK location inside domain -- this relies on the assumption that we have
286  // used foextrap for cell-centered quantities outside the domain to define the gradient as zero
287  if (j < dom_lo.y-1 || j > dom_hi.y+1)
288  GradVary = 0.0;
289  else if (j+1 > bx_hi.y)
290  GradVary = dxInv[1] * (dest_arr(i,j ,k0) - dest_arr(i,j-1,k0));
291  else if (j-1 < bx_lo.y)
292  GradVary = dxInv[1] * (dest_arr(i,j+1,k0) - dest_arr(i,j ,k0));
293  else
294  GradVary = 0.5 * dxInv[1] * (dest_arr(i,j+1,k0) - dest_arr(i,j-1,k0));
295 
296  // Prefactor
297  Real met_fac = met_h_zeta / ( met_h_xi*met_h_xi + met_h_eta*met_h_eta + 1. );
298 
299  // Accumulate in bottom ghost cell (EXTRAP already populated)
300  dest_arr(i,j,k) -= dz * met_fac * ( met_h_xi * GradVarx + met_h_eta * GradVary );
301  });
302  } // foextrap
303  } // ncomp
304  } //m_z_phys_nd
305  Gpu::streamSynchronize();
306 }
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_xi_AtIface(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: TerrainMetrics.H:93
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_zeta_AtIface(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: TerrainMetrics.H:79
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_eta_AtIface(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: TerrainMetrics.H:108
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: BoundaryConditions_xvel.cpp:167
Here is the call graph for this function:

◆ operator()()

void ERFPhysBCFunct_u::operator() ( amrex::MultiFab &  mf,
int  icomp,
int  ncomp,
amrex::IntVect const &  nghost,
const amrex::Real  time,
int  bccomp 
)
77 {
78  BL_PROFILE("ERFPhysBCFunct_u::()");
79 
80  if (m_geom.isAllPeriodic()) return;
81 
82  const auto& domain = m_geom.Domain();
83  const auto dxInv = m_geom.InvCellSizeArray();
84 
85  Box gdomainx = surroundingNodes(domain,0);
86  for (int i = 0; i < AMREX_SPACEDIM; ++i) {
87  if (m_geom.isPeriodic(i)) {
88  gdomainx.grow(i, nghost[i]);
89  }
90  }
91 
92 #ifdef AMREX_USE_OMP
93 #pragma omp parallel if (Gpu::notInLaunchRegion())
94 #endif
95  {
96  for (MFIter mfi(mf,false); mfi.isValid(); ++mfi)
97  {
98  //
99  // This is the box we pass to the different routines
100  // NOTE -- this is the full grid NOT the tile box
101  //
102  Box bx = mfi.validbox();
103 
104  //
105  // These are the boxes we use to test on relative to the domain
106  //
107  Box xbx1 = surroundingNodes(bx,0); xbx1.grow(IntVect(nghost[0],nghost[1],0));
108  Box xbx2 = surroundingNodes(bx,0); xbx2.grow(nghost);
109 
110  Array4<const Real> z_nd_arr;
111 
112  if (m_z_phys_nd)
113  {
114  z_nd_arr = m_z_phys_nd->const_array(mfi);
115  }
116 
117  if (!gdomainx.contains(xbx2))
118  {
119  const Array4<Real> velx_arr = mf.array(mfi);;
120 
121  if (!m_use_real_bcs)
122  {
123  if (!gdomainx.contains(xbx1))
124  {
125  impose_lateral_xvel_bcs(velx_arr,xbx1,domain,bccomp);
126  }
127  }
128 
129  impose_vertical_xvel_bcs(velx_arr,xbx2,domain,z_nd_arr,dxInv,bccomp,time);
130  }
131 
132  } // MFIter
133  } // OpenMP
134 } // operator()

Member Data Documentation

◆ m_bc_extdir_vals

amrex::Array<amrex::Array<amrex::Real, AMREX_SPACEDIM*2>,AMREX_SPACEDIM+NVAR_max> ERFPhysBCFunct_u::m_bc_extdir_vals
private

◆ m_bc_neumann_vals

amrex::Array<amrex::Array<amrex::Real, AMREX_SPACEDIM*2>,AMREX_SPACEDIM+NVAR_max> ERFPhysBCFunct_u::m_bc_neumann_vals
private

◆ m_domain_bcs_type

amrex::Vector<amrex::BCRec> ERFPhysBCFunct_u::m_domain_bcs_type
private

◆ m_domain_bcs_type_d

amrex::Gpu::DeviceVector<amrex::BCRec> ERFPhysBCFunct_u::m_domain_bcs_type_d
private

◆ m_geom

amrex::Geometry ERFPhysBCFunct_u::m_geom
private

◆ m_lev

int ERFPhysBCFunct_u::m_lev
private

◆ m_use_real_bcs

bool ERFPhysBCFunct_u::m_use_real_bcs
private

◆ m_z_phys_nd

amrex::MultiFab* ERFPhysBCFunct_u::m_z_phys_nd
private

The documentation for this class was generated from the following files: