Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

SelfGravityPhysics.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 _SELFGRAVITY_PHYSICS_H_
00029 #define _SELFGRAVITY_PHYSICS_H_
00030 
00031 #include <string>
00032 using std::string;
00033 
00034 #include "GodunovPhysics.H"
00035 #include "FluxBox.H"
00036 #include "LGintegrator.H"
00037 #include "CodeUnits.H"
00038 
00040 class SelfGravityPhysics : public GodunovPhysics
00041 {
00042 public:
00044   SelfGravityPhysics();
00045 
00047   virtual ~SelfGravityPhysics();
00048 
00050   virtual Real getMaxWaveSpeed(const FArrayBox& a_U,
00051                                const Box&       a_box);
00052 
00054   virtual Real getMaxWaveSpeedWithSource(const FArrayBox& a_U,
00055                                          const FArrayBox& a_S,
00056                                          const Real&      a_dx,
00057                                          const Box&       a_box);
00058 
00060   virtual GodunovPhysics* new_godunovPhysics() const;
00061 
00063   virtual Vector<string> stateNames();
00064 
00066   virtual Vector<string> plotNames();
00067 
00069   virtual int numConserved();
00070 
00072 
00076   virtual int numFluxes();
00077 
00078   virtual bool isDefined();
00079 
00081   virtual int numPrimitives();
00082 
00084   virtual int numSlopes();
00085 
00087   virtual void consToPrim(FArrayBox&       a_W,
00088                           const FArrayBox& a_U,
00089                           const Box&       a_box);
00090 
00092   virtual void getFlux(FArrayBox&       a_flux,
00093                        const FArrayBox& a_whalf,
00094                        const int&       a_dir,
00095                        const Box&       a_box);
00096 
00098 
00106   virtual void charAnalysis(FArrayBox&       a_dW,
00107                             const FArrayBox& a_W,
00108                             const int&       a_dir,
00109                             const Box&       a_box);
00110 
00112   virtual void charSynthesis(FArrayBox&       a_dW,
00113                              const FArrayBox& a_W,
00114                              const int&       a_dir,
00115                              const Box&       a_box);
00116 
00118   virtual void charValues(FArrayBox&       a_lambda,
00119                           const FArrayBox& a_W,
00120                           const int&       a_dir,
00121                           const Box&       a_box);
00122 
00124   virtual void incrementSource(FArrayBox&       a_localS,
00125                                const FArrayBox& a_S,
00126                                const FArrayBox& a_W,
00127                                const Real&      a_time,
00128                                const Real&      a_dt,
00129                                const Box&       a_box);
00131   virtual void incrementSource(FArrayBox&       a_S,
00132                                const FArrayBox& a_W,
00133                                const Box&       a_box){;};
00134 
00136   virtual void riemann(FArrayBox&       a_WStar,
00137                        const FArrayBox& a_WLeft,
00138                        const FArrayBox& a_WRight,
00139                        const FArrayBox& a_W,
00140                        const Real&      a_time,
00141                        const int&       a_dir,
00142                        const Box&       a_box);
00143 
00145   virtual void postNormalPred(FArrayBox&       a_dWMinus,
00146                               FArrayBox&       a_dWPlus,
00147                               const FArrayBox& a_W,
00148                               const Real&      a_dt,
00149                               const Real&      a_dx,
00150                               const int&       a_dir,
00151                               const Box&       a_box);
00152 
00154   virtual void quasilinearUpdate(FArrayBox&       a_AdWdx,
00155                                  const FArrayBox& a_wHalf,
00156                                  const FArrayBox& a_W,
00157                                  const Real&      a_scale,
00158                                  const int&       a_dir,
00159                                  const Box&       a_box);
00160 
00162   virtual void synchronize(FArrayBox&       a_U,
00163                            const FArrayBox& a_UOld,
00164                            const Box&       a_box);
00165 
00167   virtual void setupSourceTerm(FArrayBox&       a_S,
00168                                const ForceBox&  a_force,
00169                                const FArrayBox& a_U,
00170                                const Real&      a_time,
00171                                const Real&      a_dt,
00172                                const Box&       a_box);
00173 
00175   virtual Real applySource(FArrayBox&       a_U,
00176                            const FArrayBox& a_force,
00177                            const Real&      a_time,
00178                            const Real&      a_dt,
00179                            const Box&       a_box);
00180 
00182   virtual void forceCorrection(FArrayBox&       a_U,
00183                                const ForceBox&  a_force,
00184                                const Real&      a_time,
00185                                const Real&      a_dt,
00186                                const Box&       a_box);
00187 
00189   virtual void setPressureToEntropy(FArrayBox& a_U,
00190                                     const Box& a_box);
00191 
00193   virtual Interval velocityInterval();
00194 
00196   virtual int pressureIndex();
00197 
00199   virtual int densityIndex();
00200 
00202   virtual int bulkModulusIndex();
00203 
00205   virtual int entropyIndex();
00206 
00208   virtual Real smallPressure();
00209 
00211   virtual void setSmallPressure(const Real& a_smallPressure);
00212 
00214   virtual void setUnits(const CodeUnits& a_units);
00215 
00216 protected:
00217   // Used to limit the absolute value of a "pressure" difference 
00218   Real m_smallPressure;
00219 
00220   // 
00221   CodeUnits m_units;
00222 
00223   // FAB pointing to a source term
00224   FArrayBox* m_source;
00225 
00226 private:
00227   // Disallowed for all the usual reasons
00228   void operator=(const SelfGravityPhysics& a_input)
00229   {
00230     MayDay::Error("invalid operator");
00231   }
00232 
00233   // Disallowed for all the usual reasons
00234   SelfGravityPhysics(const SelfGravityPhysics& a_input)
00235   {
00236     MayDay::Error("invalid operator");
00237   }
00238 };
00239 
00240 
00241 #endif

Generated on Wed Oct 5 13:52:09 2005 for Chombo&AMRSelfGravity by  doxygen 1.4.1