Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
InterpolatedDerivatives.h
1 #ifndef __INTERPOLATED_DERIVATIVES_H
2 #define __INTERPOLATED_DERIVATIVES_H
3 
4 #include "../Core/SharedLibraryExportMacros.h"
5 #include "mass_feh_interp.h"
6 #include "../Core/LogDerivatives.h"
7 #include "../Core/Functions.h"
8 #include <vector>
9 
10 namespace StellarEvolution {
11 
16  class LIB_LOCAL InterpolatedDerivatives : public LogDerivatives {
17  private:
18  double
21 
23  __stellar_feh;
24 
26  std::vector<const FunctionDerivatives *> *__interp_deriv;
27 
28 
29  const alglib::real_1d_array
32 
34  &__interp_feh;
35 
38  protected:
40  double calc_deriv(unsigned deriv_order) const;
41  public:
51  double mass,
52 
55  double feh,
56 
58  std::vector<const FunctionDerivatives*> *derivatives,
59 
61  const alglib::real_1d_array &interp_masses,
62 
64  const alglib::real_1d_array &interp_feh,
65 
69  double age = NaN,
70 
72  bool log_quantity = false,
73 
76  bool delete_derivatives = false
77  );
78 
81  {
82  if(__delete_derivatives) {
83  for(size_t i = 0; i < __interp_deriv->size(); i++)
84  delete (*__interp_deriv)[i];
85  delete __interp_deriv;
86  }
87  }
88  }; //End of InterpolatedDerivatives class.
89 
90 } //End of StellarEvolution namespace.
91 
92 #endif
Derivative class for stellar quantities which are interpolated age, mass and [Fe/H].
~InterpolatedDerivatives()
Deletes the interpolation data if so specified on creation.
std::vector< const FunctionDerivatives * > * __interp_deriv
The age derivatives for each stellar model.
Define a single function performing mass-[Fe/H] interpolations.
Calculate dy/dx given dy/dx, dy/dln(x), dln(y)/dx or dln(y)/dln(x).
const alglib::real_1d_array & __interp_masses
The masses of the stelar models in .
bool __delete_derivatives
Whether to delete the derivatives it was created with.
double __stellar_mass
The mass to interpolate to in .