Chombo + EB  3.0
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  virtual void applyEBFlux(EBCellFAB& a_lphi,
37  const EBCellFAB& a_phi,
38  VoFIterator& a_vofit,
39  const LayoutData<IntVectSet>& a_cfivs,
40  const DataIndex& a_dit,
41  const RealVect& a_probLo,
42  const RealVect& a_dx,
43  const Real& a_factor,
44  const bool& a_useHomogeneous,
45  const Real& a_time);
46  ///
47  /**
48  */
49  NeumannPoissonEBBC(const ProblemDomain& a_domain,
50  const EBISLayout& a_layout,
51  const RealVect& a_dx);
52 
53  //no homogeneous stencil.
55  {
56  return NULL;
57  }
58  ///
59  /**
60  */
61  virtual ~NeumannPoissonEBBC();
62 
63  ///
64  /**
65  */
66  virtual void setValue(Real a_value);
67 
68  ///
69  /**
70  0 Neumann
71  1 Dirichlet
72  Anything else is invalid
73  */
74  virtual int whichBC()
75  {
76  return 0;
77  };
78 
79  ///
80  /**
81  */
82  virtual void setFunction(RefCountedPtr<BaseBCValue> a_flux);
83 
84  ///
85  /**
86  deprecated
87  */
88  virtual void getEBFlux(Real& a_flux,
89  const VolIndex& a_vof,
90  const LevelData<EBCellFAB>& a_phi,
91  const LayoutData<IntVectSet>& a_cfivs,
92  const DataIndex& a_dit,
93  const RealVect& a_probLo,
94  const RealVect& a_dx,
95  const bool& a_useHomogeneous,
96  const Real& a_time,
97  const pair<int,Real>* a_cacheHint=0 );
98 
99 public:
102 
105 };
106 
107 ///
108 /**
109  */
111 {
112 public:
113  ///
114  /**
115  */
117 
118  ///
119  /**
120  */
121  virtual ~NeumannPoissonEBBCFactory();
122 
123  ///
124  /**
125  */
126  virtual void setValue(Real a_value);
127 
128  ///
129  /**
130  */
131  virtual void setFunction(RefCountedPtr<BaseBCValue> a_flux);
132 
133  ///
134  /**
135  */
136  virtual NeumannPoissonEBBC* create(const ProblemDomain& a_domain,
137  const EBISLayout& a_layout,
138  const RealVect& a_dx,
139  const IntVect* a_ghostCellsPhi=0,
140  const IntVect* a_ghostCellsRhs=0);
141 
142 private:
145 
148 };
149 
150 #include "NamespaceFooter.H"
151 #endif
virtual void setValue(Real a_value)
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:130
Real m_value
Definition: NeumannPoissonEBBC.H:146
virtual int whichBC()
Definition: NeumannPoissonEBBC.H:74
bool m_onlyHomogeneous
Definition: NeumannPoissonEBBC.H:100
Definition: NeumannPoissonEBBC.H:23
Definition: NeumannPoissonEBBC.H:110
bool m_isFunction
Definition: NeumannPoissonEBBC.H:101
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:103
virtual LayoutData< BaseIVFAB< VoFStencil > > * getFluxStencil(int ivar)
Definition: NeumannPoissonEBBC.H:54
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
Definition: BaseEBBC.H:31
Definition: DataIndex.H:112
Definition: BaseEBBC.H:303
Iterator for all vofs within an IntVectSet and an Ebgraph.
Definition: VoFIterator.H:27
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
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:143
bool m_isFunction
Definition: NeumannPoissonEBBC.H:144
RefCountedPtr< BaseBCValue > m_flux
Definition: NeumannPoissonEBBC.H:147
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:104
NeumannPoissonEBBC(const ProblemDomain &a_domain, const EBISLayout &a_layout, const RealVect &a_dx)