Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
StellarEvolution::CustomStellarEvolution::Interpolator Class Reference

A stellar evolution interpolator using only a single track, assumed to apply to all stars. More...

#include <CustomStellarEvolution.h>

+ Inheritance diagram for StellarEvolution::CustomStellarEvolution::Interpolator:
+ Collaboration diagram for StellarEvolution::CustomStellarEvolution::Interpolator:

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

Detailed Description

A stellar evolution interpolator using only a single track, assumed to apply to all stars.

Definition at line 69 of file CustomStellarEvolution.h.

Member Function Documentation

◆ Evolution()

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.

Parameters
filenameThe filename of the track.
formatA list of the columns in the track
smoothingThe smoothing to apply to each column (NaN for no smoothing).

Entries for AGE and SKIP are ignored.

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

Parameters
vs_log_ageShould interpolation be done vs. log(age) instead of age for each quantity?
log_quantityShould interpolation be done of log(quantity) instead of quantity for each quantity?

◆ read_track()

std::valarray< std::valarray<double> > StellarEvolution::CustomStellarEvolution::Interpolator::read_track ( const std::string &  filename,
const std::vector< Columns > &  format 
) const
private

Reads the stellar evolution track from a file returning the array of the quantities indexed by the column tag.

Parameters
filenameThe name of the file containing the track.
formatA list of the columns in the track

The documentation for this class was generated from the following file: