Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
Stellar Evolution

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...
 

Enumerations

enum  StellarEvolution::CustomStellarEvolution::Columns {
  StellarEvolution::CustomStellarEvolution::ICONV, StellarEvolution::CustomStellarEvolution::IRAD, StellarEvolution::CustomStellarEvolution::RSTAR, StellarEvolution::CustomStellarEvolution::RRAD,
  StellarEvolution::CustomStellarEvolution::MRAD, StellarEvolution::CustomStellarEvolution::LSTAR, StellarEvolution::CustomStellarEvolution::AGE, StellarEvolution::CustomStellarEvolution::SKIP,
  StellarEvolution::CustomStellarEvolution::NUM_TRACK_QUANTITIES = SKIP
}
 

Functions

LIB_PUBLIC MESAInterpolatorcreate_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 EvolvingStellarQuantitycreate_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 MESAInterpolatorload_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...
 

Detailed Description

Enumeration Type Documentation

◆ Columns

#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CustomStellarEvolution.h>

Tags for the columns in input stellar tracks.

Enumerator
ICONV 

Moment of inertia of the convective envelope of the star in \(M_\odot R_\odot^2\).

IRAD 

Moment of inertia of the radiative core of the star in \(M_\odot R_\odot^2\).

RSTAR 

Radius of the star in \(R_\odot\).

RRAD 

Radius of the stellar core in \(R_\odot\) (low mass stars only).

MRAD 

Mass of the stellar core in \(M_\odot\) (low mass stars only).

LSTAR 

Luminosity of the star in \(L_\odot\).

AGE 

Age of the star in Gyr.

SKIP 

A column which is not needed to interpolate the evolution.

NUM_TRACK_QUANTITIES 

The number of different input quantities supported.

Definition at line 33 of file CustomStellarEvolution.h.

Function Documentation

◆ create_interpolator()

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.

Parameters
mesa_dirThe directory containing all and only the MESA tracks to include in the interpolation.
smoothingThe set of smoothing arguments to use. One for each quantity, in the order defined by the RADIUS, ICONV, ..., constants.
nodesThe set of interpolation nodes to use in the same order as smoothing.
vs_log_ageFor each quantity the corresponding entry decides if log(age) will be the independent argument against which interpolation is performed (instead of age).
log_quantityFor each quantity the corresponding entry decides if log(quantity) will be interpolated instead of just quantity.
num_threadsHow many threads to use for simultaneous interpolation.

Definition at line 19 of file CInterface.cpp.

◆ create_quantity()

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.

Parameters
interpolatorAn interpolator previously created with create_interpolator().
quantityIDThe quantity to interpolate (one of RADIUS, ICONV, LUM, IRAD, MRAD or RRAD)
massThe stellar mass for which to interpolate the quantity.
fehThe stellar [Fe/H] for which to interpolate the quantity.

Definition at line 53 of file CInterface.cpp.

◆ default_log_quantity()

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.

Parameters
quantityIDThe quantity to return the default nodes for.

Definition at line 231 of file CInterface.cpp.

◆ default_nodes()

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.

Parameters
quantityIDThe quantity to return the default nodes for.

Definition at line 215 of file CInterface.cpp.

◆ default_smoothing()

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.

Parameters
quantityIDThe quantity to return the default smoothing for.

Definition at line 207 of file CInterface.cpp.

◆ default_vs_log_age()

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).

Parameters
quantityIDThe quantity to return the default nodes for.

Definition at line 223 of file CInterface.cpp.

◆ destroy_interpolator()

LIB_PUBLIC void destroy_interpolator ( MESAInterpolator interpolator)

#include </home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h>

Destroy a previously created interpolator.

Parameters
interpolatorThe interpolator to destroy. Must have previously been created using create_interpolator()

Definition at line 46 of file CInterface.cpp.

◆ destroy_quantity()

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.

Parameters
quantityThe quantity to destroy. Must have previously been created using create_quantity().

Definition at line 75 of file CInterface.cpp.

◆ differentiate_quantity()

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.

Parameters
quantityThe quantity to differentiate. Must be previously created using interpolate().
ageThe age at which to differentiate the quantity in Gyrs.
resultA pre-allocated array of size 3 where to place the result.

Definition at line 116 of file CInterface.cpp.

◆ differentiate_quantity_array()

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.

Parameters
quantityThe quantity to differentiate. Must be previously created using interpolate()
ageThe array of ages to evaluate the quantity at.
nvaluesThe number of ages at which evaluation is required.
resultA pre-allocated memory (size: 3 * nvalues) where to place the result.

Definition at line 132 of file CInterface.cpp.

◆ evaluate_quantity()

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.

Parameters
quantityThe quantity to evaluate. Must be previously created using interpolate().
ageThe age at which to evaluate the quantity in Gyrs.

Definition at line 82 of file CInterface.cpp.

◆ evaluate_quantity_array()

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.

Parameters
quantityThe quantity to evaluate. Must be previously created using interpolate()
ageThe array of ages to evaluate the quantity at.
nvaluesThe number of ages at which evaluation is required.
resultA pre-allocated memory (size: nvalues) where to place the result.

Definition at line 93 of file CInterface.cpp.

◆ feh_from_metallicity()

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.

◆ feh_from_z()

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.

◆ load_interpolator()

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).

Parameters
filenameThe name of the file to save the state to.

Definition at line 198 of file CInterface.cpp.

◆ metallicity_from_feh()

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.

◆ quantity_continuous_range()

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.

◆ quantity_max_age()

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.

Parameters
quantityThe quantity to characterize. Must be previously created using interpolate().

Definition at line 167 of file CInterface.cpp.

◆ quantity_min_age()

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.

Parameters
quantityThe quantity to characterize. Must be previously created using interpolate().

Definition at line 159 of file CInterface.cpp.

◆ save_interpolator()

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.

Parameters
interpolatorThe interpolator to save. Must have previously been created using create_interpolator()
filenameThe name of the file to save the state to.

Definition at line 191 of file CInterface.cpp.

◆ z_from_feh()

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.

Variable Documentation

◆ EvolvingStellarQuantity

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.

◆ ICONV

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.

◆ IRAD

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.

◆ LUM

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.

◆ MESAInterpolator

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.

◆ MRAD

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.

◆ NUM_QUANTITIES

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.

◆ RADIUS

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.

◆ RRAD

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.