Proto  3.2
Proto_Operator.H
Go to the documentation of this file.
1 #pragma once
2 #ifndef _PROTO_OPERATOR_H_
3 #define _PROTO_OPERATOR_H_
4 #include "Proto.H"
5 #include "Proto_BoxData.H"
6 #include "Proto_HDF5.H"
7 #include "Proto_LevelBoxData.H"
8 #define QUADRATURE1D 5
9 namespace Operator {
10 
11  using namespace Proto;
12 
13  //==========================================================================================
14  /// 4th Order Convolution
15  /**
16  Compute the 4th order accurate average of a quantity over a cell.
17  Distinguishes between 4th and 2nd order inputs.
18 
19  \param a_ctr 4th order cell centered quantity
20  \param a_2nd 2nd+ order cell centered quantity
21  */
22  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
24  _convolve(
25  const BoxData<T,C,MEM,D,E>& a_ctr,
26  const BoxData<T,C,MEM,D,E>& a_2nd);
27 
28  /// 4th Order Convolution (In Place)
29  /**
30  Compute the 4th order accurate average of a quantity over a cell.
31  Distinguishes between 4th and 2nd order inputs.
32 
33  \param a_avg 4th order cell averaged quantity (output)
34  \param a_ctr 4th order cell centered quantity
35  \param a_2nd 2nd+ order cell centered quantity
36  */
37  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
38  inline void _convolve(
40  const BoxData<T,C,MEM,D,E>& a_ctr,
41  const BoxData<T,C,MEM,D,E>& a_2nd);
42 
43  /// 4th Order Convolution
44  /**
45  Compute the 4th order accurate average of a quantity over a cell.
46  Equal to _convolve(ctr, ctr).
47 
48  \param a_ctr 4th order cell centered quantity
49  */
50  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
52  convolve(
53  const BoxData<T,C,MEM,D,E>& a_ctr);
54 
55  /// 4th Order Convolution (In Place)
56  /**
57  Compute the 4th order accurate average of a quantity over a cell.
58  Equal to _convolve(avg, ctr, ctr).
59 
60  \param a_avg 4th order cell averaged quantity (output)
61  \param a_ctr 4th order cell centered quantity
62  */
63  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
64  inline void
65  convolve(
66  BoxData<T,C,MEM,D,E>& a_avg,
67  const BoxData<T,C,MEM,D,E>& a_ctr);
68 
69  /// 4th Order Convolution (Level, In Place)
70  /**
71  Compute the 4th order accurate average of a quantity over a level.
72  Distinguishes between 4th and 2nd order inputs.
73  TODO: implement appropriate behavior for non-cell centered LevelData
74 
75  \param a_avg 4th order cell averaged quantity (output)
76  \param a_ctr 4th order cell centered quantity
77  \param a_2nd 2nd+ order cell centered quantity
78  */
79  template<class T, unsigned int C, MemType MEM, Centering CTR>
80  inline void
81  _convolve(
83  const LevelBoxData<T,C,MEM,CTR>& a_ctr,
85  /// 4th Order Convolution (Level, In Place)
86  /**
87  Compute the 4th order accurate average of a quantity over a level.
88  Equal to _convolve(avg, ctr, ctr).
89  TODO: implement appropriate behavior for non-cell centered LevelData
90 
91  \param a_avg 4th order cell averaged quantity (output)
92  \param a_ctr 4th order cell centered quantity
93  */
94  template<class T, unsigned int C, MemType MEM, Centering CTR>
95  inline void
96  convolve(
98  const LevelBoxData<T,C,MEM,CTR>& a_ctr);
99 
100  /// Initialize and Convolve
101  template<class T, unsigned int C, MemType MEM, Centering CTR,
102  typename Func, typename... Srcs>
103  inline void initConvolve(
104  LevelBoxData<T,C,MEM,CTR>& a_data, Func& a_func, Srcs... a_srcs);
105 
106 #ifdef PR_AMR
107  /// Initialize and Convolve (AMR)
108  template<class T, unsigned int C, MemType MEM, Centering CTR,
109  typename Func, typename... Srcs>
110  inline void initConvolve(
111  AMRData<T,C,MEM,CTR>& a_data, double a_dx0, Func& a_func, Srcs... a_srcs);
112 #endif
113 
114  //==========================================================================================
115  /// 4th Order Deconvolution
116  /**
117  Compute the 4th order accurate cell centered value of a quantity from its cell average.
118  Distinguishes between 4th and 2nd order inputs
119 
120  \param a_avg 4th order cell averaged quantity
121  \param a_2nd 2nd+ order cell centered quantity
122  */
123  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
124  inline BoxData<T,C,MEM,D,E>
126  const BoxData<T,C,MEM,D,E>& a_avg,
127  const BoxData<T,C,MEM,D,E>& a_2nd);
128 
129  /// 4th Order Deconvolution (In Place)
130  /**
131  Compute the 4th order accurate cell centered value of a quantity from its cell average.
132  Distinguishes between 4th and 2nd order inputs
133 
134  \param a_ctr 4th order cell centered quantity (output)
135  \param a_avg 4th order cell averaged quantity
136  \param a_2nd 2nd+ order cell centered quantity
137  */
138  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
139  inline void
140  _deconvolve(
141  BoxData<T,C,MEM,D,E>& a_ctr,
142  const BoxData<T,C,MEM,D,E>& a_avg,
143  const BoxData<T,C,MEM,D,E>& a_2nd);
144 
145  /// 4th Order Deconvolution
146  /**
147  Compute the 4th order accurate cell centered value of a quantity from its cell average.
148  Equal to _deconvolve(avg, avg).
149 
150  \param a_avg 4th order cell averaged quantity
151  */
152  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
153  inline BoxData<T,C,MEM,D,E>
154  deconvolve(
155  const BoxData<T,C,MEM,D,E>& a_avg);
157  /// 4th Order Deconvolution (In Place)
158  /**
159  Compute the 4th order accurate cell centered value of a quantity from its cell average.
160  Equal to _deconvolve(ctr, avg, avg)
161 
162  \param a_ctr 4th order cell centered quantity (output)
163  \param a_avg 4th order cell averaged quantity
164  */
165  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
166  inline void
167  deconvolve(
168  BoxData<T,C,MEM,D,E>& a_ctr,
169  const BoxData<T,C,MEM,D,E>& a_avg);
170 
171  /// 4th Order Deconvolution (Level, In Place)
172  /**
173  Compute the 4th order accurate cell centered quantity over a level.
174  Distinguishes between 2nd and 4th order inputs.
175  TODO: implement appropriate behavior for non-cell centered LevelData
176 
177  \param a_ctr 4th order cell centered quantity (output)
178  \param a_avg 4th order cell averaged quantity
179  \param a_2nd 2nd+ order cell centered quantity
180  */
181  template<class T, unsigned int C, MemType MEM, Centering CTR>
182  inline void
183  _deconvolve(
185  const LevelBoxData<T,C,MEM,CTR>& a_avg,
186  const LevelBoxData<T,C,MEM,CTR>& a_2nd);
187  /// 4th Order Deconvolution (Level, In Place)
188  /**
189  Compute the 4th order accurate cell centered quantity over a level.
190  Equal to _deconvolve(ctr, avg, avg);
191  TODO: implement appropriate behavior for non-cell centered LevelData
192 
193  \param a_ctr 4th order cell centered quantity (output)
194  \param a_avg 4th order cell averaged quantity
195  */
196  template<class T, unsigned int C, MemType MEM, Centering CTR>
197  inline void
198  deconvolve(
201 
202  //==========================================================================================
203  /// 4th Order Face Convolution
204  /**
205  Compute the 4th order accurate average of a quantity over a face.
206  Distinguishes between 2nd and 4th order inputs.
207 
208  \param a_ctr 4th order face centered quantity
209  \param a_2nd 2nd+ order face centered quantity
210  \param a_dir Face normal
211  */
212  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
213  inline BoxData<T,C,MEM,D,E>
215  const BoxData<T,C,MEM,D,E>& a_ctr,
216  const BoxData<T,C,MEM,D,E>& a_2nd,
217  int a_dir);
218 
219  /// 4th Order Face Convolution (In Place)
220  /**
221  Compute the 4th order accurate average of a quantity over a face.
222  Distinguishes between 2nd and 4th order inputs.
223 
224  \param a_avg 4th order face averaged quantity (output)
225  \param a_ctr 4th order face centered quantity
226  \param a_2nd 2nd+ order face centered quantity
227  \param a_dir Face normal
228  */
229  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
230  inline void
232  BoxData<T,C,MEM,D,E>& a_avg,
233  const BoxData<T,C,MEM,D,E>& a_ctr,
234  const BoxData<T,C,MEM,D,E>& a_2nd,
235  int a_dir);
236 
237  /// 4th Order Face Convolution
238  /**
239  Compute the 4th order accurate average of a quantity over a face.
240  Equal to _convolveFace(ctr, ctr, dir);
242  \param a_ctr 4th order face centered quantity
243  \param a_dir Face normal
244  */
245  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
246  inline BoxData<T,C,MEM,D,E>
247  convolveFace(
248  const BoxData<T,C,MEM,D,E>& a_ctr,
249  int a_dir);
250 
251  /// 4th Order Face Convolution (In Place)
252  /**
253  Compute the 4th order accurate average of a quantity over a face.
254  Equal to _convolveFace(avg, ctr, ctr, dir)
255 
256  \param a_avg 4th order face averaged quantity (output)
257  \param a_ctr 4th order face centered quantity
258  \param a_dir Face normal
259  */
260  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
261  inline void
262  convolveFace(
263  BoxData<T,C,MEM,D,E>& a_avg,
264  const BoxData<T,C,MEM,D,E>& a_ctr,
265  int a_dir);
266 
267  //==========================================================================================
268  /// 4th Order Face Deconvolution
269  /**
270  Compute the 4th order accurate face centered value of a quantity from its face average.
271  Distinguishes between 2nd and 4th order inputs.
272 
273  \param a_avg 4th order face averaged quantity
274  \param a_2nd 2nd+ order face averaged quantity
275  \param a_dir Face normal
276  */
277  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
278  inline BoxData<T,C,MEM,D,E>
280  const BoxData<T,C,MEM,D,E>& a_avg,
281  const BoxData<T,C,MEM,D,E>& a_2nd,
282  int a_dir);
283 
284  /// 4th Order Face Deconvolution (In Place)
285  /**
286  Compute the 4th order accurate face centered value of a quantity from its face average.
287  Distinguishes between 2nd and 4th order inputs.
288 
289  \param a_ctr 4th order face centered quantity (output)
290  \param a_avg 4th order face averaged quantity
291  \param a_2nd 2nd+ order face averaged quantity
292  \param a_dir Face normal
293  */
294  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
295  inline void
297  BoxData<T,C,MEM,D,E>& a_ctr,
298  const BoxData<T,C,MEM,D,E>& a_avg,
299  const BoxData<T,C,MEM,D,E>& a_2nd,
300  int a_dir);
301 
302  /// 4th Order Face Deconvolution
303  /**
304  Compute the 4th order accurate face centered value of a quantity from its face average.
305  Equal to _deconvolveFace(avg, avg, dir)
306 
307  \param a_avg 4th order face averaged quantity
308  \param a_dir Face normal
309  */
310  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
311  inline BoxData<T,C,MEM,D,E>
313  const BoxData<T,C,MEM,D,E>& a_avg,
314  int a_dir);
315 
316  /// 4th Order Face Deconvolution (In Place)
317  /**
318  Compute the 4th order accurate face centered value of a quantity from its face average.
319  Equal to _deconvolveFace(ctr, avg, avg, dir)
320 
321  \param a_ctr 4th order face centered quantity (output)
322  \param a_avg 4th order face averaged quantity
323  \param a_dir Face normal
324  */
325  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
326  inline void
328  BoxData<T,C,MEM,D,E>& a_ctr,
329  const BoxData<T,C,MEM,D,E>& a_avg,
330  int a_dir);
331 
332  //==========================================================================================
333  /// 4th Order Cell Averaged Product
334  /**
335  Compute the 4th order accurate cell averaged product rule <P>*<Q>
336  Distinguishes between 2nd and 4th order inputs.
337 
338  \param a_pavg 4th order cell averaged quantity P
339  \param a_qavg 4th order cell averaged quantity Q
340  \param a_p2nd 2nd+ order cell centered quantity P
341  \param a_q2nd 2nd+ order cell centered quantity Q
342  */
343  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
344  inline BoxData<T,C,MEM,D,E>
345  _cellProduct(
346  const BoxData<T,C,MEM,D,E>& a_pavg,
347  const BoxData<T,C,MEM,D,E>& a_qavg,
348  const BoxData<T,C,MEM,D,E>& a_p2nd,
349  const BoxData<T,C,MEM,D,E>& a_q2nd);
350 
351  /// 4th Order Cell Averaged Product (In Place)
352  /**
353  Compute the 4th order accurate cell averaged product rule <P>*<Q>
354  Distinguishes between 2nd and 4th order inputs.
355 
356  \param a_prod 4th order cell averaged product P*Q (output)
357  \param a_pavg 4th order cell averaged quantity P
358  \param a_qavg 4th order cell averaged quantity Q
359  \param a_p2nd 2nd+ order cell centered quantity P
360  \param a_q2nd 2nd+ order cell centered quantity Q
361  */
362  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
363  inline void
364  _cellProduct(
365  BoxData<T,C,MEM,D,E>& a_prod,
366  const BoxData<T,C,MEM,D,E>& a_pavg,
367  const BoxData<T,C,MEM,D,E>& a_qavg,
368  const BoxData<T,C,MEM,D,E>& a_p2nd,
369  const BoxData<T,C,MEM,D,E>& a_q2nd);
370 
371  /// 4th Order Cell Averaged Product
372  /**
373  Compute the 4th order accurate cell averaged product rule <P>*<Q>
374  Equal to _cellProduct(pavg, qavg, pavg, qavg)
375 
376  \param a_pavg 4th order cell averaged quantity P
377  \param a_qavg 4th order cell averaged quantity Q
378  */
379  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
380  inline BoxData<T,C,MEM,D,E>
381  cellProduct(
382  const BoxData<T,C,MEM,D,E>& a_pavg,
383  const BoxData<T,C,MEM,D,E>& a_qavg);
384 
385  /// 4th Order Cell Averaged Product (In Place)
386  /**
387  Compute the 4th order accurate cell averaged product rule <P>*<Q>
388  Equal to _cellProduct(prod, pavg, qavg, pavg, qavg)
389 
390  \param a_prod 4th order cell averaged product P*Q (output)
391  \param a_pavg 4th order cell averaged quantity P
392  \param a_qavg 4th order cell averaged quantity Q
393  */
394  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
395  inline void
396  cellProduct(
397  BoxData<T,C,MEM,D,E>& a_product,
398  const BoxData<T,C,MEM,D,E>& a_pavg,
399  const BoxData<T,C,MEM,D,E>& a_qavg);
400 
401  //==========================================================================================
402  /// 4th Order Face Averaged Product
403  /**
404  Compute the 4th order accurate face averaged product rule <P>_d * <Q>_d
405  Distinguishes between 2nd and 4th order inputs.
406 
407  \param a_prod 4th order face averaged product P*Q (output)
408  \param a_pavg 4th order face averaged quantity P
409  \param a_qavg 4th order face averaged quantity Q
410  \param a_p2nd 2nd+ order face centered quantity P
411  \param a_q2nd 2nd+ order face centered quantity Q
412  \param a_dir face normal
413  */
414  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
415  inline BoxData<T,C,MEM,D,E>
416  _faceProduct(
417  const BoxData<T,C,MEM,D,E>& a_pavg,
418  const BoxData<T,C,MEM,D,E>& a_qavg,
419  const BoxData<T,C,MEM,D,E>& a_p2nd,
420  const BoxData<T,C,MEM,D,E>& a_q2nd,
421  int a_dir);
422 
423  /// 4th Order Face Averaged Product (In Place)
424  /**
425  Compute the 4th order accurate face averaged product rule <P>_d * <Q>_d
426  Distinguishes between 2nd and 4th order inputs.
427 
428  \param a_prod 4th order face averaged product P*Q (output)
429  \param a_pavg 4th order face averaged quantity P
430  \param a_qavg 4th order face averaged quantity Q
431  \param a_p2nd 2nd+ order face centered quantity P
432  \param a_q2nd 2nd+ order face centered quantity Q
433  \param a_dir face normal
434  */
435  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
436  inline void
438  BoxData<T,C,MEM,D,E>& a_prod,
439  const BoxData<T,C,MEM,D,E>& a_pavg,
440  const BoxData<T,C,MEM,D,E>& a_qavg,
441  const BoxData<T,C,MEM,D,E>& a_p2nd,
442  const BoxData<T,C,MEM,D,E>& a_q2nd,
443  int a_dir);
444 
445  /// 4th Order Face Averaged Product
446  /**
447  Compute the 4th order accurate face averaged product rule <P>_d * <Q>_d
448  Equal to _faceProduct(pavg, qavg, pavg, qavg, dir)
449 
450  \param a_pavg 4th order face averaged quantity P
451  \param a_qavg 4th order face averaged quantity Q
452  \param a_dir face normal
453  */
454  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
455  inline BoxData<T,C,MEM,D,E>
456  faceProduct(
457  const BoxData<T,C,MEM,D,E>& a_pavg,
458  const BoxData<T,C,MEM,D,E>& a_qavg,
459  int a_dir);
460 
461  /// 4th Order Face Averaged Product (In Place)
462  /**
463  Compute the 4th order accurate face averaged product rule <P>_d * <Q>_d
464  Equal to _faceProduct(prod, pavg, qavg, pavg, qavg, dir)
465 
466  \param a_prod 4th order face averaged product P*Q (output)
467  \param a_pavg 4th order face averaged quantity P
468  \param a_qavg 4th order face averaged quantity Q
469  \param a_dir face normal
470  */
471  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
472  inline void
474  BoxData<T,C,MEM,D,E>& a_prod,
475  const BoxData<T,C,MEM,D,E>& a_pavg,
476  const BoxData<T,C,MEM,D,E>& a_qavg,
477  int a_dir);
478 
479  //==========================================================================================
480  /// 4th Order Cell Averaged Quotient
481  /**
482  Compute the 4th order accurate cell averaged quotient rule <P> / <Q>
483  Distinguishes between 2nd and 4th order inputs.
484 
485  \param a_pavg 4th order cell averaged quantity P
486  \param a_qavg 4th order cell averaged quantity Q
487  \param a_p2nd 2nd+ order cell centered quantity P
488  \param a_q2nd 2nd+ order cell centered quantity Q
489  */
490  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
493  const BoxData<T,C,MEM,D,E>& a_pavg,
494  const BoxData<T,C,MEM,D,E>& a_qavg,
495  const BoxData<T,C,MEM,D,E>& a_p2nd,
496  const BoxData<T,C,MEM,D,E>& a_q2nd);
497 
498  /// 4th Order Cell Averaged Quotient (In Place)
499  /**
500  Compute the 4th order accurate cell averaged quotient rule <P> / <Q>
501  Distinguishes between 2nd and 4th order inputs.
502 
503  \param a_quot 4th order cell averaged quotient P / Q (output)
504  \param a_pavg 4th order cell averaged quantity P
505  \param a_qavg 4th order cell averaged quantity Q
506  \param a_p2nd 2nd+ order cell centered quantity P
507  \param a_q2nd 2nd+ order cell centered quantity Q
508  */
509  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
510  inline void
512  BoxData<T,C,MEM,D,E>& a_quot,
513  const BoxData<T,C,MEM,D,E>& a_pavg,
514  const BoxData<T,C,MEM,D,E>& a_qavg,
515  const BoxData<T,C,MEM,D,E>& a_p2nd,
516  const BoxData<T,C,MEM,D,E>& a_q2nd);
517 
518  /// 4th Order Cell Averaged Quotient
519  /**
520  Compute the 4th order accurate cell averaged quotient rule <P> / <Q>
521  Equal to _cellQuotient(pavg, qavg, pavg, qavg)
522 
523  \param a_pavg 4th order cell averaged quantity P
524  \param a_qavg 4th order cell averaged quantity Q
525  */
526  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
527  inline BoxData<T,C,MEM,D,E>
528  cellQuotient(
529  const BoxData<T,C,MEM,D,E>& a_pavg,
530  const BoxData<T,C,MEM,D,E>& a_qavg);
531 
532  /// 4th Order Cell Averaged Quotient (In Place)
533  /**
534  Compute the 4th order accurate cell averaged quotient rule <P> / <Q>
535  Equal to _cellQuotient(qout, pavg, qavg, pavg, qavg)
536 
537  \param a_quot 4th order cell averaged quotient P / Q (output)
538  \param a_pavg 4th order cell averaged quantity P
539  \param a_qavg 4th order cell averaged quantity Q
540  */
541  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
542  inline void
543  cellQuotient(
545  const BoxData<T,C,MEM,D,E>& a_pavg,
546  const BoxData<T,C,MEM,D,E>& a_qavg);
547 
548  //==========================================================================================
549  /// 4th Order Face Averaged Quotient
550  /**
551  Compute the 4th order accurate face averaged quotient rule <P>_d / <Q>_d
552  Distinguishes between 2nd and 4th order inputs.
553 
554  \param a_pavg 4th order face averaged quantity P
555  \param a_qavg 4th order face averaged quantity Q
556  \param a_p2nd 2nd+ order face centered quantity P
557  \param a_q2nd 2nd+ order face centered quantity Q
558  \param a_dir face normal
559  */
560  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
561  inline BoxData<T,C,MEM,D,E>
563  const BoxData<T,C,MEM,D,E>& a_pavg,
564  const BoxData<T,C,MEM,D,E>& a_qavg,
565  const BoxData<T,C,MEM,D,E>& a_p2nd,
566  const BoxData<T,C,MEM,D,E>& a_q2nd,
567  int a_dir);
568 
569  /// 4th Order Face Averaged Quotient (In Place)
570  /**
571  Compute the 4th order accurate face averaged quotient rule <P>_d / <Q>_d
572  Distinguishes between 2nd and 4th order inputs.
573 
574  \param a_quot 4th order face averaged quotient P / Q
575  \param a_pavg 4th order face averaged quantity P
576  \param a_qavg 4th order face averaged quantity Q
577  \param a_p2nd 2nd+ order face centered quantity P
578  \param a_q2nd 2nd+ order face centered quantity Q
579  \param a_dir face normal
580  */
581  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
582  inline void
584  BoxData<T,C,MEM,D,E>& a_quotient,
585  const BoxData<T,C,MEM,D,E>& a_pavg,
586  const BoxData<T,C,MEM,D,E>& a_qavg,
587  const BoxData<T,C,MEM,D,E>& a_p2nd,
588  const BoxData<T,C,MEM,D,E>& a_q2nd,
589  int a_dir);
590 
591  /// 4th Order Face Averaged Quotient
592  /**
593  Compute the 4th order accurate face averaged quotient rule <P>_d / <Q>_d
594  Equal to _faceQuotient(pavg, qavg, pavg, qavg, dir)
595 
596  \param a_pavg 4th order face averaged quantity P
597  \param a_qavg 4th order face averaged quantity Q
598  \param a_dir face normal
599  */
600  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
601  inline BoxData<T,C,MEM,D,E>
602  faceQuotient(
603  const BoxData<T,C,MEM,D,E>& a_pavg,
604  const BoxData<T,C,MEM,D,E>& a_qavg,
605  int a_dir);
606 
607  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
608  inline void
609  faceQuotient(
610  BoxData<T,C,MEM,D,E>& a_quotient,
611  const BoxData<T,C,MEM,D,E>& a_pavg,
612  const BoxData<T,C,MEM,D,E>& a_qavg,
613  int a_dir);
614 
615  //==========================================================================================
616  /// 4th Order Face Averaged Tensor Product
617  /**
618  Returns the 4th order accurate face averaged quotient rule <QR*QL>
619  where QL is a tensor,and QR is a scalar.
620  Distinguishes between 2nd and 4th order inputs.
621 
622  \param a_ql4 4th order face averaged tensor quantity QL
623  \param a_qr4 4th order face averaged scalar quantity QR
624  \param a_ql2 2nd+ order face centered quantity QL
625  \param a_qr2 2nd+ order face centered quantity QR
626  \param a_dir face normal
627  */
628  template<class T, unsigned int C, unsigned int D, unsigned int E, MemType MEM>
629  inline BoxData<T,C,MEM,D,E>
631  const BoxData<T,C,MEM,D,E>& a_ql4,
632  const BoxData<T,1,MEM,1,1>& a_qr4,
633  const BoxData<T,C,MEM,D,E>& a_ql2,
634  const BoxData<T,1,MEM,1,1>& a_qr2,
635  int a_dir);
636 
637  template<class T, unsigned int C, unsigned int D, unsigned int E, MemType MEM>
638  inline void
640  BoxData<T,C,MEM,D,E>& a_product,
641  const BoxData<T,C,MEM,D,E>& a_ql4,
642  const BoxData<T,1,MEM,1,1>& a_qr4,
643  const BoxData<T,C,MEM,D,E>& a_ql2,
644  const BoxData<T,1,MEM,1,1>& a_qr2,
645  int a_dir);
646 
647  template<class T, unsigned int C, unsigned int D, unsigned int E, MemType MEM>
648  inline BoxData<T,C,MEM,D,E>
650  const BoxData<T,C,MEM,D,E>& a_ql,
651  const BoxData<T,1,MEM,1,1>& a_qr,
652  int a_dir);
653 
654  template<class T, unsigned int C, unsigned int D, unsigned int E, MemType MEM>
655  inline void
657  BoxData<T,C,MEM,D,E>& a_product,
658  const BoxData<T,C,MEM,D,E>& a_ql,
659  const BoxData<T,1,MEM,1,1>& a_qr,
660  int a_dir);
661 
662  //==========================================================================================
663  /// 4th Order Face Averaged Tensor Quotient
664  /**
665  Returns the 4th order accurate face averaged quotient rule <(1/QR)*QL>
666  where QL is a tensor,and QR is a scalar.
667  Distinguishes between 2nd and 4th order inputs.
668 
669  \param a_ql4 4th order face averaged tensor quantity QL
670  \param a_qr4 4th order face averaged scalar quantity QR
671  \param a_ql2 2nd+ order face centered quantity QL
672  \param a_qr2 2nd+ order face centered quantity QR
673  \param a_dir face normal
674  */
675  template<class T, unsigned int C, unsigned int D, unsigned int E, MemType MEM>
676  inline BoxData<T,C,MEM,D,E>
678  const BoxData<T,C,MEM,D,E>& a_ql4,
679  const BoxData<T,1,MEM,1,1>& a_qr4,
680  const BoxData<T,C,MEM,D,E>& a_ql2,
681  const BoxData<T,1,MEM,1,1>& a_qr2,
682  int a_dir);
683 
684  template<class T, unsigned int C, unsigned int D, unsigned int E, MemType MEM>
685  inline void
687  BoxData<T,C,MEM,D,E>& a_quotient,
688  const BoxData<T,C,MEM,D,E>& a_ql4,
689  const BoxData<T,1,MEM,1,1>& a_qr4,
690  const BoxData<T,C,MEM,D,E>& a_ql2,
691  const BoxData<T,1,MEM,1,1>& a_qr2,
692  int a_dir);
693 
694  template<class T, unsigned int C, unsigned int D, unsigned int E, MemType MEM>
695  inline BoxData<T,C,MEM,D,E>
697  const BoxData<T,C,MEM,D,E>& a_ql,
698  const BoxData<T,1,MEM,1,1>& a_qr,
699  int a_dir);
700 
701  template<class T, unsigned int C, unsigned int D, unsigned int E, MemType MEM>
702  inline void
704  BoxData<T,C,MEM,D,E>& a_quotient,
705  const BoxData<T,C,MEM,D,E>& a_ql,
706  const BoxData<T,1,MEM,1,1>& a_qr,
707  int a_dir);
708 
709  //==========================================================================================
710  /// 4th Order Cell Averaged Tensor Quotient
711  /**
712  Returns the 4th order accurate face averaged quotient rule <(1/QR) QL>
713  where QL is a tensor,and QR is a scalar.
714  Distinguishes between 2nd and 4th order inputs.
715 
716  \param a_ql4 4th order cell averaged tensor quantity QL
717  \param a_qr4 4th order cell averaged scalar quantity QR
718  \param a_ql2 2nd+ order cell centered quantity QL
719  \param a_qr2 2nd+ order cell centered quantity QR
720  */
721  template<class T, unsigned int C, unsigned int D, unsigned int E, MemType MEM>
722  inline BoxData<T,C,MEM,D,E>
724  const BoxData<T,C,MEM,D,E>& a_ql4,
725  const BoxData<T,1,MEM,1,1>& a_qr4,
726  const BoxData<T,C,MEM,D,E>& a_ql2,
727  const BoxData<T,1,MEM,1,1>& a_qr2);
728 
729  template<class T, unsigned int C, unsigned int D, unsigned int E, MemType MEM>
730  inline void
732  BoxData<T,C,MEM,D,E>& a_quotient,
733  const BoxData<T,C,MEM,D,E>& a_ql4,
734  const BoxData<T,1,MEM,1,1>& a_qr4,
735  const BoxData<T,C,MEM,D,E>& a_ql2,
736  const BoxData<T,1,MEM,1,1>& a_qr2);
737 
738  template<class T, unsigned int C, unsigned int D, unsigned int E, MemType MEM>
739  inline BoxData<T,C,MEM,D,E>
741  const BoxData<T,C,MEM,D,E>& a_ql,
742  const BoxData<T,1,MEM,1,1>& a_qr);
743 
744  template<class T, unsigned int C, unsigned int D, unsigned int E, MemType MEM>
745  inline void
747  BoxData<T,C,MEM,D,E>& a_quotient,
748  const BoxData<T,C,MEM,D,E>& a_ql,
749  const BoxData<T,1,MEM,1,1>& a_qr);
750 
751  //==========================================================================================
752  /// Cofactor Vector On Face
753  template <class T, MemType MEM>
754  inline BoxData<T,DIM,MEM>
755  cofactor(
756  const BoxData<T,DIM,MEM>& a_X,
757  int a_dir);
758 
759  /// Cofactor Vector On Face
760  /** Ghost cell info:
761  * DIM = 2: No ghost cells needed, but a_X must be node centered
762  * DIM = 3: 2 layers of ghost cells in all directions in addition to node centering
763  */
764  template <class T, MemType MEM>
765  inline void
766  cofactor(
767  BoxData<T,DIM,MEM>& a_N,
768  const BoxData<T,DIM,MEM>& a_X,
769  int a_dir);
770 
771  // Divided Difference overload
772  template <class T, MemType MEM>
773  inline BoxData<T,DIM,MEM>
774  cofactor(
775  const BoxData<T,DIM,MEM>& a_X,
776  int a_dir,
777  Array<T, DIM> a_dx);
778 
779  //==========================================================================================
780  /// Compute Matrix of Cofactors
781  /** Ghost info:
782  * For NTFaces[dir] : dir != norm -> 2 ghost cells in norm, 1 in dir, 0 in others
783  */
784  template<class T, MemType MEM>
787  const FluxBoxData<T,DIM,MEM>& a_NTFaces,
788  int a_dirNorm);
789 
790  template<class T, MemType MEM>
791  inline void
793  BoxData<T,DIM,MEM,DIM>& a_NTMatrix,
794  const FluxBoxData<T,DIM,MEM>& a_NTFaces,
795  int a_dirNorm);
796 
797  //==========================================================================================
798  template <class T, MemType MEM>
799  inline BoxData<T,1,MEM>
800  jacobian(
801  const BoxData<T,DIM,MEM>& a_X,
802  const FluxBoxData<T,DIM,MEM>& a_NT);
803  //const Array<BoxData<T,DIM,MEM>, DIM>& a_NT);
804 
805  template <class T, MemType MEM>
806  inline void
807  jacobian(
808  BoxData<T,1,MEM>& a_J,
809  const BoxData<T,DIM,MEM>& a_X,
810  const FluxBoxData<T,DIM,MEM>& a_NT);
811  //const Array<BoxData<T,DIM,MEM>, DIM>& a_NT);
812 
813  //==========================================================================================
814  template<class T, MemType MEM>
815  inline BoxData<T,3,MEM>
817  const BoxData<T,3,MEM>& a_ql4,
818  const BoxData<T,3,MEM>& a_qr4,
819  const BoxData<T,3,MEM>& a_ql2,
820  const BoxData<T,3,MEM>& a_qr2,
821  int a_dir);
822 
823  template<class T, MemType MEM>
824  inline void
826  BoxData<T,3,MEM>& a_product,
827  const BoxData<T,3,MEM>& a_ql4,
828  const BoxData<T,3,MEM>& a_qr4,
829  const BoxData<T,3,MEM>& a_ql2,
830  const BoxData<T,3,MEM>& a_qr2,
831  int a_dir);
832 
833  template<class T, MemType MEM>
834  inline BoxData<T,3,MEM>
836  const BoxData<T,3,MEM>& a_ql,
837  const BoxData<T,3,MEM>& a_qr,
838  int a_edgedir);
839 
840  template<class T, MemType MEM>
841  inline void
843  BoxData<T,3,MEM>& a_product,
844  const BoxData<T,3,MEM>& a_ql,
845  const BoxData<T,3,MEM>& a_qr,
846  int a_edgedir);
847 
848  //==========================================================================================
849  template<class T, unsigned int CL,unsigned int DL,
850  unsigned int CR, unsigned int DR, unsigned int E, MemType MEM>
853  (
854  const BoxData<T,CL,MEM,DL,E>& a_ql4,
855  const BoxData<T,CR,MEM,DR,E>& a_qr4,
856  const BoxData<T,CL,MEM,DL,E>& a_ql2,
857  const BoxData<T,CR,MEM,DR,E>& a_qr2);
858 
859  //==========================================================================================
860 
861  // Ghost info: requires one layer in each dir != a_dir
862  template<class T, unsigned int CL,unsigned int DL,
863  unsigned int CR, unsigned int DR, unsigned int E, MemType MEM>
866  const BoxData<T,CL,MEM,DL,E>& a_ql4,
867  const BoxData<T,CR,MEM,DR,E>& a_qr4,
868  const BoxData<T,CL,MEM,DL,E>& a_ql2,
869  const BoxData<T,CR,MEM,DR,E>& a_qr2,
870  int a_dir);
871 
872  template<class T, unsigned int CL,unsigned int DL,
873  unsigned int CR, unsigned int DR, unsigned int E, MemType MEM>
874  inline void
876  BoxData<T,CL,MEM,DR,E>& a_product,
877  const BoxData<T,CL,MEM,DL,E>& a_ql4,
878  const BoxData<T,CR,MEM,DR,E>& a_qr4,
879  const BoxData<T,CL,MEM,DL,E>& a_ql2,
880  const BoxData<T,CR,MEM,DR,E>& a_qr2,
881  int a_dir);
882 
883  template<class T, unsigned int CL,unsigned int DL,
884  unsigned int CR, unsigned int DR, unsigned int E, MemType MEM>
887  const BoxData<T,CL,MEM,DL,E>& a_ql,
888  const BoxData<T,CR,MEM,DR,E>& a_qr,
889  int a_dir);
890 
891  template<class T, unsigned int CL,unsigned int DL,
892  unsigned int CR, unsigned int DR, unsigned int E, MemType MEM>
893  inline void
895  BoxData<T,CL,MEM,DR,E>& a_product,
896  const BoxData<T,CL,MEM,DL,E>& a_ql,
897  const BoxData<T,CR,MEM,DR,E>& a_qr,
898  int a_dir);
899 
900  //==========================================================================================
901  template<class T, unsigned int CL, unsigned int DL,
902  unsigned int CR, unsigned int DR, unsigned int E, MemType MEM>
905  const BoxData<T,CL,MEM,DL,E>& a_ql4,
906  const BoxData<T,CR,MEM,DR,E>& a_qr4,
907  const BoxData<T,CL,MEM,DL,E>& a_ql2,
908  const BoxData<T,CR,MEM,DR,E>& a_qr2,
909  int a_dir);
910  //===========================================================================================
911  template<class T, unsigned int CL, unsigned int DL,
912  unsigned int CR, unsigned int DR, unsigned int E, MemType MEM>
913  inline void
915  BoxData<T,DL,MEM,DR,E>& a_product,
916  const BoxData<T,CL,MEM,DL,E>& a_ql4,
917  const BoxData<T,CR,MEM,DR,E>& a_qr4,
918  const BoxData<T,CL,MEM,DL,E>& a_ql2,
919  const BoxData<T,CR,MEM,DR,E>& a_qr2,
920  int a_dir);
921 
922  //==========================================================================================
923  template<class T, unsigned int CL, unsigned int DL,
924  unsigned int CR, unsigned int DR, unsigned int E, MemType MEM>
927  const BoxData<T,CL,MEM,DL,E>& a_ql4,
928  const BoxData<T,CR,MEM,DR,E>& a_qr4,
929  const BoxData<T,CL,MEM,DL,E>& a_ql2,
930  const BoxData<T,CR,MEM,DR,E>& a_qr2,
931  int a_dir);
932 
933  template<class T, unsigned int CL, unsigned int DL,
934  unsigned int CR, unsigned int DR, unsigned int E, MemType MEM>
935  inline void
937  BoxData<T,CL,MEM,CR,E>& a_product,
938  const BoxData<T,CL,MEM,DL,E>& a_ql4,
939  const BoxData<T,CR,MEM,DR,E>& a_qr4,
940  const BoxData<T,CL,MEM,DL,E>& a_ql2,
941  const BoxData<T,CR,MEM,DR,E>& a_qr2,
942  int a_dir);
943 
944  //==========================================================================================
945  template<class T, unsigned int CL,unsigned int DL,
946  unsigned int CR, unsigned int DR, unsigned int E, MemType MEM>
949  const BoxData<T,CL,MEM,DL,E>& a_ql,
950  const BoxData<T,CR,MEM,DR,E>& a_qr);
951 
952  template<class T, unsigned int CL,unsigned int DL,
953  unsigned int CR, unsigned int DR, unsigned int E, MemType MEM>
954  inline void
956  BoxData<T,CL,MEM,DR,E>& a_product,
957  const BoxData<T,CL,MEM,DL,E>& a_ql,
958  const BoxData<T,CR,MEM,DR,E>& a_qr);
959 
960  //==========================================================================================
961  template<class T, unsigned int CL, unsigned int DL,
962  unsigned int CR, unsigned int DR, unsigned int E, MemType MEM>
965  const BoxData<T,CL,MEM,DL,E>& a_ql,
966  const BoxData<T,CR,MEM,DR,E>& a_qr);
967 
968  template<class T, unsigned int CL, unsigned int DL,
969  unsigned int CR, unsigned int DR, unsigned int E, MemType MEM>
970  inline void
972  BoxData<T,DL,MEM,DR,E>& a_product,
973  const BoxData<T,DL,MEM,CL,E>& a_ql,
974  const BoxData<T,CR,MEM,DR,E>& a_qr);
975 
976  //==========================================================================================
977  template<class T, unsigned int CL, unsigned int DL,
978  unsigned int CR, unsigned int DR, unsigned int E, MemType MEM>
981  const BoxData<T,CL,MEM,DL,E>& a_ql,
982  const BoxData<T,CR,MEM,DR,E>& a_qr);
983 
984  template<class T, unsigned int CL, unsigned int DL,
985  unsigned int CR, unsigned int DR, unsigned int E, MemType MEM>
986  inline void
988  BoxData<T,CL,MEM,CR,E>& a_product,
989  const BoxData<T,CL,MEM,DL,E>& a_ql,
990  const BoxData<T,CR,MEM,DR,E>& a_qr);
991 
992  //==========================================================================================
993  template<class T, unsigned int C, MemType MEM, unsigned int D, unsigned int E>
994  inline BoxData<T,C,MEM,D,E>
995  _product1D(
996  const BoxData<T,C,MEM,D,E>& a_ql4,
997  const BoxData<T,C,MEM,D,E>& a_qr4,
998  const BoxData<T,C,MEM,D,E>& a_ql2,
999  const BoxData<T,C,MEM,D,E>& a_qr2,
1000  int a_dir);
1001 
1002  template<class T,unsigned int C, MemType MEM>
1003  inline BoxData<T,C,MEM,DIM>
1004  _faceGradient(
1005  const BoxData<T,C,MEM>& phi,
1006  int a_dir,
1007  int a_order=4);
1008 
1009  template<class T,unsigned int CFLUX,unsigned int CPRIM, MemType MEM>
1010  inline BoxData<T,CFLUX,MEM>
1012  const BoxData<T,CPRIM,MEM>& a_prim4,
1013  const BoxData<T,CPRIM,MEM>& a_prim2,
1014  const BoxData<T,DIM,MEM,DIM>& a_A4,
1015  const BoxData<T,DIM,MEM,DIM>& a_A2,
1016  const BoxData<T,1,MEM>& a_DrDetA4,
1017  const BoxData<T,1,MEM>& a_DrDetA2,
1018  const BoxData<T,DIM,MEM>& a_DrAdjA4,
1019  const BoxData<T,DIM,MEM>& a_DrAdjA2,
1020  const T& a_gamma,
1021  int a_dir);
1022 
1023  //==========================================================================================
1024  template<class T,unsigned int C, MemType MEM>
1025  inline BoxData<T,C,MEM,DIM>
1026  _faceGradxPhi(
1027  const BoxData<T,C,MEM>& a_phi4,
1028  const BoxData<T,C,MEM>& a_phi2,
1029  const BoxData<T,DIM,MEM,DIM>& a_NFace4,
1030  const BoxData<T,DIM,MEM,DIM>& a_NFace2,
1031  const BoxData<T,1,MEM>& a_JFace4,
1032  const BoxData<T,1,MEM>& a_JFace2,
1033  int a_dir);
1034 
1035  template<class T,unsigned int C, MemType MEM>
1036  inline void
1037  _faceGradxPhi(
1038  BoxData<T,C,MEM,DIM>& a_grad,
1039  const BoxData<T,C,MEM>& a_phi4,
1040  const BoxData<T,C,MEM>& a_phi2,
1041  const BoxData<T,DIM,MEM,DIM>& a_NFace4,
1042  const BoxData<T,DIM,MEM,DIM>& a_NFace2,
1043  const BoxData<T,1,MEM>& a_JFace4,
1044  const BoxData<T,1,MEM>& a_JFace2,
1045  int a_dir);
1046 
1047  /// Spreads a slice.
1048  template<class T,unsigned int C,MemType MEM,unsigned int D, unsigned int E>
1049  inline void
1051 
1052  /// Calculation of equiangular cubed-sphere finite-volume metric terms using a semi-analytic approach.
1053  /**
1054 Calculation of equiangular cubed-sphere finite-volume metric terms using a semi-analytic approach - the only numerical quadratures that appear are integrals along coordinate lines. The mapping is given by \f[ \textbf{X}(\xi_0,\xi_1,\xi_2) = r(\xi_0) \frac{(1,tan(\alpha), tan(\beta))}{(1 + tan(\alpha)^2 + tan(\beta)^2)^{\frac{1}{2}}} ,
1055 \alpha = (\xi_1 - \frac{1}{2} ) \frac{\pi}{2}, \beta = (\xi_2 - \frac{1}{2} ) \frac{\pi}{2} \f]
1056 
1057 \param a_bx: cell-centered Box that define where the metric terms are being computed.
1058 \param a_h: mesh spacing in \f$ \xi \f$ space.
1059 \param a_radius: \f$r(\textbf{p} ~ {a\_h})\f$ for Points \f$\textbf{p}\f$ corresponding to the corners of a_bx.
1060 
1061 \param a_X: the mapping \f$\textbf{X}(\textbf{p} ~ \text{a_h} ) \f$ for Points corresponding to the corners of a_bx.
1062 \param a_NT[d]: for d = 0,1,2, the average of the d-th row of the cofactor matrix over the d-faces of a_bx.
1063  \param a_J: the average of the \f$ \det ( \nabla_\xi\textbf{X} )\f$ over the control volumes centered at the points in a_bx.
1064 For more details, see ref[].
1065  */
1066  template<class T, MemType MEM>
1067  inline void
1069  FluxBoxData<T,DIM,MEM>& a_NT,
1070  BoxData<T,1,MEM>& a_J,
1071  BoxData<T,1,MEM>& a_radius,
1072  const Box& a_bx,
1073  T a_h);
1074 
1075  /// Cubed-sphere for each of the six patches that cover the cube.
1076  /** Cubed-sphere for each of the patches that covers the cube. Arguments the same as above, with an additional argument a_case = 0, ..., 5 for the patch index.
1077 \f[
1078 \textbf{X}_c(\Xi ) = \textbf{X}(\Xi) \cdot P_c \\
1079 \{P_c\} = \left[ \begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & -1 \\ -1 & 0 & 0 \end{pmatrix}
1080  \text{ , } \begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{pmatrix}
1081  \text{ , } \begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{pmatrix}
1082  \text{ , } \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}
1083  \text{ , } \begin{pmatrix} 0 & -1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{pmatrix}
1084  \text{ , } \begin{pmatrix} -1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 1 \end{pmatrix}\right] \f]
1085 */
1086  template<class T, MemType MEM>
1087  inline void
1089  FluxBoxData<T,DIM,MEM>& a_NT,
1090  BoxData<T, 1, MEM>& a_J,
1091  BoxData<T, 1, MEM>& a_radius,
1092  const Box& a_bx,
1093  T a_h,
1094  int a_case);
1095 
1096  template<class T, MemType MEM>
1097  inline void
1099  BoxData<T,DIM,MEM>& a_nSphere,
1100  T a_h);
1101 
1102  template<class T, MemType MEM>
1103  inline void
1105  BoxData<T,DIM,MEM>& a_d1n_cross_n,
1106  T a_h);
1107 
1108  template<class T, MemType MEM>
1109  inline void
1111  BoxData<T,DIM,MEM>& a_n_cross_d2n,
1112  T a_h);
1113 
1114  template<class T, MemType MEM>
1115  inline void
1117  BoxData<T,1,MEM>& a_detAFlux1,
1118  T a_h);
1119  template<class T, MemType MEM>
1120  void
1122  BoxData<T,1,MEM>& a_detAFlux2,
1123  T a_h);
1124 #include "implem/Proto_OperatorImplem.H"
1125 }
1126 #endif
BoxData< T, DIM, MEM > cofactor(const BoxData< T, DIM, MEM > &a_X, int a_dir)
Cofactor Vector On Face.
Definition: Proto_Operator.H:659
BoxData< T, CL, MEM, DR, E > _cellMatrixProductAB(const BoxData< T, CL, MEM, DL, E > &a_ql4, const BoxData< T, CR, MEM, DR, E > &a_qr4, const BoxData< T, CL, MEM, DL, E > &a_ql2, const BoxData< T, CR, MEM, DR, E > &a_qr2)
Definition: Proto_Operator.H:1390
BoxData< T, C, MEM, D, E > _convolveFace(const BoxData< T, C, MEM, D, E > &a_ctr, const BoxData< T, C, MEM, D, E > &a_2nd, int a_dir)
4th Order Face Convolution
Definition: Proto_Operator.H:217
void cubedSphereDetAFlux2(BoxData< T, 1, MEM > &a_detAFlux2, T a_h)
Definition: Proto_Operator.H:968
BoxData< T, CL, MEM, DR, E > _matrixProductAB(const BoxData< T, CL, MEM, DL, E > &a_ql, const BoxData< T, CR, MEM, DR, E > &a_qr)
BoxData< T, CFLUX, MEM > MHDSphericalFlux(const BoxData< T, CPRIM, MEM > &a_prim4, const BoxData< T, CPRIM, MEM > &a_prim2, const BoxData< T, DIM, MEM, DIM > &a_A4, const BoxData< T, DIM, MEM, DIM > &a_A2, const BoxData< T, 1, MEM > &a_DrDetA4, const BoxData< T, 1, MEM > &a_DrDetA2, const BoxData< T, DIM, MEM > &a_DrAdjA4, const BoxData< T, DIM, MEM > &a_DrAdjA2, const T &a_gamma, int a_dir)
Definition: Proto_Operator.H:1784
BoxData< T, C, MEM, D, E > faceTensorProduct(const BoxData< T, C, MEM, D, E > &a_ql, const BoxData< T, 1, MEM, 1, 1 > &a_qr, int a_dir)
Definition: Proto_Operator.H:557
BoxData< T, C, MEM, D, E > deconvolveFace(const BoxData< T, C, MEM, D, E > &a_avg, int a_dir)
4th Order Face Deconvolution
Definition: Proto_Operator.H:294
Definition: Proto_Operator.H:9
BoxData< T, C, MEM, D, E > _deconvolveFace(const BoxData< T, C, MEM, D, E > &a_avg, const BoxData< T, C, MEM, D, E > &a_2nd, int a_dir)
4th Order Face Deconvolution
Definition: Proto_Operator.H:270
void cubedSphere_nSphere(BoxData< T, DIM, MEM > &a_nSphere, T a_h)
Definition: Proto_Operator.H:785
BoxData< T, C, MEM, D, E > _convolve(const BoxData< T, C, MEM, D, E > &a_ctr, const BoxData< T, C, MEM, D, E > &a_2nd)
4th Order Convolution
Definition: Proto_Operator.H:25
BoxData< T, CL, MEM, CR, E > _faceMatrixProductABT(const BoxData< T, CL, MEM, DL, E > &a_ql4, const BoxData< T, CR, MEM, DR, E > &a_qr4, const BoxData< T, CL, MEM, DL, E > &a_ql2, const BoxData< T, CR, MEM, DR, E > &a_qr2, int a_dir)
Definition: Proto_Operator.H:1613
Multidimensional Rectangular Array.
Definition: Proto_BoxData.H:314
BoxData< T, 3, MEM > _edgeCrossProduct3D(const BoxData< T, 3, MEM > &a_ql4, const BoxData< T, 3, MEM > &a_qr4, const BoxData< T, 3, MEM > &a_ql2, const BoxData< T, 3, MEM > &a_qr2, int a_dir)
Definition: Proto_Operator.H:1315
void cubedSphereDetAFlux1(BoxData< T, 1, MEM > &a_detAFlux1, T a_h)
Definition: Proto_Operator.H:921
BoxData< T, C, MEM, D, E > _faceProduct(const BoxData< T, C, MEM, D, E > &a_pavg, const BoxData< T, C, MEM, D, E > &a_qavg, const BoxData< T, C, MEM, D, E > &a_p2nd, const BoxData< T, C, MEM, D, E > &a_q2nd, int a_dir)
4th Order Face Averaged Product
Definition: Proto_Operator.H:353
BoxData< T, DL, MEM, DR, E > _faceMatrixProductATB(const BoxData< T, CL, MEM, DL, E > &a_ql4, const BoxData< T, CR, MEM, DR, E > &a_qr4, const BoxData< T, CL, MEM, DL, E > &a_ql2, const BoxData< T, CR, MEM, DR, E > &a_qr2, int a_dir)
Definition: Proto_Operator.H:1543
BoxData< T, 3, MEM > edgeCrossProduct3D(const BoxData< T, 3, MEM > &a_ql, const BoxData< T, 3, MEM > &a_qr, int a_edgedir)
Definition: Proto_Operator.H:1366
BoxData< T, C, MEM, DIM > _faceGradient(const BoxData< T, C, MEM > &phi, int a_dir, int a_order=4)
Definition: Proto_Operator.H:1771
MemType
Definition: Proto_MemType.H:7
BoxData< T, C, MEM, D, E > _faceTensorProduct(const BoxData< T, C, MEM, D, E > &a_ql4, const BoxData< T, 1, MEM, 1, 1 > &a_qr4, const BoxData< T, C, MEM, D, E > &a_ql2, const BoxData< T, 1, MEM, 1, 1 > &a_qr2, int a_dir)
4th Order Face Averaged Tensor Product
Definition: Proto_Operator.H:514
Level Box Data.
Definition: Proto_HDF5.H:17
BoxData< T, DL, MEM, DR, E > matrixProductATB(const BoxData< T, CL, MEM, DL, E > &a_ql, const BoxData< T, CR, MEM, DR, E > &a_qr)
BoxData< T, C, MEM, D, E > faceTensorQuotient(const BoxData< T, C, MEM, D, E > &a_ql, const BoxData< T, 1, MEM, 1, 1 > &a_qr, int a_dir)
Definition: Proto_Operator.H:608
BoxData< T, C, MEM, D, E > _cellQuotient(const BoxData< T, C, MEM, D, E > &a_pavg, const BoxData< T, C, MEM, D, E > &a_qavg, const BoxData< T, C, MEM, D, E > &a_p2nd, const BoxData< T, C, MEM, D, E > &a_q2nd)
4th Order Cell Averaged Quotient
Definition: Proto_Operator.H:404
An interval in DIM dimensional space.
Definition: Proto_Box.H:29
AMR Data Hierarchy.
Definition: Proto_AMRData.H:23
BoxData< T, 1, MEM > jacobian(const BoxData< T, DIM, MEM > &a_X, const FluxBoxData< T, DIM, MEM > &a_NT)
Definition: Proto_Operator.H:1269
void cubedSphere_edge2(BoxData< T, DIM, MEM > &a_n_cross_d2n, T a_h)
Definition: Proto_Operator.H:870
BoxData< T, C, MEM, D, E > _cellProduct(const BoxData< T, C, MEM, D, E > &a_pavg, const BoxData< T, C, MEM, D, E > &a_qavg, const BoxData< T, C, MEM, D, E > &a_p2nd, const BoxData< T, C, MEM, D, E > &a_q2nd)
4th Order Cell Averaged Product
Definition: Proto_Operator.H:305
BoxData< T, CL, MEM, DR, E > _faceMatrixProductAB(const BoxData< T, CL, MEM, DL, E > &a_ql4, const BoxData< T, CR, MEM, DR, E > &a_qr4, const BoxData< T, CL, MEM, DL, E > &a_ql2, const BoxData< T, CR, MEM, DR, E > &a_qr2, int a_dir)
Definition: Proto_Operator.H:1425
BoxData< T, CL, MEM, DR, E > faceMatrixProductAB(const BoxData< T, CL, MEM, DL, E > &a_ql, const BoxData< T, CR, MEM, DR, E > &a_qr, int a_dir)
Definition: Proto_Operator.H:1520
BoxData< T, C, MEM, D, E > cellQuotient(const BoxData< T, C, MEM, D, E > &a_pavg, const BoxData< T, C, MEM, D, E > &a_qavg)
4th Order Cell Averaged Quotient
Definition: Proto_Operator.H:437
void initConvolve(LevelBoxData< T, C, MEM, CTR > &a_data, Func &a_func, Srcs... a_srcs)
Initialize and Convolve.
Definition: Proto_Operator.H:84
BoxData< T, C, MEM, DIM > _faceGradxPhi(const BoxData< T, C, MEM > &a_phi4, const BoxData< T, C, MEM > &a_phi2, const BoxData< T, DIM, MEM, DIM > &a_NFace4, const BoxData< T, DIM, MEM, DIM > &a_NFace2, const BoxData< T, 1, MEM > &a_JFace4, const BoxData< T, 1, MEM > &a_JFace2, int a_dir)
Definition: Proto_Operator.H:1902
Definition: Proto_Array.H:17
BoxData< T, C, MEM, D, E > _deconvolve(const BoxData< T, C, MEM, D, E > &a_avg, const BoxData< T, C, MEM, D, E > &a_2nd)
4th Order Deconvolution
Definition: Proto_Operator.H:142
BoxData< T, C, MEM, D, E > _faceTensorQuotient(const BoxData< T, C, MEM, D, E > &a_ql4, const BoxData< T, 1, MEM, 1, 1 > &a_qr4, const BoxData< T, C, MEM, D, E > &a_ql2, const BoxData< T, 1, MEM, 1, 1 > &a_qr2, int a_dir)
4th Order Face Averaged Tensor Quotient
Definition: Proto_Operator.H:581
BoxData< T, C, MEM, D, E > cellTensorQuotient(const BoxData< T, C, MEM, D, E > &a_ql, const BoxData< T, 1, MEM, 1, 1 > &a_qr)
BoxData< T, C, MEM, D, E > convolveFace(const BoxData< T, C, MEM, D, E > &a_ctr, int a_dir)
4th Order Face Convolution
Definition: Proto_Operator.H:241
BoxData< T, C, MEM, D, E > _product1D(const BoxData< T, C, MEM, D, E > &a_ql4, const BoxData< T, C, MEM, D, E > &a_qr4, const BoxData< T, C, MEM, D, E > &a_ql2, const BoxData< T, C, MEM, D, E > &a_qr2, int a_dir)
Definition: Proto_Operator.H:1663
void cubedSphereGeometry(BoxData< T, DIM, MEM > &a_X, FluxBoxData< T, DIM, MEM > &a_NT, BoxData< T, 1, MEM > &a_J, BoxData< T, 1, MEM > &a_radius, const Box &a_bx, T a_h)
Calculation of equiangular cubed-sphere finite-volume metric terms using a semi-analytic approach...
Definition: Proto_Operator.H:1065
BoxData< T, CL, MEM, CR, E > _matrixProductABT(const BoxData< T, CL, MEM, DL, E > &a_ql, const BoxData< T, CR, MEM, DR, E > &a_qr)
BoxData< T, C, MEM, D, E > _cellTensorQuotient(const BoxData< T, C, MEM, D, E > &a_ql4, const BoxData< T, 1, MEM, 1, 1 > &a_qr4, const BoxData< T, C, MEM, D, E > &a_ql2, const BoxData< T, 1, MEM, 1, 1 > &a_qr2)
4th Order Cell Averaged Tensor Quotient
Definition: Proto_Operator.H:1677
BoxData< T, C, MEM, D, E > faceQuotient(const BoxData< T, C, MEM, D, E > &a_pavg, const BoxData< T, C, MEM, D, E > &a_qavg, int a_dir)
4th Order Face Averaged Quotient
Definition: Proto_Operator.H:491
BoxData< T, C, MEM, D, E > _faceQuotient(const BoxData< T, C, MEM, D, E > &a_pavg, const BoxData< T, C, MEM, D, E > &a_qavg, const BoxData< T, C, MEM, D, E > &a_p2nd, const BoxData< T, C, MEM, D, E > &a_q2nd, int a_dir)
4th Order Face Averaged Quotient
Definition: Proto_Operator.H:457
BoxData< T, C, MEM, D, E > faceProduct(const BoxData< T, C, MEM, D, E > &a_pavg, const BoxData< T, C, MEM, D, E > &a_qavg, int a_dir)
4th Order Face Averaged Product
Definition: Proto_Operator.H:382
BoxData< T, C, MEM, D, E > deconvolve(const BoxData< T, C, MEM, D, E > &a_avg)
4th Order Deconvolution
Definition: Proto_Operator.H:165
BoxData< T, DIM, MEM, DIM > cofactorMatrix(const FluxBoxData< T, DIM, MEM > &a_NTFaces, int a_dirNorm)
Compute Matrix of Cofactors.
Definition: Proto_Operator.H:1183
void spreadSlice(BoxData< T, C, MEM, D, E > &a_bd)
Spreads a slice.
Definition: Proto_Operator.H:736
BoxData< T, C, MEM, D, E > cellProduct(const BoxData< T, C, MEM, D, E > &a_pavg, const BoxData< T, C, MEM, D, E > &a_qavg)
4th Order Cell Averaged Product
Definition: Proto_Operator.H:333
BoxData< T, C, MEM, D, E > convolve(const BoxData< T, C, MEM, D, E > &a_ctr)
4th Order Convolution
Definition: Proto_Operator.H:48
void cubedSphere_edge1(BoxData< T, DIM, MEM > &a_d1n_cross_n, T a_h)
Definition: Proto_Operator.H:818
Centering
Definition: Proto_Centering.H:7
Definition: Proto_BoxData.H:1436