108#include "cable/subroutines/CableElDynStiff.h"
109#include "cable/subroutines/InternalCableWithBottomContact.h"
111#include "sfh/timers/Timer.h"
113#include <fhsim/simobject/SimObject.h>
121 Cable(std::string simObjectName, ISimObjectCreator* creator);
127 void OdeFcn(
const double dT,
const double*
const adX,
double*
const adXDot)
const;
128 void InitialConditionSetup(
const double dT,
const double*
const adCurrentIC,
double*
const adUpdatedIC, ISimObjectCreator*
const creator);
129 void FinalSetup(
const double dT,
const double*
const adX, ISimObjectCreator*
const creator);
130 void CalcOutput(
const double dT,
const double*
const adX)
const;
132 bool HasJacobians()
const override;
133 void OdeJacobian(
double T,
const double* X,
double* J,
int nStates)
override;
134 int GetJacobianSparsity(
int nStates,
int* rowPtr,
int* colIdx)
override;
136 const double* OutForceA(
const double dT,
const double*
const adX);
137 const double* OutForceB(
const double dT,
const double*
const adX);
138 const double* OutPosA(
const double dT,
const double*
const adX);
139 const double* OutPosB(
const double dT,
const double*
const adX);
141#ifdef FH_VISUALIZATION
144 void RenderInit(Ogre::Root*
const ogreRoot, ISimObjectCreator*
const creator);
147 void RenderUpdate(
const double dT,
const double*
const adX);
150 void UpdateLength(
double newLength,
double deltaT);
double * m_lengths
The lengths of the cable elements.
Definition Cable.h:175
ISignalPort * m_inLength
The cable length input port.
Definition Cable.h:159
ISignalPort * m_inPosB
The position B input port.
Definition Cable.h:163
std::string m_cableName
The identification name of the cable;.
Definition Cable.h:176
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:172
int m_IStates
The index to the internal states of the cable.
Definition Cable.h:164
~Cable()
The destructor deletes dynamically allocated memory.
ICommonComputation * m_commonCalc
Calculations necessary for more than one output port.
Definition Cable.h:165
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:174
int m_numElements
The number of elements to divide the cable into.
Definition Cable.h:168
ISignalPort * m_inVelB
The velocity B input port.
Definition Cable.h:161
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:171
ISignalPort * m_inPosA
The position A input port.
Definition Cable.h:162
int m_numNodes
The number of nodes of the cable.
Definition Cable.h:169
SCableSpec m_CableSpec
The cable specification.
Definition Cable.h:179
double m_forceA[3]
The force on the end A.
Definition Cable.h:173
ISignalPort * m_inVelA
The velocity A input port.
Definition Cable.h:160
Contains some specifications used for simulating cables.
Definition InternalCable.h:33