Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

NodeQuadCFInterp2.H

Go to the documentation of this file.
00001 /*  _______              __
00002    / ___/ /  ___  __ _  / /  ___
00003   / /__/ _ \/ _ \/  ' \/ _ \/ _ \
00004   \___/_//_/\___/_/_/_/_.__/\___/ 
00005 */
00006 //
00007 // This software is copyright (C) by the Lawrence Berkeley
00008 // National Laboratory.  Permission is granted to reproduce
00009 // this software for non-commercial purposes provided that
00010 // this notice is left intact.
00011 // 
00012 // It is acknowledged that the U.S. Government has rights to
00013 // this software under Contract DE-AC03-765F00098 between
00014 // the U.S.  Department of Energy and the University of
00015 // California.
00016 //
00017 // This software is provided as a professional and academic
00018 // contribution for joint exchange. Thus it is experimental,
00019 // is provided ``as is'', with no warranties of any kind
00020 // whatsoever, no support, no promise of updates, or printed
00021 // documentation. By using this software, you acknowledge
00022 // that the Lawrence Berkeley National Laboratory and
00023 // Regents of the University of California shall have no
00024 // liability with respect to the infringement of other
00025 // copyrights by any part of this software.
00026 //
00027 
00028 // NodeQuadCFInterp2.H
00029 // original NodeQuadCFInterp by petermc, Mon, Apr 23, 2001
00030 // petermc, 31 Oct 2001
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   // LayoutData<NodeCFIVS> m_loCFIVS[SpaceDim];
00313   // LayoutData<NodeCFIVS> m_hiCFIVS[SpaceDim];
00314 
00315   // weights for coarse/fine interpolation
00316   // Tuple<FArrayBox*, SpaceDim> m_wtLo, m_wtHi, m_wtC;
00317 
00320   bool m_verbose;
00321 
00322 private:
00323   //internally useful functions
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

Generated on Fri Jul 2 17:53:42 2004 for Chombo by doxygen 1.3.2