00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef NODEQUADCFINTERP_H
00032 #define NODEQUADCFINTERP_H
00033
00034 #include <cmath>
00035 #include <cstdlib>
00036 #include "BaseFab.H"
00037 #include "NodeFArrayBox.H"
00038 #include "NodeCFIVS.H"
00039 #include "NodeBC.H"
00040 #include "NodeQuadCFInterp2.H"
00041
00043 class NodeQuadCFInterp
00047 {
00048 public:
00049
00051
00053
00055 NodeQuadCFInterp();
00056
00058
00061 NodeQuadCFInterp(const DisjointBoxLayout& a_grids,
00062 Real a_dx,
00063 const ProblemDomain& a_domain,
00064 const LayoutData<NodeCFIVS>* const a_loCFIVS,
00065 const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00066 int a_refToCoarse,
00067 int a_interpolationDegree = 2,
00068 int a_ncomp = 1);
00069
00070 NodeQuadCFInterp(const DisjointBoxLayout& a_grids,
00071 Real a_dx,
00072 const Box& a_domain,
00073 const LayoutData<NodeCFIVS>* const a_loCFIVS,
00074 const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00075 int a_refToCoarse,
00076 int a_interpolationDegree = 2,
00077 int a_ncomp = 1);
00078
00080
00082 ~NodeQuadCFInterp();
00083
00085
00099 void define(const DisjointBoxLayout& a_grids,
00100 Real a_dx,
00101 const ProblemDomain& a_domain,
00102 const LayoutData<NodeCFIVS>* const a_loCFIVS,
00103 const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00104 int a_refToCoarse,
00105 int a_interpolationDegree = 2,
00106 int a_ncomp = 1);
00107
00108 void define(const DisjointBoxLayout& a_grids,
00109 Real a_dx,
00110 const Box& a_domain,
00111 const LayoutData<NodeCFIVS>* const a_loCFIVS,
00112 const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00113 int a_refToCoarse,
00114 int a_interpolationDegree = 2,
00115 int a_ncomp = 1);
00116
00118
00122 void setDomainNodeBC(const DomainNodeBC& a_dombcIn);
00123
00124
00126
00128
00131 bool isDefined() const;
00132
00133
00135
00137
00146 void coarseFineInterp(LevelData<NodeFArrayBox>& a_phiFine,
00147 const LevelData<NodeFArrayBox>& a_phiCoarse,
00148 bool a_inhomogeneous);
00149
00150
00151 protected:
00152
00153
00154 DisjointBoxLayout m_grids;
00155
00156
00157 int m_ncomp;
00158
00159
00160 int m_refToCoarse;
00161
00162
00163 int m_coarsenings;
00164
00165
00166 bool m_isDefined;
00167
00168
00169 bool m_isBCDefined;
00170
00171
00172 Real m_dx;
00173
00174
00175 Real m_dxPenultimate;
00176
00177
00178 ProblemDomain m_domainPenultimate;
00179
00180
00181 DomainNodeBC m_dombc;
00182
00183
00184 Vector< LevelData<NodeFArrayBox>* > m_inter;
00185
00186
00187
00188
00189 Vector< NodeQuadCFInterp2* > m_qcfi2;
00190
00191
00192
00193
00194 Vector< LayoutData<NodeCFIVS>* > m_loCFIVScoarser;
00195 Vector< LayoutData<NodeCFIVS>* > m_hiCFIVScoarser;
00196
00197 private:
00198
00199
00200 void clearMemory();
00201
00202 void setDefaultValues();
00203 };
00204
00205 #endif