A stellar evolution interpolator using only a single track, assumed to apply to all stars. More...
#include <CustomStellarEvolution.h>
Public Member Functions | |
Evolution (const std::string &filename, const std::vector< Columns > &format, const std::vector< double > &smoothing, const std::vector< int > &nodes, const std::vector< bool > &vs_log_age, const std::vector< bool > &log_quantity) | |
Creates an interpolator from a given track. More... | |
Public Member Functions inherited from StellarEvolution::Interpolator | |
Interpolator () | |
Construct an object that can be set to interpolate between tabulated evolution tracks. More... | |
Interpolator (const std::valarray< double > &tabulated_masses, const std::valarray< double > &tabulated_feh, const std::list< std::valarray< double > > &tabulated_ages, const std::vector< std::list< std::valarray< double > > > &tabulated_quantities, const std::vector< double > &smoothing, const std::vector< int > &nodes, const std::vector< bool > &vs_log_age, const std::vector< bool > &log_quantity, unsigned num_threads) | |
Creates a fully functional stellar evolution interpolator. More... | |
void | create_from (const std::valarray< double > &tabulated_masses, const std::valarray< double > &tabulated_feh, const std::list< std::valarray< double > > &tabulated_ages, const std::vector< std::list< std::valarray< double > > > &tabulated_quantities, const std::vector< double > &smoothing, const std::vector< int > &nodes, const std::vector< bool > &vs_log_age, const std::vector< bool > &log_quantity, unsigned num_threads) |
Fully setup an object created by the default constructor. More... | |
virtual EvolvingStellarQuantity * | operator() (QuantityID quantity, double mass, double feh) const |
Return a single quantity interpolation to a given mass and [Fe/H]. More... | |
virtual double | core_formation_age () const |
The age at which the core begins to form in Gyr. More... | |
virtual void | save_state (const std::string &filename="../interp_state_data") const |
Serializes the interpolation state to file. More... | |
virtual void | load_state (const std::string &filename="../interp_state_data") |
Loads data from serialization. More... | |
void | delete_tracks () |
Free all evolution tracks, rendering all created quantities unuseable! More... | |
Private Member Functions | |
std::valarray< std::valarray< double > > | read_track (const std::string &filename, const std::vector< Columns > &format) const |
Reads the stellar evolution track from a file returning the array of the quantities indexed by the column tag. More... | |
A stellar evolution interpolator using only a single track, assumed to apply to all stars.
Definition at line 69 of file CustomStellarEvolution.h.
StellarEvolution::CustomStellarEvolution::Interpolator::Evolution | ( | const std::string & | filename, |
const std::vector< Columns > & | format, | ||
const std::vector< double > & | smoothing, | ||
const std::vector< int > & | nodes, | ||
const std::vector< bool > & | vs_log_age, | ||
const std::vector< bool > & | log_quantity | ||
) |
Creates an interpolator from a given track.
filename | The filename of the track. |
format | A list of the columns in the track |
smoothing | The smoothing to apply to each column (NaN for no smoothing). |
Entries for AGE and SKIP are ignored.
nodes | The number of nodes to use when smoothing each column. |
This is ignored for columns for which the corresponding entry in smoothing is NaN
Negative entries result in using the smaller of the absolute value of the entry and three times the number of track points.
vs_log_age | Should interpolation be done vs. log(age) instead of age for each quantity? |
log_quantity | Should interpolation be done of log(quantity) instead of quantity for each quantity? |
|
private |
Reads the stellar evolution track from a file returning the array of the quantities indexed by the column tag.
filename | The name of the file containing the track. |
format | A list of the columns in the track |