Main Page   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 "NodeCFIVS.H"
00039 #include "NodeBC.H"
00040 
00042 class NodeQuadCFInterp2
00130 {
00131 public:
00132 
00134 
00135 
00137 
00139   NodeQuadCFInterp2();
00140 
00142 
00145   NodeQuadCFInterp2(const DisjointBoxLayout& a_grids,
00146                     const Box& a_domain,
00147                     const LayoutData<NodeCFIVS>* const a_loCFIVS,
00148                     const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00149                     bool a_interfaceOnly,
00150                     int a_interpolationDegree,
00151                     int a_ncomp = 1);
00152 
00154 
00157   NodeQuadCFInterp2(const DisjointBoxLayout& a_grids,
00158                     const ProblemDomain& a_domain,
00159                     const LayoutData<NodeCFIVS>* const a_loCFIVS,
00160                     const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00161                     bool a_interfaceOnly,
00162                     int a_interpolationDegree,
00163                     int a_ncomp = 1);
00164 
00166 
00168   ~NodeQuadCFInterp2();
00169 
00171 
00184   void define(const DisjointBoxLayout& a_grids,
00185               const Box& a_domain,
00186               const LayoutData<NodeCFIVS>* const a_loCFIVS,
00187               const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00188               bool a_interfaceOnly,
00189               int a_interpolationDegree,
00190               int a_ncomp = 1);
00191 
00192 
00194 
00207   void define(const DisjointBoxLayout& a_grids,
00208               const ProblemDomain& a_domain,
00209               const LayoutData<NodeCFIVS>* const a_loCFIVS,
00210               const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00211               bool a_interfaceOnly,
00212               int a_interpolationDegree,
00213               int a_ncomp = 1);
00214 
00215 
00217               
00219 
00222   bool isDefined() const;
00223 
00225 
00227 
00235   void coarseFineInterp(LevelData<NodeFArrayBox>& a_phi,
00236                         const LevelData<NodeFArrayBox>& a_phiCoarse);
00237 
00238 
00239 protected:
00240 
00241   // the grids at the current level (the finer level)
00242   DisjointBoxLayout m_grids;
00243 
00244   ProblemDomain m_domain;
00245 
00246   Box m_domainCoarseNodes;
00247 
00248   // coarsened version of m_grids
00249   DisjointBoxLayout m_coarsenedGrids;
00250 
00251   // copy of coarse phi, used in CFInterp().
00252   LevelData<NodeFArrayBox> m_coarseCopy;
00253 
00254   // Are you interpolating from interface only?
00255   bool m_interfaceOnly;
00256 
00257   // degree of interpolation:  1 for (bi)linear, 2 for (bi)quadratic
00258   int m_interpolationDegree;
00259 
00260   // number of components
00261   int m_ncomp;
00262 
00263   //has full define function been called?
00264   bool m_isDefined;
00265 
00266   // m_loCFIVS, m_hiCFIVS used for figuring out which nodes lie
00267   // on interface with the next coarser level.
00268   const LayoutData<NodeCFIVS>* m_loCFIVS;
00269   const LayoutData<NodeCFIVS>* m_hiCFIVS;
00270   // LayoutData<NodeCFIVS> m_loCFIVS[SpaceDim];
00271   // LayoutData<NodeCFIVS> m_hiCFIVS[SpaceDim];
00272 
00273   // weights for coarse/fine interpolation
00274   // Tuple<FArrayBox*, SpaceDim> m_wtLo, m_wtHi, m_wtC;
00275 
00276 private:
00277   //internally useful functions
00278 
00279   void clearMemory();
00280 
00281   void setDefaultValues();
00282 
00283   // Interpolate from a_psiFab to a_fineFab at a_iv along a line.
00284   void interpLine(FArrayBox& a_fineFab,
00285                   const FArrayBox& a_psiFab,
00286                   const IntVectSet& a_psiFabNodes,
00287                   const IntVect& a_iv,
00288                   int a_idirOther);
00289 
00290 };
00291 
00292 #endif

Generated on Tue Apr 15 18:34:51 2003 for AMRNodeElliptic by doxygen1.2.16