22#include "DoorAndClumpWakeBodies.h"
23#include "TrawlCableConstraintSets.h"
25#include <fhsim/simobject/ISimObjectCreator.h>
26#include <fhsim_coribo/ConstraintSolver.h>
27#include <fhsim_environment/BodyWake.h>
28#include <fhsim_environment/EnvironmentProvider.h>
35namespace trawl_mooring
40 CoRiBoDynamics::ConstraintSolver*
solver =
nullptr;
58 TrawlRig(
const std::string& ownerName,
double frequencyCoefficient, std::optional<double> collisionFrequencyCoefficient, ISimObjectCreator& creator);
61 TrawlRig(
const std::string& ownerName, CoRiBoDynamics::ConstraintSolver& solver,
double frequencyCoefficient, std::optional<double> collisionFrequencyCoefficient, ISimObjectCreator& creator);
74 void Register(environment::EnvironmentProvider& environment, ISimObjectCreator& creator);
77 void Step(
double T,
const double* X);
80 environment::wake::SourceSetBodyWake&
BodyWake() {
return *m_bodyWake; }
86 void Build(CoRiBoDynamics::ConstraintSolver& solver, std::optional<double> collisionFrequencyCoefficient, ISimObjectCreator& creator);
88 std::string m_ownerName;
90 std::unique_ptr<environment::wake::SourceSetBodyWake> m_bodyWake;
91 std::unique_ptr<trawl_mooring::DoorAndClumpWakeBodies> m_wakeBodies;
92 bool m_ownsSolver =
false;
96bool OwnsRig(ISimObjectCreator& creator);
What a TrawlCable that owns a rig offers the cables that join it (a TrawlCable with TrawlCable,...
Definition ITrawlCable.h:18
Definition DoorAndClumpWakeBodies.h:46
Definition TrawlCableConstraintSets.h:136
Definition TrawlCableConstraintSets.h:74
Definition TrawlCableConstraintSets.h:16
The rig of the object that owns the solver (a TrawlCable without TrawlCable, or a RundDorg).
Definition TrawlRig.h:49
const RigParts & Parts() const
The solver and its shared parts.
Definition TrawlRig.h:68
TrawlRig(const std::string &ownerName, CoRiBoDynamics::ConstraintSolver &solver, double frequencyCoefficient, std::optional< double > collisionFrequencyCoefficient, ISimObjectCreator &creator)
Builds a rig on solver, which it does not own (test support).
environment::wake::SourceSetBodyWake & BodyWake()
The BodyWake of the doors and clump weights.
Definition TrawlRig.h:80
void Step(double T, const double *X)
The owner's PreOdeFcn at the step start T: the BodyWake's update over the doors and clump weights,...
void Register(environment::EnvironmentProvider &environment, ISimObjectCreator &creator)
Registration without an integrator (test support): the BodyWake on environment, then the environment ...
void Register(ISimObjectCreator &creator)
The owner's FinalSetup, after every cable has added its elements: the symplectic step from the integr...
TrawlRig(const std::string &ownerName, double frequencyCoefficient, std::optional< double > collisionFrequencyCoefficient, ISimObjectCreator &creator)
trawl_mooring::DoorAndClumpWakeBodies & WakeBodies()
The doors and clump weights as the BodyWake casts them.
Definition TrawlRig.h:83
The parts of one constraint solver that every cable on it uses.
Definition TrawlRig.h:39
CoRiBoDynamics::ConstraintSolver * solver
6-DOF rigid body constrained dynamic solver.
Definition TrawlRig.h:40
trawl_mooring::TrawlCableCollisionManager * collisions
Collision constraints; owned by the solver; null in a RundDorg rig.
Definition TrawlRig.h:42
double frequencyCoefficient
The owner's regulator frequency coefficient.
Definition TrawlRig.h:44
trawl_mooring::EnvironmentForces * environmentForces
Water, wake and seabed forces; owned by the solver.
Definition TrawlRig.h:43
trawl_mooring::TrawlCableJointConstraint * joints
Structural joint constraints; owned by the solver.
Definition TrawlRig.h:41