10#ifndef CNetStructureTest_H
11#define CNetStructureTest_H
22#include <CEnvironment.h>
24#include "CNetCableElementTestSpec.h"
25#include "CNetTwineElementSpec.h"
28#include "CNetCableElementTest.h"
29#include "CNetTwineElement.h"
32#include "CNetStructureTestSpec.h"
33#ifdef FH_VISUALIZATION
34 #include "sfh/ogre/NMeshGenerators.h"
35 #include "sfh/ogre/C3DLine.h"
36 #include <CTextRenderer.h>
49 virtual void OdeFcn(
const double dT,
const double *
const adX,
double *
const adXDot,
const bool bIsMajorTimeStep);
50 virtual void InitialConditionSetup(
const double dT,
const double *
const adCurrentIC,
double *
const adUpdatedIC, ISimObjectCreator *
const pCreator);
51 virtual void FinalSetup(
const double dT,
const double *
const adX, ISimObjectCreator *
const pCreator);
52 const double * outExternalNodeForce(
const double dT,
const double *
const adX,
int iExtNode);
54#ifdef FH_VISUALIZATION
56 virtual void RenderInit(Ogre::Root *
const pOgreRoot, ISimObjectCreator *
const pCreator);
58 virtual void RenderUpdate(
const double dT,
const double *
const adX);
60 const virtual double * dragReduction(
const double T,
const double *
const X);
61 const virtual double * projectedArea(
const double T,
const double *
const X);
62 const virtual double * projectedVelocity(
const double T,
const double *
const X);
63 const virtual double * dragForce(
const double T,
const double *
const X );
64 const virtual double * cableForce(
const double T,
const double *
const X );
65 const virtual double * appendixForce(
const double T,
const double *
const X );
68 double m_dragReduction;
69 double m_projectedArea;
70 double m_projectedVelocity;
72 const virtual double * NodePos(
const double dT,
const double *
const adX,
int iExtNode);
73 const virtual double * NodeVel(
const double dT,
const double *
const adX,
int iExtNode);
75 virtual void AddExternalForces(
const double dT,
const double *
const adX);
76 virtual void AddCableForces(
const double dT,
const double *
const adX);
77 virtual void AddInputPorts(ISimObjectCreator *pCreator);
79 virtual void CreateNetCables(std::vector<CNetCableElementTestSpec*> VCableElements, ISimObjectCreator *pCreator);
80 virtual void CreateNetTwines(std::vector<const CNetTwineElementSpec*> VCableElements, ISimObjectCreator *pCreator);
83 virtual void CreateDataStructures();
84 virtual void CreateOutputPorts(ISimObjectCreator *pCreator);
85 std::vector< std::pair<std::string,int> > CreateExternalNodeMap( std::string sTag,
int* piUsed,
CNetStructureTestSpec & NetSpec, ISimObjectCreator *pCreator);
87#ifdef FH_VISUALIZATION
88 # pragma warning (disable : 4244)
89 bool m_bLineVisualization;
94 static Ogre::ColourValue mapToColor(
double val )
97 return Ogre::ColourValue(0.0 ,0.0 ,1.0 );
99 return Ogre::ColourValue(1.0 ,0.0 ,0.0 );
100 }
else if(val >= 0.75){
101 return Ogre::ColourValue(1.0 ,4.0-val/0.25 ,0.0 );
102 }
else if(val >= 0.5){
103 return Ogre::ColourValue(val/0.25-2.0 ,1.0 ,0.0 );
104 }
else if(val >= 0.25){
105 return Ogre::ColourValue(0.0 ,1.0 ,2.0-val/0.25 );
107 return Ogre::ColourValue(0.0 ,val/0.25 ,1.0 );
113 double m_dSymplecticStepsize;
119 ISignalPort *m_colorLimits;
123 double* m_NodeExternalForces;
127 int m_iNumNodesOutputPosAndVel;
137 double m_currentVel[3];
138 const double* currentVelocity(
const double dT,
const double *
const adX);
144 std::vector<CNetTwineElement*> m_VpTwineElements;
148 int** m_aaiCableConn;
149 bool m_bFoldingPointRefinementUsed;
156 std::vector< std::pair<std::string,int> > m_VsNodesInputForce;
157 bool m_bUseTagForExternalNodes;
160 double* m_adNodeForce;
161 unsigned int m_iNumTwinesCalc;
165 sfh::linalg::sse_vec3f *omp_posa;
166 sfh::linalg::sse_vec3f *omp_posb;
167 sfh::linalg::sse_vec3f *omp_vela;
168 sfh::linalg::sse_vec3f *omp_velb;
169 sfh::linalg::sse_vec3f *omp_velf;
171 sfh::linalg::sse_vec3f *omp_forceA;
172 sfh::linalg::sse_vec3f *omp_forceB;
173 double m_dragForce[3];
174 double m_cableForce[3];
175 double m_appendixForce[3];
Definition: CEnvironment.h:10
Definition: CNetStructureTestSpec.h:15
Class containing a net object.
Definition: CNetStructureTest.h:43
CEnvironment * m_pEnvironment
Environment.
Definition: CNetStructureTest.h:136
std::vector< CNetCableElementTest * > m_cableElements
Element properties.
Definition: CNetStructureTest.h:143
int m_iNumNodesInputForce
Node counts.
Definition: CNetStructureTest.h:126
virtual ~CNetStructureTest()
The destructor deletes dynamically allocated memory.
ISignalPort ** m_apInExternalForces
Interface member variables.
Definition: CNetStructureTest.h:118
std::vector< std::pair< std::string, int > > m_VsNodesOutputPosAndVel
Nodes reachable directly through input or output ports.
Definition: CNetStructureTest.h:155
CNetStructureTest(std::string sSimObjectName, ISimObjectCreator *pCreator)
The constructor sets the pointer to the output object and the parser object.