PeriDyno 0.9.2
Loading...
Searching...
No Matches
Coupling.h
Go to the documentation of this file.
1
16#pragma once
17
18#include "Ocean.h"
19#include "Vessel.h"
20
21#include "Algorithm/Reduction.h"
22
23namespace dyno
24{
25 template<typename TDataType>
26 class Coupling : public Node
27 {
29 public:
30 typedef typename TDataType::Coord Coord;
31 typedef typename TDataType::Matrix Matrix;
32
34 ~Coupling() override;
35
36 public:
37 DEF_VAR(Real, Damping, Real(0.98), "Translational damping");
38 DEF_VAR(Real, RotationalDamping, Real(0.9), "Rotational damping");
39
42
43 protected:
44 void resetStates() override;
45 void updateStates() override;
46
47 private:
50
52 };
53
55}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
double Real
Definition Typedef.inl:23
DEF_VAR(Real, RotationalDamping, Real(0.9), "Rotational damping")
TDataType::Matrix Matrix
Definition Coupling.h:31
DArray< Coord > mForce
Definition Coupling.h:48
DArray< Coord > mTorque
Definition Coupling.h:49
~Coupling() override
Reduction< Coord > mReduce
Definition Coupling.h:51
TDataType::Coord Coord
Definition Coupling.h:30
void updateStates() override
DEF_VAR(Real, Damping, Real(0.98), "Translational damping")
DEF_NODE_PORT(Ocean< TDataType >, Ocean, "Ocean")
DEF_NODE_PORTS(Vessel< TDataType >, Vessel, "Vessel")
void resetStates() override
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:24