diff --git a/BeamAdapter_test/component/forcefield/AdaptiveBeamForceFieldAndMassTest.cpp b/BeamAdapter_test/component/forcefield/AdaptiveBeamForceFieldAndMassTest.cpp index 774f2c25e..1c99e90db 100644 --- a/BeamAdapter_test/component/forcefield/AdaptiveBeamForceFieldAndMassTest.cpp +++ b/BeamAdapter_test/component/forcefield/AdaptiveBeamForceFieldAndMassTest.cpp @@ -159,7 +159,6 @@ struct AdaptiveBeamForceFieldAndMassTest : public sofa::testing::BaseSimulationT EXPECT_NEAR(positions[id][2], 0, 1e-4); // run some simulation steps - auto simulation = sofa::simulation::getSimulation(); for (int i = 0; i < nbrStep; i++) { sofa::simulation::node::animate(root.get(), 0.01); diff --git a/BeamAdapter_test/component/model/WireRestShape_test.cpp b/BeamAdapter_test/component/model/WireRestShape_test.cpp index c41d9f054..bb896bc90 100644 --- a/BeamAdapter_test/component/model/WireRestShape_test.cpp +++ b/BeamAdapter_test/component/model/WireRestShape_test.cpp @@ -175,7 +175,7 @@ void WireRestShape_test::testParameterInit() EXPECT_EQ(nbP_density.size(), 2); EXPECT_EQ(nbP_density, nbP_density_ref); - Real dx1, dx2, dx3, nbEdgesCol_ref = 20; + Real dx1, dx2, dx3; wire->getCollisionSampling(dx1, 0.0); wire->getCollisionSampling(dx2, fullLength); wire->getCollisionSampling(dx3, 90.0); diff --git a/src/BeamAdapter/component/engine/WireRestShape.inl b/src/BeamAdapter/component/engine/WireRestShape.inl index 07753a5a6..650bdcd36 100644 --- a/src/BeamAdapter/component/engine/WireRestShape.inl +++ b/src/BeamAdapter/component/engine/WireRestShape.inl @@ -149,7 +149,7 @@ bool WireRestShape::initTopology() Real prev_length = 0.0; int prev_edges = 0; int startPtId = 0; - for (auto i = 0; i < l_sectionMaterials.size(); ++i) + for (sofa::Size i = 0; i < l_sectionMaterials.size(); ++i) { // Add topology of the material int nbrVisuEdges = l_sectionMaterials.get(i)->getNbVisualEdges(); @@ -212,7 +212,7 @@ void WireRestShape::getCollisionSampling(Real &dx, const Real &x_curv } // Check in which section x_used belongs to and get access to this section material - for (auto i = 1; i< keyPts.size(); ++i) + for (sofa::Size i = 1; i< keyPts.size(); ++i) { if (x_used <= keyPts[i]) { @@ -264,7 +264,7 @@ void WireRestShape::getYoungModulusAtX(const Real& x_curv, Real& youn const type::vector& keyPts = d_keyPoints.getValue(); // Depending on the position of the beam, determine the corresponding section material and returning its Young modulus - for (auto i = 1; i < keyPts.size(); ++i) + for (sofa::Size i = 1; i < keyPts.size(); ++i) { if (x_used <= keyPts[i]) { @@ -283,7 +283,7 @@ void WireRestShape::getInterpolationParam(const Real& x_curv, Real &_ const type::vector& keyPts = d_keyPoints.getValue(); // Check in which section x_used belongs to and get access to this section material - for (auto i = 1; i < keyPts.size(); ++i) + for (sofa::Size i = 1; i < keyPts.size(); ++i) { if (x_used <= keyPts[i]) { diff --git a/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.inl b/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.inl index 918d5cf13..474c5fbf5 100644 --- a/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.inl +++ b/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.inl @@ -178,6 +178,7 @@ void AdaptiveBeamForceFieldAndMass::computeStiffness(int beamId, Beam template void AdaptiveBeamForceFieldAndMass::computeMass(int beamId, BeamLocalMatrices& beamLocalMatrix) { + SOFA_UNUSED(beamId); Real L2 = (Real) (beamLocalMatrix._L * beamLocalMatrix._L); beamLocalMatrix.m_M00.clear(); beamLocalMatrix.m_M01.clear(); beamLocalMatrix.m_M10.clear(); beamLocalMatrix.m_M11.clear(); diff --git a/src/BeamAdapter/component/mapping/AdaptiveBeamMapping.inl b/src/BeamAdapter/component/mapping/AdaptiveBeamMapping.inl index eef8d7c45..b3d8f28cd 100644 --- a/src/BeamAdapter/component/mapping/AdaptiveBeamMapping.inl +++ b/src/BeamAdapter/component/mapping/AdaptiveBeamMapping.inl @@ -666,7 +666,6 @@ void AdaptiveBeamMapping< TIn, TOut>::computeDistribution() else { m_pointBeamDistribution.reserve(points.size()); - const bool printLog = this->f_printLog.getValue(); for (unsigned int i=0; i::reset() template void BeamLengthMapping< TIn, TOut>::apply(const MechanicalParams* mparams, Data& dOut, const Data& dIn) { + SOFA_UNUSED(mparams); SCOPED_TIMER("AdaptiveBeamMappingApply"); VecCoord& out = *dOut.beginEdit(); @@ -591,6 +592,7 @@ void BeamLengthMapping< TIn, TOut>::applyDJT(const MechanicalParams* mparams, co template void BeamLengthMapping::updateK(const core::MechanicalParams* mparams, core::ConstMultiVecDerivId childForceId ) { + SOFA_UNUSED(mparams); const unsigned& geometricStiffness = d_geometricStiffness.getValue(); if( !geometricStiffness ) { K_geom.resize(0,0); return; } //helper::ReadAccessor > childForce( *childForceId[(const core::State*)this->getToModels()[0]].read() ); diff --git a/src/BeamAdapter/component/mapping/BeamProjectionDifferenceMultiMapping.inl b/src/BeamAdapter/component/mapping/BeamProjectionDifferenceMultiMapping.inl index 610961e57..1b5833e87 100644 --- a/src/BeamAdapter/component/mapping/BeamProjectionDifferenceMultiMapping.inl +++ b/src/BeamAdapter/component/mapping/BeamProjectionDifferenceMultiMapping.inl @@ -145,7 +145,7 @@ void BeamProjectionDifferenceMultiMapping::computeProjection(c Real distMin = std::numeric_limits::max(); // find the min distance between P and its projection on each edge of xTo - for (int e=0; e