Chombo + EB  3.2
computeSum.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _COMPUTESUM_H_
12 #define _COMPUTESUM_H_
13 
14 #include "REAL.H"
15 #include "Vector.H"
16 #include "LevelData.H"
17 #include "FArrayBox.H"
18 #include "Interval.H"
19 #include "RealVect.H"
20 
21 #include "NamespaceHeader.H"
22 
23 /// Returns the volume-weighted sum (integral) of phi over all valid regions
24 /*
25  */
27  const Vector<int>& a_nRefFine,
28  const Real& a_dxCrse,
29  const Interval& a_comps = Interval(0,0),
30  const int& a_lBase = 0);
31 
32 /// Returns the volume-weighted sum (integral) of phi over all valid regions and the volume
33 /*
34  */
35 Real computeSum(Real& a_volume,
36  const Vector<LevelData<FArrayBox>* >& a_phi,
37  const Vector<int>& a_nRefFine,
38  const Real& a_dxCrse,
39  const Interval& a_comps = Interval(0,0),
40  const int& a_lBase = 0);
41 
42 /// Returns the volume-weighted sum (integral) of phi over the valid region
43 /*
44  This is the single-level version. If a_global is true, then do any MPI
45  reductions in this function. If it's false, don't do any MPI stuff
46  (assumption is that it will be done outside this function). In serial,
47  the value of the a_global parameter has no effect.
48  */
50  const DisjointBoxLayout* a_finerGrids,
51  const int& a_nRefFine,
52  const Real& a_dx,
53  const Interval& a_comps = Interval(0,0),
54  const bool a_global= true);
55 
56 /// Returns the volume-weighted sum (integral) of phi over the valid region and the volume
57 /*
58  This is the single-level version. If a_global is true, then do any MPI
59  reductions in this function. If it's false, don't do any MPI stuff
60  (assumption is that it will be done outside this function). In serial,
61  the value of the a_global parameter has no effect.
62  */
63 Real computeSum(Real& a_volume,
64  const LevelData<FArrayBox>& a_phi,
65  const DisjointBoxLayout* a_finerGrids,
66  const int& a_nRefFine,
67  const Real& a_dx,
68  const Interval& a_comps = Interval(0,0),
69  const bool a_global= true);
70 
71 /// Returns the volume-weighted sum (integral) of phi over all valid regions
72 /*
73  */
75  const Vector<int>& a_nRefFine,
76  const RealVect& a_dxCrse,
77  const Interval& a_comps = Interval(0,0),
78  const int& a_lBase = 0);
79 
80 // ANISOTROPIC
81 
82 /// Returns the volume-weighted sum (integral) of phi over all valid regions and the volume
83 /*
84  */
85 Real computeSum(Real& a_volume,
86  const Vector<LevelData<FArrayBox>* >& a_phi,
87  const Vector<IntVect>& a_nRefFine,
88  const RealVect& a_dxCrse,
89  const Interval& a_comps = Interval(0,0),
90  const int& a_lBase = 0);
91 
92 /// Returns the volume-weighted sum (integral) of phi over the valid region
93 /*
94  This is the single-level version. If a_global is true, then do any MPI
95  reductions in this function. If it's false, don't do any MPI stuff
96  (assumption is that it will be done outside this function). In serial,
97  the value of the a_global parameter has no effect.
98  */
100  const DisjointBoxLayout* a_finerGrids,
101  const IntVect& a_nRefFine,
102  const RealVect& a_dx,
103  const Interval& a_comps = Interval(0,0),
104  const bool a_global= true);
105 
106 /// Returns the volume-weighted sum (integral) of phi over the valid region and the volume
107 /*
108  This is the single-level version. If a_global is true, then do any MPI
109  reductions in this function. If it's false, don't do any MPI stuff
110  (assumption is that it will be done outside this function). In serial,
111  the value of the a_global parameter has no effect.
112  */
113 Real computeSum(Real& a_volume,
114  const LevelData<FArrayBox>& a_phi,
115  const DisjointBoxLayout* a_finerGrids,
116  const IntVect& a_nRefFine,
117  const RealVect& a_dx,
118  const Interval& a_comps = Interval(0,0),
119  const bool a_global= true);
120 
121 #include "NamespaceFooter.H"
122 #endif
one dimensional dynamic array
Definition: Vector.H:53
Structure for passing component ranges in code.
Definition: Interval.H:23
double Real
Definition: REAL.H:33
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
Real computeSum(const Vector< LevelData< FArrayBox > * > &a_phi, const Vector< int > &a_nRefFine, const Real &a_dxCrse, const Interval &a_comps=Interval(0, 0), const int &a_lBase=0)
Returns the volume-weighted sum (integral) of phi over all valid regions.
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42