Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
SpinOrbitLockInfo.cpp
1 #define BUILDING_LIBRARY
2 #include "DissipatingBody.h"
3 
4 namespace Evolve {
5 
6  std::ostream &operator<<(std::ostream &os, const SpinOrbitLockInfo &lock)
7  {
8  os << "Lock: " << lock.orbital_frequency_multiplier() << "*OrbFreq = "
9  << lock.spin_frequency_multiplier() << "*SpinFreq ";
10  if(!lock) os << "DISABLED";
11  else os << (lock.lock_direction()>0 ? "from above" : "from below");
12  return os;
13  }
14 
15  void SpinOrbitLockInfo::set_lock(int orbital_freq_mult, int spin_freq_mult,
16  short lock_direction)
17  {
18  __orbital_freq_mult=orbital_freq_mult;
19  __spin_freq_mult=spin_freq_mult;
21  }
22 
24  {
27  bool(rhs.__lock_direction)==bool(__lock_direction);
28  }
29 
30 } //End Evolve namespace.
bool operator==(const SpinOrbitLockInfo &rhs) const
int __orbital_freq_mult
The mutiplier in front of the orbital frequency in the lock.
int __spin_freq_mult
The multiplier in front of the spin frequency in the lock.
std::ostream & operator<<(std::ostream &os, const ZoneEvolutionQuantities &evol_var)
More civilized output for EvolVarType variables.
int orbital_frequency_multiplier() const
The multiplier in front of the orbital frequency in the lock.
short __lock_direction
Should a lock be assumed, and if so from which direction is it approached?
Orientations of zones of bodies in a binary system.
int spin_frequency_multiplier() const
The multiplier in front of the spin frequency in the lock.
Declares the DissipatingBody class.
void set_lock(int orbital_freq_mult, int spin_freq_mult, short lock_direction=0)
Define which tidal dissipation term is in a lock.
Defines a lock between the spin of a dissipating body and the orbit.