Program Listing for File ExponentialDecayDiffRotBody.h¶
↰ Return to documentation for file (/home/kpenev/projects/git/poet/poet_src/Star/ExponentialDecayDiffRotBody.h)
#ifndef __EXPONENTIAL_DECAY_DIFF_ROT_COUPLING_BODY_H
#define __EXPONENTIAL_DECAY_DIFF_ROT_COUPLING_BODY_H
#include "../Core/SharedLibraryExportMacros.h"
#include "../Evolve/DissipatingBody.h"
#include "../Evolve/ZoneOrientation.h"
namespace Star {
class LIB_PUBLIC ExponentialDecayDiffRotBody :
virtual public Evolve::DissipatingBody {
private:
double __current_age,
__timescale;
mutable std::valarray< std::valarray<Eigen::Vector3d> > __torque;
void reset_torque();
Eigen::Vector3d &torque_entry(
unsigned top_zone_index,
Evolve::Dissipation::QuantityEntry entry,
bool wih_respect_to_top
) const;
public:
ExponentialDecayDiffRotBody(
double coupling_timescale) :
__current_age(Core::NaN),
__timescale(coupling_timescale),
__torque(0)
{}
virtual void configure(bool initialize,
double age,
double companion_mass,
double semimajor,
double eccentricity,
const double *spin_angmom,
const double *inclination = NULL,
const double *periapsis = NULL,
bool locked_surface = false,
bool zero_outer_inclination = false,
bool zero_outer_periapsis = false);
Eigen::Vector3d angular_momentum_coupling(
unsigned top_zone_index,
Evolve::Dissipation::QuantityEntry
entry=Evolve::Dissipation::NO_DERIV,
bool with_respect_to_top=false
) const;
};//End ExponentialDecayDiffRotBody class.
}//End Star namespace.
#endif