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

GraphNode.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 _EBGRAPHNODE_H_
00030 #define _EBGRAPHNODE_H_
00031 
00032 #include "REAL.H"
00033 #include "IntVect.H"
00034 #include "VolIndex.H"
00035 #include "FaceIndex.H"
00036 #include "Vector.H"
00037 
00039 
00042 class GraphNodeImplem
00043 {
00044 public:
00046   GraphNodeImplem();
00047   
00049   ~GraphNodeImplem();
00050 
00052   GraphNodeImplem& operator=(const GraphNodeImplem& a_impin);
00053 
00055   GraphNodeImplem(const GraphNodeImplem& a_impin);
00056 
00057   
00059 
00061 
00065   Vector<int>      m_arc[2*SpaceDim];
00066   
00068 
00070   int              m_coarserNode;
00071   
00072   // (for construction) index into node vector.
00073   int m_nodeInd;
00074 
00076   Vector<VolIndex> m_finerNodes;
00077   
00079   int index(int a_idir, Side::LoHiSide a_side) const;
00080 
00082   int linearSize() const;
00083 
00085   void linearOut(void* buffer ) const;
00086 
00088   void linearIn(void* buffer );
00089 
00090 };
00091 
00093 
00100 class GraphNode
00101 {
00102 public:
00104 
00107   GraphNode();
00108 
00110 
00112   ~GraphNode();
00113 
00115   int size() const;
00116 
00118 
00122   void clear();
00124 
00127   bool isRegular() const;
00128 
00130 
00133   bool isCovered() const;
00134   
00136 
00139   bool isIrregular() const;
00140   
00142 
00146   void defineAsRegular();
00147   
00149 
00153   void defineAsCovered();
00154   
00156 
00163   Vector<FaceIndex> 
00164   getFaces(const VolIndex&       a_vof, 
00165            const int&            a_idir, 
00166            const Side::LoHiSide& a_sd,
00167            const Box&            a_domain) const;
00168 
00170 
00174   Vector<VolIndex> 
00175   getVoFs(const IntVect& a_iv) const;
00176   
00178   const GraphNode& operator=(const GraphNode& ebiin);
00179 
00181   GraphNode(const GraphNode& ebiin);
00182 
00184 
00189   Vector<VolIndex> refine(const VolIndex& a_coarVoF) const;
00190 
00192 
00197   VolIndex coarsen(const VolIndex& a_fineVoF) const;
00198 
00200 
00202   void addIrregularNode(const GraphNodeImplem& a_nodein, int cellIndex);
00204 
00206   void addIrregularNode(const GraphNodeImplem& a_nodein);
00207 
00209 
00213   Vector<Vector<VolIndex> >  getVoFSets(const Box& a_box) const;
00214   
00216   int linearSize() const;
00217 
00219   void linearOut(void* buffer ) const;
00220 
00222   void linearIn(void* buffer );
00223 
00225   void setDefaults();
00226 
00228 
00234   Vector<GraphNodeImplem>* m_cellList;
00235 
00236 };
00237 
00238 #endif

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