ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_Interpolation_WENO.H
Go to the documentation of this file.
1 #ifndef ERF_INTERPOLATE_WENO_H_
2 #define ERF_INTERPOLATE_WENO_H_
3 
4 #include "ERF_DataStruct.H"
5 
6 /**
7  * Interpolation operators used for WENO-5 scheme
8  */
9 struct WENO3
10 {
11  AMREX_GPU_HOST_DEVICE
12  AMREX_FORCE_INLINE
13  WENO3 (const amrex::Array4<const amrex::Real>& phi,
14  const amrex::Real /*upw_frac*/)
15  : m_phi(phi) {}
16 
17  AMREX_GPU_DEVICE
18  AMREX_FORCE_INLINE
19  void
20  InterpolateInX (const int& i,
21  const int& j,
22  const int& k,
23  const int& qty_index,
24  amrex::Real& val_lo,
25  amrex::Real upw_lo) const
26  {
27  // Upwinding flags
28  if (upw_lo != amrex::Real(0)) upw_lo = (upw_lo > 0) ? amrex::Real(1) : -amrex::Real(1);
29 
30  // Data to interpolate on
31  amrex::Real sp1 = m_phi(i+1, j , k , qty_index);
32  amrex::Real s = m_phi(i , j , k , qty_index);
33  amrex::Real sm1 = m_phi(i-1, j , k , qty_index);
34  amrex::Real sm2 = m_phi(i-2, j , k , qty_index);
35 
36  // Left and right fluxes
37  amrex::Real Fhi = Evaluate(sm2,sm1,s );
38  amrex::Real Flo = Evaluate(sp1,s ,sm1);
39 
40  // Numerical flux
41  val_lo = (amrex::Real(1) + upw_lo)/amrex::Real(2) * Fhi + (amrex::Real(1) - upw_lo)/amrex::Real(2) * Flo;
42  }
43 
44  AMREX_GPU_DEVICE
45  AMREX_FORCE_INLINE
46  void
47  InterpolateInY (const int& i,
48  const int& j,
49  const int& k,
50  const int& qty_index,
51  amrex::Real& val_lo,
52  amrex::Real upw_lo) const
53  {
54  // Upwinding flags
55  if (upw_lo != amrex::Real(0)) upw_lo = (upw_lo > 0) ? amrex::Real(1) : -amrex::Real(1);
56 
57  // Data to interpolate on
58  amrex::Real sp1 = m_phi(i , j+1, k , qty_index);
59  amrex::Real s = m_phi(i , j , k , qty_index);
60  amrex::Real sm1 = m_phi(i , j-1, k , qty_index);
61  amrex::Real sm2 = m_phi(i , j-2, k , qty_index);
62 
63  // Left and right fluxes
64  amrex::Real Fhi = Evaluate(sm2,sm1,s );
65  amrex::Real Flo = Evaluate(sp1,s ,sm1);
66 
67  // Numerical flux
68  val_lo = (amrex::Real(1) + upw_lo)/amrex::Real(2) * Fhi + (amrex::Real(1) - upw_lo)/amrex::Real(2) * Flo;
69  }
70 
71  AMREX_GPU_DEVICE
72  AMREX_FORCE_INLINE
73  void
74  InterpolateInZ (const int& i,
75  const int& j,
76  const int& k,
77  const int& qty_index,
78  amrex::Real& val_lo,
79  amrex::Real upw_lo) const
80  {
81  // Upwinding flags
82  if (upw_lo != amrex::Real(0)) upw_lo = (upw_lo > 0) ? amrex::Real(1) : -amrex::Real(1);
83 
84  // Data to interpolate on
85  amrex::Real sp1 = m_phi(i , j , k+1, qty_index);
86  amrex::Real s = m_phi(i , j , k , qty_index);
87  amrex::Real sm1 = m_phi(i , j , k-1, qty_index);
88  amrex::Real sm2 = m_phi(i , j , k-2, qty_index);
89 
90  // Left and right fluxes
91  amrex::Real Fhi = Evaluate(sm2,sm1,s );
92  amrex::Real Flo = Evaluate(sp1,s ,sm1);
93 
94  // Numerical flux
95  val_lo = (amrex::Real(1) + upw_lo)/amrex::Real(2) * Fhi + (amrex::Real(1) - upw_lo)/amrex::Real(2) * Flo;
96  }
97 
98  AMREX_GPU_DEVICE
99  AMREX_FORCE_INLINE
101  Evaluate (const amrex::Real& sm1,
102  const amrex::Real& s ,
103  const amrex::Real& sp1) const
104  {
105  // Smoothing factors
106  amrex::Real b1 = (s - sm1) * (s - sm1);
107  amrex::Real b2 = (sp1 - s) * (sp1 - s);
108 
109  // Weight factors
110  amrex::Real w1 = g1 / ( (eps + b1) * (eps + b1) );
111  amrex::Real w2 = g2 / ( (eps + b2) * (eps + b2) );
112 
113  // Weight factor norm
114  amrex::Real wsum = w1 + w2;
115 
116  // Taylor expansions
117  amrex::Real v1 = -sm1 + amrex::Real(3) * s;
118  amrex::Real v2 = s + sp1;
119 
120  // Interpolated value
121  return ( (w1 * v1 + w2 * v2) / (amrex::Real(2) * wsum) );
122  }
123 
124 private:
125  amrex::Array4<const amrex::Real> m_phi; // Quantity to interpolate
126 #ifdef AMREX_USE_FLOAT
127  const amrex::Real eps=amrex::Real(1.0e-12);
128 #else
129  const amrex::Real eps=amrex::Real(1.0e-40);
130 #endif
131  static constexpr amrex::Real g1=(amrex::Real(1)/amrex::Real(3));
132  static constexpr amrex::Real g2=(amrex::Real(2)/amrex::Real(3));
133 };
134 
135 /**
136  * Interpolation operators used for WENO-5 scheme
137  */
138 struct WENO5
139 {
140  AMREX_GPU_HOST_DEVICE
141  AMREX_FORCE_INLINE
142  WENO5 (const amrex::Array4<const amrex::Real>& phi,
143  const amrex::Real /*upw_frac*/)
144  : m_phi(phi) {}
145 
146  AMREX_GPU_DEVICE
147  AMREX_FORCE_INLINE
148  void
149  InterpolateInX (const int& i,
150  const int& j,
151  const int& k,
152  const int& qty_index,
153  amrex::Real& val_lo,
154  amrex::Real upw_lo) const
155  {
156  // Upwinding flags
157  if (upw_lo != amrex::Real(0)) upw_lo = (upw_lo > 0) ? amrex::Real(1) : -amrex::Real(1);
158 
159  // Data to interpolate on
160  amrex::Real sp2 = m_phi(i+2, j , k , qty_index);
161  amrex::Real sp1 = m_phi(i+1, j , k , qty_index);
162  amrex::Real s = m_phi(i , j , k , qty_index);
163  amrex::Real sm1 = m_phi(i-1, j , k , qty_index);
164  amrex::Real sm2 = m_phi(i-2, j , k , qty_index);
165  amrex::Real sm3 = m_phi(i-3, j , k , qty_index);
166 
167  // Left and right fluxes
168  amrex::Real Fhi = Evaluate(sm3,sm2,sm1,s ,sp1);
169  amrex::Real Flo = Evaluate(sp2,sp1,s ,sm1,sm2);
170 
171  // Numerical flux
172  val_lo = (amrex::Real(1) + upw_lo)/amrex::Real(2) * Fhi + (amrex::Real(1) - upw_lo)/amrex::Real(2) * Flo;
173  }
174 
175  AMREX_GPU_DEVICE
176  AMREX_FORCE_INLINE
177  void
178  InterpolateInY (const int& i,
179  const int& j,
180  const int& k,
181  const int& qty_index,
182  amrex::Real& val_lo,
183  amrex::Real upw_lo) const
184  {
185  // Upwinding flags
186  if (upw_lo != amrex::Real(0)) upw_lo = (upw_lo > 0) ? amrex::Real(1) : -amrex::Real(1);
187 
188  // Data to interpolate on
189  amrex::Real sp2 = m_phi(i , j+2, k , qty_index);
190  amrex::Real sp1 = m_phi(i , j+1, k , qty_index);
191  amrex::Real s = m_phi(i , j , k , qty_index);
192  amrex::Real sm1 = m_phi(i , j-1, k , qty_index);
193  amrex::Real sm2 = m_phi(i , j-2, k , qty_index);
194  amrex::Real sm3 = m_phi(i , j-3, k , qty_index);
195 
196  // Left and right fluxes
197  amrex::Real Fhi = Evaluate(sm3,sm2,sm1,s ,sp1);
198  amrex::Real Flo = Evaluate(sp2,sp1,s ,sm1,sm2);
199 
200  // Numerical flux
201  val_lo = (amrex::Real(1) + upw_lo)/amrex::Real(2) * Fhi + (amrex::Real(1) - upw_lo)/amrex::Real(2) * Flo;
202  }
203 
204  AMREX_GPU_DEVICE
205  AMREX_FORCE_INLINE
206  void
207  InterpolateInZ (const int& i,
208  const int& j,
209  const int& k,
210  const int& qty_index,
211  amrex::Real& val_lo,
212  amrex::Real upw_lo) const
213  {
214  // Upwinding flags
215  if (upw_lo != amrex::Real(0)) upw_lo = (upw_lo > 0) ? amrex::Real(1) : -amrex::Real(1);
216 
217  // Data to interpolate on
218  amrex::Real sp2 = m_phi(i , j , k+2, qty_index);
219  amrex::Real sp1 = m_phi(i , j , k+1, qty_index);
220  amrex::Real s = m_phi(i , j , k , qty_index);
221  amrex::Real sm1 = m_phi(i , j , k-1, qty_index);
222  amrex::Real sm2 = m_phi(i , j , k-2, qty_index);
223  amrex::Real sm3 = m_phi(i , j , k-3, qty_index);
224 
225  // Left and right fluxes
226  amrex::Real Fhi = Evaluate(sm3,sm2,sm1,s ,sp1);
227  amrex::Real Flo = Evaluate(sp2,sp1,s ,sm1,sm2);
228 
229  // Numerical flux
230  val_lo = (amrex::Real(1) + upw_lo)/amrex::Real(2) * Fhi + (amrex::Real(1) - upw_lo)/amrex::Real(2) * Flo;
231  }
232 
233  AMREX_GPU_DEVICE
234  AMREX_FORCE_INLINE
236  Evaluate (const amrex::Real& sm2,
237  const amrex::Real& sm1,
238  const amrex::Real& s ,
239  const amrex::Real& sp1,
240  const amrex::Real& sp2) const
241  {
242  // Smoothing factors
243  amrex::Real b1 = c1 * (sm2 - amrex::Real(2) * sm1 + s) * (sm2 - amrex::Real(2) * sm1 + s) +
244  amrex::Real(0.25) * (sm2 - amrex::Real(4.0) * sm1 + amrex::Real(3) * s) * (sm2 - amrex::Real(4.0) * sm1 + amrex::Real(3) * s);
245  amrex::Real b2 = c1 * (sm1 - amrex::Real(2) * s + sp1) * (sm1 - amrex::Real(2) * s + sp1) +
246  amrex::Real(0.25) * (sm1 - sp1) * (sm1 - sp1);
247  amrex::Real b3 = c1 * (s - amrex::Real(2) * sp1 + sp2) * (s - amrex::Real(2) * sp1 + sp2) +
248  amrex::Real(0.25) * (amrex::Real(3) * s - amrex::Real(4.0) * sp1 + sp2) * (amrex::Real(3) * s - amrex::Real(4.0) * sp1 + sp2);
249 
250  // Weight factors
251  amrex::Real w1 = g1 / ( (eps + b1) * (eps + b1) );
252  amrex::Real w2 = g2 / ( (eps + b2) * (eps + b2) );
253  amrex::Real w3 = g3 / ( (eps + b3) * (eps + b3) );
254 
255  // Weight factor norm
256  amrex::Real wsum = w1 + w2 + w3;
257 
258  // Taylor expansions
259  amrex::Real v1 = amrex::Real(2) * sm2 - amrex::Real(7.0) * sm1 + amrex::Real(11.0) * s;
260  amrex::Real v2 = -sm1 + amrex::Real(5.0) * s + amrex::Real(2) * sp1;
261  amrex::Real v3 = amrex::Real(2) * s + amrex::Real(5.0) * sp1 - sp2;
262 
263  // Interpolated value
264  return ( (w1 * v1 + w2 * v2 + w3 * v3) / (amrex::Real(6.0) * wsum) );
265  }
266 
267 private:
268  amrex::Array4<const amrex::Real> m_phi; // Quantity to interpolate
269 #ifdef AMREX_USE_FLOAT
270  const amrex::Real eps=amrex::Real(1.0e-12);
271 #else
272  const amrex::Real eps=amrex::Real(1.0e-40);
273 #endif
274  static constexpr amrex::Real c1=(amrex::Real(13.0)/amrex::Real(12.0));
275  static constexpr amrex::Real g1=(amrex::Real(1)/amrex::Real(10.0));
276  static constexpr amrex::Real g2=(amrex::Real(3)/amrex::Real(5.0));
277  static constexpr amrex::Real g3=(amrex::Real(3)/amrex::Real(10.0));
278 };
279 
280 /**
281  * Interpolation operators used for WENO-7 scheme
282  */
283 struct WENO7
284 {
285  AMREX_GPU_HOST_DEVICE
286  AMREX_FORCE_INLINE
287  WENO7 (const amrex::Array4<const amrex::Real>& phi,
288  const amrex::Real /*upw_frac*/)
289  : m_phi(phi) {}
290 
291  AMREX_GPU_DEVICE
292  AMREX_FORCE_INLINE
293  void
294  InterpolateInX (const int& i,
295  const int& j,
296  const int& k,
297  const int& qty_index,
298  amrex::Real& val_lo,
299  amrex::Real upw_lo) const
300  {
301  // Upwinding flags
302  if (upw_lo != amrex::Real(0)) upw_lo = (upw_lo > 0) ? amrex::Real(1) : -amrex::Real(1);
303 
304  // Data to interpolate on
305  amrex::Real sp3 = m_phi(i+3, j , k , qty_index);
306  amrex::Real sp2 = m_phi(i+2, j , k , qty_index);
307  amrex::Real sp1 = m_phi(i+1, j , k , qty_index);
308  amrex::Real s = m_phi(i , j , k , qty_index);
309  amrex::Real sm1 = m_phi(i-1, j , k , qty_index);
310  amrex::Real sm2 = m_phi(i-2, j , k , qty_index);
311  amrex::Real sm3 = m_phi(i-3, j , k , qty_index);
312  amrex::Real sm4 = m_phi(i-4, j , k , qty_index);
313 
314  // Left and right fluxes
315  amrex::Real Fhi = Evaluate(sm4,sm3,sm2,sm1,s ,sp1,sp2);
316  amrex::Real Flo = Evaluate(sp3,sp2,sp1,s ,sm1,sm2,sm3);
317 
318  // Numerical flux
319  val_lo = (amrex::Real(1) + upw_lo)/amrex::Real(2) * Fhi + (amrex::Real(1) - upw_lo)/amrex::Real(2) * Flo;
320  }
321 
322  AMREX_GPU_DEVICE
323  AMREX_FORCE_INLINE
324  void
325  InterpolateInY (const int& i,
326  const int& j,
327  const int& k,
328  const int& qty_index,
329  amrex::Real& val_lo,
330  amrex::Real upw_lo) const
331  {
332  // Upwinding flags
333  if (upw_lo != amrex::Real(0)) upw_lo = (upw_lo > 0) ? amrex::Real(1) : -amrex::Real(1);
334 
335  // Data to interpolate on
336  amrex::Real sp3 = m_phi(i , j+3, k , qty_index);
337  amrex::Real sp2 = m_phi(i , j+2, k , qty_index);
338  amrex::Real sp1 = m_phi(i , j+1, k , qty_index);
339  amrex::Real s = m_phi(i , j , k , qty_index);
340  amrex::Real sm1 = m_phi(i , j-1, k , qty_index);
341  amrex::Real sm2 = m_phi(i , j-2, k , qty_index);
342  amrex::Real sm3 = m_phi(i , j-3, k , qty_index);
343  amrex::Real sm4 = m_phi(i , j-4, k , qty_index);
344 
345  // Left and right fluxes
346  amrex::Real Fhi = Evaluate(sm4,sm3,sm2,sm1,s ,sp1,sp2);
347  amrex::Real Flo = Evaluate(sp3,sp2,sp1,s ,sm1,sm2,sm3);
348 
349  // Numerical flux
350  val_lo = (amrex::Real(1) + upw_lo)/amrex::Real(2) * Fhi + (amrex::Real(1) - upw_lo)/amrex::Real(2) * Flo;
351  }
352 
353  AMREX_GPU_DEVICE
354  AMREX_FORCE_INLINE
355  void
356  InterpolateInZ (const int& i,
357  const int& j,
358  const int& k,
359  const int& qty_index,
360  amrex::Real& val_lo,
361  amrex::Real upw_lo) const
362  {
363  // Upwinding flags
364  if (upw_lo != amrex::Real(0)) upw_lo = (upw_lo > 0) ? amrex::Real(1) : -amrex::Real(1);
365 
366  // Data to interpolate on
367  amrex::Real sp3 = m_phi(i , j , k+3, qty_index);
368  amrex::Real sp2 = m_phi(i , j , k+2, qty_index);
369  amrex::Real sp1 = m_phi(i , j , k+1, qty_index);
370  amrex::Real s = m_phi(i , j , k , qty_index);
371  amrex::Real sm1 = m_phi(i , j , k-1, qty_index);
372  amrex::Real sm2 = m_phi(i , j , k-2, qty_index);
373  amrex::Real sm3 = m_phi(i , j , k-3, qty_index);
374  amrex::Real sm4 = m_phi(i , j , k-4, qty_index);
375 
376  // Left and right fluxes
377  amrex::Real Fhi = Evaluate(sm4,sm3,sm2,sm1,s ,sp1,sp2);
378  amrex::Real Flo = Evaluate(sp3,sp2,sp1,s ,sm1,sm2,sm3);
379 
380  // Numerical flux
381  val_lo = (amrex::Real(1) + upw_lo)/amrex::Real(2) * Fhi + (amrex::Real(1) - upw_lo)/amrex::Real(2) * Flo;
382  }
383 
384  AMREX_GPU_DEVICE
385  AMREX_FORCE_INLINE
387  Evaluate (const amrex::Real& sm3,
388  const amrex::Real& sm2,
389  const amrex::Real& sm1,
390  const amrex::Real& s ,
391  const amrex::Real& sp1,
392  const amrex::Real& sp2,
393  const amrex::Real& sp3) const
394  {
395  // Finite-volume Jiang-Shu smoothness indicators for cell-average data.
396  amrex::Real b1 = ( amrex::Real(547.0) * sm3 * sm3
397  - amrex::Real(3882.0) * sm3 * sm2
398  + amrex::Real(4642.0) * sm3 * sm1
399  - amrex::Real(1854.0) * sm3 * s
400  + amrex::Real(7043.0) * sm2 * sm2
401  - amrex::Real(17246.0) * sm2 * sm1
402  + amrex::Real(7042.0) * sm2 * s
403  + amrex::Real(11003.0) * sm1 * sm1
404  - amrex::Real(9402.0) * sm1 * s
405  + amrex::Real(2107.0) * s * s ) / amrex::Real(240.0);
406  amrex::Real b2 = ( amrex::Real(267.0) * sm2 * sm2
407  - amrex::Real(1642.0) * sm2 * sm1
408  + amrex::Real(1602.0) * sm2 * s
409  - amrex::Real(494.0) * sm2 * sp1
410  + amrex::Real(2843.0) * sm1 * sm1
411  - amrex::Real(5966.0) * sm1 * s
412  + amrex::Real(1922.0) * sm1 * sp1
413  + amrex::Real(3443.0) * s * s
414  - amrex::Real(2522.0) * s * sp1
415  + amrex::Real(547.0) * sp1 * sp1 ) / amrex::Real(240.0);
416  amrex::Real b3 = ( amrex::Real(547.0) * sm1 * sm1
417  - amrex::Real(2522.0) * sm1 * s
418  + amrex::Real(1922.0) * sm1 * sp1
419  - amrex::Real(494.0) * sm1 * sp2
420  + amrex::Real(3443.0) * s * s
421  - amrex::Real(5966.0) * s * sp1
422  + amrex::Real(1602.0) * s * sp2
423  + amrex::Real(2843.0) * sp1 * sp1
424  - amrex::Real(1642.0) * sp1 * sp2
425  + amrex::Real(267.0) * sp2 * sp2 ) / amrex::Real(240.0);
426  amrex::Real b4 = ( amrex::Real(2107.0) * s * s
427  - amrex::Real(9402.0) * s * sp1
428  + amrex::Real(7042.0) * s * sp2
429  - amrex::Real(1854.0) * s * sp3
430  + amrex::Real(11003.0) * sp1 * sp1
431  - amrex::Real(17246.0) * sp1 * sp2
432  + amrex::Real(4642.0) * sp1 * sp3
433  + amrex::Real(7043.0) * sp2 * sp2
434  - amrex::Real(3882.0) * sp2 * sp3
435  + amrex::Real(547.0) * sp3 * sp3 ) / amrex::Real(240.0);
436 
437  // Weight factors
438  amrex::Real w1 = g1 / ( (eps + b1) * (eps + b1) );
439  amrex::Real w2 = g2 / ( (eps + b2) * (eps + b2) );
440  amrex::Real w3 = g3 / ( (eps + b3) * (eps + b3) );
441  amrex::Real w4 = g4 / ( (eps + b4) * (eps + b4) );
442 
443  // Weight factor norm
444  amrex::Real wsum = w1 + w2 + w3 + w4;
445 
446  // Finite-volume face-reconstruction coefficients for the left state at i-1/2.
447  amrex::Real v1 = (-amrex::Real(1.0)/amrex::Real(4.0))*sm3 + ( amrex::Real(13.0)/amrex::Real(12.0))*sm2 -
448  ( amrex::Real(23.0)/amrex::Real(12.0))*sm1 + ( amrex::Real(25.0)/amrex::Real(12.0))*s;
449  amrex::Real v2 = ( amrex::Real(1.0)/amrex::Real(12.0))*sm2 - ( amrex::Real(5.0)/amrex::Real(12.0))*sm1 +
450  ( amrex::Real(13.0)/amrex::Real(12.0))*s + ( amrex::Real(1.0)/amrex::Real(4.0))*sp1;
451  amrex::Real v3 = (-amrex::Real(1.0)/amrex::Real(12.0))*sm1 + ( amrex::Real(7.0)/amrex::Real(12.0))*s +
452  ( amrex::Real(7.0)/amrex::Real(12.0))*sp1 - ( amrex::Real(1.0)/amrex::Real(12.0))*sp2;
453  amrex::Real v4 = ( amrex::Real(1.0)/amrex::Real(4.0))*s + ( amrex::Real(13.0)/amrex::Real(12.0))*sp1 -
454  ( amrex::Real(5.0)/amrex::Real(12.0))*sp2 + ( amrex::Real(1.0)/amrex::Real(12.0))*sp3;
455 
456  // Interpolated value
457  return ( (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4) / (wsum) );
458  }
459 
460 private:
461  amrex::Array4<const amrex::Real> m_phi; // Quantity to interpolate
462 #ifdef AMREX_USE_FLOAT
463  const amrex::Real eps=amrex::Real(1.0e-12);
464 #else
465  const amrex::Real eps=amrex::Real(1.0e-40);
466 #endif
467  static constexpr amrex::Real g1=( amrex::Real(1.0)/amrex::Real(35.0));
468  static constexpr amrex::Real g2=(amrex::Real(12.0)/amrex::Real(35.0));
469  static constexpr amrex::Real g3=(amrex::Real(18.0)/amrex::Real(35.0));
470  static constexpr amrex::Real g4=( amrex::Real(4.0)/amrex::Real(35.0));
471 };
472 #endif
amrex::Real Real
Definition: ERF_ShocInterface.H:19
Definition: ERF_Interpolation_WENO.H:10
static constexpr amrex::Real g1
Definition: ERF_Interpolation_WENO.H:131
amrex::Array4< const amrex::Real > m_phi
Definition: ERF_Interpolation_WENO.H:125
const amrex::Real eps
Definition: ERF_Interpolation_WENO.H:129
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void InterpolateInZ(const int &i, const int &j, const int &k, const int &qty_index, amrex::Real &val_lo, amrex::Real upw_lo) const
Definition: ERF_Interpolation_WENO.H:74
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Evaluate(const amrex::Real &sm1, const amrex::Real &s, const amrex::Real &sp1) const
Definition: ERF_Interpolation_WENO.H:101
static constexpr amrex::Real g2
Definition: ERF_Interpolation_WENO.H:132
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE WENO3(const amrex::Array4< const amrex::Real > &phi, const amrex::Real)
Definition: ERF_Interpolation_WENO.H:13
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void InterpolateInX(const int &i, const int &j, const int &k, const int &qty_index, amrex::Real &val_lo, amrex::Real upw_lo) const
Definition: ERF_Interpolation_WENO.H:20
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void InterpolateInY(const int &i, const int &j, const int &k, const int &qty_index, amrex::Real &val_lo, amrex::Real upw_lo) const
Definition: ERF_Interpolation_WENO.H:47
Definition: ERF_Interpolation_WENO.H:139
const amrex::Real eps
Definition: ERF_Interpolation_WENO.H:272
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void InterpolateInX(const int &i, const int &j, const int &k, const int &qty_index, amrex::Real &val_lo, amrex::Real upw_lo) const
Definition: ERF_Interpolation_WENO.H:149
amrex::Array4< const amrex::Real > m_phi
Definition: ERF_Interpolation_WENO.H:268
static constexpr amrex::Real c1
Definition: ERF_Interpolation_WENO.H:274
static constexpr amrex::Real g2
Definition: ERF_Interpolation_WENO.H:276
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void InterpolateInY(const int &i, const int &j, const int &k, const int &qty_index, amrex::Real &val_lo, amrex::Real upw_lo) const
Definition: ERF_Interpolation_WENO.H:178
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void InterpolateInZ(const int &i, const int &j, const int &k, const int &qty_index, amrex::Real &val_lo, amrex::Real upw_lo) const
Definition: ERF_Interpolation_WENO.H:207
static constexpr amrex::Real g3
Definition: ERF_Interpolation_WENO.H:277
static constexpr amrex::Real g1
Definition: ERF_Interpolation_WENO.H:275
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Evaluate(const amrex::Real &sm2, const amrex::Real &sm1, const amrex::Real &s, const amrex::Real &sp1, const amrex::Real &sp2) const
Definition: ERF_Interpolation_WENO.H:236
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE WENO5(const amrex::Array4< const amrex::Real > &phi, const amrex::Real)
Definition: ERF_Interpolation_WENO.H:142
Definition: ERF_Interpolation_WENO.H:284
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE WENO7(const amrex::Array4< const amrex::Real > &phi, const amrex::Real)
Definition: ERF_Interpolation_WENO.H:287
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Evaluate(const amrex::Real &sm3, const amrex::Real &sm2, const amrex::Real &sm1, const amrex::Real &s, const amrex::Real &sp1, const amrex::Real &sp2, const amrex::Real &sp3) const
Definition: ERF_Interpolation_WENO.H:387
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void InterpolateInZ(const int &i, const int &j, const int &k, const int &qty_index, amrex::Real &val_lo, amrex::Real upw_lo) const
Definition: ERF_Interpolation_WENO.H:356
const amrex::Real eps
Definition: ERF_Interpolation_WENO.H:465
static constexpr amrex::Real g4
Definition: ERF_Interpolation_WENO.H:470
static constexpr amrex::Real g3
Definition: ERF_Interpolation_WENO.H:469
static constexpr amrex::Real g2
Definition: ERF_Interpolation_WENO.H:468
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void InterpolateInX(const int &i, const int &j, const int &k, const int &qty_index, amrex::Real &val_lo, amrex::Real upw_lo) const
Definition: ERF_Interpolation_WENO.H:294
static constexpr amrex::Real g1
Definition: ERF_Interpolation_WENO.H:467
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void InterpolateInY(const int &i, const int &j, const int &k, const int &qty_index, amrex::Real &val_lo, amrex::Real upw_lo) const
Definition: ERF_Interpolation_WENO.H:325
amrex::Array4< const amrex::Real > m_phi
Definition: ERF_Interpolation_WENO.H:461