Public Member Functions | Private Member Functions | List of all members
o2scl::eos_tov_vectors< vec_t > Class Template Reference

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

#include <eos_tov.h>

Inheritance diagram for o2scl::eos_tov_vectors< vec_t >:
o2scl::eos_tov

Public Member Functions

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. More...
 
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. More...
 
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. More...
 
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. More...
 
Basic EOS functions
virtual double ed_from_pr (double pr)
 From the pressure, return the energy density.
 
virtual double pr_from_ed (double ed)
 From the energy density, return the pressure.
 
virtual double nb_from_ed (double ed)
 From the energy density, return the baryon density.
 
virtual double nb_from_pr (double pr)
 From the pressure, return the baryon density.
 
virtual double ed_from_nb (double nb)
 From the baryon density, return the energy density.
 
virtual double pr_from_nb (double nb)
 From the baryon density, return the pressure.
 
virtual void ed_nb_from_pr (double pr, double &ed, double &nb)
 Given the pressure, produce the energy and number densities. More...
 
- Public Member Functions inherited from o2scl::eos_tov
bool has_baryons ()
 Return true if a baryon density is available.
 
void check_nb (double &avg_abs_dev, double &max_abs_dev)
 Check that the baryon density is consistent with the $ P(\varepsilon) $.
 

Protected Attributes

EOS storage
vec_t ed
 Energy densities from full EOS.
 
vec_t pr
 Pressures from full EOS.
 
vec_t nb
 Baryon densities from full EOS.
 
Interpolators
interp< vec_t > pe_int
 
interp< vec_t > pn_int
 
interp< vec_t > ep_int
 
interp< vec_t > en_int
 
interp< vec_t > np_int
 
interp< vec_t > ne_int
 
- Protected Attributes inherited from o2scl::eos_tov
bool baryon_column
 Set to true if the baryon density is provided in the EOS (default false)
 

Private Member Functions

void reset_interp (size_t n)
 Desc.
 
void reset_interp_nb (size_t n)
 Desc.
 

Additional Inherited Members

- Public Attributes inherited from o2scl::eos_tov
int verbose
 Control for output (default 1)
 

Detailed Description

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

Definition at line 444 of file eos_tov.h.

Member Function Documentation

◆ ed_nb_from_pr()

template<class vec_t >
virtual void o2scl::eos_tov_vectors< vec_t >::ed_nb_from_pr ( double  pr,
double &  ed,
double &  nb 
)
inlinevirtual

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.

Implements o2scl::eos_tov.

Definition at line 578 of file eos_tov.h.

◆ read_vectors_copy() [1/2]

template<class vec_t >
void o2scl::eos_tov_vectors< vec_t >::read_vectors_copy ( size_t  user_n,
vec_t &  user_ed,
vec_t &  user_pr,
vec_t &  user_nb 
)
inline

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

Definition at line 503 of file eos_tov.h.

◆ read_vectors_copy() [2/2]

template<class vec_t >
void o2scl::eos_tov_vectors< vec_t >::read_vectors_copy ( size_t  user_n,
vec_t &  user_ed,
vec_t &  user_pr 
)
inline

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

Definition at line 522 of file eos_tov.h.

◆ read_vectors_swap() [1/2]

template<class vec_t >
void o2scl::eos_tov_vectors< vec_t >::read_vectors_swap ( size_t  user_n,
vec_t &  user_ed,
vec_t &  user_pr,
vec_t &  user_nb 
)
inline

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

Definition at line 473 of file eos_tov.h.

◆ read_vectors_swap() [2/2]

template<class vec_t >
void o2scl::eos_tov_vectors< vec_t >::read_vectors_swap ( size_t  user_n,
vec_t &  user_ed,
vec_t &  user_pr 
)
inline

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

Definition at line 489 of file eos_tov.h.


The documentation for this class was generated from the following file:

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).