Class eos_tov_vectors (o2scl)

O2scl : Class List

template<class vec_t>
class eos_tov_vectors : public o2scl::eos_tov

Provide an EOS for TOV solvers based on interpolation of user-supplied vectors.

EOS storage

vec_t ed_vec

Energy densities from full EOS.

vec_t pr_vec

Pressures from full EOS.

vec_t nb_vec

Baryon densities from full EOS.

Interpolators

interp_vec<vec_t> pe_int
interp_vec<vec_t> pn_int
interp_vec<vec_t> ep_int
interp_vec<vec_t> en_int
interp_vec<vec_t> np_int
interp_vec<vec_t> ne_int

Basic EOS functions

inline virtual double ed_from_pr(double pr)

From the pressure, return the energy density.

inline virtual double pr_from_ed(double ed)

From the energy density, return the pressure.

inline virtual double nb_from_ed(double ed)

From the energy density, return the baryon density.

inline virtual double nb_from_pr(double pr)

From the pressure, return the baryon density.

inline virtual double ed_from_nb(double nb)

From the baryon density, return the energy density.

inline virtual double pr_from_nb(double nb)

From the baryon density, return the pressure.

inline virtual void ed_nb_from_pr(double pr, double &ed, double &nb)

Given the pressure, produce the energy and number densities.

The arguments pr and ed should always be in \( M_{\odot}/\mathrm{km}^3 \) . The argument for nb should be in \( \mathrm{fm}^{-3} \) .

If baryon_column is false, then nb is unmodified.

Public Functions

inline void read_vectors_swap(size_t user_n, vec_t &user_ed, vec_t &user_pr, vec_t &user_nb)

Read the EOS from a set of equal length vectors for energy density, pressure, and baryon density.

In this version, the user-specified vectors are swapped with internal storage.

inline void read_vectors_swap(size_t user_n, vec_t &user_ed, vec_t &user_pr)

Read the EOS from a pair of equal length vectors for energy density and pressure.

In this version, the user-specified vectors are swapped with internal storage.

inline void read_vectors_copy(size_t user_n, vec_t &user_ed, vec_t &user_pr, vec_t &user_nb)

Read the EOS from a set of equal length vectors for energy density, pressure, and baryon density.

In this version, the user-specified vectors are copied to internal storage.

inline void read_vectors_copy(size_t user_n, vec_t &user_ed, vec_t &user_pr)

Read the EOS from a pair of equal length vectors for energy density and pressure.

In this version, the user-specified vectors are copied to internal storage.

Private Functions

inline void reset_interp(size_t n)

Internal function to reset the interpolation.

inline void reset_interp_nb(size_t n)

Internal function to reset the interpolation with baryon density.