9 #define BUILDING_LIBRARY 31 int orbital_frequency_multiplier,
32 int spin_frequency_multiplier
40 __zone.tidal_term_index(orbital_frequency_multiplier,
41 spin_frequency_multiplier)
54 const std::valarray<double> &orbit,
55 const std::valarray<double> &,
56 std::valarray<double> &stop_deriv
59 assert(evol_mode == Core::BINARY);
69 else semimajor = std::pow(orbit[0], 1.0 / 6.5);
71 double orbital_frequency = Core::orbital_angular_velocity(
77 double abs_forcing_frequency = std::abs(
89 double critical_frequency =
92 result[0] = ((abs_forcing_frequency - critical_frequency)
98 double critical_frequency =
101 result[above_index] = (
102 (abs_forcing_frequency - critical_frequency)
123 assert(deriv_sign == -1);
127 assert(deriv_sign == 1);
158 std::ostringstream description;
159 description <<
"Forcing frequency leaving the interval ";
183 return description.str();
std::valarray< double > operator()(Core::EvolModeType evol_mode, const std::valarray< double > &orbit, const std::valarray< double > &derivatives, std::valarray< double > &stop_deriv) const
Return the differences between the current forcing frequency of the zone monitored and the two closes...
std::vector< std::vector< double >::size_type > __tidal_indices
The indices within __tidal_frequency_powers of the powerlaw now in effect for each active tidal term...
const DissipatingBody & __other_body
The other body in the system.
unsigned number_locked_zones() const
The number of zones currently in a spin-orbit lock.
int __orbital_frequency_multiplier
A base class for any body contributing to tidal dissipation.
Orientations of zones of bodies in a binary system.
virtual short expected_crossing_deriv_sign(unsigned index=0) const
See StoppingCondition::expected_crossing_deriv_sign().
double mass() const
The mass of the body (constant with age).
LagForcingFrequencyBreakCondition(BrokenPowerlawPhaseLagZone &zone, const DissipatingBody &body, const DissipatingBody &other_body, int orbital_frequency_multiplier, int spin_frequency_multiplier)
Monitor a single forcing term of a single zone for a number of critical forcing frequencies.
virtual std::string describe(int index=-1) const
See StoppingCondition::describe().
virtual void reached(short deriv_sign, unsigned index=0)
Adjust the above and below critical frequencies being monitored.
unsigned __num_subconditions
See num_subcondition().
A DissipatingZone where the phase lag is described by a broken powerlaw.
EvolModeType
The various evolution modes.
const DissipatingBody & __body
The body this condition is monitoring.
Declares a stopping condition satisfied when a forcing frequency reaches a critical value...
Declares the class that provides the phase lag function to DissipatingZone objects.
double forcing_frequency(int orbital_frequency_multiplier, int spin_frequency_multiplier, double orbital_frequency) const
The tidal forcing frequency for the given term and orbital frequency.
std::vector< double > __tidal_frequency_powers
The powerlaw indices for the tidal frequency dependence.
std::vector< double > __tidal_frequency_breaks
The locations of the breaks in tidal frequency in rad/day.
BrokenPowerlawPhaseLagZone & __zone
The zone being monitored (for more convenient access).
void set_num_subconditions()
Set the appropriate value of __num_subcondition.
std::vector< std::vector< double >::size_type >::size_type __term_index
The index of the monitored tidal term within __zone.__tidal_indices.
std::vector< double >::size_type __powerlaw_index
The index of the currently active powerlaw within __zone.__tidal_frequency_powers.
int __spin_frequency_multiplier