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

LevelFluxRegister.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 #ifndef _LEVELFLUXREGISTER_H_
00029 #define _LEVELFLUXREGISTER_H_
00030 #include "REAL.H"
00031 #include "Vector.H"
00032 #include "FArrayBox.H"
00033 #include "IntVectSet.H"
00034 #include "CFStencil.H"
00035 #include "LoHiSide.H"
00036 #include "LevelData.H"
00037 #include "LayoutData.H"
00038 #include "ProblemDomain.H"
00039 
00040 
00042 
00051 class LevelFluxRegister
00052 {
00053 public:
00054 
00056 
00059   LevelFluxRegister();
00060 
00062 
00067   LevelFluxRegister(
00068                     const DisjointBoxLayout& a_dbl,
00069                     const DisjointBoxLayout& a_dblCoarse,
00070                     const Box& a_dProblem,
00071                     int a_nRefine,
00072                     int a_nComp);
00073 
00075 
00080   LevelFluxRegister(
00081                     const DisjointBoxLayout& a_dbl,
00082                     const DisjointBoxLayout& a_dblCoarse,
00083                     const ProblemDomain& a_dProblem,
00084                     int a_nRefine,
00085                     int a_nComp);
00086 
00088   ~LevelFluxRegister();
00089 
00091 
00096   void define(
00097               const DisjointBoxLayout& a_dbl,
00098               const DisjointBoxLayout& a_dblCoarse,
00099               const Box& a_dProblem,
00100               int a_nRefine,
00101               int a_nComp);
00102 
00103 
00105 
00110   void define(
00111               const DisjointBoxLayout& a_dbl,
00112               const DisjointBoxLayout& a_dblCoarse,
00113               const ProblemDomain& a_dProblem,
00114               int a_nRefine,
00115               int a_nComp);
00116 
00118 
00124   void
00125   undefine();
00126 
00128 
00131   void setToZero(); 
00132 
00134 
00142   void incrementCoarse(
00143                        FArrayBox& a_coarseFlux,
00144                        Real a_scale,
00145                        const DataIndex& a_coarseDataIndex,
00146                        const Interval& a_srcInterval,
00147                        const Interval& a_dstInterval,
00148                        int a_dir);
00149 
00151 
00154   void incrementCoarse(
00155                        FArrayBox& a_coarseFlux,
00156                        Real a_scale,
00157                        const DataIndex& a_coarseDataIndex,
00158                        const Interval& a_srcInterval,
00159                        const Interval& a_dstInterval,
00160                        int a_dir,
00161                        Side::LoHiSide a_sd);
00162 
00164 
00170   void incrementFine(
00171                      FArrayBox& a_fineFlux,
00172                      Real a_scale,
00173                      const DataIndex& a_fineDataIndex,
00174                      const Interval& a_srcInterval,
00175                      const Interval& a_dstInterval,
00176                      int a_dir,
00177                      Side::LoHiSide a_sd);
00178 
00180 
00188   void reflux(
00189               LevelData<FArrayBox>& a_uCoarse,
00190               Real a_scale);
00191 
00193 
00198   void reflux(
00199               LevelData<FArrayBox>& a_uCoarse,
00200               const Interval& a_coarse_interval,
00201               const Interval& a_flux_interval,
00202               Real a_scale);
00203 
00205 
00208   bool isDefined() const;
00209 
00210 protected:
00211 
00212   // both of these are defined in the coarse index space,
00213   // but, m_coarFlux uses the coarse grid layout, and
00214   // m_fineFlux uses the fine grid layout.
00215   LevelData<FArrayBox> m_coarFlux;
00216   LevelData<FArrayBox> m_fineFlux;
00217 
00218   //LayoutData<IntVectSet> m_coarseLocations[CH_SPACEDIM*2];
00219   LayoutData< Vector<Box> > m_coarseLocations[CH_SPACEDIM*2];
00220 
00221   ProblemDomain m_domain;
00222 
00223   bool m_isDefined;
00224 
00225   int m_nRefine;
00226 
00227   Copier m_reverseCopier;
00228 
00229 private:
00230 
00232   void operator= (const LevelFluxRegister&);
00234   LevelFluxRegister(const LevelFluxRegister&);
00235 };
00236 #endif

Generated on Wed Jun 2 13:53:33 2004 for Chombo&INSwithParticles by doxygen 1.3.2