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

NodeCoarseAverage.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 // petermc, Tue, Nov 28, 2000
00028 #ifndef NODECOARSEAVERAGE_H
00029 #define NODECOARSEAVERAGE_H
00030 
00031 
00032 #include "REAL.H"
00033 #include "BaseFab.H"
00034 #include "IntVectSet.H"
00035 #include "NodeFArrayBox.H"
00036 #include "LevelData.H"
00037 #include "DisjointBoxLayout.H"
00038 #include "BitSet.H"
00039 
00041 
00042 class NodeCoarseAverage
00049 {
00050 public:
00051 
00056 
00058 
00060   NodeCoarseAverage();
00061 
00063 
00066   NodeCoarseAverage(const DisjointBoxLayout& a_gridsFine,
00067                     const DisjointBoxLayout& a_gridsCoarse,
00068                     int                      a_numcomps,
00069                     int                      a_refRatio,
00070                     const ProblemDomain&     a_domainFine);
00071 
00073 
00076   NodeCoarseAverage(const DisjointBoxLayout& a_gridsFine,
00077                     const DisjointBoxLayout& a_gridsCoarse,
00078                     int                      a_numcomps,
00079                     int                      a_refRatio,
00080                     const Box&               a_domainFine);
00081 
00083 
00086   NodeCoarseAverage(const DisjointBoxLayout& a_gridsCoarse,
00087                     int                      a_numcomps,
00088                     int                      a_refRatio,
00089                     const ProblemDomain&     a_domainFine);
00090   
00092 
00095   NodeCoarseAverage(const DisjointBoxLayout& a_gridsCoarse,
00096                     int                      a_numcomps,
00097                     int                      a_refRatio,
00098                     const Box&               a_domainFine);
00099 
00101 
00103   ~NodeCoarseAverage();
00104 
00106 
00108   void define(
00109               const DisjointBoxLayout& a_gridsFine,
00111               const DisjointBoxLayout& a_gridsCoarse,
00113               int                      a_numcomps,
00115               int                      a_refRatio,
00117               const ProblemDomain&     a_domainFine);
00118 
00120 
00122   void define(
00123               const DisjointBoxLayout& a_gridsFine,
00125               const DisjointBoxLayout& a_gridsCoarse,
00127               int                      a_numcomps,
00129               int                      a_refRatio,
00131               const Box&               a_domainFine);
00132 
00133 
00135 
00138   void define(
00139               const DisjointBoxLayout& a_gridsCoarse,
00141               int                      a_numcomps,
00143               int                      a_refRatio,
00145               const ProblemDomain&     a_domainFine);
00146 
00148 
00151   void define(
00152               const DisjointBoxLayout& a_gridsCoarse,
00154               int                      a_numcomps,
00156               int                      a_refRatio,
00158               const Box&               a_domainFine);
00159 
00166 
00168 
00171   bool isDefined() const;
00172   
00174 
00177   void setVerbose( bool a_verbose );
00178 
00179 
00186 
00188 
00205   //     this method would like to be const, but the work array is changed.
00206   //     this suggests that the work array should not be persistent.
00207   void averageToCoarse(
00208                        LevelData<NodeFArrayBox>& a_coarse,
00210                        LevelData<NodeFArrayBox>& a_fine);
00211 
00214 protected:
00215 
00218   bool is_defined;
00219 
00222   bool m_verbose;
00223 
00226   int m_refRatio;
00227 
00230   int m_numcomps;
00231 
00234   ProblemDomain m_domainCoarse;
00235 
00239   Box m_refbox;
00240 
00243   FArrayBox m_weights;
00244 
00247   bool m_sameGrids;
00248 
00251   DisjointBoxLayout m_coarsenedGrids;
00252 
00255   LevelData<NodeFArrayBox> m_coarsenedFine;
00256 
00259   LayoutData< Vector<IntVectSet> > m_IVSV;
00260 
00263   LayoutData< BitSet > m_IVSVfull;
00264 
00267   LayoutData< Vector<IntVectSet> > m_IVSVsame;
00268 };
00269 
00270 #endif

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