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

LDF.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 LDF_H
00029 #define LDF_H
00030 
00031 #ifndef WRAPPER
00032 #include "LevelData.H"
00033 #include "FArrayBox.H"
00034 #include "RefCountedPtr.H"
00035 #endif
00036 
00037 #include "Interval.H"
00038 
00039 class LDF
00040 {
00041 public:
00042   LDF()
00043   {
00044         m_ptr = new LevelData<FArrayBox>();}
00045 
00046   LDF(LevelData<FArrayBox>* newPtr)
00047   {
00048         m_ptr = RefCountedPtr<LevelData<FArrayBox> >(newPtr);}
00049 
00050   void define(const DisjointBoxLayout& dp, int comps,
00051                           const IntVect& ghost) 
00052   {
00053         m_ptr->define(dp, comps, ghost);}
00054 
00055   ~LDF(){;}
00056 
00057   void exchange(const Interval& comps)
00058   {
00059         m_ptr->exchange(comps);}
00060 
00061   void copyTo(const Interval& srcComps, 
00062                           LDF& dest,
00063                           const Interval& destComps) const
00064   {
00065         m_ptr-> copyTo(srcComps, *(dest.m_ptr), destComps);}
00066 
00067   IntVect ghostVect() const {return m_ptr->ghostVect();}
00068 
00069   const DisjointBoxLayout& getBoxes() const {return m_ptr->getBoxes();}
00070 
00071   const DisjointBoxLayout& disjoiuntBoxLayout() const {return m_ptr->getBoxes();}
00072 
00073   Interval interval() const {return m_ptr->interval();}
00074 
00075   DataIterator dataIterator() const {return m_ptr->dataIterator();}
00076 
00077   Box box(const DataIndex& index) const { return m_ptr->box(index);}
00078 
00079   FArrayBox& get(const DataIndex& index) { return m_ptr->operator[](index);}
00080 
00081   const LevelData<FArrayBox>* dataPtr() const {return m_ptr;}
00082 
00083   void operator=(LevelData<FArrayBox>* newPtr){
00084         m_ptr = RefCountedPtr<LevelData<FArrayBox> >(newPtr);}
00085 
00086 private:
00087   RefCountedPtr<LevelData<FArrayBox> > m_ptr;
00088 };
00089 
00090 #endif

Generated on Thu Aug 29 11:05:45 2002 for Chombo&INS by doxygen1.2.16