8 #ifndef __SPIN_ORBIT_LOCK_INFO 9 #define __SPIN_ORBIT_LOCK_INFO 11 #include "../Core/SharedLibraryExportMacros.h" 28 int __orbital_freq_mult,
54 int orbital_freq_mult=0,
61 short lock_direction=-1)
62 {set_lock(orbital_freq_mult, spin_freq_mult, lock_direction);}
79 int orbital_freq_mult,
86 short lock_direction=0);
90 double spin(
double orbital_frequency)
const 91 {
return (orbital_frequency*__orbital_freq_mult)/__spin_freq_mult;}
96 int orbital_freq_mult,
99 int spin_freq_mult)
const 100 {
return (__lock_direction ?
false :
101 term(orbital_freq_mult, spin_freq_mult));}
107 int orbital_freq_mult,
110 int spin_freq_mult)
const 111 {
return (orbital_freq_mult * __spin_freq_mult
113 spin_freq_mult * __orbital_freq_mult);}
116 operator bool()
const {
return __lock_direction==0;}
137 LIB_LOCAL std::ostream &
operator<<(std::ostream &os,
SpinOrbitLockInfo(const SpinOrbitLockInfo &orig)
Copy the original to this.
int __spin_freq_mult
The multiplier in front of the spin frequency in the lock.
SpinOrbitLockInfo(int orbital_freq_mult=0, int spin_freq_mult=0, short lock_direction=-1)
Define which tidal dissipation term is in a 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.
double spin(double orbital_frequency) const
Spin frequency at exactly the lock that corresponds to the given orbital frequency.
int spin_frequency_multiplier() const
The multiplier in front of the spin frequency in the lock.
bool operator()(int orbital_freq_mult, int spin_freq_mult) const
Is the given tidal dissipation term one of the locked terms?
short lock_direction() const
bool term(int orbital_freq_mult, int spin_freq_mult) const
void lock_direction(short value)
Set the lock direction to the given value.
Defines a lock between the spin of a dissipating body and the orbit.
SpinOrbitLockInfo & operator=(const SpinOrbitLockInfo &rhs)
Make this the same lock as RHS.