10#ifndef CNetStructureOCL_H
11#define CNetStructureOCL_H
17#include "CNetElement3N.h"
18#include "CNetCableElementSpec.h"
19#include "CNetCableElement.h"
20#include "CNetElementDef.h"
21#include "environment/IBasicBottom.h"
22#include "CNetBottomContactFilter.h"
23#include "environment/ICurrentVel.h"
24#include "sfh/timers/ProfilerWallclock.h"
25#include "CNetStructureSpec.h"
27#include "CNetPanelForcesOcl.h"
29#ifdef FH_VISUALIZATION
30# include "NMeshGenerators.h"
41 virtual void OdeFcn(
const double dT,
const double *
const adX,
double *
const adXDot,
const bool bIsMajorTimeStep);
42 virtual void InitialConditionSetup(
const double dT,
const double *
const adCurrentIC,
double *
const adUpdatedIC, ISimObjectCreator *
const pCreator);
43 virtual void FinalSetup(
const double dT,
const double *
const adX, ISimObjectCreator *
const pCreator);
44#ifdef FH_VISUALIZATION
46 virtual void RenderInit(Ogre::Root *
const pOgreRoot, ISimObjectCreator *
const pCreator);
48 virtual void RenderUpdate(
const double dT,
const double *
const adX);
50 const virtual double *
const NodePos(
const double dT,
const double *
const adX,
int iExtNode);
51 const virtual double *
const NodeVel(
const double dT,
const double *
const adX,
int iExtNode);
52 const virtual double *
const BottomContact(
const double dT,
const double *
const adX);
53 void SetAddedDragPerMPS(
double AddedDragPerMPS);
55 virtual void CalcStateDerivatives(
const double *
const adX,
double *
const adXDot);
56 virtual void AddExternalForces(
const double dT,
const double *
const adX);
57 virtual void AddNetForces(
const double dT,
const double *
const adX);
58 virtual void AddCableForces(
const double dT,
const double *
const adX);
59 virtual double AddNodeBottomForce(
const double *
const adX,
int iNode,
double dDiam,
double adForceInOut[3]);
60 virtual void AddBottomForces(
const double *
const adX);
61 virtual void AddInputPorts(ISimObjectCreator *pCreator);
62 virtual void CreateNetPanels(std::vector<const CNetElementDef*> VNetElementDefs, ISimObjectCreator *pCreator);
63 virtual void CreateNetCables(std::vector<const CNetCableElementSpec*> VCableElements, ISimObjectCreator *pCreator);
64 virtual void CreateDataStructures();
65 virtual void CreateOutputPorts(ISimObjectCreator *pCreator);
66 VSPairStrInt CreateExternalNodeMap( std::string sTag,
int* piUsed,
CNetStructureSpec & NetSpec, ISimObjectCreator *pCreator);
67 void PRINTALLNODEFORCES(std::string spec,
double dT);
79 int m_iNumNodesOutputPosAndVel;
82 int m_iNumNodesOriginal;
84 int m_iNumNodeOutputs;
90 double m_adBottomContact[6];
93 float* m_afElementWaterVel;
99 std::vector<CNetElement3N*> m_VpNetElements;
102 int** m_aaiCableConn;
110 VSPairStrInt m_VsNodesInputForce;
111 bool m_bUseTagForExternalNodes;
114 double* m_adNodeForce;
115 sfh::timers::StopWatch m_OdeTimer;
116#ifdef CNetStructureOCL_DO_PROFILE
117 sfh::timers::ProfilerWallclock m_Profiler;
121#ifdef FH_VISUALIZATION
122 Ogre::Entity* thisEntity;
123 Ogre::SceneNode* thisSceneNode;
125 Ogre::HardwareVertexBufferSharedPtr m_VertexBuffer;
126 Ogre::HardwareVertexBufferSharedPtr m_NormalsBuffer;
127 Ogre::SceneManager* m_pSceneMgr;
128 Ogre::Entity** m_apRenderSphere;
129 Ogre::SceneNode** m_apRenderNodeSphere;
Definition: CNetPanelForcesOcl.h:10
Class containing a net object.
Definition: CNetStructureOCL.h:35
CNetStructureOCL(std::string sSimObjectName, ISimObjectCreator *pCreator)
The constructor sets the pointer to the output object and the parser object.
VSPairStrInt m_VsNodesOutputPosAndVel
Nodes reachable directly through input or output ports.
Definition: CNetStructureOCL.h:109
ISignalPort ** m_apInExternalForces
Interface member variables.
Definition: CNetStructureOCL.h:71
int m_iNumNodesInputForce
Node counts.
Definition: CNetStructureOCL.h:78
virtual ~CNetStructureOCL()
The destructor deletes dynamically allocated memory.
CNetBottomContactFilter m_BottomContactFilter
Environment.
Definition: CNetStructureOCL.h:89
std::vector< CNetCableElement * > m_VpCableElements
Element properties.
Definition: CNetStructureOCL.h:98
Definition: CNetStructureSpec.h:38
Interface for calculating the bottom force on various objects.
Definition: IBasicBottom.h:23
Definition: ICurrentVel.h:12
Class containing the specification for a net object.
Definition: CNetStructureSpec.h:22