text: //---------------------------------Spheral++----------------------------------//
  // IsothermalEquationOfState -- The isothermal equation of state:  P = cs^2 rho
  //
  // Created by JMO, Sat Nov  3 15:44:16 PDT 2007
  //----------------------------------------------------------------------------//
  #ifndef __Spheral_IsothermalEquationOfState_hh__
  #define __Spheral_IsothermalEquationOfState_hh__
  
  #include "EquationOfState.hh"
  
  namespace Spheral {
  
  template<typename Dimension>
  class IsothermalEquationOfState: public EquationOfState<Dimension> {
  
  public:
    //--------------------------- Public Interface ---------------------------//
    typedef typename Dimension::Scalar Scalar;
    typedef typename Dimension::Vector Vector;
    typedef typename Dimension::Tensor Tensor;
    typedef typename Dimension::SymTensor SymTensor;
  
    // Constructors, destructors.
    IsothermalEquationOfState(const double K,
                              const double mu,
                              const PhysicalConstants& constants,
                              const double minimumPressure,
                              const double maximumPressure,
                              const MaterialPressureMinType minPressureType);
    ~IsothermalEquationOfState();
  
    // We require any equation of state to define the following properties.
    virtual void setPressure(Field<Dimension, Scalar>& Pressure,
                             const Field<Dimension, Scalar>& massDensity,
                             const Field<Dimension, Scalar>& specificThermalEnergy) const;
  
    virtual void setTemperature(Field<Dimension, Scalar>& temperature,
                                const Field<Dimension, Scalar>& massDensity,
                                const Field<Dimension, Scalar>& specificThermalEnergy) const;
  
    virtual void setSpecificThermalEnergy(Field<Dimension, Scalar>& specificThermalEnergy,
                                          const Field<Dimension, Scalar>& massDensity,
                                          const Field<Dimension, Scalar>& temperature) const;
  
    virtual void setSpecificHeat(Field<Dimension, Scalar>& specificHeat,
                                 const Field<Dimension, Scalar>& massDensity,
                                 const Field<Dimension, Scalar>& temperature) const;
  
    virtual void setSoundSpeed(Field<Dimension, Scalar>& soundSpeed,
                               const Field<Dimension, Scalar>& massDensity,
                               const Field<Dimension, Scalar>& specificThermalEnergy) const;
  
    virtual void setGammaField(Field<Dimension, Scalar>& gamma,
                               const Field<Dimension, Scalar>& massDensity,
                               const Field<Dimension, Scalar>& specificThermalEnergy) const;
  
    virtual void setBulkModulus(Field<Dimension, Scalar>& bulkModulus,
                               const Field<Dimension, Scalar>& massDensity,
                               const Field<Dimension, Scalar>& specificThermalEnergy) const;
  
    virtual void setEntropy(Field<Dimension, Scalar>& entropy,
                            const Field<Dimension, Scalar>& massDensity,
                            const Field<Dimension, Scalar>& specificThermalEnergy) const;
  
    // We also want the equivalent functions for individual calculations.
    Scalar pressure(const Scalar massDensity,
                    const Scalar specificThermalEnergy) const;
  
    Scalar temperature(const Scalar massDensity,
                       const Scalar specificThermalEnergy) const;
  
    Scalar specificThermalEnergy(const Scalar massDensity,
                                 const Scalar temperature) const;
  
    Scalar specificHeat(const Scalar massDensity,
                        const Scalar temperature) const;
  
    Scalar soundSpeed(const Scalar massDensity,
                      const Scalar specificThermalEnergy) const;
  
    Scalar gamma(const Scalar massDensity,
                 const Scalar specificThermalEnergy) const;
  
    Scalar bulkModulus(const Scalar massDensity,
                       const Scalar specificThermalEnergy) const;
  
    Scalar entropy(const Scalar massDensity,
                   const Scalar specificThermalEnergy) const;
  
    // Access the member data.
    Scalar K() const;
    virtual Scalar molecularWeight() const;
    
    // If requested, the user can specify an external pressure to be applied
    // in the pressure calculation.
    Scalar externalPressure() const;
    void setExternalPressure(Scalar P);
  
    virtual bool valid() const;
  
  private:
    //--------------------------- Private Interface ---------------------------//
    Scalar mK;
    Scalar mCs;
    Scalar mMolecularWeight;
    Scalar mExternalPressure;
  
    // No default constructor, copying, or assignment.
    IsothermalEquationOfState();
    IsothermalEquationOfState(const IsothermalEquationOfState&);
    IsothermalEquationOfState& operator=(const IsothermalEquationOfState&);
  
    using EquationOfState<Dimension>::mConstants;
  };
  
  }
  
  #include "IsothermalEquationOfStateInline.hh"
  
  #else
  
  // Forward declaration.
  namespace Spheral {
    template<typename Dimension> class IsothermalEquationOfState;
  }
  
  #endif
  