Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
BreakLockCondition.h
Go to the documentation of this file.
1 
9 #ifndef __BREAK_LOCK_CONDITION_H
10 #define __BREAK_LOCK_CONDITION_H
11 
12 #include "../Core/SharedLibraryExportMacros.h"
13 #include "StoppingCondition.h"
14 
15 namespace Evolve {
16 
17  class BinarySystem;
18 
23  class LIB_LOCAL BreakLockCondition : public StoppingCondition {
24  private:
27 
30  public:
34  BinarySystem &system,
35 
37  unsigned locked_zone_index
38  ) :
39  __system(system),
40  __locked_zone_index(locked_zone_index)
41  {}
42 
57  std::valarray<double> operator()(
58  Core::EvolModeType evol_mode,
59  const std::valarray<double> &orbit,
60  const std::valarray<double> &derivatives,
61  std::valarray<double> &stop_deriv
62  ) const;
63 
65  virtual size_t num_subconditions() const {return 2;}
66 
68  StoppingConditionType type(unsigned =0) const {return BREAK_LOCK;}
69 
71  void reached(short deriv_sign, unsigned index=0);
72 
76  unsigned index = 0
77  ) const
78  {
79  assert(index <= 1);
80 
81  return (index == 0 ? -1 : 1);
82  }
83 
85  virtual std::string describe(int index = 0) const;
86 
87  }; //End BreakLockCondition class.
88 
89 } //End Evolve namespace.
90 
91 #endif
virtual size_t num_subconditions() const
The number of subconditions in the current condition.
The spin-orbit lock can no longer be maintaned.
StoppingConditionType type(unsigned=0) const
Identify this as a BREAK_LOCK condition.
Satisfied when the maximum tidal torque that the planet can exert on the star is no longer sufficient...
StoppingConditionType
The reasons for stopping the evolution currently supported.
Orientations of zones of bodies in a binary system.
unsigned __locked_zone_index
The index within the list of locked zones of the checked zone.
BinarySystem & __system
The binary system this condition is attached to.
A base class for all stopping conditions.
virtual short expected_crossing_deriv_sign(unsigned index=0) const
See StoppingCondition::expected_crossing_deriv_sign().
EvolModeType
The various evolution modes.
Definition: Common.h:42
Defines the various stopping conditions needed by OrbitSolver.
Describes a system of two bodies orbiting each other.
Definition: BinarySystem.h:56
BreakLockCondition(BinarySystem &system, unsigned locked_zone_index)
Create a condition monitoring for a lock breaking.