14#include <CEnvironment.h>
15#include <IBasicBottom.h>
16#include <ICurrentVel.h>
17#include "sfh/timers/ProfilerWallclock.h"
18#include <JointConstraint.h>
20#include "CNetElement3NWithConstraints.h"
21#include "CNetCableElementSpec.h"
22#include "CNetCableElementWithConstraints.h"
23#include "CNetElementDef.h"
24#include "CNetBottomContactFilter.h"
25#include "CNetStructureSpec.h"
29#ifdef FH_VISUALIZATION
30 #include "sfh/ogre/NMeshGenerators.h"
31 #include "sfh/ogre/C3DLine.h"
32 #include <CTextRenderer.h>
43 virtual void OdeFcn(
const double dT,
const double *
const adX,
double *
const adXDot,
const bool bIsMajorTimeStep);
44 virtual void InitialConditionSetup(
const double dT,
const double *
const adCurrentIC,
double *
const adUpdatedIC, ISimObjectCreator *
const pCreator);
45 virtual void FinalSetup(
const double dT,
const double *
const adX, ISimObjectCreator *
const pCreator);
46 const double *
const outExternalNodeForce(
const double dT,
const double *
const adX,
int iExtNode);
48#ifdef FH_VISUALIZATION
50 virtual void RenderInit(Ogre::Root *
const pOgreRoot, ISimObjectCreator *
const pCreator);
52 virtual void RenderUpdate(
const double dT,
const double *
const adX);
54 void CreateCapsule( Ogre::ManualObject *capsule_manual);
57 const virtual double *
const NodePos(
const double dT,
const double *
const adX,
int iExtNode);
58 const virtual double *
const NodeVel(
const double dT,
const double *
const adX,
int iExtNode);
59 const virtual double *
const BottomContact(
const double dT,
const double *
const adX);
60 void SetAddedDragPerMPS(
double AddedDragPerMPS);
61 const virtual double *
const NodeForce(
const double dT,
const double *
const adX,
int iExtNode);
63 virtual void CalcStateDerivatives(
const double *
const adX,
double *
const adXDot);
64 virtual void AddExternalForces(
const double dT,
const double *
const adX);
65 virtual void AddNetForces(
const double dT,
const double *
const adX);
66 virtual void AddCableForces(
const double dT,
const double *
const adX);
67 virtual double AddNodeBottomForce(
const double *
const adX,
int iNode,
double dDiam,
double adForceInOut[3]);
68 virtual void AddBottomForces(
const double *
const adX);
69 virtual void AddInputPorts(ISimObjectCreator *pCreator);
70 virtual void CreateNetPanels(std::vector<const CNetElementDef*> VNetElementDefs, ISimObjectCreator *pCreator);
71 virtual void CreateNetCables(std::vector<const CNetCableElementSpec*> VCableElements, ISimObjectCreator *pCreator);
72 virtual void CreateDataStructures();
73 virtual void CreateOutputPorts(ISimObjectCreator *pCreator);
74 VSPairStrInt CreateExternalNodeMap( std::string sTag,
int* piUsed,
CNetStructureSpec & NetSpec, ISimObjectCreator *pCreator);
75 void PRINTALLNODEFORCES(std::string spec,
double dT);
77 void SetExternalPos(
const double dT,
const double *
const adX);
78 void SetExternalVel(
const double dT,
const double *
const adX);
86 ISignalPort **m_InTopConstraintsVel;
90 double* m_NodeExternalForces;
91 double* m_NodeConstraintsPos;
92 double* m_NodeConstraintsVel;
96 int m_iNumNodesOutputPosAndVel;
99 int m_iNumNodesOriginal;
101 int m_iNumNodeOutputs;
104 double* m_NodeInternalForces;
106 int(* m_hasPosAndVelStates)[2];
108 int m_NumNodesInputPosAndVel;
109 int m_NumNodesOutputForce;
111 VSPairStrInt m_VsNodesInputPosAndVel;
112 VSPairStrInt m_VsNodesOutputForce;
119 double m_adBottomContact[6];
129 std::vector<CNetElement3NWithConstraints*> m_VpNetElements;
132 int** m_aaiCableConn;
134 bool m_bFoldingPointRefinementUsed;
141 VSPairStrInt m_VsNodesInputForce;
142 bool m_bUseTagForExternalNodes;
145 double* m_adNodeForce;
146 sfh::timers::StopWatch m_OdeTimer;
148 bool m_CageWakeEffectsActive;
152 struct states {
int p;
int q;
int w;
int v;};
153 std::vector<states> m_stateVector;
156 double m_topPosition1[3];
157 double m_topVelocity1[3];
158 double m_topOrientation1[4];
159 double m_topangularVel1[3];
160 double m_topPosition2[3];
161 double m_topVelocity2[3];
162 double m_topOrientation2[4];
164 double m_topangularVel2[3];
165 double* m_nodeWeight;
167 double m_YoungsModulus;
168 int m_numConstraintsElements;
169 double m_depthOfConstraintsCable;
170#ifdef FH_VISUALIZATION
171 Ogre::SceneNode** m_pRenderNodes;
175#ifdef CNetStructureWithConstraints_DO_PROFILE
176 sfh::timers::ProfilerWallclock m_Profiler;
Definition: CEnvironment.h:10
Definition: CNetStructureSpec.h:38
Definition: CNetStructureWithConstraints.h:37
CNetBottomContactFilter m_BottomContactFilter
Environment.
Definition: CNetStructureWithConstraints.h:118
virtual ~CNetStructureWithConstraints()
The destructor deletes dynamically allocated memory.
ISignalPort ** m_InTopConstraintsPos
Interface member variables.
Definition: CNetStructureWithConstraints.h:85
VSPairStrInt m_VsNodesOutputPosAndVel
Nodes reachable directly through input or output ports.
Definition: CNetStructureWithConstraints.h:140
CNetStructureWithConstraints(std::string sSimObjectName, ISimObjectCreator *pCreator)
The constructor sets the pointer to the output object and the parser object.
int m_iNumNodesInputForce
Node counts.
Definition: CNetStructureWithConstraints.h:95
std::vector< CNetCableElementWithConstraints * > m_VpCableElements
Element properties.
Definition: CNetStructureWithConstraints.h:128
Definition: ConstraintSolver.h:31
Definition: JointConstraint.h:17
Interface for calculating the bottom force on various objects.
Definition: IBasicBottom.h:23
Definition: ICurrentVel.h:12
Definition: CNetStructureWithConstraints.h:152
Class containing the specification for a net object.
Definition: CNetStructureSpec.h:22