Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
LagForcingFrequencyBreakCondition.h
Go to the documentation of this file.
1 
9 #ifndef __CRITICAL_FORCING_FREQUENCY_CONDITION_H
10 #define __CRITICAL_FORCING_FREQUENCY_CONDITION_H
11 
12 #include "../Core/SharedLibraryExportMacros.h"
13 #include "StoppingCondition.h"
14 #include "DissipatingBody.h"
15 #include "../Core/OrbitalExpressions.h"
16 #include "../Core/Error.h"
17 #include <vector>
18 
19 namespace Evolve {
21 
24  public StoppingCondition {
25  private:
26  int
29  __orbital_frequency_multiplier,
30 
34 
37 
38  const DissipatingBody
40  &__body,
41 
43  &__other_body;
44 
47  std::vector< std::vector<double>::size_type >::size_type
49 
52  std::vector<double>::size_type __powerlaw_index;
53 
56 
58  void set_num_subconditions();
59  public:
65 
67  const DissipatingBody &body,
68 
70  const DissipatingBody &other_body,
71 
74  int orbital_frequency_multiplier,
75 
78  int spin_frequency_multiplier
79  );
80 
89  std::valarray<double> operator()(
90  Core::EvolModeType evol_mode,
91  const std::valarray<double> &orbit,
92  const std::valarray<double> &derivatives,
93  std::valarray<double> &stop_deriv
94  ) const;
95 
101  virtual void reached(short deriv_sign, unsigned index = 0);
102 
105  virtual size_t num_subconditions() const
106  {return __num_subconditions;}
107 
109  virtual StoppingConditionType type(unsigned =0) const
110  {return Evolve::EXTERNAL;}
111 
113  virtual short expected_crossing_deriv_sign(
115  unsigned index = 0
116  ) const;
117 
119  virtual std::string describe(int index = -1) const;
120 
122  {
123 #ifndef NDEBUG
124  std::cerr << "Destroying: " << describe() << std::endl;
125 #endif
126  }
127  };//End LagForcingBreakFrequencyCondition class.
128 
129 } //End Evolve namespace.
130 
131 #endif
const DissipatingBody & __other_body
The other body in the system.
A base class for any body contributing to tidal dissipation.
struct LIB_PUBLIC BrokenPowerlawPhaseLagZone
Opaque struct to cant to/from Evolve::BrokenPowerlawPhasLagZone.
Definition: CInterface.h:41
StoppingConditionType
The reasons for stopping the evolution currently supported.
Orientations of zones of bodies in a binary system.
A base class for all stopping conditions.
Declares the DissipatingBody class.
A DissipatingZone where the phase lag is described by a broken powerlaw.
EvolModeType
The various evolution modes.
Definition: Common.h:42
Defines the various stopping conditions needed by OrbitSolver.
BrokenPowerlawPhaseLagZone & __zone
The zone being monitored (for more convenient access).
satisfied when a forcing frequency reaches a critical value.
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.
virtual StoppingConditionType type(unsigned=0) const
Define stopping condition type as EXTERNAL.
virtual size_t num_subconditions() const
The number of subconditions (1 if all critical spins are below or above the current spin...