Chombo + EB + MF  3.2
IrregNode.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 // ANAG, LBNL
12 
13 #ifndef _IRREGNODE_H_
14 #define _IRREGNODE_H_
15 
16 #include "REAL.H"
17 #include "IntVect.H"
18 #include "IntVectSet.H"
19 #include "VolIndex.H"
20 #include "Interval.H"
21 #include "FaceIndex.H"
22 #include "IntVectSet.H"
23 #include "RealVect.H"
24 #include "BaseFab.H"
25 #include "IndexedMoments.H"
26 #include "EB_TYPEDEFS.H"
27 #include "SPMD.H"
28 #include "NamespaceHeader.H"
29 ///
30 /**
31  Node for construction of geometric information.
32 */
33 class IrregNode
34 {
35 public:
36  ///
37  IrregNode();
38 
39  ///
40  ~IrregNode();
41 
42  ///return the index into the arc vectors
43  static int index(int a_idir, Side::LoHiSide a_side) ;
44 
45  ///
47  ///data for irregular nodes
48 
49  //volume centered data
50  ///
52 
53  ///
54  /**
55  each vof has a unique index in the cell
56  */
58 
59  ///
61 
62  ///
64 
65  //face centered irregular data
66 
67  ///
68  /**
69  Indicies into a_nodes to show connectivity.
70  If the arc is to an irregular
71  cell, the index is the unique index of the vof
72  in the cell.
73  For arcs to regular cells, the arc = -2
74  If the arc is to the domain boundary, arc = -1.
75  */
77 
78  ///
80 
81  ///
83 
84  ///
85  /**
86  helper function for construction. makes irregular cell
87  that has connectivitity and values like a regular cell, this
88  a person can modify as the irregular cell requires. saves
89  some coding in some cases
90  */
91  void makeRegular(const IntVect& iv, const Real& a_dx, const ProblemDomain& a_domain);
92  void faceReserve(int location, int size);
93 
94 
95 
96  ///for covered cells
97  void setMomentsToZero();
98 
99  //for regular cells
100  void setMomentsToRegular(const Real& a_dx);
101 
102  ///data for irregular nodes
103 
104  //volume centered data
105 
106  /// the moment at the VoF associated with the monomial with the input exponents
107  /**
108  Given VoF variables x, y, z, p = mono(0), q = mono(1), r = mono(2),
109  returns integral_over_VoF(x^p y^q z^r dV)
110  **/
112 
113  /// the normal*moment at the irregular face associated with the monomial with the input exponents
114  /**
115  Given VoF variables x, y, z, p = mono(0), q = mono(1), r = mono(2),
116  returns integral_over_irregular_area((x^p y^q z^r)*n_i dA)
117  **/
118  //NOT FILLED YET
119 #if 0
120  IndMomSpaceDim m_EBNormalMoments[SpaceDim];
121 #endif
122 
123  /// the moment at the irregular face associated with the monomial with the input exponents
124  /**
125  Given VoF variables x, y, z, p = mono(0), q = mono(1), r = mono(2),
126  returns integral_over_irregular_area((x^p y^q z^r) dA)
127  **/
129 
131  ///face centered moments
132  /// the moment at the face associated with the monomial with the input exponents
133  /**
134  Given face variables x, y, p = mono(0), q = mono(1)
135  returns integral_over_face_area((x^p y^q ) dA)
136  **/
138 
139  void spout()
140  {
141  pout() << "irreg node" << endl;
142  pout() << "volume moments " << endl;
143  m_volumeMoments.spout();
144 
145  pout() << "EB moments " << endl;
146  m_EBMoments.spout();
147 
148  for(int iindex = 0; iindex <2*SpaceDim; iindex++)
149  {
150  pout() << "face moments index " << iindex << endl;
151  m_faceMoments[iindex].spout();
152  }
153  }
154 
155  ///once the moments are set, this sets volfrac, areafrac, centroid...
156  void setNormalizedStuff(const Real& a_dx);
157 };
158 
159 
160 std::ostream& operator<< (std::ostream& a_os,
161  const IrregNode& a_iv);
162 
163 #include "NamespaceFooter.H"
164 #endif
std::ostream & pout()
Use this in place of std::cout for program output.
IndMomSDMinOne m_faceMoments[2 *SpaceDim]
Definition: IrregNode.H:137
void faceReserve(int location, int size)
void setMomentsToZero()
for covered cells
void spout()
Definition: IrregNode.H:139
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
Vector< RealVect > m_faceCentroid[2 *SpaceDim]
Definition: IrregNode.H:82
Real m_volFrac
data for irregular nodes
Definition: IrregNode.H:51
IndMomSpaceDim m_volumeMoments
data for irregular nodes
Definition: IrregNode.H:111
void setNormalizedStuff(const Real &a_dx)
once the moments are set, this sets volfrac, areafrac, centroid...
Vector< Real > m_areaFrac[2 *SpaceDim]
Definition: IrregNode.H:79
const int SpaceDim
Definition: SPACE.H:38
void makeRegular(const IntVect &iv, const Real &a_dx, const ProblemDomain &a_domain)
std::ostream & operator<<(std::ostream &a_os, const IrregNode &a_iv)
double Real
Definition: REAL.H:33
Definition: IrregNode.H:33
RealVect m_volCentroid
Definition: IrregNode.H:60
IndMomSpaceDim m_EBMoments
the normal*moment at the irregular face associated with the monomial with the input exponents ...
Definition: IrregNode.H:128
Vector< int > m_arc[2 *SpaceDim]
Definition: IrregNode.H:76
LoHiSide
Definition: LoHiSide.H:27
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
void spout() const
outputs the current state to pout() (a la parstream.H)
Definition: IndexedMomentsImplem.H:276
int m_cellIndex
Definition: IrregNode.H:57
IntVect m_cell
Definition: IrregNode.H:46
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
static int index(int a_idir, Side::LoHiSide a_side)
return the index into the arc vectors
IndMomSpaceDim m_normalPartialDeriv[SpaceDim]
Definition: IrregNode.H:130
RealVect m_bndryCentroid
Definition: IrregNode.H:63
void setMomentsToRegular(const Real &a_dx)