Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
o2scl::eos_nstar_rot_interp Class Reference

Create a tabulated EOS for nstar_rot using interpolation. More...

#include <nstar_rot.h>

Inheritance diagram for o2scl::eos_nstar_rot_interp:
o2scl::eos_nstar_rot o2scl::eos_tov o2scl::eos_nstar_rot_C o2scl::eos_nstar_rot_L

Public Member Functions

template<class vec1_t , class vec2_t , class vec3_t , class vec4_t >
void set_eos_native (vec1_t &eden, vec2_t &pres, vec3_t &enth, vec4_t &nb)
 Set the EOS from four vectors in the native unit system.
 
template<class vec1_t , class vec2_t , class vec3_t >
void set_eos_fm (size_t n, vec1_t &eden, vec2_t &pres, vec3_t &nb)
 Set the EOS from energy density, pressure, and baryon density stored in powers of $ \mathrm{fm} $ .
 
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_pr (double pr)
 From the pressure, return the baryon density.
 
virtual double pr_from_nb (double nb)
 From the baryon density, return the pressure.
 
virtual double ed_from_nb (double nb)
 From the baryon density, return the energy density.
 
virtual double nb_from_ed (double ed)
 From the energy density, return the baryon density.
 
virtual double enth_from_pr (double pr)
 From the pressure, return the enthalpy.
 
virtual double enth_from_nb (double nb)
 From the baryon density, return the enthalpy.
 
virtual double pr_from_enth (double enth)
 From the enthalpy, 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...
 
void output ()
 Output EOS table to screen. 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 Types

typedef boost::numeric::ublas::vector< double > ubvector
 
typedef boost::numeric::ublas::matrix< double > ubmatrix
 

Protected Member Functions

int new_search (int n, double *x, double val)
 Search in array x of length n for value val.
 
double interp (double xp[], double yp[], int np, double xb)
 Driver for the interpolation routine. More...
 

Protected Attributes

o2scl::search_vec< double * > sv
 Array search object.
 
int n_tab
 number of tabulated EOS points
 
double log_e_tab [201]
 rho points in tabulated EOS
 
double log_p_tab [201]
 p points in tabulated EOS
 
double log_h_tab [201]
 h points in EOS file
 
double log_n0_tab [201]
 number density in EOS file
 
int n_nearest
 Cache for interpolation.
 
Constants
double C
 Speed of light in vacuum (in CGS units)
 
double G
 Gravitational constant (in CGS units)
 
double KAPPA
 Square of length scale in CGS units, $ \kappa \equiv 10^{-15} c^2/G $.
 
double KSCALE
 The value $ 10^{-15}/c^2 $.
 
- Protected Attributes inherited from o2scl::eos_tov
bool baryon_column
 Set to true if the baryon density is provided in the EOS (default false)
 

Additional Inherited Members

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

Detailed Description

Todo:
Document what the nstar_rot code requirements are for the low-density part of the EOS.
Idea for Future:
Replace arrays with vectors

Definition at line 107 of file nstar_rot.h.

Member Function Documentation

◆ ed_nb_from_pr()

virtual void o2scl::eos_nstar_rot_interp::ed_nb_from_pr ( double  pr,
double &  ed,
double &  nb 
)
virtual

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.

◆ interp()

double o2scl::eos_nstar_rot_interp::interp ( double  xp[],
double  yp[],
int  np,
double  xb 
)
protected

First we find the tab. point nearest to xb, then we interpolate using four points around xb.

◆ output()

void o2scl::eos_nstar_rot_interp::output ( )
inline

Definition at line 375 of file nstar_rot.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).