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

A clas for stellar quantities that are the sum of two other quantities. More...

#include <SumQuantity.h>

+ Inheritance diagram for StellarEvolution::SumQuantity:
+ Collaboration diagram for StellarEvolution::SumQuantity:

Public Member Functions

 SumQuantity (EvolvingStellarQuantity *quantity1, EvolvingStellarQuantity *quantity2, bool delete_inputs=false)
 Create a quantity that is (*quantity1)-(*quantity2) More...
 
virtual void select_interpolation_region (double age) const
 See EvolvingStellarQuantity::select_interpolation_region. More...
 
double operator() (double age) const
 Return the value the quantity takes at the given age. More...
 
const FunctionDerivativesderiv (double age) const
 Return the age derivative of the quantity at the given age. More...
 
double range_high () const
 The largest age for which the quantity can be interpolated. More...
 
double range_low () const
 The smallest age for which the quantity can be interpolated. More...
 
double next_discontinuity () const
 See EvolvingStellarQuantity::next_discontinuity. More...
 
void enable_next_interpolation_region () const
 See EvolvingStellarQuantity::enable_next_interpolation_region. More...
 
InterpSolutionIterator crossings (double=0) const
 An iterator over the ages where the quantity takes the given y value. More...
 
 ~SumQuantity ()
 Clean up. More...
 
- Public Member Functions inherited from StellarEvolution::EvolvingStellarQuantity
 EvolvingStellarQuantity ()
 Default constructor (only useful for derived classes which do not use the interpolation). More...
 
 EvolvingStellarQuantity (double mass, const std::valarray< double > &track_masses, The(\f$[Fe/H]\f$) for which evolution tracks are given. const std::valarray< double > &track_feh, The evolution tracks of the relevant quantity on the grid defined by \p track_masses and \p track_feh. The const std::vector< const OneArgumentDiffFunction *> &evolution_tracks, Whether the track uses log(age) as the independent argument instead of age. bool log_age=true, Whether the track is uses log(quantity) as the dependent argument instead of quantity. bool log_quantity=true, Whether this is a quantity that is identically zero below some age and turns on afterwards bool starts_zero=false)
 Create an evolving quantity that interpolates to the given mass. More...
 
brief Prepare the quantity for interpolation around the given age After calling this requesting values or derivatives outside the range of the continuous region containing this age (see ::discontinuities) fails an assert. virtual void select_interpolation_region(double age) const
 
The ages at which the quantity may be virtual discontinuous const std::vector< double > & discontinuities () const
 
An iterator over the ages (in Gyr) where the quantity takes the given y value. InterpSolutionIterator crossings(double=0) const
 
- Public Member Functions inherited from Core::OneArgumentFunction< double, double >
virtual ~OneArgumentFunction ()
 Provide a virtual destructor for a virtual class. More...
 

Private Attributes

EvolvingStellarQuantityq1
 This quantity will be q1+q2. More...
 
EvolvingStellarQuantityq2
 
bool destroy_qs
 Whether to destroy the input quantities on destruction. More...
 

Additional Inherited Members

- Public Attributes inherited from StellarEvolution::EvolvingStellarQuantity
brief Prepare the quantity for interpolation around the given age After calling this method
 
- Protected Member Functions inherited from StellarEvolution::EvolvingStellarQuantity
virtual double age_to_interp_param (double age, double mass, double feh) const
 Return the interpoltaion parameter given age, mass and [Fe/H]. More...
 
virtual double interp_param_to_age (double interp_param, double mass, double feh) const
 Return the age in Gyrs given an interpolation parameter, mass, and [Fe/H]. More...
 

Detailed Description

A clas for stellar quantities that are the sum of two other quantities.

Definition at line 21 of file SumQuantity.h.

Constructor & Destructor Documentation

◆ SumQuantity()

StellarEvolution::SumQuantity::SumQuantity ( EvolvingStellarQuantity quantity1,
EvolvingStellarQuantity quantity2,
bool  delete_inputs = false 
)
inline

Create a quantity that is (*quantity1)-(*quantity2)

Definition at line 30 of file SumQuantity.h.

◆ ~SumQuantity()

StellarEvolution::SumQuantity::~SumQuantity ( )
inline

Clean up.

Definition at line 84 of file SumQuantity.h.

Member Function Documentation

◆ crossings()

InterpSolutionIterator StellarEvolution::SumQuantity::crossings ( double  = 0) const
inlinevirtual

An iterator over the ages where the quantity takes the given y value.

Implements Core::OneArgumentFunction< double, double >.

Definition at line 75 of file SumQuantity.h.

◆ deriv()

const FunctionDerivatives* StellarEvolution::SumQuantity::deriv ( double  age) const
inlinevirtual

Return the age derivative of the quantity at the given age.

Reimplemented from StellarEvolution::EvolvingStellarQuantity.

Definition at line 47 of file SumQuantity.h.

◆ enable_next_interpolation_region()

void StellarEvolution::SumQuantity::enable_next_interpolation_region ( ) const
inline

See EvolvingStellarQuantity::enable_next_interpolation_region.

Definition at line 63 of file SumQuantity.h.

◆ next_discontinuity()

double StellarEvolution::SumQuantity::next_discontinuity ( ) const
inline

See EvolvingStellarQuantity::next_discontinuity.

Definition at line 59 of file SumQuantity.h.

◆ operator()()

double StellarEvolution::SumQuantity::operator() ( double  age) const
inlinevirtual

Return the value the quantity takes at the given age.

Reimplemented from StellarEvolution::EvolvingStellarQuantity.

Definition at line 43 of file SumQuantity.h.

◆ range_high()

double StellarEvolution::SumQuantity::range_high ( ) const
inlinevirtual

The largest age for which the quantity can be interpolated.

Reimplemented from StellarEvolution::EvolvingStellarQuantity.

Definition at line 51 of file SumQuantity.h.

◆ range_low()

double StellarEvolution::SumQuantity::range_low ( ) const
inlinevirtual

The smallest age for which the quantity can be interpolated.

Reimplemented from StellarEvolution::EvolvingStellarQuantity.

Definition at line 55 of file SumQuantity.h.

◆ select_interpolation_region()

virtual void StellarEvolution::SumQuantity::select_interpolation_region ( double  age) const
inlinevirtual

See EvolvingStellarQuantity::select_interpolation_region.

Definition at line 36 of file SumQuantity.h.

Member Data Documentation

◆ destroy_qs

bool StellarEvolution::SumQuantity::destroy_qs
private

Whether to destroy the input quantities on destruction.

Definition at line 27 of file SumQuantity.h.

◆ q1

EvolvingStellarQuantity* StellarEvolution::SumQuantity::q1
private

This quantity will be q1+q2.

Definition at line 24 of file SumQuantity.h.


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