chombo-discharge
CD_EBMGProlong.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2022 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef CD_EBMGProlong_H
13 #define CD_EBMGProlong_H
14 
15 // Chombo includes
16 #include <EBLevelGrid.H>
17 #include <ProblemDomain.H>
18 #include <LevelData.H>
19 #include <EBCellFAB.H>
20 
21 // Our includes
22 #include <CD_NamespaceHeader.H>
23 
30 {
31 public:
35  EBMGProlong() noexcept;
36 
43  EBMGProlong(const EBLevelGrid& a_eblgFine, const EBLevelGrid& a_eblgCoar, const int& a_refRat) noexcept;
44 
48  virtual ~EBMGProlong() noexcept;
49 
56  virtual void
57  define(const EBLevelGrid& a_eblgFine, const EBLevelGrid& a_eblgCoar, const int& a_refRat) noexcept;
58 
65  virtual void
66  prolongResidual(LevelData<EBCellFAB>& a_fineData,
67  const LevelData<EBCellFAB>& a_coarData,
68  const Interval a_variables) const noexcept;
69 
70 protected:
75 
79  int m_refRat;
80 
84  EBLevelGrid m_eblgFine;
85 
89  EBLevelGrid m_eblgCoar;
90 
94  EBLevelGrid m_eblgCoFi;
95 
99  Copier m_copier;
100 
105  LayoutData<BaseIVFAB<VoFStencil>> m_prolongStencils;
106 
110  mutable LayoutData<VoFIterator> m_vofitFine;
111 };
112 
113 #include <CD_NamespaceFooter.H>
114 
115 #endif
Class for prolongation of multigrid residual onto a finer grid.
Definition: CD_EBMGProlong.H:30
EBLevelGrid m_eblgCoFi
Coarsened fine grids.
Definition: CD_EBMGProlong.H:94
virtual void define(const EBLevelGrid &a_eblgFine, const EBLevelGrid &a_eblgCoar, const int &a_refRat) noexcept
Define function.
Definition: CD_EBMGProlong.cpp:44
EBLevelGrid m_eblgCoar
Coarse grid.
Definition: CD_EBMGProlong.H:89
Copier m_copier
Copier for making copying from eblgCoar to eblgCoFi go faster.
Definition: CD_EBMGProlong.H:99
virtual ~EBMGProlong() noexcept
Destructor.
Definition: CD_EBMGProlong.cpp:38
EBLevelGrid m_eblgFine
Fine grid.
Definition: CD_EBMGProlong.H:84
bool m_isDefined
Defined or not.
Definition: CD_EBMGProlong.H:74
LayoutData< BaseIVFAB< VoFStencil > > m_prolongStencils
Prolongion stencils near the EB.
Definition: CD_EBMGProlong.H:105
int m_refRat
Refinement ratio.
Definition: CD_EBMGProlong.H:79
LayoutData< VoFIterator > m_vofitFine
Iterator for iterating over cut-cells on the fine level.
Definition: CD_EBMGProlong.H:110
virtual void prolongResidual(LevelData< EBCellFAB > &a_fineData, const LevelData< EBCellFAB > &a_coarData, const Interval a_variables) const noexcept
Prolong residual onto the coarse grid.
Definition: CD_EBMGProlong.cpp:109
EBMGProlong() noexcept
Default constructor. User must subsequently call the define function.
Definition: CD_EBMGProlong.cpp:22