FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
SCableSectionData.h
1#ifndef S_CABLE_SECTION_DATA_H
2#define S_CABLE_SECTION_DATA_H
3
4#include <string>
5#include <vector>
6
7#ifdef _WIN32
8# define MEMCPY std::memcpy
9#else
10# define MEMCPY memcpy
11#endif
12
13
14#include "net/NTrawlSpec.h"
15
17{
18 double D;
19 double E;
20 double L;
21 int Conn[2];
22 double Rho;
23 std::string MaterialName;
24 double DrawScale;
25 unsigned short NumSpheres;
26 double* SphereD;
27 double* SphereMass;
28 double* SpherePos;
29 unsigned short NumDisks;
30 double* DiskD;
31 double* DiskThickness;
32 double* DiskMass;
33 double* DiskPos;
34 double AddedWeightInWater;
35 double RefineFactor;
36 std::vector<std::string> VsSphereMaterial;
37 std::vector<std::string> VsDiskMaterial;
40 {
41 bool firstHalf;
42 double pos;
43 };
44 std::vector<HalfPlacement> SphereHalves;
45 std::vector<HalfPlacement> DiskHalves;
47
51 SCableSectionData& operator=(const SCableSectionData& old);
56 void Initialize(double dL = 10.0,
57 double dD = 0.01,
58 double dRho = 1025,
59 double dE = 1e9,
60 double dRefineFactor = 1,
61 std::string sMaterialName = "Trawl/Wire2",
62 double dDrawScale = 1);
63 void AddSpheres(unsigned short iNum, double dDiameter, double dRho, double dEndPos, double dStartPos, std::string sMaterial = "floater");
64 void AddSpheres(unsigned short iNum, double dDiameter, double dRho, std::string sMaterial = "floater");
65 void AddDisks(unsigned short iNum, double dDiameter, double dThickness, double dRho, double dEndPos, double dStartPos, std::string sMaterial = "floater");
66 void AddDisks(unsigned short iNum, double dDiameter, double dThickness, double dRho, std::string sMaterial = "floater");
67 void DeleteSpheres();
68 void ResetSpheres();
69 void ResetDisks();
70
71private:
73 void AddSphereGroup(unsigned short iNum, double dDiameter, double dRho, const std::vector<double>& positions,
74 const std::vector<HalfPlacement>& halves, const std::string& sMaterial);
76 void AddDiskGroup(unsigned short iNum, double dDiameter, double dThickness, double dRho, const std::vector<double>& positions,
77 const std::vector<HalfPlacement>& halves, const std::string& sMaterial);
78};
79#endif
Where each sphere and disk goes if the line is divided into two mirror-image halves (GetHalfCable).
Definition SCableSectionData.h:40
bool firstHalf
On the first half, else on the second.
Definition SCableSectionData.h:41
double pos
Position on its half, a fraction from the half's outer end.
Definition SCableSectionData.h:42
Definition SCableSectionData.h:17
SCableSectionData GetHalfCable(bool bFirstHalf)
Definition NTrawlSpec.h:226