eos_consistent1d.cpp
1 #include "eos_consistent1d.hpp"
2 
3 using namespace std;
4 using namespace interpolations1d;
5 
6 EOSConsistent::EOSConsistent
7 (SpatialReconstruction1D const& naive,
8  EquationOfState const& eos):
9  naive_(naive), eos_(eos) {}
10 
11 Primitive EOSConsistent::operator()
12 (vector<double> const& vp,
13  vector<Primitive> const& hv,
14  double interface_speed,
15  size_t i, int dir, double dt) const
16 {
17  Primitive res = naive_
18  (vp,hv,interface_speed,i,dir,dt);
19  res.Energy = eos_.dp2e(res.Density,res.Pressure);
20  res.SoundSpeed = eos_.dp2c(res.Density,res.Pressure);
21  return res;
22 }
double Density
Density.
double SoundSpeed
Speed of sound.
Base class for spatial reconstruction.
A class that guarantees that a spatial reconstruction would satisfy the equation of state...
Interpolations for one dimensional simulation.
Base class for equation of state.
double Pressure
Pressure.
double Energy
Thermal energy per unit mass, entahalpy in relativistic case.
Primitive hydrodynamic variables.