Declare C-style functions for accessing the functionality of the StellarEvolution library. More...
Go to the source code of this file.
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... | |
Declare C-style functions for accessing the functionality of the StellarEvolution library.
Definition in file CInterface.h.