@@ -181,7 +181,7 @@ class gz::sim::systems::LinearWaveBodyPrivate
181
181
// /
182
182
// / 12. Use math::eigen3::convert for converting Matrix and Vector types.
183
183
// /
184
- // /
184
+ // / 13. Review use of Eigen.
185
185
// /
186
186
187
187
// / \brief WEC-Sim BEMIO hydro data structure (read from HDF5 file)
@@ -1344,7 +1344,7 @@ void LinearWaveBody::Configure(const Entity &_entity,
1344
1344
if (this ->dataPtr ->forceFlags .radiationAddedMassOn )
1345
1345
{
1346
1346
// parameters
1347
- auto & A = this ->dataPtr ->hydroForceCoeffs .A ;
1347
+ Eigen::Matrix6d & A = this ->dataPtr ->hydroForceCoeffs .A ;
1348
1348
1349
1349
// convert from Eigen to gz
1350
1350
gz::math::Matrix6d gzA;
@@ -1843,9 +1843,9 @@ void LinearWaveBodyPrivate::UpdateLinkState(const UpdateInfo &_info,
1843
1843
this ->linkState .X_WBcm .Rot ().RotateVector (this ->linkState .p_BcmBwp_Bcm );
1844
1844
1845
1845
// position vector of body center of buoyancy
1846
- auto & cb = this ->hydroData .cb ;
1847
- auto & cg = this ->hydroData .cg ;
1848
- auto p_BcmBcb = cb - cg;
1846
+ Eigen::Vector3d & cb = this ->hydroData .cb ;
1847
+ Eigen::Vector3d & cg = this ->hydroData .cg ;
1848
+ Eigen::Vector3d p_BcmBcb = cb - cg;
1849
1849
1850
1850
// position vector of body CoB wrt body CoM in body/world frame
1851
1851
this ->linkState .p_BcmBcb_B =
@@ -1990,17 +1990,17 @@ void LinearWaveBodyPrivate::UpdateHydrostaticForces(const UpdateInfo &_info,
1990
1990
double g = this ->simParams .g ;
1991
1991
double rho = this ->simParams .rho ;
1992
1992
double Vo = this ->geometry .Vo ;
1993
- auto & K_hs = this ->hydroForceCoeffs .K_hs ;
1993
+ Eigen::Matrix6d & K_hs = this ->hydroForceCoeffs .K_hs ;
1994
1994
1995
1995
// / \todo check whether to add correction - in WEC-Sim buoyancy force is
1996
1996
// / applied at CoB not CoM, so there is an additional moment. This
1997
1997
// / to be compared with the point of application in the linear model,
1998
1998
// / which seems to apply all forces at the origin of the waterplane?
1999
1999
2000
2000
// center of buoyancy in link frame (i.e. wrt link origin)
2001
- // auto & cb = this->hydroData.cb;
2002
- // auto & cg = this->hydroData.cg;
2003
- // auto p_BcmBcb = cb - cg;
2001
+ // Eigen::Vector3d & cb = this->hydroData.cb;
2002
+ // Eigen::Vector3d & cg = this->hydroData.cg;
2003
+ // Eigen::Vector3d p_BcmBcb = cb - cg;
2004
2004
2005
2005
// link properties
2006
2006
gz::sim::Link baseLink (this ->linkEntity );
@@ -2124,7 +2124,7 @@ void LinearWaveBodyPrivate::UpdateRadiationDampingForces(
2124
2124
return ;
2125
2125
2126
2126
// parameters
2127
- auto & B = this ->hydroForceCoeffs .B ;
2127
+ Eigen::Matrix6d & B = this ->hydroForceCoeffs .B ;
2128
2128
2129
2129
// link properties
2130
2130
gz::sim::Link baseLink (this ->linkEntity );
@@ -2221,7 +2221,7 @@ void LinearWaveBodyPrivate::UpdateRadiationAddedMassForces(
2221
2221
(currentTime - this ->prevTime ) < updatePeriod)
2222
2222
{
2223
2223
// parameters
2224
- auto & A = this ->hydroForceCoeffs .A ;
2224
+ Eigen::Matrix6d & A = this ->hydroForceCoeffs .A ;
2225
2225
2226
2226
// link properties
2227
2227
gz::sim::Link baseLink (this ->linkEntity );
@@ -2320,12 +2320,12 @@ void LinearWaveBodyPrivate::UpdateExcitationForces(const UpdateInfo &_info,
2320
2320
double height = this ->waves .height ;
2321
2321
double phase = this ->waves .phase ;
2322
2322
double omega = this ->simParams .w ;
2323
- auto & ex_re = this ->hydroForceCoeffs .ex_re ;
2324
- auto & ex_im = this ->hydroForceCoeffs .ex_im ;
2325
- auto & fk_re = this ->hydroForceCoeffs .fk_re ;
2326
- auto & fk_im = this ->hydroForceCoeffs .fk_im ;
2327
- auto & sc_re = this ->hydroForceCoeffs .sc_re ;
2328
- auto & sc_im = this ->hydroForceCoeffs .sc_im ;
2323
+ Eigen::Vector6d & ex_re = this ->hydroForceCoeffs .ex_re ;
2324
+ Eigen::Vector6d & ex_im = this ->hydroForceCoeffs .ex_im ;
2325
+ Eigen::Vector6d & fk_re = this ->hydroForceCoeffs .fk_re ;
2326
+ Eigen::Vector6d & fk_im = this ->hydroForceCoeffs .fk_im ;
2327
+ Eigen::Vector6d & sc_re = this ->hydroForceCoeffs .sc_re ;
2328
+ Eigen::Vector6d & sc_im = this ->hydroForceCoeffs .sc_im ;
2329
2329
2330
2330
// link properties
2331
2331
gz::sim::Link baseLink (this ->linkEntity );
0 commit comments