5#include "eigen_matrix_defs.h"
6#include <sfh/constants.h>
7#include <Eigen/StdVector>
8#include <CEnvironment.h>
12#include "RingStructureGravityHydro.h"
15#ifdef FH_VISUALIZATION
16 #include <sfh/ogre/C3DLine.h>
24 CoRiBoNet(
const CoRiBoNet& copy) {
throw std::runtime_error(
"Illegal copy constructor call on CoRiBoNet"); }
25 void Init(ISimObjectCreator* creator, std::string prefix,
FloatingCollar * floating_collar,
BottomRing * bottom_ring,
double diameter,
double height);
26 void InitStates(
double* updatedIC);
27 void OdeFcn(
double T,
const double* X);
28 void Kinematics(
const double* X,
double* XDot,
double delta_t);
31 int cols() {
return m_nc; }
32 int rows() {
return m_nr; }
34 const Eigen::Matrix<double, Eigen::Dynamic, 1>& GetFloatingCollarReactionForce(
double T,
const double* X);
35 const Eigen::Matrix<double, Eigen::Dynamic, 1>& GetBottomRingReactionForce(
double T,
const double* X);
36 double Gamma() {
return m_gamma; }
38#ifdef FH_VISUALIZATION
39 virtual void RenderInit(Ogre::Root *
const ogreRoot, ISimObjectCreator *
const creator);
40 virtual void RenderUpdate(
const double T,
const double *
const X);
41 std::unique_ptr<C3DLine> m_net_line;
42 std::unique_ptr<C3DLine> m_net_normals;
46 void Recompute(
double T,
const double* X);
48 void distance_constraint(vec3& PA, vec3& PB, vec3& VA, vec3& VB, vec3& F, mat3& M,
double L,
double L_dot);
56 CoRiBoDynamics::Vector m_FA;
57 CoRiBoDynamics::Vector m_FB;
58 CoRiBoDynamics::Vector m_PA;
59 CoRiBoDynamics::Vector m_PB;
60 CoRiBoDynamics::Vector m_VA;
61 CoRiBoDynamics::Vector m_VB;
71 double m_ring_connection_bar_length;
74 double m_node_added_mass;
75 double m_node_projected_area;
76 double m_node_submerged_weight;
78 std::vector<mat3,Eigen::aligned_allocator<mat3>> m_connection_matrices;
79 std::vector<mat3,Eigen::aligned_allocator<mat3>> m_node_matrices;
81 struct ix_pair{ uint16_t i; uint16_t j; ix_pair(uint16_t a, uint16_t b){i=a;j=b;}};
82 std::vector<ix_pair> m_connections;
84 std::vector<vec3, Eigen::aligned_allocator<vec3>> m_N;
85 std::vector<vec3, Eigen::aligned_allocator<vec3>> m_P;
86 std::vector<vec3, Eigen::aligned_allocator<vec3>> m_V;
87 CoRiBoDynamics::Vector m_A;
91 SparseMat m_system_matrix;
92 std::unique_ptr<Eigen::SimplicialLLT<SparseMat,Eigen::Upper>> m_solver;
94 int m_position_states;
95 int m_velocity_states;
Definition: RingStructureGravityHydro.h:74
Definition: CEnvironment.h:10
Definition: CoriboNet.h:21
Definition: RingStructureGravityHydro.h:67
Definition: CollisionManager.h:6