9 #ifndef __COMBINED_STOPPING_CONDITION_H 10 #define __COMBINED_STOPPING_CONDITION_H 12 #include "../Core/SharedLibraryExportMacros.h" 35 std::vector<StoppingConditionType>
__types;
42 void add_subcondition_values(
50 const std::valarray<double> &orbit,
53 const std::valarray<double> &derivatives,
61 std::valarray<double> &values,
64 std::valarray<double> &derivs)
const;
68 std::vector<StoppingCondition *>::const_iterator
69 find_condition(
unsigned &index)
const;
73 std::vector<StoppingCondition *>::iterator
74 find_condition(
unsigned &index);
79 __sub_conditions(), __num_subconditions(0), __delete_subcond(true) {}
92 std::valarray<double> operator()(
94 const std::valarray<double> &orbit,
95 const std::valarray<double> &derivatives,
96 std::valarray<double> &stop_deriv)
const;
104 {
return __types[index];}
107 virtual void reached(
short deriv_sign,
unsigned index=0);
110 short expected_crossing_deriv_sign(
unsigned index = 0)
const;
113 virtual std::string describe(
int index)
const;
CombinedStoppingCondition()
Create an empty stopping condition (identical to NoStopCondition).
void no_delete_subcond()
Disables the destruction of the subconditions when *this is destroyed.
unsigned __num_subconditions
The number of subconditinos included, allowing for subconditions with multiple entries.
StoppingConditionType
The reasons for stopping the evolution currently supported.
Orientations of zones of bodies in a binary system.
std::vector< StoppingConditionType > __types
The types of the subconditinos, including subconditions of subconditions.
std::vector< StoppingCondition * > __sub_conditions
The conditions that are combined.
A base class for all stopping conditions.
bool __delete_subcond
Whether to delete the sub-conditions then *this is destroyed.
EvolModeType
The various evolution modes.
virtual size_t num_subconditions() const
The number of subconditions in the current condition.
Defines the various stopping conditions needed by OrbitSolver.
A class combining the the outputs of multiple stopping conditions.
StoppingConditionType type(unsigned index=0) const
What event is the index-th stopping sub-condition associated with.