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

EBArith.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 _EB_ARITH_H_
00029 #define _EB_ARITH_H_
00030 
00031 #include "EBCellFAB.H"
00032 #include "EBISBox.H"
00033 #include "EBISLayout.H"
00034 #include "EBFaceFAB.H"
00035 #include "BoxLayout.H"
00036 #include "BoxLayoutData.H"
00037 #include "Stencils.H"
00038 #include "LayoutData.H"
00039 #include "Tuple.H"
00040 #include "EBFluxFAB.H"
00041 #include "EBCellFAB.H"
00043 
00051 class EBNormType
00052 {
00053 public:
00055 
00063   enum  NormMode{OverOnlyRegular=0, OverOnlyIrregular, OverBoth};
00064 };
00066 
00070 class EBArith
00071 {
00072 public:
00074 
00078   static
00079   bool
00080   getAdjacentFace(FaceIndex& a_adjacentFace,
00081                   const FaceIndex& a_face,
00082                   const EBISBox& a_ebisBox, 
00083                   const Box& a_domain,
00084                   const int& a_idir,
00085                   const Side::LoHiSide& a_side);
00086 
00087 
00088 
00090 
00094   static
00095   void computeGradFluxStencil(VoFStencil& a_thisStencil,
00096                               const FaceIndex& a_thisFace,
00097                               const EBISBox& a_ebisBox,
00098                               const Box& a_domain,
00099                               const int& a_dir);
00100 
00102 
00106   static
00107   void computeInterpStencil(FaceStencil& a_thisStencil,
00108                             const FaceIndex& a_thisFace,
00109                             const EBISBox& a_ebisBox,
00110                             const Box& a_domain,
00111                             const int& a_dir);
00112 
00114 
00126   static
00127   void
00128   volWeightedSum(Real& norm, Real& volume,
00129                  const EBCellFAB& a_src, 
00130                  const Box& a_region,
00131                  const EBISBox& a_ebisBox,
00132                  const int& comp,
00133                  const int& p,
00134                  EBNormType::NormMode = EBNormType::OverBoth);
00135 
00136 
00138 
00150   static
00151   Real 
00152   norm(const BoxLayoutData<EBCellFAB >& a_dataOne, 
00153        const BoxLayout& a_layout, 
00154        const EBISLayout& a_ebisl, 
00155        const int& comp,
00156        const int&  p,
00157        EBNormType::NormMode = EBNormType::OverBoth);
00158 
00159   //testing interface
00160   static
00161   Real 
00162   norm(Real& volume, const BoxLayoutData<EBCellFAB >& a_dataOne, 
00163        const BoxLayout& a_layout, 
00164        const EBISLayout& a_ebisl, 
00165        const int& comp,
00166        const int&  p,
00167        EBNormType::NormMode = EBNormType::OverBoth);
00168 
00170 
00182   static
00183   Real 
00184   norm(const EBCellFAB& a_dataOne, 
00185        const Box&       a_grid, 
00186        const EBISBox&   a_ebisl, 
00187        const int&       a_comp,
00188        const int&       a_p,
00189        EBNormType::NormMode = EBNormType::OverBoth);
00190 
00191 
00192   static
00193   Real 
00194   norm(Real& volume, const EBCellFAB& a_dataOne, 
00195        const Box&       a_grid, 
00196        const EBISBox&   a_ebisl, 
00197        const int&       a_comp,
00198        const int&       a_p,
00199        EBNormType::NormMode = EBNormType::OverBoth);
00200 
00202 
00213   static
00214   void
00215   volWeightedSum(Real& sum, Real& volume, 
00216                  const BoxLayoutData<EBCellFAB >& a_dataOne, 
00217                  const BoxLayout& a_layout, 
00218                  const EBISLayout& a_ebisl, 
00219                  const int& comp,
00220                  const int& p,
00221                  EBNormType::NormMode = EBNormType::OverBoth);
00222 
00224 
00227   static
00228   Real 
00229   dotProduct(const BoxLayoutData<EBCellFAB >& a_dataOne, 
00230              const BoxLayoutData<EBCellFAB >& a_dataTwo,
00231              const BoxLayout& a_layout, 
00232              const EBISLayout& a_ebisl, 
00233              const int& a_comp);
00234 
00236 
00239   static
00240   Real 
00241   dotProduct(const EBCellFAB& a_dataOne, 
00242              const EBCellFAB& a_dataTwo,
00243              const Box& a_layout, 
00244              const EBISBox& a_ebisBox,
00245              const int& a_comp);
00246 
00247 
00249 
00255   static
00256   bool
00257   monotonePathVoFToCellVoF(VolIndex& a_vof2,
00258                            const VolIndex& a_vof1,
00259                            const IntVect& a_cell2,
00260                            const EBISBox& a_ebisBox);
00261 
00262   static
00263   void
00264   getAllVoFsInMonotonePath(Vector<VolIndex>& a_vofs,
00265                            const IntVect&    a_timesMoved,
00266                            const IntVect&    a_pathSign,
00267                            const VolIndex&   a_vof,
00268                            const EBISBox&    a_ebisBox,
00269                            const int&        a_redistRad);
00270   
00271 
00272 private:
00273 
00274 };
00275 
00276 #endif

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