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

Derivative class for stellar quantities which are interpolated age, mass and [Fe/H]. More...

#include <InterpolatedDerivatives.h>

+ Inheritance diagram for StellarEvolution::InterpolatedDerivatives:
+ Collaboration diagram for StellarEvolution::InterpolatedDerivatives:

Public Member Functions

 InterpolatedDerivatives (double mass, double feh, std::vector< const FunctionDerivatives *> *derivatives, const alglib::real_1d_array &interp_masses, const alglib::real_1d_array &interp_feh, double age=NaN, bool log_quantity=false, bool delete_derivatives=false)
 Create an object that interpolates derivatives from evolution tracks. More...
 
 ~InterpolatedDerivatives ()
 Deletes the interpolation data if so specified on creation. More...
 
- Public Member Functions inherited from StellarEvolution::LogDerivatives
 LogDerivatives (double x=NaN, bool log_y=false)
 Create a derivative for possibly log(functions) of possibly log(arg). More...
 
double order (unsigned deriv_order=1) const
 Returns the deriv_order-th derivative of the quantity. More...
 
- Public Member Functions inherited from Core::FunctionDerivatives
virtual ~FunctionDerivatives ()
 Clean up. More...
 

Protected Member Functions

double calc_deriv (unsigned deriv_order) const
 Returns the deriv_order-th derivative of the quantity. More...
 

Private Attributes

double __stellar_mass
 The mass to interpolate to in \(M_\odot\). More...
 
double __stellar_feh
 The [Fe/H] to interpolate to. More...
 
std::vector< const FunctionDerivatives * > * __interp_deriv
 The age derivatives for each stellar model. More...
 
const alglib::real_1d_array & __interp_masses
 The masses of the stelar models in \(M_\odot\). More...
 
const alglib::real_1d_array & __interp_feh
 The [Fe/H] of the stellar models. More...
 
bool __delete_derivatives
 Whether to delete the derivatives it was created with. More...
 

Detailed Description

Derivative class for stellar quantities which are interpolated age, mass and [Fe/H].

Definition at line 16 of file InterpolatedDerivatives.h.

Constructor & Destructor Documentation

◆ InterpolatedDerivatives()

StellarEvolution::InterpolatedDerivatives::InterpolatedDerivatives ( double  mass,
double  feh,
std::vector< const FunctionDerivatives *> *  derivatives,
const alglib::real_1d_array &  interp_masses,
const alglib::real_1d_array &  interp_feh,
double  age = NaN,
bool  log_quantity = false,
bool  delete_derivatives = false 
)

Create an object that interpolates derivatives from evolution tracks.

The input grid of derivatives may be of quantity of log(quantity) vs. age or log(age). The returned derivatives are always of quantity vs age (no log of anything).

Parameters
massThe stellar mass at which to evaluate the interpolated derivatives.
fehThe stellar [Fe/H] at which to evaluate the interpolated derivatives.
derivativesThe derivatives at each grid intersection.
interp_massesThe masses of the grid intersections.
interp_fehThe sorted [Fe/H] of the grid intersections.
ageIf not NaN, derivatives are assumed to calculate derivatives w.r.t. ln(age), whereas this object always returns derivatives w.r.t. age.
log_quantityAre derivatives of log(quantity) instead of quantity?
delete_derivativesShould derivatives be deleted when this object is destroyed?

Definition at line 22 of file InterpolatedDerivatives.cpp.

◆ ~InterpolatedDerivatives()

StellarEvolution::InterpolatedDerivatives::~InterpolatedDerivatives ( )
inline

Deletes the interpolation data if so specified on creation.

Definition at line 80 of file InterpolatedDerivatives.h.

Member Function Documentation

◆ calc_deriv()

double StellarEvolution::InterpolatedDerivatives::calc_deriv ( unsigned  deriv_order) const
protectedvirtual

Returns the deriv_order-th derivative of the quantity.

Implements StellarEvolution::LogDerivatives.

Definition at line 6 of file InterpolatedDerivatives.cpp.

Member Data Documentation

◆ __delete_derivatives

bool StellarEvolution::InterpolatedDerivatives::__delete_derivatives
private

Whether to delete the derivatives it was created with.

Definition at line 37 of file InterpolatedDerivatives.h.

◆ __interp_deriv

std::vector<const FunctionDerivatives *>* StellarEvolution::InterpolatedDerivatives::__interp_deriv
private

The age derivatives for each stellar model.

Definition at line 26 of file InterpolatedDerivatives.h.

◆ __interp_feh

const alglib::real_1d_array & StellarEvolution::InterpolatedDerivatives::__interp_feh
private

The [Fe/H] of the stellar models.

Definition at line 31 of file InterpolatedDerivatives.h.

◆ __interp_masses

const alglib::real_1d_array& StellarEvolution::InterpolatedDerivatives::__interp_masses
private

The masses of the stelar models in \(M_\odot\).

Definition at line 31 of file InterpolatedDerivatives.h.

◆ __stellar_feh

double StellarEvolution::InterpolatedDerivatives::__stellar_feh
private

The [Fe/H] to interpolate to.

Definition at line 20 of file InterpolatedDerivatives.h.

◆ __stellar_mass

double StellarEvolution::InterpolatedDerivatives::__stellar_mass
private

The mass to interpolate to in \(M_\odot\).

Definition at line 20 of file InterpolatedDerivatives.h.


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