chombo-discharge
CD_IrregAmrStencil.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2021 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef CD_IrregAmrStencil_H
13 #define CD_IrregAmrStencil_H
14 
15 // Our includes
16 #include <CD_EBAMRData.H>
17 #include <CD_IrregStencil.H>
18 #include <CD_NamespaceHeader.H>
19 
27 template <class IrregSten>
29 {
30 public:
35 
47  IrregAmrStencil(const Vector<DisjointBoxLayout>& a_grids,
48  const Vector<EBISLayout>& a_ebisl,
49  const Vector<ProblemDomain>& a_domains,
50  const Vector<Real>& a_dx,
51  const int a_finestLevel,
52  const int a_order,
53  const int a_radius,
54  const IrregStencil::StencilType a_type);
55 
59  virtual ~IrregAmrStencil();
60 
65  const IrregStencil&
66  operator[](const int& a_lvl) const;
67 
73  operator[](const int& a_lvl);
74 
86  virtual void
87  define(const Vector<DisjointBoxLayout>& a_grids,
88  const Vector<EBISLayout>& a_ebisl,
89  const Vector<ProblemDomain>& a_domains,
90  const Vector<Real>& a_dx,
91  const int a_finestLevel,
92  const int a_order,
93  const int a_radius,
94  const IrregStencil::StencilType a_type);
95 
103  virtual void
104  apply(LevelData<EBCellFAB>& a_dst, const LevelData<EBCellFAB>& a_src, const int a_lvl) const;
105 
111  virtual void
112  apply(LevelData<EBCellFAB>& a_data, const int a_lvl) const;
113 
121  virtual void
122  apply(LevelData<BaseIVFAB<Real>>& a_dst, const LevelData<EBCellFAB>& a_src, const int a_lvl) const;
123 
130  virtual void
131  apply(EBAMRCellData& a_dst, const EBAMRCellData& a_src) const;
132 
137  virtual void
138  apply(EBAMRCellData& a_dst) const;
139 
145  virtual void
146  apply(EBAMRIVData& a_dst, const EBAMRCellData& a_src) const;
147 
152  virtual void
153  apply(Vector<EBAMRCellData*>& a_data) const;
154 
160  virtual void
161  apply(Vector<EBAMRCellData*>& a_dst, const Vector<EBAMRCellData*>& a_src) const;
162 
168  virtual void
169  apply(Vector<EBAMRIVData*>& a_dst, const Vector<EBAMRCellData*>& a_src) const;
170 
171 protected:
175  Vector<DisjointBoxLayout> m_grids;
176 
180  Vector<EBISLayout> m_ebisl;
181 
185  Vector<ProblemDomain> m_domains;
186 
190  Vector<Real> m_dx;
191 
195  Vector<RefCountedPtr<IrregStencil>> m_stencils;
196 
201 
205  int m_order;
206 
210  int m_radius;
211 
216 
221 };
222 
223 #include <CD_NamespaceFooter.H>
224 
226 
227 #endif
Class for holding data across EBAMR hierarchies.
Implementation of CD_IrregAmrStencil.H.
Abstract class for holding cut-cell stencils on an AMR level.
Class for holding VoFStencils on irregular cells over an entire AMR hierarchy. The template parameter...
Definition: CD_IrregAmrStencil.H:29
const IrregStencil & operator[](const int &a_lvl) const
Get the stencils over an AMR level.
Definition: CD_IrregAmrStencilImplem.H:49
virtual void define(const Vector< DisjointBoxLayout > &a_grids, const Vector< EBISLayout > &a_ebisl, const Vector< ProblemDomain > &a_domains, const Vector< Real > &a_dx, const int a_finestLevel, const int a_order, const int a_radius, const IrregStencil::StencilType a_type)
Define function.
Definition: CD_IrregAmrStencilImplem.H:63
IrregAmrStencil()
Empty constructor. You must subsequently call define.
Definition: CD_IrregAmrStencilImplem.H:20
virtual void apply(LevelData< EBCellFAB > &a_dst, const LevelData< EBCellFAB > &a_src, const int a_lvl) const
Apply the stencils to an existing data holder.
Definition: CD_IrregAmrStencilImplem.H:96
virtual ~IrregAmrStencil()
Destructor.
Definition: CD_IrregAmrStencilImplem.H:42
IrregStencil::StencilType m_stencilType
Stencil type.
Definition: CD_IrregAmrStencil.H:220
Vector< RefCountedPtr< IrregStencil > > m_stencils
Stencils.
Definition: CD_IrregAmrStencil.H:195
int m_order
Order.
Definition: CD_IrregAmrStencil.H:205
int m_radius
Radius.
Definition: CD_IrregAmrStencil.H:210
Vector< DisjointBoxLayout > m_grids
AMR grids.
Definition: CD_IrregAmrStencil.H:175
Vector< EBISLayout > m_ebisl
EBIS layouts.
Definition: CD_IrregAmrStencil.H:180
int m_finestLevel
Finest level.
Definition: CD_IrregAmrStencil.H:215
Vector< Real > m_dx
Resolutions.
Definition: CD_IrregAmrStencil.H:190
bool m_isDefined
Stencils defined or not.
Definition: CD_IrregAmrStencil.H:200
Vector< ProblemDomain > m_domains
Problem domains.
Definition: CD_IrregAmrStencil.H:185
Class for holding stencils on irregular cells over a single AMR level.
Definition: CD_IrregStencil.H:38
StencilType
Enum for identifying stencil – only meant for enhancing code visibility.
Definition: CD_IrregStencil.H:44