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 // petermc, Mon, Apr 23, 2001
00029 // petermc, 31 Oct 2001
00030 #ifndef NODEQUADCFINTERP2_H
00031 #define NODEQUADCFINTERP2_H
00032 
00033 #include <cmath>
00034 #include <cstdlib>
00035 #include "BaseFab.H"
00036 #include "NodeFArrayBox.H"
00037 #include "NodeCFIVS.H"
00038 #include "NodeBC.H"
00039 
00041 class NodeQuadCFInterp2
00272 {
00273 public:
00274 
00276 
00277 
00279 
00281   NodeQuadCFInterp2();
00282 
00283   NodeQuadCFInterp2(const DisjointBoxLayout& a_grids,
00284                     Real a_dx,
00285                     const ProblemDomain& a_domain,
00286                     const LayoutData<NodeCFIVS>* const a_loCFIVS,
00287                     const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00288                     bool a_interfaceOnly,
00289                     int a_interpolationDegree,
00290                     int a_ncomp = 1);
00291 
00293 
00295   ~NodeQuadCFInterp2();
00296 
00298 
00312   void define(const DisjointBoxLayout& a_grids,
00313               Real a_dx,
00314               const ProblemDomain& a_domain,
00315               const LayoutData<NodeCFIVS>* const a_loCFIVS,
00316               const LayoutData<NodeCFIVS>* const a_hiCFIVS,
00317               bool a_interfaceOnly,
00318               int a_interpolationDegree,
00319               int a_ncomp = 1);
00320 
00322               
00324 
00327   bool isDefined() const;
00328 
00330 
00332 
00340   void coarseFineInterp(LevelData<NodeFArrayBox>& a_phiFine,
00341                         const LevelData<NodeFArrayBox>& a_phiCoarse);
00342 
00343 
00344 protected:
00345 
00346   // the grids at the current level (the finer level)
00347   DisjointBoxLayout m_grids;
00348 
00349   ProblemDomain m_domain;
00350 
00351   // nodes of m_grids
00352   BoxLayout m_gridsNodes;
00353 
00354   // nodes of grids at the coarser level
00355   BoxLayout m_coarsenedGridsNodes;
00356 
00357   // all nodes at the coarser level
00358   Box m_domainCoarseNodes;
00359 
00360   // copy of coarse phi, used in CFInterp().
00361   LevelData<NodeFArrayBox> m_coarseCopy;
00362 
00363   // Are you interpolating from interface only?
00364   bool m_interfaceOnly;
00365 
00366   // degree of interpolation:  1 for (bi)linear, 2 for (bi)quadratic
00367   int m_interpolationDegree;
00368 
00369   // number of components
00370   int m_ncomp;
00371 
00372   // mesh spacing at this level
00373   Real m_dx;
00374 
00375   // has full define function been called?
00376   bool m_isDefined;
00377 
00378   // m_loCFIVS, m_hiCFIVS used for figuring out which nodes lie
00379   // on interface with the next coarser level.
00380   const LayoutData<NodeCFIVS>* m_loCFIVS;
00381   const LayoutData<NodeCFIVS>* m_hiCFIVS;
00382   // LayoutData<NodeCFIVS> m_loCFIVS[SpaceDim];
00383   // LayoutData<NodeCFIVS> m_hiCFIVS[SpaceDim];
00384 
00385   // weights for coarse/fine interpolation
00386   // Tuple<FArrayBox*, SpaceDim> m_wtLo, m_wtHi, m_wtC;
00387 
00388   BoxLayoutData< BaseFab<int> > m_mask;
00389 
00390   BoxLayoutData< BaseFab<int> > m_maskCoarse;
00391 
00392 private:
00393   //internally useful functions
00394 
00395   void getMask();
00396 
00397   void clearMemory();
00398 
00399   void setDefaultValues();
00400 
00401   void interpLine(FArrayBox& a_fineFab,
00402                   const FArrayBox& a_psiFab,
00403                   const IntVectSet& a_psiFabNodes,
00404                   const BaseFab<int>& a_maskFab,
00405                   const BaseFab<int>& a_maskCoarseFab,
00406                   const IntVect& a_iv,
00407                   int a_idirOther);
00408 };
00409 
00410 #endif

Generated on Tue Apr 15 18:31:55 2003 for AMRNodeElliptic by doxygen1.2.16