Chombo + EB  3.2
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  bool a_forceNocoarser = false);
82 
83  ///
84  virtual EBPoissonOp*
85  MGnewOp(const ProblemDomain& a_FineindexSpace,
86  int a_depth,
87  bool a_homoOnly = true);
88 
89  EBPoissonOp* createOperator(const EBLevelGrid& a_eblgMGLevel,
90  const EBLevelGrid& a_eblgCoarMG,
91  const bool& a_hasMGObjects,
92  const RealVect& a_dxMGLevel);
93 
94 
95 protected:
96  int m_orderEB;
99 
100 
103 
110 
113 
114 private:
115  ///weak construction bad
117  {
118  MayDay::Error("invalid operator");
119  }
120 
121  //copy constructor and operator= disallowed for all the usual reasons
123  {
124  MayDay::Error("invalid operator");
125  }
126 
127  void operator=(const EBPoissonOpFactory& a_opin)
128  {
129  MayDay::Error("invalid operator");
130  }
131 };
132 
133 #include "NamespaceFooter.H"
134 #endif
RefCountedPtr< BaseEBBCFactory > m_ebBCFactory
Definition: EBPoissonOpFactory.H:112
RefCountedPtr< BaseDomainBCFactory > m_domainBCFactory
Definition: EBPoissonOpFactory.H:111
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
RealVect m_dx
Definition: EBPoissonOpFactory.H:104
Definition: EBLevelGrid.H:30
Definition: EBPoissonOpFactory.H:45
EBLevelGrid m_eblg
Definition: EBPoissonOpFactory.H:101
virtual ~EBPoissonOpFactory()
Definition: MultiGrid.H:294
Real m_alpha
Definition: EBPoissonOpFactory.H:106
double Real
Definition: REAL.H:33
void operator=(const EBPoissonOpFactory &a_opin)
Definition: EBPoissonOpFactory.H:127
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:107
int m_relaxType
Definition: EBPoissonOpFactory.H:98
Definition: EBPoissonOp.H:63
EBPoissonOpFactory()
weak construction bad
Definition: EBPoissonOpFactory.H:116
RealVect m_origin
Definition: EBPoissonOpFactory.H:105
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:108
EBPoissonOpFactory(const EBPoissonOpFactory &a_opin)
Definition: EBPoissonOpFactory.H:122
int m_numPreCondIters
Definition: EBPoissonOpFactory.H:97
Vector< EBLevelGrid > m_eblgVecMG
Definition: EBPoissonOpFactory.H:102
const IntVect m_ghostCellsRHS
Definition: EBPoissonOpFactory.H:109
int m_orderEB
Definition: EBPoissonOpFactory.H:96