159#include "cable/subroutines/CableElDynStiff.h"
160#include "cable/subroutines/InternalCableWithBottomContact.h"
162#include "sfh/timers/Timer.h"
164#include <fhsim/simobject/SimObject.h>
172 Cable(std::string simObjectName, ISimObjectCreator* creator);
178 void OdeFcn(
const double dT,
const double*
const adX,
double*
const adXDot)
const;
179 void InitialConditionSetup(
const double dT,
const double*
const adCurrentIC,
double*
const adUpdatedIC, ISimObjectCreator*
const creator);
180 void FinalSetup(
const double dT,
const double*
const adX, ISimObjectCreator*
const creator);
181 void CalcOutput(
const double dT,
const double*
const adX)
const;
183 bool HasJacobians()
const override;
184 void OdeJacobian(
double T,
const double* X,
double* J,
int nStates)
override;
185 int GetJacobianSparsity(
int nStates,
int* rowPtr,
int* colIdx)
override;
187 const double* OutForceA(
const double dT,
const double*
const adX);
188 const double* OutForceB(
const double dT,
const double*
const adX);
189 const double* OutPosA(
const double dT,
const double*
const adX);
190 const double* OutPosB(
const double dT,
const double*
const adX);
192#ifdef FH_VISUALIZATION
195 void RenderInit(Ogre::Root*
const ogreRoot, ISimObjectCreator*
const creator);
198 void RenderUpdate(
const double dT,
const double*
const adX);
201 void UpdateLength(
double newLength,
double deltaT);
double * m_lengths
The lengths of the cable elements.
Definition Cable.h:226
ISignalPort * m_inLength
The cable length input port.
Definition Cable.h:210
ISignalPort * m_inPosB
The position B input port.
Definition Cable.h:214
std::string m_cableName
The identification name of the cable;.
Definition Cable.h:227
void InitialConditionSetup(const double dT, const double *const adCurrentIC, double *const adUpdatedIC, ISimObjectCreator *const creator)
functionality for setting initialconditions based on input port results.
double m_inertiaB
The inertia of the end B.
Definition Cable.h:223
int m_IStates
The index to the internal states of the cable.
Definition Cable.h:215
~Cable()
The destructor deletes dynamically allocated memory.
ICommonComputation * m_commonCalc
Calculations necessary for more than one output port.
Definition Cable.h:216
Cable(std::string simObjectName, ISimObjectCreator *creator)
The constructor sets the pointer to the output object and the parser object.
double m_forceB[3]
The force on the end B.
Definition Cable.h:225
int m_numElements
The number of elements to divide the cable into.
Definition Cable.h:219
ISignalPort * m_inVelB
The velocity B input port.
Definition Cable.h:212
void UpdateInertia()
Updates the inertia of the cable according to the changing length.
void UpdateStiffness(const double *const adForceA, const double *const adForceB)
Updates the stiffness of the cable to ensure that this is not too large.
double m_inertiaA
The inertia of the end A.
Definition Cable.h:222
ISignalPort * m_inPosA
The position A input port.
Definition Cable.h:213
int m_numNodes
The number of nodes of the cable.
Definition Cable.h:220
SCableSpec m_CableSpec
The cable specification.
Definition Cable.h:230
double m_forceA[3]
The force on the end A.
Definition Cable.h:224
ISignalPort * m_inVelA
The velocity A input port.
Definition Cable.h:211
Contains some specifications used for simulating cables.
Definition InternalCable.h:33