From 2261ccbc739f33fc918dd305b9c1b1f72c92e8a6 Mon Sep 17 00:00:00 2001 From: epernod Date: Fri, 10 May 2024 16:56:09 +0200 Subject: [PATCH] [src] Remove unnecessary link to restshape --- .../forcefield/AdaptiveBeamForceFieldAndMass.h | 1 - .../AdaptiveBeamForceFieldAndMass.inl | 18 ++---------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.h b/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.h index c8ea23b1..de8d972a 100644 --- a/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.h +++ b/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.h @@ -198,7 +198,6 @@ class AdaptiveBeamForceFieldAndMass : public core::behavior::Mass protected : SingleLink, BInterpolation, BaseLink::FLAG_STOREPATH|BaseLink::FLAG_STRONGLINK> l_interpolation; - SingleLink, WireRestShape, BaseLink::FLAG_STOREPATH|BaseLink::FLAG_STRONGLINK> l_instrumentParameters; void applyMassLarge( VecDeriv& df, int bIndex, Index nd0Id, Index nd1Id, SReal factor); void applyStiffnessLarge( VecDeriv& df, const VecDeriv& dx, int beam, Index nd0Id, Index nd1Id, SReal factor ); diff --git a/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.inl b/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.inl index 474c5fbf..36aaae75 100644 --- a/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.inl +++ b/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.inl @@ -65,7 +65,6 @@ AdaptiveBeamForceFieldAndMass::AdaptiveBeamForceFieldAndMass() , d_useShearStressComputation(initData(&d_useShearStressComputation, true, "shearStressComputation","if false, suppress the shear stress in the computation")) , d_reinforceLength(initData(&d_reinforceLength, false, "reinforceLength", "if true, a separate computation for the error in elongation is peformed")) , l_interpolation(initLink("interpolation","Path to the Interpolation component on scene")) - , l_instrumentParameters(initLink("instrumentParameters", "link to an object specifying physical parameters based on abscissa")) { } @@ -548,21 +547,8 @@ void AdaptiveBeamForceFieldAndMass::addForce (const MechanicalParams* /// material parameters beamMatrices._rho = d_massDensity.getValue(); - /// Temp : we only overide values for which a Data has been set in the WireRestShape - if (l_instrumentParameters.get()) - { - Real x_curv = 0; - l_interpolation->getAbsCurvXFromBeam(beamId, x_curv); - - /// The length of the beams is only known to the interpolation ! - l_instrumentParameters->getInterpolationParam(x_curv, beamMatrices._rho, beamMatrices._A, beamMatrices._Iy, - beamMatrices._Iz, beamMatrices._Asy, beamMatrices._Asz, beamMatrices._J); - } - else - { - l_interpolation->getInterpolationParam(beamId, beamMatrices._L, beamMatrices._A, beamMatrices._Iy, - beamMatrices._Iz, beamMatrices._Asy, beamMatrices._Asz, beamMatrices._J); - } + l_interpolation->getInterpolationParam(beamId, beamMatrices._L, beamMatrices._A, beamMatrices._Iy, + beamMatrices._Iz, beamMatrices._Asy, beamMatrices._Asz, beamMatrices._J); /// compute the local mass matrices