ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
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, MultiFab *Tau11, MultiFab *Tau22, MultiFab *Tau33, MultiFab *Tau12, MultiFab *Tau13, MultiFab *Tau21, MultiFab *Tau23, MultiFab *Tau31, MultiFab *Tau32, MultiFab *SmnSmn, MultiFab *eddyDiffs, const Geometry geom, const SolverChoice &solverChoice, std::unique_ptr< ABLMost > &most, std::unique_ptr< MultiFab > &detJ, std::unique_ptr< MultiFab > &mapfac_m, std::unique_ptr< MultiFab > &mapfac_u, std::unique_ptr< MultiFab > &mapfac_v)
 

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

Referenced by erf_slow_rhs_pre().

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