ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_Utils.H
Go to the documentation of this file.
1 #ifndef ERF_UTILS_H_
2 #define ERF_UTILS_H_
3 
4 #include <AMReX.H>
5 #include <AMReX_MultiFab.H>
6 #include <AMReX_BCRec.H>
7 #include <ERF_DataStruct.H>
8 #include <ERF_IndexDefines.H>
9 #include <ERF_ABLMost.H>
10 #include <ERF_FillPatcher.H>
11 
12 /*
13  * Create a new BoxArray in which every grid touches the bottom boundary
14  */
15 void ChopGrids2D (amrex::BoxArray& ba, const amrex::Box& domain, int target_size);
16 
17 /*
18  * Create a new BoxArray with exactly the number of boxes as MPI ranks.
19  * This is designed to work only on the base level which covers the entire domain.
20  */
21 amrex::BoxArray
22 ERFPostProcessBaseGrids (const amrex::Box& domain, bool decompose_in_z);
23 
24 /*
25  * Create the Jacobian for the metric transformation when use_terrain is true
26  */
27 void make_J (const amrex::Geometry& geom,
28  amrex::MultiFab& z_phys_nd,
29  amrex::MultiFab& detJ_cc);
30 
31 void make_areas (const amrex::Geometry& geom,
32  amrex::MultiFab& z_phys_nd,
33  amrex::MultiFab& ax,
34  amrex::MultiFab& ay,
35  amrex::MultiFab& az);
36 
37 /*
38  * Average z_phys_nd on nodes to cell centers
39  */
40 void make_zcc (const amrex::Geometry& geom,
41  amrex::MultiFab& z_phys_nd,
42  amrex::MultiFab& z_phys_cc);
43 
44 /*
45  * Convert momentum to velocity by dividing by density averaged onto faces
46  */
47 void MomentumToVelocity (amrex::MultiFab& xvel_out,
48  amrex::MultiFab& yvel_out,
49  amrex::MultiFab& zvel_out,
50  const amrex::MultiFab& cons_in,
51  const amrex::MultiFab& xmom_in,
52  const amrex::MultiFab& ymom_in,
53  const amrex::MultiFab& zmom_in,
54  const amrex::Box& domain,
55  const amrex::Vector<amrex::BCRec>& domain_bcs_type_h);
56 
57 /*
58  * Convert velocity to momentum by multiplying by density averaged onto faces
59  */
60 void VelocityToMomentum (const amrex::MultiFab& xvel_in,
61  const amrex::IntVect & xvel_ngrow,
62  const amrex::MultiFab& yvel_in,
63  const amrex::IntVect & yvel_ngrow,
64  const amrex::MultiFab& zvel_in,
65  const amrex::IntVect & zvel_ngrow,
66  const amrex::MultiFab& cons_in,
67  amrex::MultiFab& xmom_out,
68  amrex::MultiFab& ymom_out,
69  amrex::MultiFab& zmom_out,
70  const amrex::Box& domain,
71  const amrex::Vector<amrex::BCRec>& domain_bcs_type_h);
72 
73 /*
74  * Compute boxes for looping over interior/exterior ghost cells
75  * for use by fillpatch, erf_slow_rhs_pre, and erf_slow_rhs_post
76  */
77 void compute_interior_ghost_bxs_xy (const amrex::Box& bx,
78  const amrex::Box& domain,
79  const int& width,
80  const int& set_width,
81  amrex::Box& bx_xlo,
82  amrex::Box& bx_xhi,
83  amrex::Box& bx_ylo,
84  amrex::Box& bx_yhi,
85  const amrex::IntVect& ng_vect=amrex::IntVect(0,0,0),
86  const bool get_int_ng=false);
87 
88 /*
89  * Compute relaxation region RHS with wrfbdy
90  */
91 void realbdy_compute_interior_ghost_rhs (const amrex::Real& bdy_time_interval,
92  const amrex::Real& start_bdy_time,
93  const amrex::Real& time,
94  const amrex::Real& delta_t,
95  int width,
96  int set_width,
97  const amrex::Geometry& geom,
98  amrex::Vector<amrex::MultiFab>& S_rhs,
99  amrex::Vector<amrex::MultiFab>& S_old_data,
100  amrex::Vector<amrex::MultiFab>& S_cur_data,
101  amrex::Vector<amrex::Vector<amrex::FArrayBox>>& bdy_data_xlo,
102  amrex::Vector<amrex::Vector<amrex::FArrayBox>>& bdy_data_xhi,
103  amrex::Vector<amrex::Vector<amrex::FArrayBox>>& bdy_data_ylo,
104  amrex::Vector<amrex::Vector<amrex::FArrayBox>>& bdy_data_yhi);
105 
106 /*
107  * Compute relaxation region RHS at fine-crse interface
108  */
109 void
110 fine_compute_interior_ghost_rhs (const amrex::Real& time,
111  const amrex::Real& delta_t,
112  const int& width,
113  const int& set_width,
114  const amrex::Geometry& geom,
115  ERFFillPatcher* FPr_c,
116  ERFFillPatcher* FPr_u,
117  ERFFillPatcher* FPr_v,
118  ERFFillPatcher* FPr_w,
119  amrex::Vector<amrex::BCRec>& domain_bcs_type,
120  amrex::Vector<amrex::MultiFab>& S_rhs_f,
121  amrex::Vector<amrex::MultiFab>& S_data_f);
122 
123 /*
124  * Accumulate time averaged velocity fields
125  */
126 void
127 Time_Avg_Vel_atCC (const amrex::Real& dt,
128  amrex::Real& t_avg_cnt,
129  amrex::MultiFab* vel_t_avg,
130  amrex::MultiFab& xvel,
131  amrex::MultiFab& yvel,
132  amrex::MultiFab& zvel);
133 
134 /**
135  * Zero RHS in the set region
136  *
137  * @param[in] icomp component offset
138  * @param[in] num_var number of variables to loop
139  * @param[in] bx_xlo box for low x relaxation
140  * @param[in] bx_xhi box for high x relaxation
141  * @param[in] bx_ylo box for low y relaxation
142  * @param[in] bx_yhi box for high y relaxation
143  * @param[out] rhs_arr RHS array
144  */
145 AMREX_GPU_HOST
146 AMREX_FORCE_INLINE
147 void
148 realbdy_set_rhs_in_spec_region (const amrex::Real& dt,
149  const int& icomp,
150  const int& num_var,
151  const int& width,
152  const int& set_width,
153  const amrex::Dim3& dom_lo,
154  const amrex::Dim3& dom_hi,
155  const amrex::Box& bx_xlo,
156  const amrex::Box& bx_xhi,
157  const amrex::Box& bx_ylo,
158  const amrex::Box& bx_yhi,
159  const amrex::Array4<const amrex::Real>& arr_xlo,
160  const amrex::Array4<const amrex::Real>& arr_xhi,
161  const amrex::Array4<const amrex::Real>& arr_ylo,
162  const amrex::Array4<const amrex::Real>& arr_yhi,
163  const amrex::Array4<const amrex::Real>& data_arr,
164  const amrex::Array4<amrex::Real>& rhs_arr)
165 {
166  int Spec_z = set_width;
167  amrex::ParallelFor(bx_xlo, num_var, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) noexcept
168  {
169  // Corners with x boxes
170  int j_lo = std::min(j-dom_lo.y,width-1);
171  int j_hi = std::min(dom_hi.y-j,width-1);
172  int jj = std::min(j_lo,j_hi);
173  int n_ind = std::min(i-dom_lo.x,jj) + 1;
174  if (n_ind <= Spec_z) {
175  amrex::Real tend = ( arr_xlo(i,j,k) - data_arr(i,j,k,n+icomp) ) / dt;
176  rhs_arr(i,j,k,n+icomp) = tend;
177  }
178  },
179  bx_xhi, num_var, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) noexcept
180  {
181  // Corners with x boxes
182  int j_lo = std::min(j-dom_lo.y,width-1);
183  int j_hi = std::min(dom_hi.y-j,width-1);
184  int jj = std::min(j_lo,j_hi);
185  int n_ind = std::min(dom_hi.x-i,jj) + 1;
186  if (n_ind <= Spec_z) {
187  amrex::Real tend = ( arr_xhi(i,j,k) - data_arr(i,j,k,n+icomp) ) / dt;
188  rhs_arr(i,j,k,n+icomp) = tend;
189  }
190  });
191 
192  amrex::ParallelFor(bx_ylo, num_var, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) noexcept
193  {
194  // No corners for y boxes
195  int n_ind = j - dom_lo.y + 1;
196  if (n_ind <= Spec_z) {
197  amrex::Real tend = ( arr_ylo(i,j,k) - data_arr(i,j,k,n+icomp) ) / dt;
198  rhs_arr(i,j,k,n+icomp) = tend;
199  }
200  },
201  bx_yhi, num_var, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) noexcept
202  {
203  // No corners for y boxes
204  int n_ind = dom_hi.y - j + 1;
205  if (n_ind <= Spec_z) {
206  amrex::Real tend = ( arr_yhi(i,j,k) - data_arr(i,j,k,n+icomp) ) / dt;
207  rhs_arr(i,j,k,n+icomp) = tend;
208  }
209  });
210 }
211 
212 /**
213  * Compute the Laplacian RHS in the relaxation zone
214  *
215  * @param[in] delta_t time step
216  * @param[in] icomp component offset
217  * @param[in] num_var number of variables to loop
218  * @param[in] width width of wrf bdy file
219  * @param[in] set_width width the set region
220  * @param[in] dom_lo low bound of domain
221  * @param[in] dom_hi high bound of domain
222  * @param[in] F1 drift relaxation parameter
223  * @param[in] F2 Laplacian relaxation parameter
224  * @param[in] bx_xlo box for low x relaxation
225  * @param[in] bx_xhi box for high x relaxation
226  * @param[in] bx_ylo box for low y relaxation
227  * @param[in] bx_yhi box for high y relaxation
228  * @param[in] arr_xlo array for low x relaxation
229  * @param[in] arr_xhi array for high x relaxation
230  * @param[in] arr_ylo array for low y relaxation
231  * @param[in] arr_yhi array for high y relaxation
232  * @param[in] data_arr data array
233  * @param[out] rhs_arr RHS array
234  */
235 AMREX_GPU_HOST
236 AMREX_FORCE_INLINE
237 void
239  const int& num_var,
240  const int& width,
241  const int& set_width,
242  const amrex::Dim3& dom_lo,
243  const amrex::Dim3& dom_hi,
244  const amrex::Real& F1,
245  const amrex::Real& F2,
246  const amrex::Box& bx_xlo,
247  const amrex::Box& bx_xhi,
248  const amrex::Box& bx_ylo,
249  const amrex::Box& bx_yhi,
250  const amrex::Array4<const amrex::Real>& arr_xlo,
251  const amrex::Array4<const amrex::Real>& arr_xhi,
252  const amrex::Array4<const amrex::Real>& arr_ylo,
253  const amrex::Array4<const amrex::Real>& arr_yhi,
254  const amrex::Array4<const amrex::Real>& data_arr,
255  const amrex::Array4<amrex::Real>& rhs_arr)
256 {
257  // RHS computation
258  int Spec_z = set_width;
259  int Relax_z = width - Spec_z + 1;
260  amrex::Real num = amrex::Real(Spec_z + Relax_z);
261  amrex::Real denom = amrex::Real(Relax_z - 1);
262  amrex::Real SpecExp = -std::log(0.1) / amrex::Real(width - Spec_z);
263  amrex::ParallelFor(bx_xlo, num_var, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) noexcept
264  {
265  // Corners with x boxes
266  int j_lo = std::min(j-dom_lo.y,width-1);
267  int j_hi = std::min(dom_hi.y-j,width-1);
268  int jj = std::min(j_lo,j_hi);
269  int n_ind = std::min(i-dom_lo.x,jj) + 1;
270  AMREX_ASSERT(n_ind > Spec_z);
271  amrex::Real Factor = (num - amrex::Real(n_ind))/denom
272  * std::exp(-SpecExp * amrex::Real(n_ind - Spec_z));
273  amrex::Real d = data_arr(i ,j ,k ,n+icomp);
274  amrex::Real d_ip1 = data_arr(i+1,j ,k ,n+icomp);
275  amrex::Real d_im1 = data_arr(i-1,j ,k ,n+icomp);
276  amrex::Real d_jp1 = data_arr(i ,j+1,k ,n+icomp);
277  amrex::Real d_jm1 = data_arr(i ,j-1,k ,n+icomp);
278  amrex::Real delta = arr_xlo(i ,j ,k,n) - d;
279  amrex::Real delta_xp = arr_xlo(i+1,j ,k,n) - d_ip1;
280  amrex::Real delta_xm = arr_xlo(i-1,j ,k,n) - d_im1;
281  amrex::Real delta_yp = arr_xlo(i ,j+1,k,n) - d_jp1;
282  amrex::Real delta_ym = arr_xlo(i ,j-1,k,n) - d_jm1;
283  amrex::Real Laplacian = delta_xp + delta_xm + delta_yp + delta_ym - 4.0*delta;
284  amrex::Real Temp = (F1*delta - F2*Laplacian) * Factor;
285  rhs_arr(i,j,k,n+icomp) += Temp;
286  },
287  bx_xhi, num_var, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) noexcept
288  {
289  // Corners with x boxes
290  int j_lo = std::min(j-dom_lo.y,width-1);
291  int j_hi = std::min(dom_hi.y-j,width-1);
292  int jj = std::min(j_lo,j_hi);
293  int n_ind = std::min(dom_hi.x-i,jj) + 1;
294  AMREX_ASSERT(n_ind > Spec_z);
295  amrex::Real Factor = (num - amrex::Real(n_ind))/denom
296  * std::exp(-SpecExp * amrex::Real(n_ind - Spec_z));
297  amrex::Real d = data_arr(i ,j ,k ,n+icomp);
298  amrex::Real d_ip1 = data_arr(i+1,j ,k ,n+icomp);
299  amrex::Real d_im1 = data_arr(i-1,j ,k ,n+icomp);
300  amrex::Real d_jp1 = data_arr(i ,j+1,k ,n+icomp);
301  amrex::Real d_jm1 = data_arr(i ,j-1,k ,n+icomp);
302  amrex::Real delta = arr_xhi(i ,j ,k,n) - d;
303  amrex::Real delta_xp = arr_xhi(i+1,j ,k,n) - d_ip1;
304  amrex::Real delta_xm = arr_xhi(i-1,j ,k,n) - d_im1;
305  amrex::Real delta_yp = arr_xhi(i ,j+1,k,n) - d_jp1;
306  amrex::Real delta_ym = arr_xhi(i ,j-1,k,n) - d_jm1;
307  amrex::Real Laplacian = delta_xp + delta_xm + delta_yp + delta_ym - 4.0*delta;
308  amrex::Real Temp = (F1*delta - F2*Laplacian) * Factor;
309  rhs_arr(i,j,k,n+icomp) += Temp;
310  });
311 
312  amrex::ParallelFor(bx_ylo, num_var, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) noexcept
313  {
314  // No corners for y boxes
315  int n_ind = j - dom_lo.y + 1;
316  AMREX_ASSERT(n_ind > Spec_z);
317  amrex::Real Factor = (num - amrex::Real(n_ind))/denom
318  * std::exp(-SpecExp * amrex::Real(n_ind - Spec_z));
319  amrex::Real d = data_arr(i ,j ,k ,n+icomp);
320  amrex::Real d_ip1 = data_arr(i+1,j ,k ,n+icomp);
321  amrex::Real d_im1 = data_arr(i-1,j ,k ,n+icomp);
322  amrex::Real d_jp1 = data_arr(i ,j+1,k ,n+icomp);
323  amrex::Real d_jm1 = data_arr(i ,j-1,k ,n+icomp);
324  amrex::Real delta = arr_ylo(i ,j ,k,n) - d;
325  amrex::Real delta_xp = arr_ylo(i+1,j ,k,n) - d_ip1;
326  amrex::Real delta_xm = arr_ylo(i-1,j ,k,n) - d_im1;
327  amrex::Real delta_yp = arr_ylo(i ,j+1,k,n) - d_jp1;
328  amrex::Real delta_ym = arr_ylo(i ,j-1,k,n) - d_jm1;
329  amrex::Real Laplacian = delta_xp + delta_xm + delta_yp + delta_ym - 4.0*delta;
330  amrex::Real Temp = (F1*delta - F2*Laplacian) * Factor;
331  rhs_arr(i,j,k,n+icomp) += Temp;
332  },
333  bx_yhi, num_var, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) noexcept
334  {
335  // No corners for y boxes
336  int n_ind = dom_hi.y - j + 1;
337  AMREX_ASSERT(n_ind > Spec_z);
338  amrex::Real Factor = (num - amrex::Real(n_ind))/denom
339  * std::exp(-SpecExp * amrex::Real(n_ind - Spec_z));
340  amrex::Real d = data_arr(i ,j ,k ,n+icomp);
341  amrex::Real d_ip1 = data_arr(i+1,j ,k ,n+icomp);
342  amrex::Real d_im1 = data_arr(i-1,j ,k ,n+icomp);
343  amrex::Real d_jp1 = data_arr(i ,j+1,k ,n+icomp);
344  amrex::Real d_jm1 = data_arr(i ,j-1,k ,n+icomp);
345  amrex::Real delta = arr_yhi(i ,j ,k,n) - d;
346  amrex::Real delta_xp = arr_yhi(i+1,j ,k,n) - d_ip1;
347  amrex::Real delta_xm = arr_yhi(i-1,j ,k,n) - d_im1;
348  amrex::Real delta_yp = arr_yhi(i ,j+1,k,n) - d_jp1;
349  amrex::Real delta_ym = arr_yhi(i ,j-1,k,n) - d_jm1;
350  amrex::Real Laplacian = delta_xp + delta_xm + delta_yp + delta_ym - 4.0*delta;
351  amrex::Real Temp = (F1*delta - F2*Laplacian) * Factor;
352  rhs_arr(i,j,k,n+icomp) += Temp;
353  });
354 }
355 
356 /*
357  * Effectively a Multiply for a MultiFab and an iMultiFab mask
358  */
359 AMREX_GPU_HOST
360 AMREX_FORCE_INLINE
361 void
362 ApplyMask (amrex::MultiFab& dst,
363  const amrex::iMultiFab& imask,
364  const int nghost = 0)
365 {
366  for (amrex::MFIter mfi(dst,amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi)
367  {
368  const amrex::Box& bx = mfi.growntilebox(nghost);
369  if (bx.ok())
370  {
371  auto dstFab = dst.array(mfi);
372  const auto maskFab = imask.const_array(mfi);
373  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
374  {
375  dstFab(i,j,k) *= maskFab(i,j,k);
376  });
377  }
378  }
379 }
380 AMREX_GPU_HOST
381 AMREX_FORCE_INLINE
382 void
383 ApplyInvertedMask (amrex::MultiFab& dst,
384  const amrex::iMultiFab& imask,
385  const int nghost = 0)
386 {
387  for (amrex::MFIter mfi(dst,amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi)
388  {
389  const amrex::Box& bx = mfi.growntilebox(nghost);
390  if (bx.ok())
391  {
392  auto dstFab = dst.array(mfi);
393  const auto maskFab = imask.const_array(mfi);
394  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
395  {
396  dstFab(i,j,k) *= (1-maskFab(i,j,k));
397  });
398  }
399  }
400 }
401 
402 #endif
void MomentumToVelocity(amrex::MultiFab &xvel_out, amrex::MultiFab &yvel_out, amrex::MultiFab &zvel_out, const amrex::MultiFab &cons_in, const amrex::MultiFab &xmom_in, const amrex::MultiFab &ymom_in, const amrex::MultiFab &zmom_in, const amrex::Box &domain, const amrex::Vector< amrex::BCRec > &domain_bcs_type_h)
void VelocityToMomentum(const amrex::MultiFab &xvel_in, const amrex::IntVect &xvel_ngrow, const amrex::MultiFab &yvel_in, const amrex::IntVect &yvel_ngrow, const amrex::MultiFab &zvel_in, const amrex::IntVect &zvel_ngrow, const amrex::MultiFab &cons_in, amrex::MultiFab &xmom_out, amrex::MultiFab &ymom_out, amrex::MultiFab &zmom_out, const amrex::Box &domain, const amrex::Vector< amrex::BCRec > &domain_bcs_type_h)
void fine_compute_interior_ghost_rhs(const amrex::Real &time, const amrex::Real &delta_t, const int &width, const int &set_width, const amrex::Geometry &geom, ERFFillPatcher *FPr_c, ERFFillPatcher *FPr_u, ERFFillPatcher *FPr_v, ERFFillPatcher *FPr_w, amrex::Vector< amrex::BCRec > &domain_bcs_type, amrex::Vector< amrex::MultiFab > &S_rhs_f, amrex::Vector< amrex::MultiFab > &S_data_f)
AMREX_GPU_HOST AMREX_FORCE_INLINE void realbdy_set_rhs_in_spec_region(const amrex::Real &dt, const int &icomp, const int &num_var, const int &width, const int &set_width, const amrex::Dim3 &dom_lo, const amrex::Dim3 &dom_hi, const amrex::Box &bx_xlo, const amrex::Box &bx_xhi, const amrex::Box &bx_ylo, const amrex::Box &bx_yhi, const amrex::Array4< const amrex::Real > &arr_xlo, const amrex::Array4< const amrex::Real > &arr_xhi, const amrex::Array4< const amrex::Real > &arr_ylo, const amrex::Array4< const amrex::Real > &arr_yhi, const amrex::Array4< const amrex::Real > &data_arr, const amrex::Array4< amrex::Real > &rhs_arr)
Definition: ERF_Utils.H:148
amrex::BoxArray ERFPostProcessBaseGrids(const amrex::Box &domain, bool decompose_in_z)
void compute_interior_ghost_bxs_xy(const amrex::Box &bx, const amrex::Box &domain, const int &width, const int &set_width, amrex::Box &bx_xlo, amrex::Box &bx_xhi, amrex::Box &bx_ylo, amrex::Box &bx_yhi, const amrex::IntVect &ng_vect=amrex::IntVect(0, 0, 0), const bool get_int_ng=false)
void make_zcc(const amrex::Geometry &geom, amrex::MultiFab &z_phys_nd, amrex::MultiFab &z_phys_cc)
void realbdy_compute_interior_ghost_rhs(const amrex::Real &bdy_time_interval, const amrex::Real &start_bdy_time, const amrex::Real &time, const amrex::Real &delta_t, int width, int set_width, const amrex::Geometry &geom, amrex::Vector< amrex::MultiFab > &S_rhs, amrex::Vector< amrex::MultiFab > &S_old_data, amrex::Vector< amrex::MultiFab > &S_cur_data, amrex::Vector< amrex::Vector< amrex::FArrayBox >> &bdy_data_xlo, amrex::Vector< amrex::Vector< amrex::FArrayBox >> &bdy_data_xhi, amrex::Vector< amrex::Vector< amrex::FArrayBox >> &bdy_data_ylo, amrex::Vector< amrex::Vector< amrex::FArrayBox >> &bdy_data_yhi)
void Time_Avg_Vel_atCC(const amrex::Real &dt, amrex::Real &t_avg_cnt, amrex::MultiFab *vel_t_avg, amrex::MultiFab &xvel, amrex::MultiFab &yvel, amrex::MultiFab &zvel)
AMREX_GPU_HOST AMREX_FORCE_INLINE void ApplyInvertedMask(amrex::MultiFab &dst, const amrex::iMultiFab &imask, const int nghost=0)
Definition: ERF_Utils.H:383
void make_J(const amrex::Geometry &geom, amrex::MultiFab &z_phys_nd, amrex::MultiFab &detJ_cc)
AMREX_GPU_HOST AMREX_FORCE_INLINE void ApplyMask(amrex::MultiFab &dst, const amrex::iMultiFab &imask, const int nghost=0)
Definition: ERF_Utils.H:362
void ChopGrids2D(amrex::BoxArray &ba, const amrex::Box &domain, int target_size)
AMREX_GPU_HOST AMREX_FORCE_INLINE void realbdy_compute_laplacian_relaxation(const int &icomp, const int &num_var, const int &width, const int &set_width, const amrex::Dim3 &dom_lo, const amrex::Dim3 &dom_hi, const amrex::Real &F1, const amrex::Real &F2, const amrex::Box &bx_xlo, const amrex::Box &bx_xhi, const amrex::Box &bx_ylo, const amrex::Box &bx_yhi, const amrex::Array4< const amrex::Real > &arr_xlo, const amrex::Array4< const amrex::Real > &arr_xhi, const amrex::Array4< const amrex::Real > &arr_ylo, const amrex::Array4< const amrex::Real > &arr_yhi, const amrex::Array4< const amrex::Real > &data_arr, const amrex::Array4< amrex::Real > &rhs_arr)
Definition: ERF_Utils.H:238
void make_areas(const amrex::Geometry &geom, amrex::MultiFab &z_phys_nd, amrex::MultiFab &ax, amrex::MultiFab &ay, amrex::MultiFab &az)
Definition: ERF_FillPatcher.H:9
@ xvel
Definition: ERF_IndexDefines.H:130
@ zvel
Definition: ERF_IndexDefines.H:132
@ yvel
Definition: ERF_IndexDefines.H:131