Chombo + EB  3.2
EBCFData.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 // dtgraves july 2009
12 
13 
14 #ifndef _EBCFDATA_H_
15 #define _EBCFDATA_H_
16 
17 #include "REAL.H"
18 #include "FArrayBox.H"
19 #include "LevelData.H"
20 #include "DisjointBoxLayout.H"
21 #include "EBIndexSpace.H"
22 #include "EBISLayout.H"
23 #include "EBCellFAB.H"
24 #include "Interval.H"
25 #include "Stencils.H"
26 #include "QuadCFInterp.H"
27 #include "BaseIVFAB.H"
28 #include "CornerCopier.H"
29 #include "VoFIterator.H"
30 #include "NamespaceHeader.H"
31 
32 ///
33 /**
34  Stuff that objects that do eb/cf will need.
35  Used by EBQuadCFInterp and EBTensorCFInterp.
36  Not really all that useful outside their context.
37  */
38 class EBCFData
39 {
40 public:
41 
42  ///
43  virtual ~EBCFData();
44 
45  ///
46  /**
47  */
48  EBCFData(const DisjointBoxLayout& a_dblFine,
49  const DisjointBoxLayout& a_dblCoar,
50  const EBISLayout& a_ebislFine,
51  const EBISLayout& a_ebislCoar,
52  const ProblemDomain& a_domainCoar,
53  const int& a_nref,
54  const LayoutData<IntVectSet>& a_cfivs,
55  const EBIndexSpace* const a_ebisPtr = Chombo_EBIS::instance(),
56  bool a_doEBCFCrossing = true,
57  bool a_doCornerEdgeIterators = true);
58 
59 
60 
61  static void getExtrapSigns(IntVect& a_signs, const IntVect& a_corner, const Box& a_grid) ;
62 
63  //deliberately public to avoid the get set stuff.
72  int m_refRat;
73 
75 
76  //cache the EB-CF vofiterator, these are on the fine index space
83 
84  //fine index space fine layout
87 
88  ///static for reuse
89  static void getEBCFIVSGrid(IntVectSet& a_ebcfivs,
90  const Box& a_grid,
91  const int& a_idir,
92  const Side::LoHiSide& a_side,
93  const IntVect& a_diagGrow,
94  const ProblemDomain& a_domain,
95  const IntVectSet& a_cfivs,
96  const EBISBox& a_ebisBox);
97 
98  ///static for reuse
99  static void
100  getEdgeAndCornerIVS(IntVectSet& a_edgeIVS, IntVectSet& a_cornerIVS,
101  const Box& a_grid, const ProblemDomain& a_domain,
102  const IntVectSet& a_cfivsGrid);
103 
104 
105 private:
106 
107  void defineEdCoIterators(const LayoutData<IntVectSet>& a_cfivs);
108  void defineLoHiIterators(const LayoutData<IntVectSet>& a_cfivs);
109  ///
110  /**
111  Builds the IntVectSets for where we need to do
112  EB aware CF interpolation.
113  Returns a bool that indicates if we need to do EB aware CF interp
114  */
115  bool getEBCFIVS(const LayoutData<IntVectSet>& a_cfivs);
116 
117 
118  //weak construction is discouraged
120  {
121  MayDay::Error("ebcfd invalid operator");
122  }
123 
124  //disallowed for all the usual reasons
125  EBCFData(const EBCFData& ebcin)
126  {
127  MayDay::Error("ebcfd invalid operator");
128  }
129  void operator=(const EBCFData& fabin)
130  {
131  MayDay::Error("ebcfd invalid operator");
132  }
133 };
134 
135 #include "NamespaceFooter.H"
136 #endif
DisjointBoxLayout m_gridsFine
Definition: EBCFData.H:69
LayoutData< IntVectSet > m_ebcfivsLo[SpaceDim]
Definition: EBCFData.H:85
An irregular domain on an integer lattice.
Definition: IntVectSet.H:44
void defineLoHiIterators(const LayoutData< IntVectSet > &a_cfivs)
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
Definition: EBIndexSpace.H:50
bool m_doEBCFCrossing
Definition: EBCFData.H:74
Definition: EBISBox.H:46
LayoutData< VoFIterator > m_vofItEdges
Definition: EBCFData.H:80
EBCFData(const EBCFData &ebcin)
Definition: EBCFData.H:125
const int SpaceDim
Definition: SPACE.H:38
static void getEdgeAndCornerIVS(IntVectSet &a_edgeIVS, IntVectSet &a_cornerIVS, const Box &a_grid, const ProblemDomain &a_domain, const IntVectSet &a_cfivsGrid)
static for reuse
EBISLayout m_ebislFine
Definition: EBCFData.H:66
static EBIndexSpace * instance()
LayoutData< VoFIterator > m_vofItEBCFLo[SpaceDim]
Definition: EBCFData.H:77
DisjointBoxLayout m_gridsCoar
Definition: EBCFData.H:67
virtual ~EBCFData()
bool getEBCFIVS(const LayoutData< IntVectSet > &a_cfivs)
LayoutData< VoFIterator > m_vofItCorners
Definition: EBCFData.H:79
EBISLayout m_ebislCoar
Definition: EBCFData.H:64
void operator=(const EBCFData &fabin)
Definition: EBCFData.H:129
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
LoHiSide
Definition: LoHiSide.H:27
ProblemDomain m_domainFine
Definition: EBCFData.H:70
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.
EBISLayout m_ebislCoarsenedFine
Definition: EBCFData.H:65
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
EBCFData()
Definition: EBCFData.H:119
ProblemDomain m_domainCoar
Definition: EBCFData.H:71
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
LayoutData< VoFIterator > m_vofItEBCFHi[SpaceDim]
Definition: EBCFData.H:78
void defineEdCoIterators(const LayoutData< IntVectSet > &a_cfivs)
LayoutData< IntVectSet > m_cornerIVS
Definition: EBCFData.H:81
LayoutData< IntVectSet > m_ebcfivsHi[SpaceDim]
Definition: EBCFData.H:86
int m_refRat
Definition: EBCFData.H:72
Definition: EBISLayout.H:39
static void getEBCFIVSGrid(IntVectSet &a_ebcfivs, const Box &a_grid, const int &a_idir, const Side::LoHiSide &a_side, const IntVect &a_diagGrow, const ProblemDomain &a_domain, const IntVectSet &a_cfivs, const EBISBox &a_ebisBox)
static for reuse
static void getExtrapSigns(IntVect &a_signs, const IntVect &a_corner, const Box &a_grid)
DisjointBoxLayout m_gridsCoarsenedFine
Definition: EBCFData.H:68
LayoutData< IntVectSet > m_edgeIVS
Definition: EBCFData.H:82
Definition: EBCFData.H:38