Marine systems simulation
CInternalCableWithAttractor.h
1
9
10#ifndef CInternalCableWithAttractor_H
11#define CInternalCableWithAttractor_H
12
13// Includes
14#include <cable/subroutines/CInternalCableWithBottomContact.h>
15#include "CAttractorBase.h"
16
17//Class definition
19{
20public:
22 CInternalCableWithAttractor(ISimObjectCreator* pCreator, const SCableSpec& CableSpec,std::string attractorName);
23 virtual void FinalSetup(const double dT, const double *const adX, ISimObjectCreator* const pCreator);
24
26 void SetAttractor(CAttractorBase* pAttractor);
27
29 virtual void OdeFcn(const double* const adPosA,
30 const double* const adVelA,
31 const double* const adPosB,
32 const double* const adVelB,
33 const double* const adX,
34 double* const adXDot,
35 double dT);
36
37protected:
39 void AddAttractorForces(const double* const adX);
40
42 void AddElementForce(int iCableElement,
43 const double adPosA[3],
44 const double adVelA[3],
45 const double adPosB[3],
46 const double adVelB[3],
47 double adForceA[3],
48 double adForceB[3],
49 double dT);
50
51
52 std::string m_attractorName;
54};
55
56
57#endif
Class modelling the interface of a general attractor.
Definition: CAttractorBase.h:17
Class containing a cable object to be part of larger cable structures.
Definition: CInternalCableWithAttractor.h:19
virtual void OdeFcn(const double *const adPosA, const double *const adVelA, const double *const adPosB, const double *const adVelB, const double *const adX, double *const adXDot, double dT)
Calculates the state derivatives and the end forces.
void AddElementForce(int iCableElement, const double adPosA[3], const double adVelA[3], const double adPosB[3], const double adVelB[3], double adForceA[3], double adForceB[3], double dT)
Adds the forces from each cable element.
CInternalCableWithAttractor(ISimObjectCreator *pCreator, const SCableSpec &CableSpec, std::string attractorName)
The constructor sets the pointer to the output object and the parser object.
CAttractorBase * m_pAttractor
A pointer to the attractor to use.
Definition: CInternalCableWithAttractor.h:53
void AddAttractorForces(const double *const adX)
Adds the attractor forces to each cable node.
void SetAttractor(CAttractorBase *pAttractor)
Sets the attractor to use.
Class containing a cable object to be part of other structures.
Definition: CInternalCableWithBottomContact.h:21
Contains some specifications used for simulating cables.
Definition: CInternalCable.h:31