diff --git a/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.inl b/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.inl index c124ff59d..918d5cf13 100644 --- a/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.inl +++ b/src/BeamAdapter/component/forcefield/AdaptiveBeamForceFieldAndMass.inl @@ -472,7 +472,7 @@ void AdaptiveBeamForceFieldAndMass::addForce (const MechanicalParams* const DataVecCoord& datax, const DataVecDeriv& v) { - ScopedAdvancedTimer timer("AdaptiveBeamForceFieldAndMass_addForce"); + SCOPED_TIMER("AdaptiveBeamForceFieldAndMass_addForce"); SOFA_UNUSED(v); auto f = sofa::helper::getWriteOnlyAccessor(dataf); diff --git a/src/BeamAdapter/component/mapping/AdaptiveBeamMapping.inl b/src/BeamAdapter/component/mapping/AdaptiveBeamMapping.inl index 8a9029c12..eef8d7c45 100644 --- a/src/BeamAdapter/component/mapping/AdaptiveBeamMapping.inl +++ b/src/BeamAdapter/component/mapping/AdaptiveBeamMapping.inl @@ -40,7 +40,6 @@ #include #include -#include #include #include #include @@ -202,23 +201,23 @@ void AdaptiveBeamMapping< TIn, TOut>::clear(int size) template void AdaptiveBeamMapping< TIn, TOut>::apply(const MechanicalParams* mparams, Data& dOut, const Data& dIn) { - ScopedAdvancedTimer timer("AdaptiveBeamMapping_Apply"); + SCOPED_TIMER("AdaptiveBeamMapping_Apply"); auto out = sofa::helper::getWriteOnlyAccessor(dOut); const InVecCoord& in = dIn.getValue(); m_isXBufferUsed=false; - AdvancedTimer::stepBegin("pointsRedistribution"); // When using an adaptatif controller, one need to redistribute the points at each time step - if (d_useCurvAbs.getValue() && !d_contactDuplicate.getValue()) - computeDistribution(); - - AdvancedTimer::stepEnd("pointsRedistribution"); + { + SCOPED_TIMER("computeDistribution"); + if (d_useCurvAbs.getValue() && !d_contactDuplicate.getValue()) + computeDistribution(); + } - AdvancedTimer::stepBegin("resizeToModel&Out"); if (!m_isSubMapping) { + SCOPED_TIMER("resizeToModel&Out"); if (d_nbPointsPerBeam.getValue() > 0) { this->toModel->resize(m_pointBeamDistribution.size()); @@ -230,7 +229,6 @@ void AdaptiveBeamMapping< TIn, TOut>::apply(const MechanicalParams* mparams, Dat out.resize(d_points.getValue().size()); } } - AdvancedTimer::stepEnd("resizeToModel&Out"); MultiVecCoordId x = VecCoordId::position(); MultiVecCoordId xfree = VecCoordId::freePosition(); @@ -293,7 +291,7 @@ template void AdaptiveBeamMapping< TIn, TOut>::applyJ(const core::MechanicalParams* mparams, Data& dOut, const Data& dIn) { SOFA_UNUSED(mparams); - ScopedAdvancedTimer timer("AdaptiveBeamMapping_applyJ"); + SCOPED_TIMER("AdaptiveBeamMapping_applyJ"); auto out = sofa::helper::getWriteOnlyAccessor(dOut); const InVecDeriv& in= dIn.getValue(); @@ -379,7 +377,7 @@ void AdaptiveBeamMapping< TIn, TOut>::applyJT(const core::MechanicalParams* mpar { SOFA_UNUSED(mparams); - ScopedAdvancedTimer timer("AdaptiveBeamMapping_applyJT"); + SCOPED_TIMER("AdaptiveBeamMapping_applyJT"); auto out = sofa::helper::getWriteOnlyAccessor(dOut); const VecDeriv& in= dIn.getValue(); @@ -422,7 +420,7 @@ void AdaptiveBeamMapping< TIn, TOut>::applyJT(const core::ConstraintParams* cpar { SOFA_UNUSED(cparams); - ScopedAdvancedTimer timer("AdaptiveBeamMapping_ApplyJT"); + SCOPED_TIMER("AdaptiveBeamMapping_ApplyJT"); auto out = sofa::helper::getWriteOnlyAccessor(dOut); const OutMatrixDeriv& in = dIn.getValue(); const Data& dataInX = *this->getFromModel()->read(ConstVecCoordId::position()); diff --git a/src/BeamAdapter/component/mapping/BeamLengthMapping.inl b/src/BeamAdapter/component/mapping/BeamLengthMapping.inl index 582bb0194..e7801e038 100644 --- a/src/BeamAdapter/component/mapping/BeamLengthMapping.inl +++ b/src/BeamAdapter/component/mapping/BeamLengthMapping.inl @@ -41,7 +41,6 @@ #include #include -#include #include #include #include @@ -64,7 +63,6 @@ using sofa::core::State; using helper::ReadAccessor; using helper::WriteAccessor; using sofa::core::ConstVecCoordId; -using sofa::helper::AdvancedTimer; using sofa::core::MultiVecCoordId; using sofa::core::VecCoordId; using sofa::core::VecDerivId; @@ -124,7 +122,7 @@ void BeamLengthMapping< TIn, TOut>::reset() template void BeamLengthMapping< TIn, TOut>::apply(const MechanicalParams* mparams, Data& dOut, const Data& dIn) { - sofa::helper::ScopedAdvancedTimer timer("AdaptiveBeamMappingApply"); + SCOPED_TIMER("AdaptiveBeamMappingApply"); VecCoord& out = *dOut.beginEdit(); const InVecCoord& in = dIn.getValue(); @@ -157,7 +155,7 @@ void BeamLengthMapping< TIn, TOut>::applyJ(const core::MechanicalParams* mparams { SOFA_UNUSED(mparams); - sofa::helper::ScopedAdvancedTimer timer("AdaptiveBeamMappingApplyJ"); + SCOPED_TIMER("AdaptiveBeamMappingApplyJ"); VecDeriv& out = *dOut.beginEdit(); const InVecDeriv& in= dIn.getValue(); @@ -230,7 +228,7 @@ void BeamLengthMapping< TIn, TOut>::applyJT(const core::MechanicalParams* mparam { SOFA_UNUSED(mparams); - sofa::helper::ScopedAdvancedTimer timer("AdaptiveBeamMappingMechanicalApplyJT"); + SCOPED_TIMER("AdaptiveBeamMappingMechanicalApplyJT"); InVecDeriv& out = *dOut.beginEdit(); const VecDeriv& in= dIn.getValue(); @@ -344,7 +342,7 @@ void BeamLengthMapping< TIn, TOut>::applyJT(const core::ConstraintParams* cparam { SOFA_UNUSED(cparams); - sofa::helper::ScopedAdvancedTimer timer("AdaptiveBeamMappingConstrainApplyJT"); + SCOPED_TIMER("AdaptiveBeamMappingConstrainApplyJT"); InMatrixDeriv& out = *dOut.beginEdit(); const OutMatrixDeriv& in = dIn.getValue(); diff --git a/src/BeamAdapter/component/mapping/BeamProjectionDifferenceMultiMapping.inl b/src/BeamAdapter/component/mapping/BeamProjectionDifferenceMultiMapping.inl index e895552bd..ca2a64f27 100644 --- a/src/BeamAdapter/component/mapping/BeamProjectionDifferenceMultiMapping.inl +++ b/src/BeamAdapter/component/mapping/BeamProjectionDifferenceMultiMapping.inl @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -43,7 +42,6 @@ namespace beamadapter::mapping { using sofa::core::objectmodel::BaseContext ; -using sofa::helper::AdvancedTimer; using sofa::helper::WriteAccessor; using sofa::type::RGBAColor ; using sofa::core::objectmodel::ComponentState; diff --git a/src/BeamAdapter/component/mapping/MultiAdaptiveBeamMapping.inl b/src/BeamAdapter/component/mapping/MultiAdaptiveBeamMapping.inl index ebb6e7d70..d28a27d03 100644 --- a/src/BeamAdapter/component/mapping/MultiAdaptiveBeamMapping.inl +++ b/src/BeamAdapter/component/mapping/MultiAdaptiveBeamMapping.inl @@ -74,7 +74,7 @@ MultiAdaptiveBeamMapping< TIn, TOut>::MultiAdaptiveBeamMapping() template void MultiAdaptiveBeamMapping< TIn, TOut>::apply(const core::MechanicalParams* mparams /* PARAMS FIRST */, Data& dOut, const Data& dIn) { - ScopedAdvancedTimer timer("MultiAdaptiveBeamMapping_apply"); + SCOPED_TIMER("MultiAdaptiveBeamMapping_apply"); auto out = sofa::helper::getWriteOnlyAccessor(dOut); if(!isBarycentricMapping) @@ -96,7 +96,7 @@ void MultiAdaptiveBeamMapping< TIn, TOut>::apply(const core::MechanicalParams* m template void MultiAdaptiveBeamMapping< TIn, TOut>::applyJ(const core::MechanicalParams* mparams /* PARAMS FIRST */, Data& dOut, const Data& dIn) { - ScopedAdvancedTimer timer("MultiAdaptiveBeamMapping_applyJ"); + SCOPED_TIMER("MultiAdaptiveBeamMapping_applyJ"); for (unsigned int subMap=0; subMap::applyJ(const core::MechanicalParams* template void MultiAdaptiveBeamMapping< TIn, TOut>::applyJT(const core::MechanicalParams* mparams /* PARAMS FIRST */, Data& dOut, const Data& dIn) { - ScopedAdvancedTimer timer("MultiAdaptiveBeamMapping_applyJT"); + SCOPED_TIMER("MultiAdaptiveBeamMapping_applyJT"); for (unsigned int subMap=0; subMap::applyJT(const core::MechanicalParams* template void MultiAdaptiveBeamMapping< TIn, TOut>::applyJT(const core::ConstraintParams* cparams /* PARAMS FIRST */, Data& dOut, const Data& dIn) { - ScopedAdvancedTimer timer("MultiAdaptiveBeamMapping_applyJT"); + SCOPED_TIMER("MultiAdaptiveBeamMapping_applyJT"); for (unsigned int subMap=0; subMap