9 #ifndef __TEST_LOCK_MONITORING_H 10 #define __TEST_LOCK_MONITORING_H 13 #include <boost/math/special_functions/sign.hpp> 15 #include "../shared/Common.h" 16 #include "../../Planet/PlanetZone.h" 17 #include "../../Planet/Planet.h" 35 double spin_frequency);
42 std::ostringstream &message
52 double orbital_frequency,
53 double spin_frequency,
61 std::pair<double, double> range,
73 double lock_set_orbital_frequency,
76 double lock_set_spin_frequency,
80 double test_orbital_frequency,
85 std::pair<double, double> test_spin_frequency_range,
89 int orbital_frequency_multiplier,
93 int spin_frequency_multiplier,
98 int expected_correction
111 int lower_lock_orbital_freuqency_multiplier,
114 double orbital_frequency
void test_tidal_frequency_fix()
Test fix applied to the tidal frequency of tidal term(s) matching lower boundary lock.
void check_monitored_locks(double orbital_frequency, double spin_frequency, const SpinOrbitLockInfo &expected_lock_below, const SpinOrbitLockInfo &expected_lock_above)
Verify a single expectation of what locks would be monitored in a given situation.
void setup()
No fixture at this point.
Orientations of zones of bodies in a binary system.
void set_orbital_spin_frequeqncy(double orbital_frequency, double spin_frequency)
Change the orbital and spin frequencies for __zone.
The test suite that ensures the correct locks are selected for monitoring and the fixes applied to th...
void check_tidal_frequency_range(double lock_set_orbital_frequency, double lock_set_spin_frequency, double test_orbital_frequency, std::pair< double, double > test_spin_frequency_range, int orbital_frequency_multiplier, int spin_frequency_multiplier, int expected_correction)
Verify a single expectation for fixing of a tidal term in a given situation over a range of spin freq...
test_LockMonitoring()
Create the test suite.
Planet::PlanetZone __zone
A dissipative zone to run the tests on.
void add_zone_locks_to_message(std::ostringstream &message)
void tear_down()
No fixture at this point.
void check_unlocked_tidal_frequency(int expansion_order, int lower_lock_orbital_freuqency_multiplier, double orbital_frequency)
Check that lock-corrected tidal frequency reproduces expectations for a single set of monitored locks...
double sample_range(std::pair< double, double > range, unsigned position)
Pick a just inside each boundary or in the middle of a range.
void set_expansion_order(int max_orbital_multiplier)
Change the order of the tidal potential expansion used by __zone.
void test_lock_init()
Test whether the correct tidal terms are selected for lock monitoring when and.
void add_locks_to_message(const SpinOrbitLockInfo &lock_below, const SpinOrbitLockInfo &lock_above, std::ostringstream &message)
Add information about the given locks relative to the tidal frequency to the test message...
Defines a lock between the spin of a dissipating body and the orbit.
The only zone of a LockedPlanet.