8 #ifndef __STOPPING_CONDITION_H 9 #define __STOPPING_CONDITION_H 11 #include "../Core/SharedLibraryExportMacros.h" 12 #include "../Core/Common.h" 49 LIB_LOCAL std::ostream &
operator<<(std::ostream &os,
66 short expected_crossing_deriv_sign = 0
68 : __expected_crossing_deriv_sign(expected_crossing_deriv_sign)
75 virtual std::valarray<double> operator()(
83 const std::valarray<double> &orbit,
87 const std::valarray<double> &derivatives,
91 std::valarray<double> &stop_deriv
119 assert(__expected_crossing_deriv_sign == deriv_sign);
121 __expected_crossing_deriv_sign = -deriv_sign;
137 return __expected_crossing_deriv_sign;
142 virtual std::string describe(
int index = -1)
const = 0;
158 const std::valarray<double> &,
159 std::valarray<double> &stop_deriv)
const 160 {stop_deriv.resize(1, Core::NaN);
return std::valarray<double>(1, 1);}
A stopping condition that is never satisfied.
StoppingConditionType type(unsigned=0) const
Identifies the condition as NO_STOP.
The spin-orbit lock can no longer be maintaned.
std::ostream & operator<<(std::ostream &os, const ZoneEvolutionQuantities &evol_var)
More civilized output for EvolVarType variables.
A base class for all external stopping conditions.
std::valarray< double > operator()(Core::EvolModeType, const std::valarray< double > &, const std::valarray< double > &, std::valarray< double > &stop_deriv) const
The error due to truncating the eccentricity expansion is too small.
virtual size_t num_subconditions() const
The number of subconditions in the current condition.
StoppingConditionType
The reasons for stopping the evolution currently supported.
Orientations of zones of bodies in a binary system.
StoppingConditionType type(unsigned=0) const
Identify this as an EXTERNAL condition.
The error due to truncating the eccentricity expansion is too large.
virtual short expected_crossing_deriv_sign(unsigned index=0) const
The expected sign of the derivative at the next zero-crossing.
A base class for all stopping conditions.
StoppingCondition(short expected_crossing_deriv_sign=0)
Create a generic stopping condition.
short __expected_crossing_deriv_sign
The sign of the first derivative at the next zero-crossing of this condition.
EvolModeType
The various evolution modes.
void reached(short, unsigned=0)
See StoppingCondition::reached().
virtual void reached(short deriv_sign, unsigned index=0)
Called when a stopping condition has been reached by the evolution.