13 #include "../Core/SharedLibraryExportMacros.h" 18 LIB_PUBLIC
extern const int RADIUS;
22 LIB_PUBLIC
extern const int ICONV;
25 LIB_PUBLIC
extern const int LUM;
29 LIB_PUBLIC
extern const int IRAD;
33 LIB_PUBLIC
extern const int MRAD;
37 LIB_PUBLIC
extern const int RRAD;
LIB_PUBLIC double metallicity_from_feh(double feh)
Alias for StellarEvolution::metallicity_from_feh()
LIB_PUBLIC void destroy_interpolator(MESAInterpolator *interpolator)
Destroy a previously created interpolator.
LIB_PUBLIC const int RADIUS
Identifier for the stellar radius as an interpolation quantity.
struct LIB_PUBLIC EvolvingStellarQuantity
Opaque struct to cast to/from StellarEvolution::EvolvingStellarQuantity pointers. ...
LIB_PUBLIC MESAInterpolator * load_interpolator(const char *filename)
Load a previously saved interpolator state (faster than creating it).
LIB_PUBLIC const int ICONV
Identifier for the convective zone moment of inertia as an interpolation quantity.
LIB_PUBLIC bool default_vs_log_age(int quantityID)
Return whether by default the given quantity is interpolated vs. log(age).
LIB_PUBLIC double quantity_max_age(const EvolvingStellarQuantity *quantity)
Return the maximum age for which the quantity is defined.
LIB_PUBLIC const int LUM
Identifier for the stellar luminosity as an interpolation quantity.
struct LIB_PUBLIC MESAInterpolator
Opaque struct to cast to/from StellarEvolution::Interpolator pointers.
LIB_PUBLIC double evaluate_quantity(const EvolvingStellarQuantity *quantity, double age)
Evaluate a stellar quantity at a given age.
LIB_PUBLIC void differentiate_quantity(const EvolvingStellarQuantity *quantity, double age, double *result)
Calculate the zeroth, first and second derivatives of a quantity.
LIB_PUBLIC const EvolvingStellarQuantity * create_quantity(const MESAInterpolator *interpolator, int quantityID, double mass, double feh)
Create a single quantity interpolation for a given star.
LIB_PUBLIC double default_smoothing(int quantityID)
Return the default smoothing argument used for the given quantity.
Defines the classes for generating stellar evolution interpolators from the MESA tracks.
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.
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...
LIB_PUBLIC double feh_from_metallicity(double metallicity)
Alias for StellarEvolution::feh_from_metallicity()
LIB_PUBLIC const int IRAD
Identifier for the radiative zone moment of inertia as an interpolation quantity. ...
LIB_PUBLIC const int NUM_QUANTITIES
The number of interpolation quantities currentyl supported.
LIB_PUBLIC int default_nodes(int quantityID)
Return the default number of interpolation nodes used for the given quantity.
LIB_PUBLIC void evaluate_quantity_array(const EvolvingStellarQuantity *quantity, double *age, unsigned nvalues, double *result)
Evaluate a stellar quantity at an array of ages.
LIB_PUBLIC bool default_log_quantity(int quantityID)
Return whether by default the log(given quantity) is interpolated vs. the quantity itself...
LIB_PUBLIC double feh_from_z(double z)
Calculate [Fe/H] given Z (metal mass fraction) for a star.
LIB_PUBLIC void save_interpolator(MESAInterpolator *interpolator, const char *filename)
Save the state of an interpolator for faster creation.
LIB_PUBLIC const int MRAD
Identifier for the radiative zone mass of inertia as an interpolation quantity.
LIB_PUBLIC double quantity_min_age(const EvolvingStellarQuantity *quantity)
Return the minimum age for which the quantity is defined.
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.
LIB_PUBLIC const int RRAD
Identifier for the convective-radiative boundary as an interpolation quantity.
LIB_PUBLIC double z_from_feh(double feh)
Calculate Z (metal mass fraction) given [Fe/H] for a star.
LIB_PUBLIC void destroy_quantity(EvolvingStellarQuantity *quantity)
Destroy a previously created evolving stellar quantity.