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 "LevelData.H"
00040 #include "NodeBC.H"
00041 #include "NodeQuadCFInterp2.H"
00042
00044 class NodeQuadCFInterp
00048 {
00049 public:
00050
00055
00057
00059 NodeQuadCFInterp();
00060
00062
00065 NodeQuadCFInterp(const DisjointBoxLayout& a_grids,
00066 Real a_dx,
00067 const ProblemDomain& a_domain,
00068 const LayoutData<NodeCFIVS>* const a_loCFIVS,
00069 const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00070 int a_refToCoarse,
00071 int a_interpolationDegree = 2,
00072 int a_ncomp = 1,
00073 bool a_verbose = false);
00074
00076
00079 NodeQuadCFInterp(const DisjointBoxLayout& a_grids,
00080 Real a_dx,
00081 const Box& a_domain,
00082 const LayoutData<NodeCFIVS>* const a_loCFIVS,
00083 const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00084 int a_refToCoarse,
00085 int a_interpolationDegree = 2,
00086 int a_ncomp = 1,
00087 bool a_verbose = false);
00088
00090
00092 ~NodeQuadCFInterp();
00093
00095
00099 void define(
00100 const DisjointBoxLayout& a_grids,
00102 Real a_dx,
00104 const ProblemDomain& a_domain,
00106 const LayoutData<NodeCFIVS>* const a_loCFIVS,
00108 const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00110 int a_refToCoarse,
00112 int a_interpolationDegree = 2,
00114 int a_ncomp = 1,
00116 bool a_verbose = false);
00117
00119
00123 void define(
00124 const DisjointBoxLayout& a_grids,
00126 Real a_dx,
00128 const Box& a_domain,
00130 const LayoutData<NodeCFIVS>* const a_loCFIVS,
00132 const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00134 int a_refToCoarse,
00136 int a_interpolationDegree = 2,
00138 int a_ncomp = 1,
00140 bool a_verbose = false);
00141
00143
00148 void setDomainNodeBC(const DomainNodeBC& a_dombcIn);
00149
00150
00157
00159
00162 bool isDefined() const;
00163
00170
00172
00174 void setVerbose( bool a_verbose );
00175
00182
00184
00188 void coarseFineInterp(
00189 LevelData<NodeFArrayBox>& a_phiFine,
00191 const LevelData<NodeFArrayBox>& a_phiCoarse,
00193 bool a_inhomogeneous);
00194
00197 protected:
00198
00201 DisjointBoxLayout m_grids;
00202
00205 int m_ncomp;
00206
00209 int m_refToCoarse;
00210
00214 int m_coarsenings;
00215
00218 bool m_isDefined;
00219
00222 bool m_isBCDefined;
00223
00226 Real m_dx;
00227
00230 Real m_dxPenultimate;
00231
00234 ProblemDomain m_domainPenultimate;
00235
00238 DomainNodeBC m_dombc;
00239
00243 Vector< LevelData<NodeFArrayBox>* > m_inter;
00244
00249 Vector< NodeQuadCFInterp2* > m_qcfi2;
00250
00254 Vector< LayoutData<NodeCFIVS>* > m_loCFIVScoarser;
00255
00259 Vector< LayoutData<NodeCFIVS>* > m_hiCFIVScoarser;
00260
00263 bool m_verbose ;
00264
00265 private:
00266
00267
00268 void clearMemory();
00269
00270 void setDefaultValues();
00271 };
00272
00273 #endif