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

GodunovUtilities.H

Go to the documentation of this file.
00001 /*   _______              __
00002     / ___/ /  ___  __ _  / /  ___
00003    / /__/ _ \/ _ \/  V \/ _ \/ _ \
00004    \___/_//_/\___/_/_/_/_.__/\___/
00005 */
00006 // CHOMBO Copyright (c) 2000-2004, The Regents of the University of
00007 // California, through Lawrence Berkeley National Laboratory (subject to
00008 // receipt of any required approvals from U.S. Dept. of Energy).  All
00009 // rights reserved.
00010 //
00011 // Redistribution and use in source and binary forms, with or without
00012 // modification, are permitted provided that the following conditions are met:
00013 //
00014 // (1) Redistributions of source code must retain the above copyright
00015 // notice, this list of conditions and the following disclaimer.
00016 // (2) Redistributions in binary form must reproduce the above copyright
00017 // notice, this list of conditions and the following disclaimer in the
00018 // documentation and/or other materials provided with the distribution.
00019 // (3) Neither the name of Lawrence Berkeley National Laboratory, U.S.
00020 // Dept. of Energy nor the names of its contributors may be used to endorse
00021 // or promote products derived from this software without specific prior
00022 // written permission.
00023 //
00024 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00025 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
00026 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
00027 // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
00028 // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00029 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00030 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00031 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00032 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00033 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00034 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00035 //
00036 // You are under no obligation whatsoever to provide any bug fixes,
00037 // patches, or upgrades to the features, functionality or performance of
00038 // the source code ("Enhancements") to anyone; however, if you choose to
00039 // make your Enhancements available either publicly, or directly to
00040 // Lawrence Berkeley National Laboratory, without imposing a separate
00041 // written license agreement for such Enhancements, then you hereby grant
00042 // the following license: a non-exclusive, royalty-free perpetual license
00043 // to install, use, modify, prepare derivative works, incorporate into
00044 // other computer software, distribute, and sublicense such Enhancements or
00045 // derivative works thereof, in binary and source code form.
00046 //
00047 // TRADEMARKS. Product and company names mentioned herein may be the
00048 // trademarks of their respective owners.  Any rights not expressly granted
00049 // herein are reserved.
00050 //
00051 
00052 #ifndef _GODUNOVUTILITIES_H_
00053 #define _GODUNOVUTILITIES_H_
00054 
00055 #include "Box.H"
00056 #include "IntVectSet.H"
00057 #include "Vector.H"
00058 #include "REAL.H"
00059 #include "FArrayBox.H"
00060 
00061 #include "GodunovPhysics.H"
00062 
00064 
00071 class GodunovUtilities
00072 {
00073 public:
00075 
00077   GodunovUtilities();
00078 
00080 
00082   ~GodunovUtilities();
00083 
00085 
00087   void define(ProblemDomain& a_domain,
00088               const Real&    a_dx);
00089 
00091 
00095   void computeFlattening(FArrayBox&       a_flattening,
00096                          const FArrayBox& a_W,
00097                          const Interval&  a_velInt,
00098                          const int&       a_presInd,
00099                          const Real&      a_smallPres,
00100                          const int&       a_bulkModulusInd,
00101                          const Box&       a_box);
00102 
00104 
00106   void applyFlattening(FArrayBox&       a_dW,
00107                        const FArrayBox& a_flat,
00108                        const Box&       a_box);
00109 
00111 
00115   void vanLeerSlopes(FArrayBox&       a_dW,
00116                      const FArrayBox& a_W,
00117                      const int&       a_numSlopes,
00118                      const bool&      a_useLimiting,
00119                      const int&       a_dir,
00120                      const Box&       a_box);
00121 
00123 
00127   void fourthOrderSlopes(FArrayBox&       a_dW4,
00128                          const FArrayBox& a_W,
00129                          const FArrayBox& a_dWvL,
00130                          const int&       a_numSlopes,
00131                          const int&       a_dir,
00132                          const Box&       a_box);
00133 
00135 
00137   void oneSidedDifferences(FArrayBox&       a_dWMinus,
00138                            FArrayBox&       a_dWPlus,
00139                            const FArrayBox& a_W,
00140                            const int&       a_dir,
00141                            const Box&       a_box);
00142 
00144 
00146   void slopes(FArrayBox&       a_dWCent,
00147               FArrayBox&       a_dWMinus,
00148               FArrayBox&       a_dWPlus,
00149               const FArrayBox& a_W,
00150               const int&       a_numSlopes,
00151               const int&       a_dir,
00152               const Box&       a_loBox,
00153               const Box&       a_hiBox,
00154               const Box&       a_centerBox,
00155               const Box&       a_entireBox,
00156               const int&       a_hasLo,
00157               const int&       a_hasHi);
00158 
00160 
00166   void slopeLimiter(FArrayBox&       a_dW,
00167                     const FArrayBox& a_dWMinus,
00168                     const FArrayBox& a_dWPlus,
00169                     const int&       a_numSlopes,
00170                     const Box&       a_box);
00171 
00173 
00176   void PLMNormalPred(FArrayBox&       a_dWCharMinus,
00177                      FArrayBox&       a_dWCharPlus,
00178                      const FArrayBox& a_dWChar,
00179                      const FArrayBox& a_Lambda,
00180                      const Real&      a_dtbydx,
00181                      const Box&       a_box);
00182 
00184 
00189   void PPMFaceValues(FArrayBox&            a_WFace,
00190                      const FArrayBox&      a_W,
00191                      const int&            a_numSlopes,
00192                      const bool&           a_useLimiting,
00193                      const int&            a_dir,
00194                      const Box&            a_box,
00195                      const Real&           a_time,
00196                      const GodunovPhysics* a_physPtr = NULL);
00197 
00199 
00205   void PPMLimiter(FArrayBox& a_dWMinus,
00206                   FArrayBox& a_dWPlus,
00207                   const int& a_numSlopes,
00208                   const Box& a_box);
00209 
00211 
00218   void PPMNormalPred(FArrayBox&       a_dWMinus,
00219                      FArrayBox&       a_dWPlus,
00220                      const FArrayBox& a_Lambda,
00221                      const Real&      a_dtbydx,
00222                      const int&       a_numSlopes,
00223                      const Box&       a_box);
00224 
00226 
00231   void divVel(FArrayBox&       a_divVel,
00232               const FArrayBox& a_W,
00233               const Interval&  a_velInt,
00234               const int&       a_dir,
00235               const Box&       a_box);
00236 
00238 
00242   void artificialViscosity(FArrayBox&       a_Flux,
00243                            const FArrayBox& a_U,
00244                            const FArrayBox& a_divVel,
00245                            const Real&      a_scale,
00246                            const int&       a_dir,
00247                            const Box&       a_box);
00248 
00249 
00250 protected:
00251   // Problem domain and grid spacing
00252   ProblemDomain m_domain;
00253   Real          m_dx;
00254 
00255   // Has this object been defined
00256   bool          m_isDefined;
00257 
00258 
00259 private:
00260   // We may allow copying and assignment later.
00261   // Disallowed for all the usual reasons
00262   void operator=(const GodunovUtilities& a_input)
00263   {
00264     MayDay::Error("invalid operator");
00265   }
00266 
00267   // Disallowed for all the usual reasons
00268   GodunovUtilities(const GodunovUtilities& a_input)
00269   {
00270     MayDay::Error("invalid operator");
00271   }
00272 };
00273 
00274 #endif

Generated on Wed Jan 19 17:51:24 2005 for Chombo&INSwithParticles by doxygen1.2.16