Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
RemoveLogDeriv.h
Go to the documentation of this file.
1 
8 #ifndef __REMOVE_LOG_DERIV_H
9 #define __REMOVE_LOG_DERIV_H
10 
11 #include "../Core/SharedLibraryExportMacros.h"
12 #include "../Core/LogDerivatives.h"
13 
14 namespace StellarEvolution {
15 
17  class LIB_LOCAL RemoveLogDeriv : public LogDerivatives {
18  private:
21 
24  protected:
26  double calc_deriv(unsigned deriv_order) const
27  {return __log_deriv->order(deriv_order);}
28  public:
31  double age,
32  bool log_quantity,
33  const FunctionDerivatives *log_deriv,
34  bool delete_deriv
35  ) :
36  LogDerivatives(age, log_quantity),
37  __log_deriv(log_deriv),
38  __delete_deriv(delete_deriv)
39  {}
40 
44  {if(__delete_deriv) delete __log_deriv;}
45  }; //End RemoveLogDeriv class declaration.
46 
47 } //End StellarEvolution namespace.
48 
49 #endif
virtual double order(unsigned deriv_order=1) const =0
Derivative of the given order of the function with respect to its argument.
Calculate dy/dx given dy/dx, dy/dln(x), dln(y)/dx or dln(y)/dln(x).
A class representing arbitrary order derivatives of a function.
Definition: Functions.h:66
RemoveLogDeriv(double age, bool log_quantity, const FunctionDerivatives *log_deriv, bool delete_deriv)
Create a linear derivative from a log one.
bool __delete_deriv
Whether to delete the underlying log-derivative on destruction.
Return dy/dx given dy/dln(x), dln(y)/dx or dln(y)/dln(x).
double calc_deriv(unsigned deriv_order) const
Returns the deriv_order-th derivative of the quantity.
const FunctionDerivatives * __log_deriv
The original logarithmic derivative.
~RemoveLogDeriv()
Deletes the input logarithmic derivative if so specified on creation.