Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
testLockMonitoring.h
Go to the documentation of this file.
1 
9 #ifndef __TEST_LOCK_MONITORING_H
10 #define __TEST_LOCK_MONITORING_H
11 
12 #include <sstream>
13 #include <boost/math/special_functions/sign.hpp>
14 
15 #include "../shared/Common.h"
16 #include "../../Planet/PlanetZone.h"
17 #include "../../Planet/Planet.h"
18 
19 namespace Evolve {
25  class test_LockMonitoring : public Test::Suite {
26  private:
29 
31  void set_expansion_order(int max_orbital_multiplier);
32 
34  void set_orbital_spin_frequeqncy(double orbital_frequency,
35  double spin_frequency);
36 
40  const SpinOrbitLockInfo &lock_below,
41  const SpinOrbitLockInfo &lock_above,
42  std::ostringstream &message
43  );
44 
47  void add_zone_locks_to_message(std::ostringstream &message);
48 
52  double orbital_frequency,
53  double spin_frequency,
54  const SpinOrbitLockInfo &expected_lock_below,
55  const SpinOrbitLockInfo &expected_lock_above
56  );
57 
59  double sample_range(
61  std::pair<double, double> range,
62 
66  unsigned position
67  );
68 
73  double lock_set_orbital_frequency,
74 
76  double lock_set_spin_frequency,
77 
80  double test_orbital_frequency,
81 
85  std::pair<double, double> test_spin_frequency_range,
86 
88  //term being tested.
89  int orbital_frequency_multiplier,
90 
92  //term being calculated.
93  int spin_frequency_multiplier,
94 
98  int expected_correction
99  );
100 
106  int expansion_order,
107 
111  int lower_lock_orbital_freuqency_multiplier,
112 
114  double orbital_frequency
115  );
116  protected:
118  void setup() {};
119 
121  void tear_down() {};
122 
123  public:
126 
129  void test_lock_init();
130 
134  }; //End test_LockMonitoring class.
135 
136 } //End Evolve namespace.
137 
138 #endif
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.
Definition: PlanetZone.h:21