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

NodeQuadCFInterp.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 // NodeQuadCFInterp.H
00029 // petermc, Mon, Apr 23, 2001
00030 // petermc, 1 Nov 2001, redid this so that it uses NodeQuadCFInterp2
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   //internally useful functions
00267 
00268   void clearMemory();
00269 
00270   void setDefaultValues();
00271 };
00272 
00273 #endif

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