8 #define BUILDING_LIBRARY 14 const std::valarray<double> &,
15 const std::valarray<double> &derivatives,
16 std::valarray<double> &stop_deriv)
const 19 assert(evol_mode != Core::LOCKED_SURFACE_SPIN);
20 if(evol_mode != Core::BINARY) assert(
__primary);
23 if(evol_mode == Core::BINARY)
29 else angmom_index -= 3;
30 assert(angmom_index <= derivatives.size());
37 wsurf_sign = (wsurf < 0 ? -1.0 : 1.0);
40 surf_angmom_deriv = derivatives[angmom_index];
45 wsurf_sign * surf_angmom_deriv
52 return std::valarray<double>(result, 1);
63 std::ostringstream description;
64 description << (
__primary ?
"Primary" :
"Secondary")
69 <<
" the wind saturation threshold of" 72 return description.str();
unsigned number_locked_zones() const
The number of zones currently in a spin-orbit lock.
virtual const DissipatingZone & zone(unsigned zone_index) const =0
A modifiable reference to one of the body's zones.
virtual double moment_of_inertia(int deriv_order=0) const =0
Moment of inertia of the zone or its age derivative at the age of last configure() call...
Declaration of a stopping condition monitoring for the surface spin of a star crossing the wind satur...
virtual std::string describe(int index=-1) const
See StoppingCondition::describe().
double __saturation_freq
The frequency at which the wind saturates.
virtual short expected_crossing_deriv_sign(unsigned index=0) const
The expected sign of the derivative at the next zero-crossing.
bool __primary
Is __body we are the primary in the system?
std::valarray< double > operator()(Core::EvolModeType evol_mode, const std::valarray< double > &orbit, const std::valarray< double > &derivatives, std::valarray< double > &stop_deriv) const
The difference between the convective and wind saturation angular velocities divided by the latter...
virtual bool locked(int orbital_frequency_multiplier, int spin_frequency_multiplier) const
Should return true iff the given term is presently locked.
EvolModeType
The various evolution modes.
SaturatingSkumanichWindBody & __body
The body this condition is monitoring.
const Evolve::DissipatingBody & __other_body
The primary body in the system if not __body.
double spin_frequency() const
The surface spin freuqency of the body.
virtual unsigned number_zones() const =0
The number of zones the body consists of.