Chombo + EB + MF  3.2
EBTensorCFInterp.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 _EBTENSORCFINTERP_H_
12 #define _EBTENSORCFINTERP_H_
13 
14 #include <iostream>
15 #include <math.h>
16 #include "SPACE.H"
17 #include <stdlib.h>
18 #include "REAL.H"
19 #include "IntVect.H"
20 #include "Box.H"
21 #include "BaseFab.H"
22 #include "DisjointBoxLayout.H"
23 #include "LevelData.H"
24 #include "FArrayBox.H"
25 #include "QuadCFStencil.H"
26 #include "ProblemDomain.H"
27 #include "TensorFineStencilSet.H"
28 #include "REAL.H"
29 #include "FArrayBox.H"
30 #include "LevelData.H"
31 #include "DisjointBoxLayout.H"
32 #include "EBISLayout.H"
33 #include "EBCellFAB.H"
34 #include "Interval.H"
35 #include "Stencils.H"
36 #include "QuadCFInterp.H"
37 #include "BaseIVFAB.H"
38 #include "TensorCFInterp.H"
39 #include "CornerCopier.H"
40 #include "EBCFData.H"
41 #include "EBQuadCFInterp.H"
42 #include "NamespaceHeader.H"
43 
44 /// Quadratic coarse-fine interpolation utility for tensors
45 /**
46  Class to fill ghost cells on coarse-fine interface using
47  quadratic interpolation. Also computes tangential
48  derivatives
49 */
51 {
52 public:
53 
54  ///
55  EBTensorCFInterp(const DisjointBoxLayout& a_fineBoxes,
56  const DisjointBoxLayout& a_coarBoxes,
57  const EBISLayout& a_ebislFine,
58  const EBISLayout& a_ebislCoar,
59  const ProblemDomain& a_domainCoar,
60  const int& a_nref,
61  const int& a_nvar,
62  const Real& a_dxFine,
63  const LayoutData<IntVectSet>& a_cfivs,
64  const EBIndexSpace* const a_ebisPtr = Chombo_EBIS::instance(),
65  bool a_doEBCFCrossing = true);
66 
67  ///
69 
70  ///
71  /**
72  Coarse / Fine interpolation operator.
73  */
75  LevelData<EBCellFAB>& a_tanGradf,
76  const LevelData<EBCellFAB>& a_phic);
77 
78 
79  ///
80  /**
81  Coarse-fine interpolation operator with homogeneous BCs.
82  Does same interpolation as coarseFineInterp function,
83  but with all coarse-level data set to 0.
84  */
86  LevelData<EBCellFAB>& a_tanGradf);
87 
88 
89 protected:
90 
91  void buildEBCFCornerStencils( const LayoutData<IntVectSet>& a_cfivs);
93 
94 
96  LevelData<EBCellFAB>& a_tanGradF,
97  const LevelData<EBCellFAB>& a_coarData);
98 
99  void interpEBCFCorners(LevelData<EBCellFAB>& a_fineData,
100  LevelData<EBCellFAB>& a_tanGradF,
101  const LevelData<EBCellFAB>& a_coarData);
102 
103 
104 
107 
109 
114 
115  //fine index space fine layout
118 
119  // Copier object to handle corner cells
121 
123  int m_refRat;
127 
128 
129 private:
130  //weak construction is bad
132  {
133  MayDay::Error("invalid operator");
134  }
135 
136  //disallowed for all the usual reasons
138  {
139  MayDay::Error("invalid operator");
140  }
141 
142  //disallowed for all the usual reasons
144  {
145  MayDay::Error("invalid operator");
146  }
147 
148 };
149 
150 #include "NamespaceFooter.H"
151 #endif
void interpEBCFCrossing(LevelData< EBCellFAB > &a_fineData, LevelData< EBCellFAB > &a_tanGradF, const LevelData< EBCellFAB > &a_coarData)
LayoutData< IntVectSet > m_ebcfivsLo[SpaceDim]
Definition: EBTensorCFInterp.H:116
void buildEBCFCornerStencils(const LayoutData< IntVectSet > &a_cfivs)
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
Definition: EBIndexSpace.H:50
RefCountedPtr< EBCFData > m_ebcfdata
Definition: EBTensorCFInterp.H:105
CornerCopier m_cornerCopier
Definition: EBTensorCFInterp.H:120
Quadratic coarse-fine interpolation utility for tensors.
Definition: EBTensorCFInterp.H:50
static IntVect s_ivDebCoar
Definition: EBTensorCFInterp.H:125
LayoutData< IntVectSet > m_ebcfivsHi[SpaceDim]
Definition: EBTensorCFInterp.H:117
LayoutData< BaseIVFAB< VoFStencil > > m_coarStencilLo[SpaceDim]
Definition: EBTensorCFInterp.H:110
Quadratic coarse-fine interpolation utility for tensors.
Definition: TensorCFInterp.H:36
EBTensorCFInterp()
Definition: EBTensorCFInterp.H:131
RefCountedPtr< EBQuadCFInterp > m_ebquadcfi
Definition: EBTensorCFInterp.H:106
void buildEBCFCrossingStencils(const LayoutData< IntVectSet > &a_cfivs)
const int SpaceDim
Definition: SPACE.H:38
ProblemDomain m_domainCoar
Definition: EBTensorCFInterp.H:126
static EBIndexSpace * instance()
LayoutData< BaseIVFAB< VoFStencil > > m_stencilEdges
Definition: EBTensorCFInterp.H:113
double Real
Definition: REAL.H:33
LayoutData< BaseIVFAB< VoFStencil > > m_stencilCorners
Definition: EBTensorCFInterp.H:112
LevelData< EBCellFAB > m_ebBufferCoarsenedFine
Definition: EBTensorCFInterp.H:108
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
bool m_doEBCFCrossing
Definition: EBTensorCFInterp.H:122
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.
EBTensorCFInterp(EBTensorCFInterp &a_input)
Definition: EBTensorCFInterp.H:137
static IntVect s_ivDebFine
Definition: EBTensorCFInterp.H:124
void coarseFineInterp(LevelData< EBCellFAB > &a_phif, LevelData< EBCellFAB > &a_tanGradf, const LevelData< EBCellFAB > &a_phic)
void operator=(EBTensorCFInterp &a_input)
Definition: EBTensorCFInterp.H:143
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
void interpEBCFCorners(LevelData< EBCellFAB > &a_fineData, LevelData< EBCellFAB > &a_tanGradF, const LevelData< EBCellFAB > &a_coarData)
LayoutData< BaseIVFAB< VoFStencil > > m_coarStencilHi[SpaceDim]
Definition: EBTensorCFInterp.H:111
An even stranger (than Copier) thing to copy from ghost cells to corner ghost cells.
Definition: CornerCopier.H:31
Definition: EBISLayout.H:39
int m_refRat
Definition: EBTensorCFInterp.H:123
void coarseFineInterpH(LevelData< EBCellFAB > &a_phif, LevelData< EBCellFAB > &a_tanGradf)
ProblemDomain m_domainFine
Definition: EBTensorCFInterp.H:126