Chombo + EB  3.0
NeumannPoissonDomainBC.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 _NEUMANNPOISSONDOMAINBC_H_
12 #define _NEUMANNPOISSONDOMAINBC_H_
13 
14 #include "RefCountedPtr.H"
15 
16 #include "BaseDomainBC.H"
17 #include "BaseBCValue.H"
18 #include "NamespaceHeader.H"
19 
21 {
22 public:
24 
25  //no homogeneous stencil.
26  // virtual LayoutData<BaseIVFAB<VoFStencil> >* getFluxStencil(int ivar)
27  // {
28  // return NULL;
29  // }
30 
31  virtual ~NeumannPoissonDomainBC();
32 
33  virtual void setValue(Real a_value);
34 
35  virtual void setFunction(RefCountedPtr<BaseBCValue> a_flux);
36 
37  virtual void getFaceFlux(BaseFab<Real>& a_faceFlux,
38  const BaseFab<Real>& a_phi,
39  const RealVect& a_probLo,
40  const RealVect& a_dx,
41  const int& a_idir,
42  const Side::LoHiSide& a_side,
43  const DataIndex& a_dit,
44  const Real& a_time,
45  const bool& a_useHomogeneous);
46  ///
47  /**
48  A query of whether a_jvof is Dirichlet Domain boundary to a_ivof. a_jvof is the ghost vof; a_ivof is the valid computational vof.
49  If the code runs into here it's got to be Neumann BC
50  */
51  bool isDirichletDom(const VolIndex& a_ivof,
52  const VolIndex& a_jvof,
53  const EBCellFAB& a_phi) const
54  {
55  return false;
56  }
57  ///
58  /**
59  Elliptic solver flux.
60  */
61  virtual void getFaceFlux(Real& a_faceFlux,
62  const VolIndex& a_vof,
63  const int& a_comp,
64  const EBCellFAB& a_phi,
65  const RealVect& a_probLo,
66  const RealVect& a_dx,
67  const int& a_idir,
68  const Side::LoHiSide& a_side,
69  const DataIndex& a_dit,
70  const Real& a_time,
71  const bool& a_useHomogeneous);
72 
73  virtual void getInhomFaceFlux(Real& a_faceFlux,
74  const VolIndex& a_vof,
75  const int& a_comp,
76  const EBCellFAB& a_phi,
77  const RealVect& a_probLo,
78  const RealVect& a_dx,
79  const int& a_idir,
80  const Side::LoHiSide& a_side,
81  const DataIndex& a_dit,
82  const Real& a_time);
83 
84  ///
85  /**
86  This is used by the operator to get
87  grad(phi) at domain faces.
88  */
89  virtual void getFaceGradPhi(Real& a_faceFlux,
90  const FaceIndex& a_face,
91  const int& a_comp,
92  const EBCellFAB& a_phi,
93  const RealVect& a_probLo,
94  const RealVect& a_dx,
95  const int& a_idir,
96  const Side::LoHiSide& a_side,
97  const DataIndex& a_dit,
98  const Real& a_time,
99  const bool& a_useAreaFrac,
100  const RealVect& a_centroid,
101  const bool& a_useHomogeneous);
102 
103  ///
104  /**
105  This is used by the projections to get extrapolated
106  grad(phi) at domain faces for cell-centered gradient.
107  Called by getFaceFlux.
108  */
109  virtual void getFaceFluxGradPhi(Real& a_faceFlux,
110  const FaceIndex& a_face,
111  const int& a_comp,
112  const EBCellFAB& a_phi,
113  const RealVect& a_probLo,
114  const RealVect& a_dx,
115  const int& a_idir,
116  const Side::LoHiSide& a_side,
117  const DataIndex& a_dit,
118  const Real& a_time,
119  const bool& a_useAreaFrac,
120  const RealVect& a_centroid,
121  const bool& a_useHomogeneous);
122 
123  ///
124  /**
125  */
126  virtual void getInhomFaceGradPhi(Real& a_faceFlux,
127  const FaceIndex& a_face,
128  const int& a_comp,
129  const EBCellFAB& a_phi,
130  const RealVect& a_probLo,
131  const RealVect& a_dx,
132  const int& a_idir,
133  const Side::LoHiSide& a_side,
134  const DataIndex& a_dit,
135  const Real& a_time,
136  const bool& a_useAreaFrac,
137  const RealVect& a_centroid);
138 
139  ///
140  /**
141  */
142  virtual void getInhomFaceFluxGradPhi(Real& a_faceFlux,
143  const FaceIndex& a_face,
144  const int& a_comp,
145  const EBCellFAB& a_phi,
146  const RealVect& a_probLo,
147  const RealVect& a_dx,
148  const int& a_idir,
149  const Side::LoHiSide& a_side,
150  const DataIndex& a_dit,
151  const Real& a_time,
152  const bool& a_useAreaFrac,
153  const RealVect& a_centroid);
154 
155  ///
156  /**
157  This is used by the projections to get
158  velocity at domain faces. This one just returns
159  the value in a_vel(a_face).
160  */
161  virtual void getFaceVel(Real& a_faceFlux,
162  const FaceIndex& a_face,
163  const EBFluxFAB& a_vel,
164  const RealVect& a_probLo,
165  const RealVect& a_dx,
166  const int& a_idir,
167  const int& a_icomp,
168  const Real& a_time,
169  const Side::LoHiSide& a_side,
170  const bool& a_doDivFreeOutflow);
171 
172 private:
175 
178 };
179 
181 {
182 public:
184 
186 
187  virtual void setValue(Real a_value);
188 
189  virtual void setFunction(RefCountedPtr<BaseBCValue> a_flux);
190 
191  virtual NeumannPoissonDomainBC* create(const ProblemDomain& a_domain,
192  const EBISLayout& a_layout,
193  const RealVect& a_dx);
194 private:
197 
200 };
201 
202 #include "NamespaceFooter.H"
203 #endif
bool isDirichletDom(const VolIndex &a_ivof, const VolIndex &a_jvof, const EBCellFAB &a_phi) const
Definition: NeumannPoissonDomainBC.H:51
Definition: NeumannPoissonDomainBC.H:180
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:130
virtual void getInhomFaceFluxGradPhi(Real &a_faceFlux, const FaceIndex &a_face, const int &a_comp, const EBCellFAB &a_phi, const RealVect &a_probLo, const RealVect &a_dx, const int &a_idir, const Side::LoHiSide &a_side, const DataIndex &a_dit, const Real &a_time, const bool &a_useAreaFrac, const RealVect &a_centroid)
virtual ~NeumannPoissonDomainBC()
Definition: BaseDomainBC.H:31
virtual void getInhomFaceGradPhi(Real &a_faceFlux, const FaceIndex &a_face, const int &a_comp, const EBCellFAB &a_phi, const RealVect &a_probLo, const RealVect &a_dx, const int &a_idir, const Side::LoHiSide &a_side, const DataIndex &a_dit, const Real &a_time, const bool &a_useAreaFrac, const RealVect &a_centroid)
Definition: FaceIndex.H:28
RefCountedPtr< BaseBCValue > m_flux
Definition: NeumannPoissonDomainBC.H:177
Real m_value
Definition: NeumannPoissonDomainBC.H:198
bool m_onlyHomogeneous
Definition: NeumannPoissonDomainBC.H:195
virtual void getFaceFlux(BaseFab< Real > &a_faceFlux, const BaseFab< Real > &a_phi, const RealVect &a_probLo, const RealVect &a_dx, const int &a_idir, const Side::LoHiSide &a_side, const DataIndex &a_dit, const Real &a_time, const bool &a_useHomogeneous)
bool m_isFunction
Definition: NeumannPoissonDomainBC.H:196
A EBFaceFAB-like container for edge-centered fluxes.
Definition: EBFluxFAB.H:25
Definition: EBCellFAB.H:29
double Real
Definition: REAL.H:33
Definition: BaseDomainBC.H:343
virtual void getFaceVel(Real &a_faceFlux, const FaceIndex &a_face, const EBFluxFAB &a_vel, const RealVect &a_probLo, const RealVect &a_dx, const int &a_idir, const int &a_icomp, const Real &a_time, const Side::LoHiSide &a_side, const bool &a_doDivFreeOutflow)
LoHiSide
Definition: LoHiSide.H:27
virtual void setValue(Real a_value)
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
virtual void getFaceFluxGradPhi(Real &a_faceFlux, const FaceIndex &a_face, const int &a_comp, const EBCellFAB &a_phi, const RealVect &a_probLo, const RealVect &a_dx, const int &a_idir, const Side::LoHiSide &a_side, const DataIndex &a_dit, const Real &a_time, const bool &a_useAreaFrac, const RealVect &a_centroid, const bool &a_useHomogeneous)
Real m_value
Definition: NeumannPoissonDomainBC.H:176
Definition: DataIndex.H:112
virtual void getFaceGradPhi(Real &a_faceFlux, const FaceIndex &a_face, const int &a_comp, const EBCellFAB &a_phi, const RealVect &a_probLo, const RealVect &a_dx, const int &a_idir, const Side::LoHiSide &a_side, const DataIndex &a_dit, const Real &a_time, const bool &a_useAreaFrac, const RealVect &a_centroid, const bool &a_useHomogeneous)
bool m_isFunction
Definition: NeumannPoissonDomainBC.H:174
Volume of Fluid Index.
Definition: VolIndex.H:31
Definition: EBISLayout.H:39
RefCountedPtr< BaseBCValue > m_flux
Definition: NeumannPoissonDomainBC.H:199
Definition: NeumannPoissonDomainBC.H:20
bool m_onlyHomogeneous
Definition: NeumannPoissonDomainBC.H:173
virtual void getInhomFaceFlux(Real &a_faceFlux, const VolIndex &a_vof, const int &a_comp, const EBCellFAB &a_phi, const RealVect &a_probLo, const RealVect &a_dx, const int &a_idir, const Side::LoHiSide &a_side, const DataIndex &a_dit, const Real &a_time)
virtual void setFunction(RefCountedPtr< BaseBCValue > a_flux)