A clas for stellar quantities that are the sum of two other quantities. More...
#include <SumQuantity.h>
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 FunctionDerivatives * | deriv (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 | |
EvolvingStellarQuantity * | q1 |
This quantity will be q1+q2. More... | |
EvolvingStellarQuantity * | q2 |
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... | |
A clas for stellar quantities that are the sum of two other quantities.
Definition at line 21 of file SumQuantity.h.
|
inline |
Create a quantity that is (*quantity1)-(*quantity2)
Definition at line 30 of file SumQuantity.h.
|
inline |
Clean up.
Definition at line 84 of file SumQuantity.h.
|
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.
|
inlinevirtual |
Return the age derivative of the quantity at the given age.
Reimplemented from StellarEvolution::EvolvingStellarQuantity.
Definition at line 47 of file SumQuantity.h.
|
inline |
See EvolvingStellarQuantity::enable_next_interpolation_region.
Definition at line 63 of file SumQuantity.h.
|
inline |
See EvolvingStellarQuantity::next_discontinuity.
Definition at line 59 of file SumQuantity.h.
|
inlinevirtual |
Return the value the quantity takes at the given age.
Reimplemented from StellarEvolution::EvolvingStellarQuantity.
Definition at line 43 of file SumQuantity.h.
|
inlinevirtual |
The largest age for which the quantity can be interpolated.
Reimplemented from StellarEvolution::EvolvingStellarQuantity.
Definition at line 51 of file SumQuantity.h.
|
inlinevirtual |
The smallest age for which the quantity can be interpolated.
Reimplemented from StellarEvolution::EvolvingStellarQuantity.
Definition at line 55 of file SumQuantity.h.
|
inlinevirtual |
See EvolvingStellarQuantity::select_interpolation_region.
Definition at line 36 of file SumQuantity.h.
|
private |
Whether to destroy the input quantities on destruction.
Definition at line 27 of file SumQuantity.h.
|
private |
This quantity will be q1+q2.
Definition at line 24 of file SumQuantity.h.