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

EBCoarseAverage.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 // dtgraves fri aug 17, 2001
00028 
00029 #ifndef _EB_COARSE_AVERAGE_H_
00030 #define _EB_COARSE_AVERAGE_H_
00031 
00032 #include "REAL.H"
00033 #include "FArrayBox.H"
00034 #include "LevelData.H"
00035 #include "DisjointBoxLayout.H"
00036 #include "EBISLayout.H"
00037 #include "EBCellFAB.H"
00038 #include "Interval.H"
00039 
00041 
00047 class EBCoarseAverage
00048 {
00049 public:
00051 
00054   EBCoarseAverage();
00055 
00057   ~EBCoarseAverage();
00058 
00060 
00073   EBCoarseAverage(const DisjointBoxLayout& dblFine,
00074                   const DisjointBoxLayout& dblCoar,
00075                   const EBISLayout& ebislFine,
00076                   const EBISLayout& ebislCoar,
00077                   const Box& domainCoar,
00078                   const int& nref,
00079                   const int& nvar);
00080 
00082 
00094   void define(const DisjointBoxLayout& dblFine,
00095               const DisjointBoxLayout& dblCoar,
00096               const EBISLayout& ebislFine,
00097               const EBISLayout& ebislCoar,
00098               const Box& domainCoar,
00099               const int& nref,
00100               const int& nvar);
00101 
00103 
00107   bool isDefined() const;
00108 
00110 
00130   void
00131   average(LevelData<EBCellFAB>& coarData,
00132           const LevelData<EBCellFAB>& fineData,
00133           const Interval& variables);          
00134 
00135 protected:
00136   void
00137   averageFAB(EBCellFAB& a_coar,
00138              const EBCellFAB& a_fine,
00139              const DataIndex& a_datInd,
00140              const Interval& variables) const;
00141 
00142 
00143   void 
00144   setDefaultValues();
00145 
00146   bool m_isDefined;
00147 
00148   DisjointBoxLayout m_coarGrids;
00149   DisjointBoxLayout m_fineGrids;
00150   DisjointBoxLayout m_coarsenedFineGrids;
00151   Box m_coarDomain;
00152 
00153   EBISLayout m_coarEBISL;
00154   EBISLayout m_fineEBISL;
00155 
00156   EBISLayout m_coarsenedFineEBISL;
00157 
00158   int m_refRat;
00159   int m_nComp;
00160   LevelData<EBCellFAB> m_coarsenedFineData;
00161 
00162 private:
00163     //disallowed for all the usual reasons
00164   EBCoarseAverage(const EBCoarseAverage& ebcin)
00165   {
00166     MayDay::Error("ebca 2 invalid operator");
00167   }
00168   void operator=(const EBCoarseAverage& fabin)
00169   {
00170     MayDay::Error("ebca 3 invalid operator");
00171   }
00172 
00173 };
00174 
00175 #endif

Generated on Wed Apr 16 14:31:04 2003 for EBChombo by doxygen1.2.16