12#include "sfh/sim/simulation.h"
23 double pos[3] = {0.0, 0.0, 0.0};
24 double vel[3] = {0.0, 0.0, 0.0};
25 double relStrength = 1.0;
29 using PosAndVelSource = std::function<void(
double T,
const double* X,
double pos[3],
double vel[3])>;
48 virtual void GetForce(
const Motion& motion,
double*
const adForce,
const double*
const adNodePos,
const double*
const adNodeVel) = 0;
49 virtual void AddForce(
const Motion& motion,
double*
const adForce,
const double nodeMass,
const double*
const adNodePos,
const double*
const adNodeVel) = 0;
50 virtual void AddForce(
const Motion& motion,
double*
const adForce,
const double*
const adNodePos,
const double*
const adNodeVel) = 0;
51 virtual void SetForceIfActive(
const Motion& motion,
double*
const adForce,
const double*
const adNodePos,
const double*
const adNodeVel) { };
52 virtual bool IsActive(
const Motion& motion,
const double*
const adNodePos) = 0;
Class modelling the interface of a general attractor.
Definition AttractorBase.h:18
std::function< double(double T)> StrengthSource
Gives the attractor's relative strength at time T.
Definition AttractorBase.h:32
std::function< void(double T, const double *X, double pos[3], double vel[3])> PosAndVelSource
Gives the attractor's position and velocity at (T, X), X the model-global states.
Definition AttractorBase.h:29
Motion MotionAt(double T, const double *X) const
void SetPosAndVelSource(PosAndVelSource source)
Sets what moves the attractor (Seine/Vessel, when it creates it).
void SetStrengthSource(StrengthSource source)
Sets what scales the attractor's pull (Seine/Operation, in its FinalSetup).
Where the attractor is, how fast it moves, and how strongly it pulls.
Definition AttractorBase.h:22