Chombo + EB + MF  3.2
computeMappedSum.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 _COMPUTEMAPPEDSUM_H_
12 #define _COMPUTEMAPPEDSUM_H_
13 
14 #include "REAL.H"
15 #include "Vector.H"
16 #include "LevelData.H"
17 #include "FArrayBox.H"
18 #include "FluxBox.H"
19 #include "Interval.H"
20 #include "CoordSys.H"
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 Vector<CoordSys<FArrayBox,FluxBox>* >& a_coordSysPtr,
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 Vector<CoordSys<FArrayBox,FluxBox>* >& a_coordSysPtr,
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 CoordSys<FArrayBox,FluxBox>* a_coordSysPtr,
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 CoordSys<FArrayBox,FluxBox>* a_coordSysPtr,
68  const Interval& a_comps = Interval(0,0),
69  const bool a_global= true);
70 
71 #include "NamespaceFooter.H"
72 #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
Real computeSum(const Vector< LevelData< FArrayBox > * > &a_phi, const Vector< int > &a_nRefFine, const Vector< CoordSys< FArrayBox, FluxBox > * > &a_coordSysPtr, const Interval &a_comps=Interval(0, 0), const int &a_lBase=0)
Returns the volume-weighted sum (integral) of phi over all valid regions.