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

FaceIndex.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, DTG
00028 
00029 #ifndef _FACEINDEX_H_
00030 #define _FACEINDEX_H_
00031 
00032 #include "LoHiSide.H"
00033 #include "VolIndex.H"
00034 #include "SPMD.H"
00035 
00037 
00042 class FaceIndex
00043 {
00044 public:
00046 
00051   FaceIndex(const VolIndex& a_vof1, 
00052             const VolIndex& a_vof2, 
00053             const int& a_direction); 
00054 
00056 
00061   void define(const VolIndex& a_vof1, 
00062               const VolIndex& a_vof2, 
00063               const int& a_direction); 
00064 
00066 
00068   FaceIndex();
00069 
00071 
00073   FaceIndex(const FaceIndex& a_facein);
00074 
00076 
00078   void define(const FaceIndex& a_facein);
00079 
00081 
00083   ~FaceIndex();
00084 
00086 
00088   FaceIndex& operator= (const FaceIndex& a_facein);
00089 
00091 
00093   bool operator== (const FaceIndex& a_facein) const;
00094 
00096 
00098   bool operator!= (const FaceIndex& a_facein) const;
00099 
00101 
00103   const int& direction() const;
00104 
00106 
00108   const bool& isDefined() const;
00109 
00111 
00113   const bool& isBoundary() const;
00114 
00116 
00121   const int& cellIndex(const Side::LoHiSide& a_sd) const;
00122 
00124 
00128   const IntVect& gridIndex(const Side::LoHiSide& a_sd) const;
00129 
00131 
00134   VolIndex getVoF(const Side::LoHiSide& a_sd) const;
00135 
00136   // not user functions
00137   static size_t lo_offset, hi_offset, rest_offset;
00138   static int initializeOffsets();
00139 private:
00140 
00142 
00144   IntVect m_loiv;
00145 
00147 
00149   IntVect m_hiiv;
00150 
00152 
00157   int m_loIndex;
00158 
00160 
00165   int m_hiIndex;
00166 
00168   int m_direction;
00169 
00171 
00174   bool m_isDefined;
00175 
00177 
00181   bool m_isBoundary;
00182 
00183 };
00184 
00185 template < >
00186 int linearSize(const FaceIndex& findex);
00187 
00188 //FaceIndex specialization of linearIn
00189 template < >
00190 void linearIn(FaceIndex& a_outputT, const void* const inBuf); 
00191 
00192 //FaceIndex specialization of linearOut
00193 template < >
00194 void linearOut(void* const a_outBuf, const FaceIndex& a_inputT); 
00195 
00196 
00197 #endif

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