ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ERF_MakeTauTerms.cpp File Reference
#include "AMReX_ArrayLim.H"
#include "AMReX_BCRec.H"
#include "AMReX_GpuContainers.H"
#include "ERF_TI_slow_headers.H"
#include "ERF_EOS.H"
#include "ERF_Utils.H"
Include dependency graph for ERF_MakeTauTerms.cpp:

Functions

void erf_make_tau_terms (int level, int nrk, const Vector< BCRec > &domain_bcs_type_h, std::unique_ptr< MultiFab > &z_phys_nd, Vector< MultiFab > &S_data, const MultiFab &xvel, const MultiFab &yvel, const MultiFab &zvel, Vector< std::unique_ptr< MultiFab >> &Tau_lev, MultiFab *SmnSmn, MultiFab *eddyDiffs, const Geometry geom, const SolverChoice &solverChoice, std::unique_ptr< SurfaceLayer > &, std::unique_ptr< MultiFab > &detJ, Vector< std::unique_ptr< MultiFab >> &mapfac)
 

Function Documentation

◆ erf_make_tau_terms()

void erf_make_tau_terms ( int  level,
int  nrk,
const Vector< BCRec > &  domain_bcs_type_h,
std::unique_ptr< MultiFab > &  z_phys_nd,
Vector< MultiFab > &  S_data,
const MultiFab &  xvel,
const MultiFab &  yvel,
const MultiFab &  zvel,
Vector< std::unique_ptr< MultiFab >> &  Tau_lev,
MultiFab *  SmnSmn,
MultiFab *  eddyDiffs,
const Geometry  geom,
const SolverChoice solverChoice,
std::unique_ptr< SurfaceLayer > &  ,
std::unique_ptr< MultiFab > &  detJ,
Vector< std::unique_ptr< MultiFab >> &  mapfac 
)
27 {
28  BL_PROFILE_REGION("erf_make_tau_terms()");
29 
30  const BCRec* bc_ptr_h = domain_bcs_type_h.data();
31 
32  DiffChoice dc = solverChoice.diffChoice;
33  TurbChoice tc = solverChoice.turbChoice[level];
34 
35  const bool l_use_terrain_fitted_coords = (solverChoice.mesh_type != MeshType::ConstantDz);
36  const bool l_moving_terrain = (solverChoice.terrain_type == TerrainType::MovingFittedMesh);
37  if (l_moving_terrain) AMREX_ALWAYS_ASSERT (l_use_terrain_fitted_coords);
38 
39 
40  const bool l_use_diff = ( (dc.molec_diff_type != MolecDiffType::None) || tc.use_kturb );
41  const bool l_use_constAlpha = ( dc.molec_diff_type == MolecDiffType::ConstantAlpha );
42  const bool l_use_turb = ( tc.les_type == LESType::Smagorinsky ||
43  tc.les_type == LESType::Deardorff ||
44  tc.rans_type == RANSType::kEqn ||
45  tc.pbl_type == PBLType::MYNN25 ||
46  tc.pbl_type == PBLType::MYNNEDMF ||
47  tc.pbl_type == PBLType::YSU );
48 
49  const bool need_SmnSmn = (tc.les_type == LESType::Deardorff ||
50  tc.rans_type == RANSType::kEqn);
51 
52  const Box& domain = geom.Domain();
53  const int domlo_z = domain.smallEnd(2);
54  const int domhi_z = domain.bigEnd(2);
55 
56  const GpuArray<Real, AMREX_SPACEDIM> dxInv = geom.InvCellSizeArray();
57 
58  // *****************************************************************************
59  // Pre-computed quantities
60  // *****************************************************************************
61  const BoxArray& ba = S_data[IntVars::cons].boxArray();
62  const DistributionMapping& dm = S_data[IntVars::cons].DistributionMap();
63 
64  std::unique_ptr<MultiFab> expr;
65 
66  if (l_use_diff) {
67  expr = std::make_unique<MultiFab>(ba, dm, 1, IntVect(1,1,1));
68 
69  // if using constant alpha (mu = rho * alpha), then first divide by the
70  // reference density -- mu_eff will be scaled by the instantaneous
71  // local density later when ComputeStress*Visc_*() is called
72  Real mu_eff = (l_use_constAlpha) ? 2.0 * dc.dynamic_viscosity / dc.rho0_trans
73  : 2.0 * dc.dynamic_viscosity;
74 
75 #ifdef _OPENMP
76 #pragma omp parallel if (Gpu::notInLaunchRegion())
77 #endif
78  for ( MFIter mfi(S_data[IntVars::cons],TileNoZ()); mfi.isValid(); ++mfi)
79  {
80  const Box& bx = mfi.tilebox();
81  const Box& valid_bx = mfi.validbox();
82 
83  // Velocities
84  const Array4<const Real> & u = xvel.array(mfi);
85  const Array4<const Real> & v = yvel.array(mfi);
86  const Array4<const Real> & w = zvel.array(mfi);
87 
88  // Map factors
89  const Array4<const Real>& mf_mx = mapfac[MapFacType::m_x]->const_array(mfi);
90  const Array4<const Real>& mf_ux = mapfac[MapFacType::u_x]->const_array(mfi);
91  const Array4<const Real>& mf_vx = mapfac[MapFacType::v_x]->const_array(mfi);
92  const Array4<const Real>& mf_my = mapfac[MapFacType::m_y]->const_array(mfi);
93  const Array4<const Real>& mf_uy = mapfac[MapFacType::u_y]->const_array(mfi);
94  const Array4<const Real>& mf_vy = mapfac[MapFacType::v_y]->const_array(mfi);
95 
96  // Eddy viscosity
97  const Array4<Real const>& mu_turb = l_use_turb ? eddyDiffs->const_array(mfi) :
98  Array4<const Real>{};
99  const Array4<Real const>& cell_data = l_use_constAlpha ? S_data[IntVars::cons].const_array(mfi) :
100  Array4<const Real>{};
101 
102  // Terrain metrics
103  const Array4<const Real>& z_nd = z_phys_nd->const_array(mfi);
104  const Array4<const Real>& detJ_arr = detJ->const_array(mfi);
105 
106  //-------------------------------------------------------------------------------
107  // NOTE: Tile boxes with terrain are not intuitive. The linear combination of
108  // stress terms requires care. Create a tile box that intersects the
109  // valid box, then grow the box in x/y. Compute the strain on the local
110  // FAB over this grown tile box. Compute the stress over the tile box,
111  // except tau_ii which still needs the halo cells. Finally, write from
112  // the local FAB to the Tau MF but only on the tile box.
113  //-------------------------------------------------------------------------------
114 
115  //-------------------------------------------------------------------------------
116  // TODO: Avoid recomputing strain on the first RK stage. One could populate
117  // the FABs with tau_ij, compute stress, and then write to tau_ij. The
118  // problem with this approach is you will over-write the needed halo layer
119  // needed by subsequent tile boxes (particularly S_ii becomes Tau_ii).
120  //-------------------------------------------------------------------------------
121 
122  // Strain/Stress tile boxes
123  Box bxcc = mfi.tilebox();
124  Box tbxxy = mfi.tilebox(IntVect(1,1,0));
125  Box tbxxz = mfi.tilebox(IntVect(1,0,1));
126  Box tbxyz = mfi.tilebox(IntVect(0,1,1));
127 
128  // We need a halo cell for terrain
129  bxcc.grow(IntVect(1,1,0));
130  tbxxy.grow(IntVect(1,1,0));
131  tbxxz.grow(IntVect(1,1,0));
132  tbxyz.grow(IntVect(1,1,0));
133 
134  if (bxcc.smallEnd(2) != domain.smallEnd(2)) {
135  bxcc.growLo(2,1);
136  tbxxy.growLo(2,1);
137  tbxxz.growLo(2,1);
138  tbxyz.growLo(2,1);
139  }
140 
141  if (bxcc.bigEnd(2) != domain.bigEnd(2)) {
142  bxcc.growHi(2,1);
143  tbxxy.growHi(2,1);
144  tbxxz.growHi(2,1);
145  tbxyz.growHi(2,1);
146  }
147 
148  // Expansion rate
149  Array4<Real> er_arr = expr->array(mfi);
150 
151  // Temporary storage for tiling/OMP
152  FArrayBox S11,S22,S33;
153  FArrayBox S12,S13,S23;
154  S11.resize( bxcc,1,The_Async_Arena()); S22.resize(bxcc,1,The_Async_Arena()); S33.resize(bxcc,1,The_Async_Arena());
155  S12.resize(tbxxy,1,The_Async_Arena()); S13.resize(tbxxz,1,The_Async_Arena()); S23.resize(tbxyz,1,The_Async_Arena());
156  Array4<Real> s11 = S11.array(); Array4<Real> s22 = S22.array(); Array4<Real> s33 = S33.array();
157  Array4<Real> s12 = S12.array(); Array4<Real> s13 = S13.array(); Array4<Real> s23 = S23.array();
158 
159  // Symmetric strain/stresses
160  Array4<Real> tau11 = Tau_lev[TauType::tau11]->array(mfi); Array4<Real> tau22 = Tau_lev[TauType::tau22]->array(mfi);
161  Array4<Real> tau33 = Tau_lev[TauType::tau33]->array(mfi); Array4<Real> tau12 = Tau_lev[TauType::tau12]->array(mfi);
162  Array4<Real> tau13 = Tau_lev[TauType::tau13]->array(mfi); Array4<Real> tau23 = Tau_lev[TauType::tau23]->array(mfi);
163 
164  // Strain magnitude
165  Array4<Real> SmnSmn_a;
166 
167  if (l_use_terrain_fitted_coords) {
168  // Terrain non-symmetric terms
169  FArrayBox S21,S31,S32;
170  S21.resize(tbxxy,1,The_Async_Arena()); S31.resize(tbxxz,1,The_Async_Arena()); S32.resize(tbxyz,1,The_Async_Arena());
171  Array4<Real> s21 = S21.array(); Array4<Real> s31 = S31.array(); Array4<Real> s32 = S32.array();
172  Array4<Real> tau21 = Tau_lev[TauType::tau21]->array(mfi);
173  Array4<Real> tau31 = Tau_lev[TauType::tau31]->array(mfi);
174  Array4<Real> tau32 = Tau_lev[TauType::tau32]->array(mfi);
175 
176 
177  // *****************************************************************************
178  // Expansion rate compute terrain
179  // *****************************************************************************
180  {
181  BL_PROFILE("slow_rhs_making_er_T");
182  Box gbxo = surroundingNodes(bxcc,2);
183 
184  // We make a temporary container for contravariant velocity Omega here
185  // -- it is only used to compute er_arr below
186  FArrayBox Omega;
187  Omega.resize(gbxo,1,The_Async_Arena());
188 
189  // First create Omega using velocity (not momentum)
190  Array4<Real> omega_arr = Omega.array();
191  ParallelFor(gbxo, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
192  {
193  omega_arr(i,j,k) = (k == 0) ? 0. : OmegaFromW(i,j,k,w(i,j,k),u,v,
194  mf_ux,mf_vy,z_nd,dxInv);
195  });
196 
197  ParallelFor(bxcc, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
198  {
199 
200  Real met_u_h_zeta_hi = Compute_h_zeta_AtIface(i+1, j , k, dxInv, z_nd);
201  Real met_u_h_zeta_lo = Compute_h_zeta_AtIface(i , j , k, dxInv, z_nd);
202 
203  Real met_v_h_zeta_hi = Compute_h_zeta_AtJface(i , j+1, k, dxInv, z_nd);
204  Real met_v_h_zeta_lo = Compute_h_zeta_AtJface(i , j , k, dxInv, z_nd);
205 
206  Real Omega_hi = omega_arr(i,j,k+1);
207  Real Omega_lo = omega_arr(i,j,k );
208 
209  Real mfsq = mf_mx(i,j,0)*mf_my(i,j,0);
210 
211  Real expansionRate = (u(i+1,j ,k)/mf_uy(i+1,j,0)*met_u_h_zeta_hi - u(i,j,k)/mf_uy(i,j,0)*met_u_h_zeta_lo)*dxInv[0]*mfsq +
212  (v(i ,j+1,k)/mf_vx(i,j+1,0)*met_v_h_zeta_hi - v(i,j,k)/mf_vx(i,j,0)*met_v_h_zeta_lo)*dxInv[1]*mfsq +
213  (Omega_hi - Omega_lo)*dxInv[2];
214 
215  er_arr(i,j,k) = expansionRate / detJ_arr(i,j,k);
216  });
217  } // end profile
218 
219  // *****************************************************************************
220  // Strain tensor compute terrain
221  // *****************************************************************************
222  {
223  BL_PROFILE("slow_rhs_making_strain_T");
224  ComputeStrain_T(bxcc, tbxxy, tbxxz, tbxyz, domain,
225  u, v, w,
226  s11, s22, s33,
227  s12, s21,
228  s13, s31,
229  s23, s32,
230  z_nd, detJ_arr, bc_ptr_h, dxInv,
231  mf_mx, mf_ux, mf_vx,
232  mf_my, mf_uy, mf_vy);
233  } // profile
234 
235  // Populate SmnSmn if using Deardorff or k-eqn RANS (used as diff src in post)
236  // and in the first RK stage (TKE tendencies constant for nrk>0, following WRF)
237  if ((nrk==0) && (need_SmnSmn)) {
238  SmnSmn_a = SmnSmn->array(mfi);
239  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
240  {
241  SmnSmn_a(i,j,k) = ComputeSmnSmn(i,j,k,
242  s11,s22,s33,
243  s12,s13,s23);
244  });
245  }
246 
247  // *****************************************************************************
248  // Stress tensor compute terrain
249  // *****************************************************************************
250  {
251  BL_PROFILE("slow_rhs_making_stress_T");
252 
253  // Remove Halo cells just for tau_ij comps
254  tbxxy.grow(IntVect(-1,-1,0));
255  tbxxz.grow(IntVect(-1,-1,0));
256  tbxyz.grow(IntVect(-1,-1,0));
257 
258  if (!l_use_turb) {
259  ComputeStressConsVisc_T(bxcc, tbxxy, tbxxz, tbxyz, mu_eff,
260  cell_data,
261  s11, s22, s33,
262  s12, s21,
263  s13, s31,
264  s23, s32,
265  er_arr, z_nd, detJ_arr, dxInv);
266  } else {
267  ComputeStressVarVisc_T(bxcc, tbxxy, tbxxz, tbxyz, mu_eff, mu_turb,
268  cell_data,
269  s11, s22, s33,
270  s12, s21,
271  s13, s31,
272  s23, s32,
273  er_arr, z_nd, detJ_arr, dxInv);
274  }
275 
276  // Remove halo cells from tau_ii but extend across valid_box bdry
277  bxcc.grow(IntVect(-1,-1,0));
278  if (bxcc.smallEnd(0) == valid_bx.smallEnd(0)) bxcc.growLo(0, 1);
279  if (bxcc.bigEnd(0) == valid_bx.bigEnd(0)) bxcc.growHi(0, 1);
280  if (bxcc.smallEnd(1) == valid_bx.smallEnd(1)) bxcc.growLo(1, 1);
281  if (bxcc.bigEnd(1) == valid_bx.bigEnd(1)) bxcc.growHi(1, 1);
282 
283  // Copy from temp FABs back to tau
284  ParallelFor(bxcc,
285  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
286  tau11(i,j,k) = s11(i,j,k);
287  tau22(i,j,k) = s22(i,j,k);
288  tau33(i,j,k) = s33(i,j,k);
289  });
290 
291  ParallelFor(tbxxy, tbxxz, tbxyz,
292  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
293  tau12(i,j,k) = s12(i,j,k);
294  tau21(i,j,k) = s21(i,j,k);
295  },
296  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
297  tau13(i,j,k) = s13(i,j,k);
298  tau31(i,j,k) = s31(i,j,k);
299  },
300  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
301  tau23(i,j,k) = s23(i,j,k);
302  tau32(i,j,k) = s32(i,j,k);
303  });
304  } // end profile
305 
306  } else {
307 
308  // *****************************************************************************
309  // Expansion rate compute no terrain
310  // *****************************************************************************
311  {
312  BL_PROFILE("slow_rhs_making_er_N");
313  ParallelFor(bxcc, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
314  Real mfsq = mf_mx(i,j,0)*mf_my(i,j,0);
315  er_arr(i,j,k) = (u(i+1, j , k )/mf_uy(i+1,j,0) - u(i, j, k)/mf_uy(i,j,0))*dxInv[0]*mfsq +
316  (v(i , j+1, k )/mf_vx(i,j+1,0) - v(i, j, k)/mf_vx(i,j,0))*dxInv[1]*mfsq +
317  (w(i , j , k+1) - w(i, j, k))*dxInv[2];
318  });
319  } // end profile
320 
321 
322  // *****************************************************************************
323  // Strain tensor compute no terrain
324  // *****************************************************************************
325  {
326  BL_PROFILE("slow_rhs_making_strain_N");
327  ComputeStrain_N(bxcc, tbxxy, tbxxz, tbxyz, domain,
328  u, v, w,
329  s11, s22, s33,
330  s12, s13, s23,
331  bc_ptr_h, dxInv,
332  mf_mx, mf_ux, mf_vx,
333  mf_my, mf_uy, mf_vy);
334  } // end profile
335 
336  // Populate SmnSmn if using Deardorff or k-eqn RANS (used as diff src in post)
337  // and in the first RK stage (TKE tendencies constant for nrk>0, following WRF)
338  if ((nrk==0) && (need_SmnSmn)) {
339  SmnSmn_a = SmnSmn->array(mfi);
340  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
341  {
342  SmnSmn_a(i,j,k) = ComputeSmnSmn(i,j,k,
343  s11,s22,s33,
344  s12,s13,s23);
345  });
346  }
347 
348  // *****************************************************************************
349  // Stress tensor compute no terrain
350  // *****************************************************************************
351  {
352  BL_PROFILE("slow_rhs_making_stress_N");
353 
354  // Remove Halo cells just for tau_ij comps
355  tbxxy.grow(IntVect(-1,-1,0));
356  tbxxz.grow(IntVect(-1,-1,0));
357  tbxyz.grow(IntVect(-1,-1,0));
358  if (tbxxy.smallEnd(2) > domlo_z) {
359  tbxxy.growLo(2,-1);
360  tbxxz.growLo(2,-1);
361  tbxyz.growLo(2,-1);
362  }
363  if (tbxxy.bigEnd(2) < domhi_z) {
364  tbxxy.growHi(2,-1);
365  tbxxz.growHi(2,-1);
366  tbxyz.growHi(2,-1);
367  }
368 
369  if (!l_use_turb) {
370  ComputeStressConsVisc_N(bxcc, tbxxy, tbxxz, tbxyz, mu_eff,
371  cell_data,
372  s11, s22, s33,
373  s12, s13, s23,
374  er_arr);
375  } else {
376  ComputeStressVarVisc_N(bxcc, tbxxy, tbxxz, tbxyz, mu_eff, mu_turb,
377  cell_data,
378  s11, s22, s33,
379  s12, s13, s23,
380  er_arr);
381  }
382 
383  // Remove halo cells from tau_ii but extend across valid_box bdry
384  bxcc.grow(IntVect(-1,-1,0));
385  if (bxcc.smallEnd(0) == valid_bx.smallEnd(0)) bxcc.growLo(0, 1);
386  if (bxcc.bigEnd(0) == valid_bx.bigEnd(0)) bxcc.growHi(0, 1);
387  if (bxcc.smallEnd(1) == valid_bx.smallEnd(1)) bxcc.growLo(1, 1);
388  if (bxcc.bigEnd(1) == valid_bx.bigEnd(1)) bxcc.growHi(1, 1);
389 
390  // Copy from temp FABs back to tau
391  ParallelFor(bxcc,
392  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
393  tau11(i,j,k) = s11(i,j,k);
394  tau22(i,j,k) = s22(i,j,k);
395  tau33(i,j,k) = s33(i,j,k);
396  });
397  ParallelFor(tbxxy, tbxxz, tbxyz,
398  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
399  tau12(i,j,k) = s12(i,j,k);
400  },
401  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
402  tau13(i,j,k) = s13(i,j,k);
403  },
404  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
405  tau23(i,j,k) = s23(i,j,k);
406  });
407  } // end profile
408  } // l_use_terrain_fitted_coords
409  } // MFIter
410  } // l_use_diff
411 }
void ComputeStrain_N(Box bxcc, Box tbxxy, Box tbxxz, Box tbxyz, Box domain, const Array4< const Real > &u, const Array4< const Real > &v, const Array4< const Real > &w, Array4< Real > &tau11, Array4< Real > &tau22, Array4< Real > &tau33, Array4< Real > &tau12, Array4< Real > &tau13, Array4< Real > &tau23, const BCRec *bc_ptr, const GpuArray< Real, AMREX_SPACEDIM > &dxInv, const Array4< const Real > &mf_mx, const Array4< const Real > &mf_ux, const Array4< const Real > &mf_vx, const Array4< const Real > &mf_my, const Array4< const Real > &mf_uy, const Array4< const Real > &mf_vy)
Definition: ERF_ComputeStrain_N.cpp:28
void ComputeStrain_T(Box bxcc, Box tbxxy, Box tbxxz, Box tbxyz, Box domain, const Array4< const Real > &u, const Array4< const Real > &v, const Array4< const Real > &w, Array4< Real > &tau11, Array4< Real > &tau22, Array4< Real > &tau33, Array4< Real > &tau12, Array4< Real > &tau21, Array4< Real > &tau13, Array4< Real > &tau31, Array4< Real > &tau23, Array4< Real > &tau32, const Array4< const Real > &z_nd, const Array4< const Real > &detJ, const BCRec *bc_ptr, const GpuArray< Real, AMREX_SPACEDIM > &dxInv, const Array4< const Real > &mf_mx, const Array4< const Real > &mf_ux, const Array4< const Real > &mf_vx, const Array4< const Real > &mf_my, const Array4< const Real > &mf_uy, const Array4< const Real > &mf_vy)
Definition: ERF_ComputeStrain_T.cpp:36
void ComputeStressVarVisc_N(Box bxcc, Box tbxxy, Box tbxxz, Box tbxyz, Real mu_eff, const Array4< const Real > &mu_turb, const Array4< const Real > &cell_data, Array4< Real > &tau11, Array4< Real > &tau22, Array4< Real > &tau33, Array4< Real > &tau12, Array4< Real > &tau13, Array4< Real > &tau23, const Array4< const Real > &er_arr)
Definition: ERF_ComputeStress_N.cpp:105
void ComputeStressConsVisc_N(Box bxcc, Box tbxxy, Box tbxxz, Box tbxyz, Real mu_eff, const Array4< const Real > &cell_data, Array4< Real > &tau11, Array4< Real > &tau22, Array4< Real > &tau33, Array4< Real > &tau12, Array4< Real > &tau13, Array4< Real > &tau23, const Array4< const Real > &er_arr)
Definition: ERF_ComputeStress_N.cpp:23
void ComputeStressVarVisc_T(Box bxcc, Box tbxxy, Box tbxxz, Box tbxyz, Real mu_eff, const Array4< const Real > &mu_turb, const Array4< const Real > &cell_data, Array4< Real > &tau11, Array4< Real > &tau22, Array4< Real > &tau33, Array4< Real > &tau12, Array4< Real > &tau21, Array4< Real > &tau13, Array4< Real > &tau31, Array4< Real > &tau23, Array4< Real > &tau32, const Array4< const Real > &er_arr, const Array4< const Real > &z_nd, const Array4< const Real > &detJ, const GpuArray< Real, AMREX_SPACEDIM > &dxInv)
Definition: ERF_ComputeStress_T.cpp:303
void ComputeStressConsVisc_T(Box bxcc, Box tbxxy, Box tbxxz, Box tbxyz, Real mu_eff, const Array4< const Real > &cell_data, Array4< Real > &tau11, Array4< Real > &tau22, Array4< Real > &tau33, Array4< Real > &tau12, Array4< Real > &tau21, Array4< Real > &tau13, Array4< Real > &tau31, Array4< Real > &tau23, Array4< Real > &tau32, const Array4< const Real > &er_arr, const Array4< const Real > &z_nd, const Array4< const Real > &detJ, const GpuArray< Real, AMREX_SPACEDIM > &dxInv)
Definition: ERF_ComputeStress_T.cpp:29
@ tau12
Definition: ERF_DataStruct.H:26
@ tau23
Definition: ERF_DataStruct.H:26
@ tau33
Definition: ERF_DataStruct.H:26
@ tau22
Definition: ERF_DataStruct.H:26
@ tau11
Definition: ERF_DataStruct.H:26
@ tau32
Definition: ERF_DataStruct.H:26
@ tau31
Definition: ERF_DataStruct.H:26
@ tau21
Definition: ERF_DataStruct.H:26
@ tau13
Definition: ERF_DataStruct.H:26
@ v_x
Definition: ERF_DataStruct.H:21
@ u_y
Definition: ERF_DataStruct.H:22
@ v_y
Definition: ERF_DataStruct.H:22
@ m_y
Definition: ERF_DataStruct.H:22
@ u_x
Definition: ERF_DataStruct.H:21
@ m_x
Definition: ERF_DataStruct.H:21
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real ComputeSmnSmn(int &i, int &j, int &k, const amrex::Array4< amrex::Real const > &tau11, const amrex::Array4< amrex::Real const > &tau22, const amrex::Array4< amrex::Real const > &tau33, const amrex::Array4< amrex::Real const > &tau12, const amrex::Array4< amrex::Real const > &tau13, const amrex::Array4< amrex::Real const > &tau23)
Definition: ERF_EddyViscosity.H:37
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real OmegaFromW(int &i, int &j, int &k, amrex::Real w, const amrex::Array4< const amrex::Real > &u_arr, const amrex::Array4< const amrex::Real > &v_arr, const amrex::Array4< const amrex::Real > &mf_u, const amrex::Array4< const amrex::Real > &mf_v, const amrex::Array4< const amrex::Real > &z_nd, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &dxInv)
Definition: ERF_TerrainMetrics.H:415
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: ERF_TerrainMetrics.H:96
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_zeta_AtJface(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: ERF_TerrainMetrics.H:139
AMREX_FORCE_INLINE amrex::IntVect TileNoZ()
Definition: ERF_TileNoZ.H:11
@ cons
Definition: ERF_IndexDefines.H:158
@ xvel
Definition: ERF_IndexDefines.H:141
@ zvel
Definition: ERF_IndexDefines.H:143
@ yvel
Definition: ERF_IndexDefines.H:142
Definition: ERF_DiffStruct.H:19
amrex::Real rho0_trans
Definition: ERF_DiffStruct.H:88
MolecDiffType molec_diff_type
Definition: ERF_DiffStruct.H:81
amrex::Real dynamic_viscosity
Definition: ERF_DiffStruct.H:93
static MeshType mesh_type
Definition: ERF_DataStruct.H:665
DiffChoice diffChoice
Definition: ERF_DataStruct.H:674
amrex::Vector< TurbChoice > turbChoice
Definition: ERF_DataStruct.H:676
static TerrainType terrain_type
Definition: ERF_DataStruct.H:659
Definition: ERF_TurbStruct.H:31
PBLType pbl_type
Definition: ERF_TurbStruct.H:276
RANSType rans_type
Definition: ERF_TurbStruct.H:273
LESType les_type
Definition: ERF_TurbStruct.H:236
bool use_kturb
Definition: ERF_TurbStruct.H:282

Referenced by erf_slow_rhs_pre().

Here is the call graph for this function:
Here is the caller graph for this function: