Chombo + EB + MF  3.2
MinimalCCCM.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 _MINIMALCCCM_H_
12 #define _MINIMALCCCM_H_
13 
14 #include <map>
15 using std::map;
16 
17 #include "Vector.H"
18 #include "REAL.H"
19 #include "IndexTM.H"
20 
21 #include "Notation.H"
22 #include "LSquares.H"
23 #include "IFData.H"
24 #include "CutCellMoments.H"
25 #include "RefinementCriterion.H"
26 
27 #include "NamespaceHeader.H"
28 
29 template <int dim> class LSProblem;
30 
31 template <int dim> class MinimalCCCM
32 {
33 public:
36 
37  typedef map<IvDim,Real > PthMoment;
38 
39  typedef map<IndexTM<int,dim-1>,Real > PthMomentLesserDimension;
40 
41  typedef map<IndexTM<int,1>,Real > OneDMoments;
42  typedef map<int,IvDim> LocPthMoment;
43  typedef map<IvDim,int > PthMomentLoc;
44 
45  typedef map<Iv2,CutCellMoments<dim-1> > BdCutCellMoments;
46 
47  // Constructors
48  MinimalCCCM();
49  MinimalCCCM(const MinimalCCCM<dim>& a_MinimalCCCM);
50 
51  // This is used to build bd MinimalCCCM
52  MinimalCCCM(const IFData<dim>& a_info);
53 
54  // Destructor
55  ~MinimalCCCM();
56 
57  void computeMoments(const int & a_orderPmax,
58  const int & a_degreePmax);
59 
60  void computeMomentsRecursively(const int & a_orderPmax,
61  const int & a_degreePmax);
62 
64  const int & a_order);
65 
66 
67  // Output
68  void print(ostream& out) const;
69 
70  void dump() const;
71 
72  // Operators
73  void operator=(const MinimalCCCM<dim>& a_MinimalCCCM);
74 
75  Real factorial(const IvDim & a_multiIndex) const;
76 
77  // All the moments (and other data)
79 
80  // Flag whether the boundary moments have been computed already
82 };
83 
84 // One dimensional MinimalCCCM
85 template <> class MinimalCCCM<1>
86 {
87 public:
88  typedef map<IndexTM<int,1>,Real> OneDMoments;
89 
90  // Constructors
91  MinimalCCCM();
92  MinimalCCCM(const MinimalCCCM<1> & a_MinimalCCCM);
93  MinimalCCCM(const IFData<1>& a_info);
94 
95  // Destructor
96  ~MinimalCCCM();
97 
98  void computeMoments(const int & a_orderPmax,
99  const int & a_degreePmax);
100 
101 
102  void simpleComputeMoments(const Real & a_loPt,
103  const Real & a_hiPt,
104  const int & a_degreePmax);
105 
106  void computeMomentsUsingBinomial(const Real & a_loPt,
107  const Real & a_hiPt,
108  const int & a_loSign,
109  const int & a_hiSign,
110  const int & a_degreePmax);
111 
112  // Output
113  void print(ostream& out) const;
114 
115  void dump() const;
116 
117  // Operators
118  void operator=(const MinimalCCCM<1>& a_MinimalCCCM);
119 
120  // Member data
122 };
123 
124 
125 #include "NamespaceFooter.H"
126 
127 #include "MinimalCCCMImplem.H"
128 
129 #endif
map< int, IvDim > LocPthMoment
Definition: MinimalCCCM.H:42
void dump() const
Definition: MinimalCCCMImplem.H:339
Definition: CutCellMoments.H:157
MinimalCCCM()
Definition: MinimalCCCMImplem.H:30
map< IndexTM< int, 1 >, Real > OneDMoments
Definition: MinimalCCCM.H:41
CutCellMoments< dim > m_cutCellMoments
Definition: MinimalCCCM.H:78
IndexTM< int, dim > IvDim
Definition: MinimalCCCM.H:34
map< IndexTM< int, dim-1 >, Real > PthMomentLesserDimension
Definition: MinimalCCCM.H:39
Definition: MinimalCCCM.H:31
Definition: IFData.H:145
Definition: ComputeCutCellMoments.H:35
IndexTM< Real, dim > RvDim
Definition: MinimalCCCM.H:35
Real factorial(const IvDim &a_multiIndex) const
Definition: MinimalCCCMImplem.H:361
Definition: IndexTM.H:36
bool m_boundaryMomentsComputed
Definition: MinimalCCCM.H:81
map< IvDim, Real > PthMoment
Definition: MinimalCCCM.H:37
Vector< Real > computeRhs(LSProblem< dim > &a_lsp, const int &a_order)
Definition: MinimalCCCMImplem.H:238
Definition: IFData.H:42
void operator=(const MinimalCCCM< dim > &a_MinimalCCCM)
Definition: MinimalCCCMImplem.H:345
double Real
Definition: REAL.H:33
void print(ostream &out) const
Definition: MinimalCCCMImplem.H:334
map< Iv2, CutCellMoments< dim-1 > > BdCutCellMoments
Definition: MinimalCCCM.H:45
void computeMoments(const int &a_orderPmax, const int &a_degreePmax)
Definition: MinimalCCCMImplem.H:79
~MinimalCCCM()
Definition: MinimalCCCMImplem.H:73
IndexTM< int, 2 > Iv2
Definition: Notation.H:108
int dim
Definition: EBInterface.H:146
map< IvDim, int > PthMomentLoc
Definition: MinimalCCCM.H:43
map< IndexTM< int, 1 >, Real > OneDMoments
Definition: MinimalCCCM.H:88
Definition: CutCellMoments.H:32
Definition: MinimalCCCM.H:85
void computeMomentsRecursively(const int &a_orderPmax, const int &a_degreePmax)
Definition: MinimalCCCMImplem.H:132
CutCellMoments< 1 > m_cutCellMoments
Definition: MinimalCCCM.H:121