#include <hadgas_eos.h>
A class to hold, compute and access tabulated EoS.
Definition at line 32 of file hadgas_eos.h.
Classes | |
struct | table_element |
Define the data structure for one element of the table. More... | |
Public Member Functions | |
EosTable (double de, double dnb, double dq, size_t n_e, size_t n_b, size_t n_q) | |
Sets up a table p/T/muB/mus/muQ versus (e, nb, nq), where e - energy density, nb - net baryon density, nq - net charge density, p - pressure, T. More... | |
void | compile_table (HadronGasEos &eos, const std::string &eos_savefile_name="hadgas_eos.dat") |
Computes the actual content of the table (for EosTable description see documentation of the constructor). More... | |
void | get (table_element &res, double e, double nb, double nq) const |
Obtain interpolated p/T/muB/muS/muQ from the tabulated equation of state given energy density, net baryon density and net charge density. More... | |
Private Member Functions | |
size_t | index (size_t ie, size_t inb, size_t inq) const |
proper index in a 1d vector, where the 3d table is stored More... | |
Private Attributes | |
std::vector< table_element > | table_ |
Storage for the tabulated equation of state. More... | |
double | de_ |
Step in energy density. More... | |
double | dnb_ |
Step in net-baryon density. More... | |
double | dq_ |
Step in net-charge density. More... | |
size_t | n_e_ |
Number of steps in energy density. More... | |
size_t | n_nb_ |
Number of steps in net-baryon density. More... | |
size_t | n_q_ |
Number of steps in net-charge density. More... | |
smash::EosTable::EosTable | ( | double | de, |
double | dnb, | ||
double | dq, | ||
size_t | n_e, | ||
size_t | n_b, | ||
size_t | n_q | ||
) |
Sets up a table p/T/muB/mus/muQ versus (e, nb, nq), where e - energy density, nb - net baryon density, nq - net charge density, p - pressure, T.
After calling this constructor the table is allocated, but it is still empty. To compute values call compile_table.
[in] | de | step in energy density [GeV/fm^4] |
[in] | dnb | step in net baryon density [GeV/fm^3] |
[in] | dq | step in net charge density [GeV/Gev^3] |
[in] | n_e | number of steps in energy density |
[in] | n_b | number of steps in net baryon density |
[in] | n_q | number of steps in net charge density |
Entry at (ie, inb, inq) corresponds to energy density and net baryon density (e, nb, nq) = (ie*de, inb*dnb, inq*dnq) [GeV/fm^4, GeV/fm^3].
Definition at line 28 of file hadgas_eos.cc.
void smash::EosTable::compile_table | ( | HadronGasEos & | eos, |
const std::string & | eos_savefile_name = "hadgas_eos.dat" |
||
) |
Computes the actual content of the table (for EosTable description see documentation of the constructor).
[in] | eos | equation of state |
[in] | eos_savefile_name | name of the file to save tabulated equation of state |
Definition at line 34 of file hadgas_eos.cc.
void smash::EosTable::get | ( | EosTable::table_element & | res, |
double | e, | ||
double | nb, | ||
double | nq | ||
) | const |
Obtain interpolated p/T/muB/muS/muQ from the tabulated equation of state given energy density, net baryon density and net charge density.
[in] | e | energy density |
[in] | nb | net baryon density |
[in] | nq | net charge density |
[out] | res | structure, that contains p/T/muB/muS/muQ |
Definition at line 162 of file hadgas_eos.cc.
|
inlineprivate |
proper index in a 1d vector, where the 3d table is stored
Definition at line 93 of file hadgas_eos.h.
|
private |
Storage for the tabulated equation of state.
Definition at line 97 of file hadgas_eos.h.
|
private |
Step in energy density.
Definition at line 99 of file hadgas_eos.h.
|
private |
Step in net-baryon density.
Definition at line 101 of file hadgas_eos.h.
|
private |
Step in net-charge density.
Definition at line 103 of file hadgas_eos.h.
|
private |
Number of steps in energy density.
Definition at line 105 of file hadgas_eos.h.
|
private |
Number of steps in net-baryon density.
Definition at line 107 of file hadgas_eos.h.
|
private |
Number of steps in net-charge density.
Definition at line 109 of file hadgas_eos.h.