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

EBISBox.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 _EBISINDEXBOX_H_
00030 #define _EBISINDEXBOX_H_
00031 
00032 #include "REAL.H"
00033 #include "IntVect.H"
00034 #include "IntVectSet.H"
00035 #include "VolIndex.H"
00036 #include "Interval.H"
00037 #include "FaceIndex.H"
00038 #include "Tuple.H"
00039 #include "IntVectSet.H"
00040 #include "RealVect.H"
00041 #include "BaseFab.H"
00042 #include "RefCountedPtr.H"
00043 #include "SPMD.H"
00044 #include "EBGraph.H"
00045 #include "EBData.H"
00046 
00049 
00061 class EBISBox
00062 {
00063 public:
00064 
00066 
00069   EBISBox();
00070 
00072   ~EBISBox();
00073 
00075 
00079   IntVectSet getMultiCells(const Box& a_subbox) const;
00080 
00082 
00086   IntVectSet getIrregIVS(const Box& a_subbox) const;
00087 
00089 
00092   int numVoFs(const IntVect& a_iv) const;
00093 
00095 
00098   Vector<VolIndex> getVoFs(const IntVect& a_iv) const;
00099 
00101 
00112   Vector<VolIndex> getVoFs(const VolIndex& a_vof, 
00113                            const int& a_dir,
00114                            const Side::LoHiSide& a_sd,
00115                            const int& a_steps) const;
00116 
00118 
00121   bool isAllRegular() const;
00122 
00124 
00127   bool isAllCovered() const;
00128 
00130 
00133   bool isRegular(const IntVect& a_iv) const;
00134 
00136 
00139   bool isIrregular(const IntVect& a_iv) const;
00140 
00142 
00145   bool isCovered(const IntVect& a_iv) const;
00146 
00148 
00152   bool isCovered(const Box& a_box) const;
00153 
00155 
00159   bool isRegular(const Box& a_box) const;
00160 
00162 
00166   Vector<FaceIndex> getFaces(const VolIndex& a_vof, 
00167                              const int& a_idir, 
00168                              const Side::LoHiSide& a_sd) const;
00169 
00171   Vector<FaceIndex> getAllFaces(const IntVect& a_iv, 
00172                                 const int& a_idir,
00173                                 const Side::LoHiSide& a_sd) const;
00175 
00185   RealVect centroid(const FaceIndex& facein) const;
00186 
00188 
00192   int numFaces(const VolIndex& a_vof, 
00193                const int& a_idir, 
00194                const Side::LoHiSide& a_sd) const;
00195 
00197 
00200   Real volFrac(const VolIndex& a_vof) const;
00201 
00202 
00204 
00207   bool isConnected(const VolIndex& a_vof1,
00208                    const VolIndex& a_vof2) const;
00209 
00211 
00216   Real areaFrac(const FaceIndex& a_face1) const;
00217 
00219 
00223   Real sumArea(const VolIndex& a_vof, 
00224                const int& a_idir,
00225                const Side::LoHiSide& a_sd) const;
00226 
00228 
00233   RealVect normal(const VolIndex& a_vof) const;
00234 
00236 
00242   RealVect centroid(const VolIndex& a_vof) const;
00243 
00245 
00250   Vector<VolIndex> refine(const VolIndex& a_coarVoF) const;
00251 
00253 
00258   VolIndex coarsen(const VolIndex& a_fineVoF) const;
00259 
00260 
00262 
00264   RealVect bndryCentroid(const VolIndex& a_vof) const;
00265 
00267 
00269   Real bndryArea(const VolIndex& a_vof) const;
00270 
00272   const Box& getRegion() const;
00273 
00275   const Box& getDomain() const;
00276 
00278   void setDomain(const Box& box);
00279 
00280 
00282 
00287   Vector<FaceIndex> refine(const FaceIndex& a_coarFace,const EBISBox& a_fineEBISBox) const;
00288 
00290 
00296   FaceIndex coarsen(const FaceIndex& a_fineFace) const;
00297 
00299 
00302   void setToAllRegular();
00303 
00305 
00308   void setToAllCovered();
00309 
00310 
00312   void
00313   define(const BaseFab<int>&      a_regIrregCovered,
00314          const Vector<IrregNode>& a_irregGraph,
00315          const Box&               a_validRegion,
00316          const Box&               a_domain);
00317 
00319 
00321   const EBGraph& getEBGraph() const;
00322 
00324 
00326   const EBData& getEBData() const;
00327 
00328 
00330   void 
00331   define(const EBGraph&  a_graph,
00332          const EBData&   a_data);
00333 
00335   EBISBox& operator=(const EBISBox& ebiin);
00336   
00338   EBISBox(const EBISBox& ebiin);
00339 
00341   bool operator==(const EBISBox& ebiin);
00342 private:
00343 
00345   EBGraph  m_graph;
00346 
00348   EBData   m_data;
00349 
00350 private:
00351 };
00352 
00353 
00354 #endif

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