ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_Interpolation_WENO_Z.H
Go to the documentation of this file.
1 #ifndef ERF_INTERPOLATE_WENO_Z_H_
2 #define ERF_INTERPOLATE_WENO_Z_H_
3 
4 #include "ERF_DataStruct.H"
5 
6 /**
7  * Interpolation operators used for WENO_Z-3 scheme
8  */
9 struct WENO_Z3
10 {
11  WENO_Z3 (const amrex::Array4<const amrex::Real>& phi)
12  : m_phi(phi) {}
13 
14  AMREX_GPU_DEVICE
15  AMREX_FORCE_INLINE
16  void
17  InterpolateInX (const int& i,
18  const int& j,
19  const int& k,
20  const int& qty_index,
21  amrex::Real& val_lo,
22  amrex::Real upw_lo,
23  const amrex::Real /*upw_frac*/) const
24  {
25  // Data to interpolate on
26  amrex::Real sp1 = m_phi(i+1, j , k , qty_index);
27  amrex::Real s = m_phi(i , j , k , qty_index);
28  amrex::Real sm1 = m_phi(i-1, j , k , qty_index);
29  amrex::Real sm2 = m_phi(i-2, j , k , qty_index);
30 
31  if (upw_lo > tol) {
32  val_lo = Evaluate(sm2,sm1,s );
33  } else if (upw_lo < -tol) {
34  val_lo = Evaluate(sp1,s ,sm1);
35  } else {
36  val_lo = 0.5 * (s + sm1);
37  }
38  }
39 
40  AMREX_GPU_DEVICE
41  AMREX_FORCE_INLINE
42  void
43  InterpolateInY (const int& i,
44  const int& j,
45  const int& k,
46  const int& qty_index,
47  amrex::Real& val_lo,
48  amrex::Real upw_lo,
49  const amrex::Real /*upw_frac*/) const
50  {
51  // Data to interpolate on
52  amrex::Real sp1 = m_phi(i , j+1, k , qty_index);
53  amrex::Real s = m_phi(i , j , k , qty_index);
54  amrex::Real sm1 = m_phi(i , j-1, k , qty_index);
55  amrex::Real sm2 = m_phi(i , j-2, k , qty_index);
56 
57  if (upw_lo > tol) {
58  val_lo = Evaluate(sm2,sm1,s );
59  } else if (upw_lo < -tol) {
60  val_lo = Evaluate(sp1,s ,sm1);
61  } else {
62  val_lo = 0.5 * (s + sm1);
63  }
64  }
65 
66  AMREX_GPU_DEVICE
67  AMREX_FORCE_INLINE
68  void
69  InterpolateInZ (const int& i,
70  const int& j,
71  const int& k,
72  const int& qty_index,
73  amrex::Real& val_lo,
74  amrex::Real upw_lo,
75  const amrex::Real /*upw_frac*/) const
76  {
77  // Data to interpolate on
78  amrex::Real sp1 = m_phi(i , j , k+1, qty_index);
79  amrex::Real s = m_phi(i , j , k , qty_index);
80  amrex::Real sm1 = m_phi(i , j , k-1, qty_index);
81  amrex::Real sm2 = m_phi(i , j , k-2, qty_index);
82 
83  if (upw_lo > tol) {
84  val_lo = Evaluate(sm2,sm1,s );
85  } else if (upw_lo < -tol) {
86  val_lo = Evaluate(sp1,s ,sm1);
87  } else {
88  val_lo = 0.5 * (s + sm1);
89  }
90  }
91 
92  AMREX_GPU_DEVICE
93  AMREX_FORCE_INLINE
94  amrex::Real
95  Evaluate (const amrex::Real& sm1,
96  const amrex::Real& s ,
97  const amrex::Real& sp1) const
98  {
99  // Smoothing factors
100  amrex::Real b1 = (s - sm1) * (s - sm1);
101  amrex::Real b2 = (sp1 - s) * (sp1 - s);
102 
103  // Weight factors
104  amrex::Real t5 = std::abs(b2 - b1);
105  amrex::Real w1 = g1 * ( 1.0 + (t5*t5) / ((eps + b1) * (eps + b1)) );
106  amrex::Real w2 = g2 * ( 1.0 + (t5*t5) / ((eps + b2) * (eps + b2)) );
107 
108  // Weight factor norm
109  amrex::Real wsum = w1 + w2;
110 
111  // Taylor expansions
112  amrex::Real v1 = -sm1 + 3.0 * s;
113  amrex::Real v2 = s + sp1;
114 
115  // Interpolated value
116  return ( (w1 * v1 + w2 * v2) / (2.0 * wsum) );
117  }
118 
119 private:
120  amrex::Array4<const amrex::Real> m_phi; // Quantity to interpolate
121  const amrex::Real eps=1.0e-6;
122  const amrex::Real tol=1.0e-12;
123  static constexpr amrex::Real g1=(1.0/3.0);
124  static constexpr amrex::Real g2=(2.0/3.0);
125 };
126 
127 /**
128  * Interpolation operators used for WENO_MZQ3 scheme
129  */
130 struct WENO_MZQ3
131 {
132  WENO_MZQ3 (const amrex::Array4<const amrex::Real>& phi)
133  : m_phi(phi) {}
134 
135  AMREX_GPU_DEVICE
136  AMREX_FORCE_INLINE
137  void
138  InterpolateInX (const int& i,
139  const int& j,
140  const int& k,
141  const int& qty_index,
142  amrex::Real& val_lo,
143  amrex::Real upw_lo,
144  const amrex::Real /*upw_frac*/) const
145  {
146  // Data to interpolate on
147  amrex::Real sp1 = m_phi(i+1, j , k , qty_index);
148  amrex::Real s = m_phi(i , j , k , qty_index);
149  amrex::Real sm1 = m_phi(i-1, j , k , qty_index);
150  amrex::Real sm2 = m_phi(i-2, j , k , qty_index);
151 
152  if (upw_lo > tol) {
153  val_lo = Evaluate(sm2,sm1,s );
154  } else if (upw_lo < -tol) {
155  val_lo = Evaluate(sp1,s ,sm1);
156  } else {
157  val_lo = 0.5 * (s + sm1);
158  }
159  }
160 
161  AMREX_GPU_DEVICE
162  AMREX_FORCE_INLINE
163  void
164  InterpolateInY (const int& i,
165  const int& j,
166  const int& k,
167  const int& qty_index,
168  amrex::Real& val_lo,
169  amrex::Real upw_lo,
170  const amrex::Real /*upw_frac*/) const
171  {
172  // Data to interpolate on
173  amrex::Real sp1 = m_phi(i , j+1, k , qty_index);
174  amrex::Real s = m_phi(i , j , k , qty_index);
175  amrex::Real sm1 = m_phi(i , j-1, k , qty_index);
176  amrex::Real sm2 = m_phi(i , j-2, k , qty_index);
177 
178  if (upw_lo > tol) {
179  val_lo = Evaluate(sm2,sm1,s );
180  } else if (upw_lo < -tol) {
181  val_lo = Evaluate(sp1,s ,sm1);
182  } else {
183  val_lo = 0.5 * (s + sm1);
184  }
185  }
186 
187  AMREX_GPU_DEVICE
188  AMREX_FORCE_INLINE
189  void
190  InterpolateInZ (const int& i,
191  const int& j,
192  const int& k,
193  const int& qty_index,
194  amrex::Real& val_lo,
195  amrex::Real upw_lo,
196  const amrex::Real /*upw_frac*/) const
197  {
198  // Data to interpolate on
199  amrex::Real sp1 = m_phi(i , j , k+1, qty_index);
200  amrex::Real s = m_phi(i , j , k , qty_index);
201  amrex::Real sm1 = m_phi(i , j , k-1, qty_index);
202  amrex::Real sm2 = m_phi(i , j , k-2, qty_index);
203 
204  if (upw_lo > tol) {
205  val_lo = Evaluate(sm2,sm1,s );
206  } else if (upw_lo < -tol) {
207  val_lo = Evaluate(sp1,s ,sm1);
208  } else {
209  val_lo = 0.5 * (s + sm1);
210  }
211  }
212 
213  AMREX_GPU_DEVICE
214  AMREX_FORCE_INLINE
215  amrex::Real
216  Evaluate (const amrex::Real& sm1,
217  const amrex::Real& s ,
218  const amrex::Real& sp1) const
219  {
220  // Smoothing factors
221  amrex::Real b1 = (s - sm1) * (s - sm1);
222  amrex::Real b2 = (sp1 - s) * (sp1 - s);
223  amrex::Real b3 = ( (13.0 / 12.0) * ((sm1 - 2.0*s + sp1)*(sm1 - 2.0*s + sp1)) ) + ( ((sp1 - sm1)*(sp1 - sm1)) / 4.0 );
224 
225  // Weight factors
226  amrex::Real t5 = ( std::abs(b3 - b1) + std::abs(b3 - b2) ) / 32.0;
227  amrex::Real a1 = g1 * ( 1.0 + (t5*t5) / ((eps + b1) * (eps + b1)) );
228  amrex::Real a2 = g2 * ( 1.0 + (t5*t5) / ((eps + b2) * (eps + b2)) );
229  amrex::Real a3 = g3 * ( 1.0 + (t5*t5) / ((eps + b3) * (eps + b3)) );
230  amrex::Real asum = a1 + a2 + a3;
231  amrex::Real w1 = a1 / asum;
232  amrex::Real w2 = a2 / asum;
233  amrex::Real w3 = a3 / asum;
234 
235  // Taylor expansions
236  amrex::Real v1 = (-sm1 + 3.0 * s) / 2.0;
237  amrex::Real v2 = ( s + sp1) / 2.0;
238  amrex::Real v3 = (-sm1 + 5.0 * s + 2.0 * sp1) / 6.0;
239 
240  // Interpolated value
241  return ( (w3 / g3) * (v3 - g1 * v1 - g2 * v2) + w1 * v1 + w2 * v2 );
242  }
243 
244 private:
245  amrex::Array4<const amrex::Real> m_phi; // Quantity to interpolate
246  const amrex::Real eps=1.0e-6;
247  const amrex::Real tol=1.0e-12;
248  static constexpr amrex::Real g1=(1.0/3.0);
249  static constexpr amrex::Real g2=(1.0/3.0);
250  static constexpr amrex::Real g3=(1.0/3.0);
251 };
252 
253 /**
254  * Interpolation operators used for WENO_Z-5 scheme
255  */
256 struct WENO_Z5
257 {
258  WENO_Z5 (const amrex::Array4<const amrex::Real>& phi)
259  : m_phi(phi) {}
260 
261  AMREX_GPU_DEVICE
262  AMREX_FORCE_INLINE
263  void
264  InterpolateInX (const int& i,
265  const int& j,
266  const int& k,
267  const int& qty_index,
268  amrex::Real& val_lo,
269  amrex::Real upw_lo,
270  const amrex::Real /*upw_frac*/) const
271  {
272  // Data to interpolate on
273  amrex::Real sp2 = m_phi(i+2, j , k , qty_index);
274  amrex::Real sp1 = m_phi(i+1, j , k , qty_index);
275  amrex::Real s = m_phi(i , j , k , qty_index);
276  amrex::Real sm1 = m_phi(i-1, j , k , qty_index);
277  amrex::Real sm2 = m_phi(i-2, j , k , qty_index);
278  amrex::Real sm3 = m_phi(i-3, j , k , qty_index);
279 
280  if (upw_lo > tol) {
281  val_lo = Evaluate(sm3,sm2,sm1,s ,sp1);
282  } else if (upw_lo < -tol) {
283  val_lo = Evaluate(sp2,sp1,s,sm1,sm2);
284  } else {
285  val_lo = 0.5 * (s + sm1);
286  }
287  }
288 
289  AMREX_GPU_DEVICE
290  AMREX_FORCE_INLINE
291  void
292  InterpolateInY (const int& i,
293  const int& j,
294  const int& k,
295  const int& qty_index,
296  amrex::Real& val_lo,
297  amrex::Real upw_lo,
298  const amrex::Real /*upw_frac*/) const
299  {
300  // Data to interpolate on
301  amrex::Real sp2 = m_phi(i , j+2, k , qty_index);
302  amrex::Real sp1 = m_phi(i , j+1, k , qty_index);
303  amrex::Real s = m_phi(i , j , k , qty_index);
304  amrex::Real sm1 = m_phi(i , j-1, k , qty_index);
305  amrex::Real sm2 = m_phi(i , j-2, k , qty_index);
306  amrex::Real sm3 = m_phi(i , j-3, k , qty_index);
307 
308  if (upw_lo > tol) {
309  val_lo = Evaluate(sm3,sm2,sm1,s ,sp1);
310  } else if (upw_lo < -tol) {
311  val_lo = Evaluate(sp2,sp1,s,sm1,sm2);
312  } else {
313  val_lo = 0.5 * (s + sm1);
314  }
315  }
316 
317  AMREX_GPU_DEVICE
318  AMREX_FORCE_INLINE
319  void
320  InterpolateInZ (const int& i,
321  const int& j,
322  const int& k,
323  const int& qty_index,
324  amrex::Real& val_lo,
325  amrex::Real upw_lo,
326  const amrex::Real /*upw_frac*/) const
327  {
328  // Data to interpolate on
329  amrex::Real sp2 = m_phi(i , j , k+2, qty_index);
330  amrex::Real sp1 = m_phi(i , j , k+1, qty_index);
331  amrex::Real s = m_phi(i , j , k , qty_index);
332  amrex::Real sm1 = m_phi(i , j , k-1, qty_index);
333  amrex::Real sm2 = m_phi(i , j , k-2, qty_index);
334  amrex::Real sm3 = m_phi(i , j , k-3, qty_index);
335 
336  if (upw_lo > tol) {
337  val_lo = Evaluate(sm3,sm2,sm1,s ,sp1);
338  } else if (upw_lo < -tol) {
339  val_lo = Evaluate(sp2,sp1,s,sm1,sm2);
340  } else {
341  val_lo = 0.5 * (s + sm1);
342  }
343  }
344 
345  AMREX_GPU_DEVICE
346  AMREX_FORCE_INLINE
347  amrex::Real
348  Evaluate (const amrex::Real& sm2,
349  const amrex::Real& sm1,
350  const amrex::Real& s ,
351  const amrex::Real& sp1,
352  const amrex::Real& sp2) const
353  {
354  // Smoothing factors
355  amrex::Real b1 = c1 * (sm2 - 2.0 * sm1 + s) * (sm2 - 2.0 * sm1 + s) +
356  0.25 * (sm2 - 4.0 * sm1 + 3.0 * s) * (sm2 - 4.0 * sm1 + 3.0 * s);
357  amrex::Real b2 = c1 * (sm1 - 2.0 * s + sp1) * (sm1 - 2.0 * s + sp1) +
358  0.25 * (sm1 - sp1) * (sm1 - sp1);
359  amrex::Real b3 = c1 * (s - 2.0 * sp1 + sp2) * (s - 2.0 * sp1 + sp2) +
360  0.25 * (3.0 * s - 4.0 * sp1 + sp2) * (3.0 * s - 4.0 * sp1 + sp2);
361 
362  // Weight factors
363  amrex::Real t5 = std::abs(b3 - b1);
364  amrex::Real w1 = g1 * ( 1.0 + (t5*t5) / ((eps + b1) * (eps + b1)) );
365  amrex::Real w2 = g2 * ( 1.0 + (t5*t5) / ((eps + b2) * (eps + b2)) );
366  amrex::Real w3 = g3 * ( 1.0 + (t5*t5) / ((eps + b3) * (eps + b3)) );
367 
368  // Weight factor norm
369  amrex::Real wsum = w1 + w2 + w3;
370 
371  // Taylor expansions
372  amrex::Real v1 = 2.0 * sm2 - 7.0 * sm1 + 11.0 * s;
373  amrex::Real v2 = -sm1 + 5.0 * s + 2.0 * sp1;
374  amrex::Real v3 = 2.0 * s + 5.0 * sp1 - sp2;
375 
376  // Interpolated value
377  return ( (w1 * v1 + w2 * v2 + w3 * v3) / (6.0 * wsum) );
378  }
379 
380 private:
381  amrex::Array4<const amrex::Real> m_phi; // Quantity to interpolate
382  const amrex::Real eps=1.0e-6;
383  const amrex::Real tol=1.0e-12;
384  static constexpr amrex::Real c1=(13.0/12.0);
385  static constexpr amrex::Real g1=(1.0/10.0);
386  static constexpr amrex::Real g2=(3.0/5.0);
387  static constexpr amrex::Real g3=(3.0/10.0);
388 };
389 
390 /**
391  * Interpolation operators used for WENO_Z-7 scheme
392  */
393 struct WENO_Z7
394 {
395  WENO_Z7 (const amrex::Array4<const amrex::Real>& phi)
396  : m_phi(phi) {}
397 
398  AMREX_GPU_DEVICE
399  AMREX_FORCE_INLINE
400  void
401  InterpolateInX (const int& i,
402  const int& j,
403  const int& k,
404  const int& qty_index,
405  amrex::Real& val_lo,
406  amrex::Real upw_lo,
407  const amrex::Real /*upw_frac*/) const
408  {
409  // Data to interpolate on
410  amrex::Real sp3 = m_phi(i+3, j , k , qty_index);
411  amrex::Real sp2 = m_phi(i+2, j , k , qty_index);
412  amrex::Real sp1 = m_phi(i+1, j , k , qty_index);
413  amrex::Real s = m_phi(i , j , k , qty_index);
414  amrex::Real sm1 = m_phi(i-1, j , k , qty_index);
415  amrex::Real sm2 = m_phi(i-2, j , k , qty_index);
416  amrex::Real sm3 = m_phi(i-3, j , k , qty_index);
417  amrex::Real sm4 = m_phi(i-4, j , k , qty_index);
418 
419  if (upw_lo > tol) {
420  val_lo = Evaluate(sm4,sm3,sm2,sm1,s ,sp1,sp2);
421  } else if (upw_lo < -tol) {
422  val_lo = Evaluate(sp3,sp2,sp1,s ,sm1,sm2,sm3);
423  } else {
424  val_lo = 0.5 * (s + sm1);
425  }
426  }
427 
428  AMREX_GPU_DEVICE
429  AMREX_FORCE_INLINE
430  void
431  InterpolateInY (const int& i,
432  const int& j,
433  const int& k,
434  const int& qty_index,
435  amrex::Real& val_lo,
436  amrex::Real upw_lo,
437  const amrex::Real /*upw_frac*/) const
438  {
439  // Data to interpolate on
440  amrex::Real sp3 = m_phi(i , j+3, k , qty_index);
441  amrex::Real sp2 = m_phi(i , j+2, k , qty_index);
442  amrex::Real sp1 = m_phi(i , j+1, k , qty_index);
443  amrex::Real s = m_phi(i , j , k , qty_index);
444  amrex::Real sm1 = m_phi(i , j-1, k , qty_index);
445  amrex::Real sm2 = m_phi(i , j-2, k , qty_index);
446  amrex::Real sm3 = m_phi(i , j-3, k , qty_index);
447  amrex::Real sm4 = m_phi(i , j-4, k , qty_index);
448 
449  if (upw_lo > tol) {
450  val_lo = Evaluate(sm4,sm3,sm2,sm1,s ,sp1,sp2);
451  } else if (upw_lo < -tol) {
452  val_lo = Evaluate(sp3,sp2,sp1,s ,sm1,sm2,sm3);
453  } else {
454  val_lo = 0.5 * (s + sm1);
455  }
456  }
457 
458  AMREX_GPU_DEVICE
459  AMREX_FORCE_INLINE
460  void
461  InterpolateInZ (const int& i,
462  const int& j,
463  const int& k,
464  const int& qty_index,
465  amrex::Real& val_lo,
466  amrex::Real upw_lo,
467  const amrex::Real /*upw_frac*/) const
468  {
469  // Data to interpolate on
470  amrex::Real sp3 = m_phi(i , j , k+2, qty_index);
471  amrex::Real sp2 = m_phi(i , j , k+2, qty_index);
472  amrex::Real sp1 = m_phi(i , j , k+1, qty_index);
473  amrex::Real s = m_phi(i , j , k , qty_index);
474  amrex::Real sm1 = m_phi(i , j , k-1, qty_index);
475  amrex::Real sm2 = m_phi(i , j , k-2, qty_index);
476  amrex::Real sm3 = m_phi(i , j , k-3, qty_index);
477  amrex::Real sm4 = m_phi(i , j , k-3, qty_index);
478 
479  if (upw_lo > tol) {
480  val_lo = Evaluate(sm4,sm3,sm2,sm1,s ,sp1,sp2);
481  } else if (upw_lo < -tol) {
482  val_lo = Evaluate(sp3,sp2,sp1,s ,sm1,sm2,sm3);
483  } else {
484  val_lo = 0.5 * (s + sm1);
485  }
486  }
487 
488  AMREX_GPU_DEVICE
489  AMREX_FORCE_INLINE
490  amrex::Real
491  Evaluate (const amrex::Real& sm3,
492  const amrex::Real& sm2,
493  const amrex::Real& sm1,
494  const amrex::Real& s ,
495  const amrex::Real& sp1,
496  const amrex::Real& sp2,
497  const amrex::Real& sp3) const
498  {
499  // Smoothing factors
500  amrex::Real b1 = ( sm3 * sm3 * 6649./2880.0
501  - sm3 * sm2 * 2623./160.0
502  + sm3 * sm1 * 9449./480.0
503  - sm3 * s * 11389./1440.0
504  + sm2 * sm2 * 28547./960.0
505  - sm2 * sm1 * 35047./480.0
506  + sm2 * s * 14369./480.0
507  + sm1 * sm1 * 44747./960.0
508  - sm1 * s * 6383./160.0
509  + s * s * 25729./2880.0 );
510  amrex::Real b2 = ( sm2 * sm2 * 3169/2880.0
511  - sm2 * sm1 * 3229/480.0
512  + sm2 * s * 3169/480.0
513  - sm2 * sp1 * 2989/1440.0
514  + sm1 * sm1 * 11147/960.0
515  - sm1 * s * 11767/480.0
516  + sm1 * sp1 * 1283/160.0
517  + s * s * 13667/960.0
518  - s * sp1 * 5069/480.0
519  + sp1 * sp1 * 6649/2880.0 );
520  amrex::Real b3 = ( sm1 * sm1 * 6649./2880.0
521  - sm1 * s * 5069./480.0
522  + sm1 * sp1 * 1283./160.0
523  - sm1 * sp2 * 2989./1440.0
524  + s * s * 13667./960.0
525  - s * sp1 * 11767./480.0
526  + s * sp2 * 3169./480.0
527  + sp1 * sp1 * 11147./960.0
528  - sp1 * sp2 * 3229./480.0
529  + sp2 * sp2 * 3169./2880.0 );
530  amrex::Real b4 = ( s * s * 25729./2880.
531  - s * sp1 * 6383./160.
532  + s * sp2 * 14369./480.
533  - s * sp3 * 11389./1440.
534  + sp1 * sp1 * 44747./960.
535  - sp1 * sp2 * 35047./480.
536  + sp1 * sp3 * 9449./480.
537  + sp2 * sp2 * 28547./960.
538  - sp2 * sp3 * 2623./160.
539  + sp3 * sp3 * 6649./2880. );
540 
541  // Weight factors
542  amrex::Real t5 = std::abs(b1 - b2 - b3 + b4);
543  amrex::Real w1 = g1 * ( 1.0 + (t5*t5) / ((eps + b1) * (eps + b1)) );
544  amrex::Real w2 = g2 * ( 1.0 + (t5*t5) / ((eps + b2) * (eps + b2)) );
545  amrex::Real w3 = g3 * ( 1.0 + (t5*t5) / ((eps + b3) * (eps + b3)) );
546  amrex::Real w4 = g4 * ( 1.0 + (t5*t5) / ((eps + b3) * (eps + b3)) );
547 
548  // Weight factor norm
549  amrex::Real wsum = w1 + w2 + w3 + w4;
550 
551  // Taylor expansions
552  amrex::Real v1 = (-0.3125)*sm3 + ( 1.3125)*sm2 + (-2.1875)*sm1 + ( 2.1875)*s;
553  amrex::Real v2 = ( 0.0625)*sm2 + (-0.3125)*sm1 + ( 0.9375)*s + ( 0.3125)*sp1;
554  amrex::Real v3 = (-0.0625)*sm1 + ( 0.5625)*s + ( 0.5625)*sp1 + (-0.0625)*sp2;
555  amrex::Real v4 = ( 0.3125)*s + ( 0.9375)*sp1 + (-0.3125)*sp2 + ( 0.0625)*sp3;
556 
557  // Interpolated value
558  return ( (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4) / (wsum) );
559  }
560 
561 private:
562  amrex::Array4<const amrex::Real> m_phi; // Quantity to interpolate
563  const amrex::Real eps=1.0e-40;
564  const amrex::Real tol=1.0e-12;
565  static constexpr amrex::Real g1=( 1.0/64.0);
566  static constexpr amrex::Real g2=(21.0/64.0);
567  static constexpr amrex::Real g3=(35.0/64.0);
568  static constexpr amrex::Real g4=( 7.0/64.0);
569 };
570 #endif
Definition: ERF_Interpolation_WENO_Z.H:131
static constexpr amrex::Real g2
Definition: ERF_Interpolation_WENO_Z.H:249
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 amrex::Real) const
Definition: ERF_Interpolation_WENO_Z.H:190
amrex::Array4< const amrex::Real > m_phi
Definition: ERF_Interpolation_WENO_Z.H:245
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 amrex::Real) const
Definition: ERF_Interpolation_WENO_Z.H:138
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_Z.H:216
static constexpr amrex::Real g3
Definition: ERF_Interpolation_WENO_Z.H:250
WENO_MZQ3(const amrex::Array4< const amrex::Real > &phi)
Definition: ERF_Interpolation_WENO_Z.H:132
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 amrex::Real) const
Definition: ERF_Interpolation_WENO_Z.H:164
const amrex::Real eps
Definition: ERF_Interpolation_WENO_Z.H:246
static constexpr amrex::Real g1
Definition: ERF_Interpolation_WENO_Z.H:248
const amrex::Real tol
Definition: ERF_Interpolation_WENO_Z.H:247
Definition: ERF_Interpolation_WENO_Z.H:10
const amrex::Real eps
Definition: ERF_Interpolation_WENO_Z.H:121
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 amrex::Real) const
Definition: ERF_Interpolation_WENO_Z.H:43
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 amrex::Real) const
Definition: ERF_Interpolation_WENO_Z.H:17
WENO_Z3(const amrex::Array4< const amrex::Real > &phi)
Definition: ERF_Interpolation_WENO_Z.H:11
amrex::Array4< const amrex::Real > m_phi
Definition: ERF_Interpolation_WENO_Z.H:120
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 amrex::Real) const
Definition: ERF_Interpolation_WENO_Z.H:69
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_Z.H:95
static constexpr amrex::Real g2
Definition: ERF_Interpolation_WENO_Z.H:124
static constexpr amrex::Real g1
Definition: ERF_Interpolation_WENO_Z.H:123
const amrex::Real tol
Definition: ERF_Interpolation_WENO_Z.H:122
Definition: ERF_Interpolation_WENO_Z.H:257
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 amrex::Real) const
Definition: ERF_Interpolation_WENO_Z.H:292
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_Z.H:348
static constexpr amrex::Real g3
Definition: ERF_Interpolation_WENO_Z.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 amrex::Real) const
Definition: ERF_Interpolation_WENO_Z.H:320
static constexpr amrex::Real g1
Definition: ERF_Interpolation_WENO_Z.H:385
amrex::Array4< const amrex::Real > m_phi
Definition: ERF_Interpolation_WENO_Z.H:381
static constexpr amrex::Real c1
Definition: ERF_Interpolation_WENO_Z.H:384
WENO_Z5(const amrex::Array4< const amrex::Real > &phi)
Definition: ERF_Interpolation_WENO_Z.H:258
const amrex::Real eps
Definition: ERF_Interpolation_WENO_Z.H:382
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 amrex::Real) const
Definition: ERF_Interpolation_WENO_Z.H:264
static constexpr amrex::Real g2
Definition: ERF_Interpolation_WENO_Z.H:386
const amrex::Real tol
Definition: ERF_Interpolation_WENO_Z.H:383
Definition: ERF_Interpolation_WENO_Z.H:394
static constexpr amrex::Real g1
Definition: ERF_Interpolation_WENO_Z.H:565
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_Z.H:491
amrex::Array4< const amrex::Real > m_phi
Definition: ERF_Interpolation_WENO_Z.H:562
const amrex::Real eps
Definition: ERF_Interpolation_WENO_Z.H:563
WENO_Z7(const amrex::Array4< const amrex::Real > &phi)
Definition: ERF_Interpolation_WENO_Z.H:395
static constexpr amrex::Real g4
Definition: ERF_Interpolation_WENO_Z.H:568
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 amrex::Real) const
Definition: ERF_Interpolation_WENO_Z.H:461
static constexpr amrex::Real g2
Definition: ERF_Interpolation_WENO_Z.H:566
const amrex::Real tol
Definition: ERF_Interpolation_WENO_Z.H:564
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 amrex::Real) const
Definition: ERF_Interpolation_WENO_Z.H:431
static constexpr amrex::Real g3
Definition: ERF_Interpolation_WENO_Z.H:567
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 amrex::Real) const
Definition: ERF_Interpolation_WENO_Z.H:401