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 NODEQUADCFINTERP2_H
00032 #define NODEQUADCFINTERP2_H
00033
00034 #include <cmath>
00035 #include <cstdlib>
00036 #include "BaseFab.H"
00037 #include "NodeFArrayBox.H"
00038 #include "LevelData.H"
00039 #include "NodeCFIVS.H"
00040 #include "NodeBC.H"
00041
00043 class NodeQuadCFInterp2
00132 {
00133 public:
00134
00139
00141
00143 NodeQuadCFInterp2();
00144
00146
00149 NodeQuadCFInterp2(const DisjointBoxLayout& a_grids,
00150 const Box& a_domain,
00151 const LayoutData<NodeCFIVS>* const a_loCFIVS,
00152 const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00153 bool a_interfaceOnly,
00154 int a_interpolationDegree,
00155 int a_ncomp = 1,
00156 bool a_verbose = false);
00157
00159
00162 NodeQuadCFInterp2(const DisjointBoxLayout& a_grids,
00163 const ProblemDomain& a_domain,
00164 const LayoutData<NodeCFIVS>* const a_loCFIVS,
00165 const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00166 bool a_interfaceOnly,
00167 int a_interpolationDegree,
00168 int a_ncomp = 1,
00169 bool a_verbose = false);
00170
00172
00174 ~NodeQuadCFInterp2();
00175
00177
00181 void define(
00182 const DisjointBoxLayout& a_grids,
00184 const ProblemDomain& a_domain,
00186 const LayoutData<NodeCFIVS>* const a_loCFIVS,
00188 const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00190 bool a_interfaceOnly,
00192 int a_interpolationDegree,
00194 int a_ncomp = 1,
00196 bool a_verbose = false);
00197
00199
00203 void define(
00204 const DisjointBoxLayout& a_grids,
00206 const Box& a_domain,
00208 const LayoutData<NodeCFIVS>* const a_loCFIVS,
00210 const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00212 bool a_interfaceOnly,
00214 int a_interpolationDegree,
00216 int a_ncomp = 1,
00218 bool a_verbose = false);
00219
00220
00227
00229
00232 bool isDefined() const;
00233
00240
00242
00244 void setVerbose( bool a_verbose );
00245
00252
00254
00258 void coarseFineInterp(
00259 LevelData<NodeFArrayBox>& a_phi,
00261 const LevelData<NodeFArrayBox>& a_phiCoarse);
00262
00265 protected:
00266
00269 DisjointBoxLayout m_grids;
00270
00273 ProblemDomain m_domain;
00274
00277 Box m_domainCoarseNodes;
00278
00281 DisjointBoxLayout m_coarsenedGrids;
00282
00285 LevelData<NodeFArrayBox> m_coarseCopy;
00286
00289 bool m_interfaceOnly;
00290
00293 int m_interpolationDegree;
00294
00297 int m_ncomp;
00298
00301 bool m_isDefined;
00302
00306 const LayoutData<NodeCFIVS>* m_loCFIVS;
00307
00311 const LayoutData<NodeCFIVS>* m_hiCFIVS;
00312
00313
00314
00315
00316
00317
00320 bool m_verbose;
00321
00322 private:
00323
00324
00325 void clearMemory();
00326
00327 void setDefaultValues();
00328
00332 void interpLine(
00333 FArrayBox& a_fineFab,
00335 const FArrayBox& a_psiFab,
00337 const IntVectSet& a_psiFabNodes,
00339 const IntVect& a_iv,
00341 int a_idirOther);
00342
00343 };
00344
00345 #endif