Chombo + EB  3.0
EBPoissonOpFactory.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 _EBPOISSONOPFACTORY_H__
12 #define _EBPOISSONOPFACTORY_H__
13 
14 #include "REAL.H"
15 #include "Box.H"
16 #include "FArrayBox.H"
17 #include "Vector.H"
18 #include <map>
19 #include "RefCountedPtr.H"
20 
21 #include "AMRMultiGrid.H"
22 
23 #include "EBIndexSpace.H"
24 #include "EBCellFAB.H"
25 #include "EBCellFactory.H"
26 
27 #include "EBLevelDataOps.H"
28 #include "BaseEBBC.H"
29 #include "BaseDomainBC.H"
30 #include "CFIVS.H"
31 #include "EBFluxRegister.H"
32 #include "EBMGAverage.H"
33 #include "EBMGInterp.H"
34 #include "EBCoarsen.H"
35 #include "PolyGeom.H"
36 #include "EBPoissonOp.H"
37 #include "EBLevelGrid.H"
38 #include "NamespaceHeader.H"
39 
40 
41 ///
42 /**
43  Factory class to generate EBPoissonOps. This follows the AMRLevelOpFactory interface.
44 */
45 class EBPoissonOpFactory: public MGLevelOpFactory<LevelData<EBCellFAB> >
46 {
47 public:
48  ///
49  virtual ~EBPoissonOpFactory();
50 
51  ///
52  /**
53  a_eblgs : layouts at each AMR level \\
54  a_domainFactory : domain boundary conditions \\
55  a_ebBCFactory: eb boundary conditions \\
56  a_dxCoarse: grid spacing at coarsest level \\
57  a_origin: offset to lowest corner of the domain \\
58  a_refRatio: refinement ratios. refRatio[i] is between levels i and i+1 \\
59  a_preCondIters: number of iterations to do for pre-conditioning \\
60  a_relaxType: 0 means point Jacobi, 1 is Gauss-Seidel, 2 is line solver. \\
61  a_orderEB: 0 to not do flux interpolation at cut faces. \\
62  a_alpha: coefficent of identity \\
63  a_beta: coefficient of laplacian.\\
64  a_ghostCellsPhi: Number of ghost cells in phi, correction (typically one)\\
65  a_ghostCellsRhs: Number of ghost cells in RHS, residual, lphi (typically zero)\\
66  Ghost cell arguments are there for caching reasons. Once you set them, an error is thrown if
67  you send in data that does not match.
68  */
69  EBPoissonOpFactory(const EBLevelGrid& a_eblgs,
70  const RealVect& a_dx,
71  const RealVect& a_origin,
72  const int& a_orderEB,
73  const int& a_numPreCondIters,
74  const int& a_relaxType,
75  RefCountedPtr<BaseDomainBCFactory> a_domainBCFactory,
76  RefCountedPtr<BaseEBBCFactory> a_ebBcFactory,
77  const Real& a_alpha,
78  const Real& a_beta,
79  const IntVect& a_ghostCellsPhi,
80  const IntVect& a_ghostCellsRhs);
81 
82  ///
83  virtual EBPoissonOp*
84  MGnewOp(const ProblemDomain& a_FineindexSpace,
85  int a_depth,
86  bool a_homoOnly = true);
87 
88  EBPoissonOp* createOperator(const EBLevelGrid& a_eblgMGLevel,
89  const EBLevelGrid& a_eblgCoarMG,
90  const bool& a_hasMGObjects,
91  const RealVect& a_dxMGLevel);
92 
93 
94 protected:
95  int m_orderEB;
98 
99 
102 
109 
112 
113 private:
114  ///weak construction bad
116  {
117  MayDay::Error("invalid operator");
118  }
119 
120  //copy constructor and operator= disallowed for all the usual reasons
122  {
123  MayDay::Error("invalid operator");
124  }
125 
126  void operator=(const EBPoissonOpFactory& a_opin)
127  {
128  MayDay::Error("invalid operator");
129  }
130 };
131 
132 #include "NamespaceFooter.H"
133 #endif
RefCountedPtr< BaseEBBCFactory > m_ebBCFactory
Definition: EBPoissonOpFactory.H:111
RefCountedPtr< BaseDomainBCFactory > m_domainBCFactory
Definition: EBPoissonOpFactory.H:110
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:130
RealVect m_dx
Definition: EBPoissonOpFactory.H:103
Definition: EBLevelGrid.H:30
Definition: EBPoissonOpFactory.H:45
EBLevelGrid m_eblg
Definition: EBPoissonOpFactory.H:100
virtual ~EBPoissonOpFactory()
Definition: MultiGrid.H:259
Real m_alpha
Definition: EBPoissonOpFactory.H:105
double Real
Definition: REAL.H:33
void operator=(const EBPoissonOpFactory &a_opin)
Definition: EBPoissonOpFactory.H:126
static void Error(const char *const a_msg=m_nullString, int m_exitCode=CH_DEFAULT_ERROR_CODE)
Print out message to cerr and exit with the specified exit code.
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
EBPoissonOp * createOperator(const EBLevelGrid &a_eblgMGLevel, const EBLevelGrid &a_eblgCoarMG, const bool &a_hasMGObjects, const RealVect &a_dxMGLevel)
Real m_beta
Definition: EBPoissonOpFactory.H:106
int m_relaxType
Definition: EBPoissonOpFactory.H:97
Definition: EBPoissonOp.H:63
EBPoissonOpFactory()
weak construction bad
Definition: EBPoissonOpFactory.H:115
RealVect m_origin
Definition: EBPoissonOpFactory.H:104
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
virtual EBPoissonOp * MGnewOp(const ProblemDomain &a_FineindexSpace, int a_depth, bool a_homoOnly=true)
const IntVect m_ghostCellsPhi
Definition: EBPoissonOpFactory.H:107
EBPoissonOpFactory(const EBPoissonOpFactory &a_opin)
Definition: EBPoissonOpFactory.H:121
int m_numPreCondIters
Definition: EBPoissonOpFactory.H:96
Vector< EBLevelGrid > m_eblgVecMG
Definition: EBPoissonOpFactory.H:101
const IntVect m_ghostCellsRHS
Definition: EBPoissonOpFactory.H:108
int m_orderEB
Definition: EBPoissonOpFactory.H:95