Files | |
file | AllowedGridGrowth.h |
Declares & defines a class describing how the mass-[Fe/H] interpolation grid is allowed to grow. | |
file | CInterface.cpp |
The definitions of the functions declared in CInterface.h. | |
file | CInterface.h |
Declare C-style functions for accessing the functionality of the StellarEvolution library. | |
file | CustomStellarEvolution.cpp |
The definitions of the CustomStellarEvolution::Evolution methods. | |
file | CustomStellarEvolution.h |
Defines the class which implements a custom single track stellar evolution. | |
file | InterpolationQuantities.h |
Defines constant to serve as identifier of the various quantities handled by the stellar evolution interpoltaion. | |
file | Interpolator.cpp |
Defines some of the methods of the StellarEvolution class. | |
file | Interpolator.h |
Defines the StellarEvolution class needed for interpolating among stellar evolution tracks. | |
file | MESAIO.h |
Defines the classes for generating stellar evolution interpolators from the MESA tracks. | |
file | ThreadedInterpolation.cpp |
The implementation of some of the methods of the InterpolationQueue class. | |
file | ThreadedInterpolation.h |
Declaration of a class that handles multithreaded stellar evolution interpolation. | |
Namespaces | |
StellarEvolution::CustomStellarEvolution | |
Classes | |
class | StellarEvolution::AllowedGridGrowth |
class | StellarEvolution::CustomStellarEvolution::Interpolator |
A stellar evolution interpolator using only a single track, assumed to apply to all stars. More... | |
Functions | |
LIB_PUBLIC MESAInterpolator * | create_interpolator (const char *mesa_dir, double *smoothing, int *nodes, bool *vs_log_age, bool *log_quantity, unsigned num_threads) |
Create an interpolator from a directory containing MESA tracks. More... | |
LIB_PUBLIC void | destroy_interpolator (MESAInterpolator *interpolator) |
Destroy a previously created interpolator. More... | |
LIB_PUBLIC const EvolvingStellarQuantity * | create_quantity (const MESAInterpolator *interpolator, int quantityID, double mass, double feh) |
Create a single quantity interpolation for a given star. More... | |
LIB_PUBLIC void | destroy_quantity (EvolvingStellarQuantity *quantity) |
Destroy a previously created evolving stellar quantity. More... | |
LIB_PUBLIC double | evaluate_quantity (const EvolvingStellarQuantity *quantity, double age) |
Evaluate a stellar quantity at a given age. More... | |
LIB_PUBLIC void | evaluate_quantity_array (const EvolvingStellarQuantity *quantity, double *age, unsigned nvalues, double *result) |
Evaluate a stellar quantity at an array of ages. More... | |
LIB_PUBLIC void | differentiate_quantity (const EvolvingStellarQuantity *quantity, double age, double *result) |
Calculate the zeroth, first and second derivatives of a quantity. More... | |
LIB_PUBLIC void | differentiate_quantity_array (const EvolvingStellarQuantity *quantity, double *age, unsigned nvalues, double *result) |
Calculate the derivatives of a quantity at an array of ages. More... | |
LIB_PUBLIC double | quantity_min_age (const EvolvingStellarQuantity *quantity) |
Return the minimum age for which the quantity is defined. More... | |
LIB_PUBLIC double | quantity_max_age (const EvolvingStellarQuantity *quantity) |
Return the maximum age for which the quantity is defined. More... | |
LIB_PUBLIC void | quantity_continuous_range (const EvolvingStellarQuantity *quantity, double age, double *range_min, double *range_max) |
Return the range of ages surrounding a given age over which a quantity is guaranteed continuous. More... | |
LIB_PUBLIC void | save_interpolator (MESAInterpolator *interpolator, const char *filename) |
Save the state of an interpolator for faster creation. More... | |
LIB_PUBLIC MESAInterpolator * | load_interpolator (const char *filename) |
Load a previously saved interpolator state (faster than creating it). More... | |
LIB_PUBLIC double | default_smoothing (int quantityID) |
Return the default smoothing argument used for the given quantity. More... | |
LIB_PUBLIC int | default_nodes (int quantityID) |
Return the default number of interpolation nodes used for the given quantity. More... | |
LIB_PUBLIC bool | default_vs_log_age (int quantityID) |
Return whether by default the given quantity is interpolated vs. log(age). More... | |
LIB_PUBLIC bool | default_log_quantity (int quantityID) |
Return whether by default the log(given quantity) is interpolated vs. the quantity itself. More... | |
LIB_PUBLIC double | metallicity_from_feh (double feh) |
Alias for StellarEvolution::metallicity_from_feh() More... | |
LIB_PUBLIC double | feh_from_metallicity (double metallicity) |
Alias for StellarEvolution::feh_from_metallicity() More... | |
LIB_PUBLIC double | feh_from_z (double z) |
Calculate [Fe/H] given Z (metal mass fraction) for a star. More... | |
LIB_PUBLIC double | z_from_feh (double feh) |
Calculate Z (metal mass fraction) given [Fe/H] for a star. More... | |
Variables | |
LIB_PUBLIC const int | RADIUS |
Identifier for the stellar radius as an interpolation quantity. More... | |
LIB_PUBLIC const int | ICONV |
Identifier for the convective zone moment of inertia as an interpolation quantity. More... | |
LIB_PUBLIC const int | LUM |
Identifier for the stellar luminosity as an interpolation quantity. More... | |
LIB_PUBLIC const int | IRAD |
Identifier for the radiative zone moment of inertia as an interpolation quantity. More... | |
LIB_PUBLIC const int | MRAD |
Identifier for the radiative zone mass of inertia as an interpolation quantity. More... | |
LIB_PUBLIC const int | RRAD |
Identifier for the convective-radiative boundary as an interpolation quantity. More... | |
LIB_PUBLIC const int | NUM_QUANTITIES |
The number of interpolation quantities currentyl supported. More... | |
struct LIB_PUBLIC | MESAInterpolator |
Opaque struct to cast to/from StellarEvolution::Interpolator pointers. More... | |
struct LIB_PUBLIC | EvolvingStellarQuantity |
Opaque struct to cast to/from StellarEvolution::EvolvingStellarQuantity pointers. More... | |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CustomStellarEvolution.h>
Tags for the columns in input stellar tracks.
Definition at line 33 of file CustomStellarEvolution.h.
LIB_PUBLIC MESAInterpolator* create_interpolator | ( | const char * | mesa_dir, |
double * | smoothing, | ||
int * | nodes, | ||
bool * | vs_log_age, | ||
bool * | log_quantity, | ||
unsigned | num_threads | ||
) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Create an interpolator from a directory containing MESA tracks.
The result must be de-allocated when no longer necessary.
mesa_dir | The directory containing all and only the MESA tracks to include in the interpolation. |
smoothing | The set of smoothing arguments to use. One for each quantity, in the order defined by the RADIUS, ICONV, ..., constants. |
nodes | The set of interpolation nodes to use in the same order as smoothing. |
vs_log_age | For each quantity the corresponding entry decides if log(age) will be the independent argument against which interpolation is performed (instead of age). |
log_quantity | For each quantity the corresponding entry decides if log(quantity) will be interpolated instead of just quantity. |
num_threads | How many threads to use for simultaneous interpolation. |
Definition at line 19 of file CInterface.cpp.
LIB_PUBLIC const EvolvingStellarQuantity* create_quantity | ( | const MESAInterpolator * | interpolator, |
int | quantityID, | ||
double | mass, | ||
double | feh | ||
) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Create a single quantity interpolation for a given star.
The result must be de-allocated when no longer needed.
interpolator | An interpolator previously created with create_interpolator(). |
quantityID | The quantity to interpolate (one of RADIUS, ICONV, LUM, IRAD, MRAD or RRAD) |
mass | The stellar mass for which to interpolate the quantity. |
feh | The stellar [Fe/H] for which to interpolate the quantity. |
Definition at line 53 of file CInterface.cpp.
LIB_PUBLIC bool default_log_quantity | ( | int | quantityID | ) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Return whether by default the log(given quantity) is interpolated vs. the quantity itself.
quantityID | The quantity to return the default nodes for. |
Definition at line 231 of file CInterface.cpp.
LIB_PUBLIC int default_nodes | ( | int | quantityID | ) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Return the default number of interpolation nodes used for the given quantity.
quantityID | The quantity to return the default nodes for. |
Definition at line 215 of file CInterface.cpp.
LIB_PUBLIC double default_smoothing | ( | int | quantityID | ) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Return the default smoothing argument used for the given quantity.
quantityID | The quantity to return the default smoothing for. |
Definition at line 207 of file CInterface.cpp.
LIB_PUBLIC bool default_vs_log_age | ( | int | quantityID | ) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Return whether by default the given quantity is interpolated vs. log(age).
quantityID | The quantity to return the default nodes for. |
Definition at line 223 of file CInterface.cpp.
LIB_PUBLIC void destroy_interpolator | ( | MESAInterpolator * | interpolator | ) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Destroy a previously created interpolator.
interpolator | The interpolator to destroy. Must have previously been created using create_interpolator() |
Definition at line 46 of file CInterface.cpp.
LIB_PUBLIC void destroy_quantity | ( | EvolvingStellarQuantity * | quantity | ) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Destroy a previously created evolving stellar quantity.
quantity | The quantity to destroy. Must have previously been created using create_quantity(). |
Definition at line 75 of file CInterface.cpp.
LIB_PUBLIC void differentiate_quantity | ( | const EvolvingStellarQuantity * | quantity, |
double | age, | ||
double * | result | ||
) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Calculate the zeroth, first and second derivatives of a quantity.
quantity | The quantity to differentiate. Must be previously created using interpolate(). |
age | The age at which to differentiate the quantity in Gyrs. |
result | A pre-allocated array of size 3 where to place the result. |
Definition at line 116 of file CInterface.cpp.
LIB_PUBLIC void differentiate_quantity_array | ( | const EvolvingStellarQuantity * | quantity, |
double * | age, | ||
unsigned | nvalues, | ||
double * | result | ||
) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Calculate the derivatives of a quantity at an array of ages.
The result is a double array containing 3 sub-arrays of zeroth, first and second order derivatives. That is the first consecutive nvalues entries are the function values at echo of the nvalues ages, the next nvalues entries are the first derivatives at each age etc.
quantity | The quantity to differentiate. Must be previously created using interpolate() |
age | The array of ages to evaluate the quantity at. |
nvalues | The number of ages at which evaluation is required. |
result | A pre-allocated memory (size: 3 * nvalues) where to place the result. |
Definition at line 132 of file CInterface.cpp.
LIB_PUBLIC double evaluate_quantity | ( | const EvolvingStellarQuantity * | quantity, |
double | age | ||
) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Evaluate a stellar quantity at a given age.
quantity | The quantity to evaluate. Must be previously created using interpolate(). |
age | The age at which to evaluate the quantity in Gyrs. |
Definition at line 82 of file CInterface.cpp.
LIB_PUBLIC void evaluate_quantity_array | ( | const EvolvingStellarQuantity * | quantity, |
double * | age, | ||
unsigned | nvalues, | ||
double * | result | ||
) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Evaluate a stellar quantity at an array of ages.
quantity | The quantity to evaluate. Must be previously created using interpolate() |
age | The array of ages to evaluate the quantity at. |
nvalues | The number of ages at which evaluation is required. |
result | A pre-allocated memory (size: nvalues) where to place the result. |
Definition at line 93 of file CInterface.cpp.
LIB_PUBLIC double feh_from_metallicity | ( | double | metallicity | ) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Alias for StellarEvolution::feh_from_metallicity()
Alias for StellarEvolution::feh_from_metallicity()
Definition at line 244 of file CInterface.cpp.
LIB_PUBLIC double feh_from_z | ( | double | z | ) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Calculate [Fe/H] given Z (metal mass fraction) for a star.
Definition at line 249 of file CInterface.cpp.
LIB_PUBLIC MESAInterpolator* load_interpolator | ( | const char * | filename | ) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Load a previously saved interpolator state (faster than creating it).
filename | The name of the file to save the state to. |
Definition at line 198 of file CInterface.cpp.
LIB_PUBLIC double metallicity_from_feh | ( | double | feh | ) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Alias for StellarEvolution::metallicity_from_feh()
Alias for StellarEvolution::metallicity_from_feh()
Definition at line 239 of file CInterface.cpp.
LIB_PUBLIC void quantity_continuous_range | ( | const EvolvingStellarQuantity * | quantity, |
double | age, | ||
double * | range_min, | ||
double * | range_max | ||
) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Return the range of ages surrounding a given age over which a quantity is guaranteed continuous.
Definition at line 175 of file CInterface.cpp.
LIB_PUBLIC double quantity_max_age | ( | const EvolvingStellarQuantity * | quantity | ) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Return the maximum age for which the quantity is defined.
quantity | The quantity to characterize. Must be previously created using interpolate(). |
Definition at line 167 of file CInterface.cpp.
LIB_PUBLIC double quantity_min_age | ( | const EvolvingStellarQuantity * | quantity | ) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Return the minimum age for which the quantity is defined.
quantity | The quantity to characterize. Must be previously created using interpolate(). |
Definition at line 159 of file CInterface.cpp.
LIB_PUBLIC void save_interpolator | ( | MESAInterpolator * | interpolator, |
const char * | filename | ||
) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Save the state of an interpolator for faster creation.
interpolator | The interpolator to save. Must have previously been created using create_interpolator() |
filename | The name of the file to save the state to. |
Definition at line 191 of file CInterface.cpp.
LIB_PUBLIC double z_from_feh | ( | double | feh | ) |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Calculate Z (metal mass fraction) given [Fe/H] for a star.
Definition at line 256 of file CInterface.cpp.
struct LIB_PUBLIC EvolvingStellarQuantity |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Opaque struct to cast to/from StellarEvolution::EvolvingStellarQuantity pointers.
Definition at line 47 of file CInterface.h.
LIB_PUBLIC const int ICONV |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Identifier for the convective zone moment of inertia as an interpolation quantity.
Definition at line 12 of file CInterface.cpp.
LIB_PUBLIC const int IRAD |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Identifier for the radiative zone moment of inertia as an interpolation quantity.
Definition at line 14 of file CInterface.cpp.
LIB_PUBLIC const int LUM |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Identifier for the stellar luminosity as an interpolation quantity.
Definition at line 13 of file CInterface.cpp.
struct LIB_PUBLIC MESAInterpolator |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Opaque struct to cast to/from StellarEvolution::Interpolator pointers.
Definition at line 43 of file CInterface.h.
LIB_PUBLIC const int MRAD |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Identifier for the radiative zone mass of inertia as an interpolation quantity.
Definition at line 15 of file CInterface.cpp.
LIB_PUBLIC const int NUM_QUANTITIES |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
The number of interpolation quantities currentyl supported.
Definition at line 17 of file CInterface.cpp.
LIB_PUBLIC const int RADIUS |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Identifier for the stellar radius as an interpolation quantity.
Identifier for the stellar radius as an interpolation quantity.
Definition at line 99 of file DissipationQuantities.h.
LIB_PUBLIC const int RRAD |
#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>
Identifier for the convective-radiative boundary as an interpolation quantity.
Definition at line 16 of file CInterface.cpp.