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

BaseEBFaceFAB.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 //  ANAG, LBNL
00028 
00029 #ifndef _BaseEBFaceFAB_H_
00030 #define _BaseEBFaceFAB_H_
00031 
00032 #include <cmath>
00033 #include <cstdlib>
00034 #include <cassert>
00035 #include "Vector.H"
00036 #include "BaseIFFAB.H"
00037 #include "IntVectSet.H"
00038 #include "BaseFab.H"
00039 #include "EBISBox.H"
00040 
00042 
00057 template <class T>
00058 class BaseEBFaceFAB
00059 {
00060 public:
00062   BaseEBFaceFAB();
00063 
00064 
00066 
00070   BaseEBFaceFAB(const EBISBox& a_ebisBox,
00071                 const Box& a_region, 
00072                 int a_iDir, int a_nVar);
00073 
00074 
00076 
00080   void 
00081   define(const EBISBox& a_ebisBox, 
00082          const Box& a_region, 
00083          int a_iDir, int a_nVar);
00084 
00085 
00087   virtual ~BaseEBFaceFAB();
00088 
00089 
00091   void  clear();
00092 
00094   void setVal(T value);
00095 
00096 
00098   bool isDefined() const;
00099 
00100 
00102   int nComp() const ;
00103 
00105   const BaseIFFAB<T>&   getMultiValuedFAB() const;
00106 
00108   BaseIFFAB<T>&  getMultiValuedFAB() ;
00109 
00111   const BaseFab<T>& getSingleValuedFAB() const;
00112 
00114   const IntVectSet& getMultiCells() const;
00115 
00117   BaseFab<T>&   getSingleValuedFAB() ;
00118 
00120   int  direction() const;
00121 
00123 
00126   const Box& getRegion() const ;
00127 
00129 
00132   const Box& getCellRegion() const ;
00133 
00135   T& operator() (const FaceIndex& a_facein, int  a_nVarLoc);
00136 
00138   const T&
00139   operator() (const FaceIndex& a_facein, int  a_nVarLoc) const;
00140 
00142   static bool preAllocatable(){ return true;}
00143 
00145 
00149   void copy(const Box& RegionFrom, 
00150             const Interval& destInt, 
00151             const Box& RegionTo,
00152             const BaseEBFaceFAB<T>& source, 
00153             const Interval& srcInt);
00154 
00156   BaseEBFaceFAB(const Box& a_region, int a_nVar)
00157   {
00158     MayDay::Error("invalid constructor called for baseebfacefab");
00159   }
00160 
00162   const EBISBox& getEBISBox() const;
00163     
00164 protected:
00166   BaseIFFAB<T> m_irrFAB;
00167 
00169   BaseFab<T> m_regFAB;
00170 
00172   int m_nComp;
00173 
00174   //direction of the faces in the BaseEBFaceFAB
00175   int m_iDir;
00176 
00178   Box m_regionFace;
00179 
00181   Box m_region;
00182 
00184   bool m_isDefined;
00185 
00186   EBISBox m_ebisBox;
00187 private:
00188   void
00189   setDefaultValues();
00190   //disallowed for performance reasons
00191   void operator= (const BaseEBFaceFAB<T>& ebcin)
00192   {
00193     MayDay::Error("BaseEBFaceFAB<T>::operator=  not defined");
00194   }
00195   BaseEBFaceFAB (const BaseEBFaceFAB<T>& ebcin)
00196   { 
00197     MayDay::Error("BaseEBFaceFAB<T> copy constructor  not defined");
00198   }
00199 };
00200 
00201 #include "BaseEBFaceFABI.H"
00202 
00203 #endif
00204 

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