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