Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
SynchronizedCondition.h
Go to the documentation of this file.
1 
9 #ifndef __SYNCHRONIZED_CONDITION_H
10 #define __SYNCHRONIZED_CONDITION_H
11 
12 #include "../Core/SharedLibraryExportMacros.h"
13 #include "StoppingCondition.h"
14 #include "SpinOrbitLockInfo.h"
15 
16 namespace Evolve {
17 
18  class DissipatingZone;
19  class BinarySystem;
20 
23  class LIB_LOCAL SynchronizedCondition : public StoppingCondition{
24  private:
26  int __orbital_freq_mult,
27 
30 
32  bool __primary;
33 
35  unsigned __zone_index;
36 
39 
42 
43  public:
47  int orbital_freq_mult,
48 
50  int spin_freq_mult,
51 
54  short deriv_sign,
55 
57  bool primary,
58 
60  unsigned zone_index,
61 
63  BinarySystem &system
64  );
65 
69  const SpinOrbitLockInfo &monitored_lock,
70 
72  bool primary,
73 
75  unsigned zone_index,
76 
78  BinarySystem &system
79  ) :
81  monitored_lock.orbital_frequency_multiplier(),
82  monitored_lock.spin_frequency_multiplier(),
83  monitored_lock.lock_direction(),
84  primary,
85  zone_index,
86  system
87  )
88  {}
89 
90 
97  std::valarray<double> operator()(
98  Core::EvolModeType evol_mode,
99  const std::valarray<double> &orbit,
100  const std::valarray<double> &derivatives,
101  std::valarray<double> &stop_deriv
102  ) const;
103 
105  StoppingConditionType type(unsigned =0) const {return SYNCHRONIZED;}
106 
108  int orbital_frequency_multiplier() const {return __orbital_freq_mult;}
109 
111  int spin_frequency_multiplier() const {return __spin_freq_mult;}
112 
114  // short body_index() const {return __body_index;}
115 
117  void reached(short deriv_sign, unsigned index=0);
118 
120  virtual std::string describe(int index = -1) const;
121 
122  };//End SynchronizedCondition class.
123 
124 }//End Evolve namespace.
125 
126 #endif
int __spin_freq_mult
The multiplier in front of the spin frequency in the lock.
BinarySystem & __system
The binary system this locking condition is attached to.
Satisfied when some multiples of the orbit and stellar rotation are synchronized. ...
const DissipatingZone & __zone
The zone whose spin is monitored.
int orbital_frequency_multiplier() const
The multiplier in front of the orbital frequency in the lock.
StoppingConditionType
The reasons for stopping the evolution currently supported.
Orientations of zones of bodies in a binary system.
SynchronizedCondition(const SpinOrbitLockInfo &monitored_lock, bool primary, unsigned zone_index, BinarySystem &system)
Create the synchronization condition for the given object from a lock.
bool __primary
Which body&#39;s spin is checked for locking.
A layer of a system body for which the tidal bulge is not exactly in phase with the tidal potential...
Defines the SpinOrbitLockInfo class.
A base class for all stopping conditions.
StoppingConditionType type(unsigned=0) const
Identify this as a SYNCHRONIZED condition.
EvolModeType
The various evolution modes.
Definition: Common.h:42
unsigned __zone_index
Which zone is checked for locking.
Defines the various stopping conditions needed by OrbitSolver.
int spin_frequency_multiplier() const
The multiplier in front of the spin frequency in the lock.
Describes a system of two bodies orbiting each other.
Definition: BinarySystem.h:57
Defines a lock between the spin of a dissipating body and the orbit.