Marine systems simulation
CCableBranchedAttractor.h
1#pragma once
17#include <CInputReader.h>
18
19#include <cable/CCableBranched.h>
20#include "CInternalCableWithAttractor.h"
21#include "CAttractorBase.h"
22
23
24//#define OUTPUT_NODE_POS
25
26//Class definition
28{
29public:
30 CCableBranchedAttractor(std::string sSimObjectName, ISimObjectCreator* pCreator);
31
34 virtual void aFunction(std::string sSimObjectName, ISimObjectCreator* pCreator);
35 virtual void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep);
36 virtual void FinalSetup(const double dT, const double *const adX, ISimObjectCreator* const pCreator);
37 //virtual void OutputFcn(const double dT, const double* const adX, const double* const * const aadInputports, double* const * const aadY); ///< Calculates the end forces.
38 //void GetSimRes();
39
40#ifdef FH_VISUALIZATION
42 //void RenderInit(Ogre::Root* const pOgreRoot, ISimObjectCreator* const pCreator);
43
45 //void RenderUpdate(const double dT, const double* const adX);
46#endif
47
48protected:
49 //virtual void InitializeCableSections(double* const adX, double* const * const aadInputports);
50 virtual void CreateStates(ISimObjectCreator* pCreator);
51 //void OutputExternalConnForces(const double* const adVelWater, const double* const adX, const double* const * const aadInputports, double* const * const aadY);
52 //void OutputElementTensions(const double* const adVelWater, const double* const adX, const double* const * const aadInputports, double* const * const aadY);
53 void AllocateCableSections();
54 //void InstantiateInternalCable(TiXmlElement* elCableEl, std::string& sFileAndPath, std::string& sElementName, int iElement);
55 void AddAttractorForces(const double* const adX);
56
57 std::vector<CAttractorBase*> m_VAttractors;
58 //unsigned long m_IInAttractorPos; ///< The index of the input port with position of the attractor (such as a net bin).
59 //unsigned long m_IInAttractorVel; ///< The index of the input port with velocity of the attractor (such as a net bin).
60 std::string m_sAttractorName;
61 //CInternalCableWithAttractor** m_apCableSections; ///< An array holding the cable sections.
62
63
64#ifdef OUTPUT_NODE_POS
65 int m_iNumNodesToOutput;
66 int* m_aiNodesToOutput;
67 unsigned long* m_aIOutNodePos;
68 unsigned long* m_aIOutNodeVel;
69
70 int m_iNumElementTensionToOutput;
71 int* m_aiElementTensionToOutput;
72 unsigned long* m_aIOutElementTension;
73
74 //double* aadElementTensions
75#endif
76};
Definition: CCableBranchedAttractor.h:28
~CCableBranchedAttractor()
The destructor deletes dynamically allocated memory.
std::string m_sAttractorName
The name of the attractor.
Definition: CCableBranchedAttractor.h:60
Definition: CCableBranched.h:227