Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
EvolvingStellarCore.cpp
1 #define BUILDING_LIBRARY
2 #include "EvolvingStellarCore.h"
3 
4 namespace Star {
5 
7  size_t quantity,
8  double age,
9  unsigned deriv_order,
10  double min_value
11  ) const
12  {
13  if(deriv_order == 0) {
14  return std::max(any_age_quantity(quantity, age, 0), min_value);
15  } else {
16  if(any_age_quantity(quantity, age, 0) < min_value)
17  return 0.0;
18  else
19  return any_age_quantity(quantity, age, deriv_order);
20  }
21  }
22 
24  size_t quantity,
25  unsigned deriv_order,
26  double min_value
27  ) const
28  {
29  if(deriv_order == 0) {
30  return std::max(current_age_quantity(quantity, 0), min_value);
31  } else {
32  if(current_age_quantity(quantity, 0) < min_value)
33  return 0.0;
34  else
35  return current_age_quantity(quantity, deriv_order);
36  }
37 
38  }
39 }//End Star namespace.
Declaration of the class representing stellar cores.
double current_age_quantity(size_t quantity, unsigned deriv_order=0) const
The current age value of the given quantity (or its derivative).
double positive_definite_quantity(size_t quantity, double age, unsigned deriv_order, double min_value) const
Ensure the returned quantity is never less than a specified value.
double any_age_quantity(size_t quantity, double age, unsigned deriv_order=0) const
The value of the given quantity (or its derivative) at an arbitrary age.
double current_positive_definite_quantity(size_t quantity, unsigned deriv_order, double min_value) const
Same as positive_definite_quantity() but at currently configured age.