Chombo + EB  3.2
NeumannPoissonEBBC.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 _NEUMANNPOISSONEBBC_H_
12 #define _NEUMANNPOISSONEBBC_H_
13 
14 #include "RefCountedPtr.H"
15 
16 #include "BaseEBBC.H"
17 #include "BaseBCValue.H"
18 #include "NamespaceHeader.H"
19 
20 ///
21 /**
22  */
24 {
25 public:
26  ///
27  /**
28  */
29  virtual void define(const LayoutData<IntVectSet>& a_cfivs,
30  const Real& a_factor)
31  {
32  ;
33  //no flux stencil for Neumann
34  }
35 
36  void applyEBFluxPoint(const VolIndex& a_vof,
37  EBCellFAB& a_lphi,
38  const EBCellFAB& a_phi,
39  VoFIterator& a_vofit,
40  const LayoutData<IntVectSet>& a_cfivs,
41  const DataIndex& a_dit,
42  const RealVect& a_probLo,
43  const RealVect& a_dx,
44  const Real& a_factor,
45  const bool& a_useHomogeneous,
46  const Real& a_time);
47 
48  virtual void applyEBFlux(EBCellFAB& a_lphi,
49  const EBCellFAB& a_phi,
50  VoFIterator& a_vofit,
51  const LayoutData<IntVectSet>& a_cfivs,
52  const DataIndex& a_dit,
53  const RealVect& a_probLo,
54  const RealVect& a_dx,
55  const Real& a_factor,
56  const bool& a_useHomogeneous,
57  const Real& a_time);
58  ///
59  /**
60  */
61  NeumannPoissonEBBC(const ProblemDomain& a_domain,
62  const EBISLayout& a_layout,
63  const RealVect& a_dx);
64 
65  //no homogeneous stencil.
67  {
68  return NULL;
69  }
70  ///
71  /**
72  */
73  virtual ~NeumannPoissonEBBC();
74 
75  ///
76  /**
77  */
78  virtual void setValue(Real a_value);
79 
80  ///
81  /**
82  0 Neumann
83  1 Dirichlet
84  Anything else is invalid
85  */
86  virtual int whichBC()
87  {
88  return 0;
89  };
90 
91  ///
92  /**
93  */
94  virtual void setFunction(RefCountedPtr<BaseBCValue> a_flux);
95 
96  ///
97  /**
98  deprecated
99  */
100  virtual void getEBFlux(Real& a_flux,
101  const VolIndex& a_vof,
102  const LevelData<EBCellFAB>& a_phi,
103  const LayoutData<IntVectSet>& a_cfivs,
104  const DataIndex& a_dit,
105  const RealVect& a_probLo,
106  const RealVect& a_dx,
107  const bool& a_useHomogeneous,
108  const Real& a_time,
109  const pair<int,Real>* a_cacheHint=0 );
110 
111 public:
114 
117 
118  static int s_comp;
119 };
120 
121 ///
122 /**
123  */
125 {
126 public:
127  ///
128  /**
129  */
131 
132  ///
133  /**
134  */
135  virtual ~NeumannPoissonEBBCFactory();
136 
137  ///
138  /**
139  */
140  virtual void setValue(Real a_value);
141 
142  ///
143  /**
144  */
145  virtual void setFunction(RefCountedPtr<BaseBCValue> a_flux);
146 
147  virtual void setData( RefCountedPtr<LevelData<BaseIVFAB<Real> > >& a_data)
148  {
149  m_data = a_data;
150  m_dataBased = true;
151  }
152 
153  ///
154  /**
155  */
156  virtual NeumannPoissonEBBC* create(const ProblemDomain& a_domain,
157  const EBISLayout& a_layout,
158  const RealVect& a_dx,
159  const IntVect* a_ghostCellsPhi=0,
160  const IntVect* a_ghostCellsRhs=0);
161 
162 private:
165 
168 
171 };
172 
173 #include "NamespaceFooter.H"
174 #endif
bool m_dataBased
Definition: NeumannPoissonEBBC.H:170
RefCountedPtr< LevelData< BaseIVFAB< Real > > > m_data
Definition: NeumannPoissonEBBC.H:169
virtual void setValue(Real a_value)
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
Real m_value
Definition: NeumannPoissonEBBC.H:166
virtual void setData(RefCountedPtr< LevelData< BaseIVFAB< Real > > > &a_data)
Definition: NeumannPoissonEBBC.H:147
virtual int whichBC()
Definition: NeumannPoissonEBBC.H:86
bool m_onlyHomogeneous
Definition: NeumannPoissonEBBC.H:112
Definition: NeumannPoissonEBBC.H:23
virtual void setFunction(RefCountedPtr< BaseBCValue > a_flux)
Definition: NeumannPoissonEBBC.H:124
bool m_isFunction
Definition: NeumannPoissonEBBC.H:113
virtual void getEBFlux(Real &a_flux, const VolIndex &a_vof, const LevelData< EBCellFAB > &a_phi, const LayoutData< IntVectSet > &a_cfivs, const DataIndex &a_dit, const RealVect &a_probLo, const RealVect &a_dx, const bool &a_useHomogeneous, const Real &a_time, const pair< int, Real > *a_cacheHint=0)
virtual void setFunction(RefCountedPtr< BaseBCValue > a_flux)
Definition: EBCellFAB.H:29
virtual ~NeumannPoissonEBBC()
double Real
Definition: REAL.H:33
Real m_value
Definition: NeumannPoissonEBBC.H:115
virtual NeumannPoissonEBBC * create(const ProblemDomain &a_domain, const EBISLayout &a_layout, const RealVect &a_dx, const IntVect *a_ghostCellsPhi=0, const IntVect *a_ghostCellsRhs=0)
virtual LayoutData< BaseIVFAB< VoFStencil > > * getFluxStencil(int ivar)
Definition: NeumannPoissonEBBC.H:66
virtual void setValue(Real a_value)
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
Definition: BaseEBBC.H:31
Definition: DataIndex.H:112
Definition: BaseEBBC.H:315
Iterator for all vofs within an IntVectSet and an Ebgraph.
Definition: VoFIterator.H:27
void applyEBFluxPoint(const VolIndex &a_vof, EBCellFAB &a_lphi, const EBCellFAB &a_phi, VoFIterator &a_vofit, const LayoutData< IntVectSet > &a_cfivs, const DataIndex &a_dit, const RealVect &a_probLo, const RealVect &a_dx, const Real &a_factor, const bool &a_useHomogeneous, const Real &a_time)
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
virtual ~NeumannPoissonEBBCFactory()
static int s_comp
Definition: NeumannPoissonEBBC.H:118
Volume of Fluid Index.
Definition: VolIndex.H:31
virtual void define(const LayoutData< IntVectSet > &a_cfivs, const Real &a_factor)
Definition: NeumannPoissonEBBC.H:29
Definition: EBISLayout.H:39
bool m_onlyHomogeneous
Definition: NeumannPoissonEBBC.H:163
bool m_isFunction
Definition: NeumannPoissonEBBC.H:164
RefCountedPtr< BaseBCValue > m_flux
Definition: NeumannPoissonEBBC.H:167
virtual void applyEBFlux(EBCellFAB &a_lphi, const EBCellFAB &a_phi, VoFIterator &a_vofit, const LayoutData< IntVectSet > &a_cfivs, const DataIndex &a_dit, const RealVect &a_probLo, const RealVect &a_dx, const Real &a_factor, const bool &a_useHomogeneous, const Real &a_time)
RefCountedPtr< BaseBCValue > m_flux
Definition: NeumannPoissonEBBC.H:116
NeumannPoissonEBBC(const ProblemDomain &a_domain, const EBISLayout &a_layout, const RealVect &a_dx)