Skip to content

Commit

Permalink
[src] Remove unnecessary link to restshape
Browse files Browse the repository at this point in the history
  • Loading branch information
epernod committed May 10, 2024
1 parent 2d96f1b commit 2261ccb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ class AdaptiveBeamForceFieldAndMass : public core::behavior::Mass<DataTypes>

protected :
SingleLink<AdaptiveBeamForceFieldAndMass<DataTypes>, BInterpolation, BaseLink::FLAG_STOREPATH|BaseLink::FLAG_STRONGLINK> l_interpolation;
SingleLink<AdaptiveBeamForceFieldAndMass<DataTypes>, 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 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ AdaptiveBeamForceFieldAndMass<DataTypes>::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"))
{
}

Expand Down Expand Up @@ -548,21 +547,8 @@ void AdaptiveBeamForceFieldAndMass<DataTypes>::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
Expand Down

0 comments on commit 2261ccb

Please sign in to comment.