Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@
#include <sofa/simulation/mechanicalvisitor/MechanicalVInitVisitor.h>
using sofa::simulation::mechanicalvisitor::MechanicalVInitVisitor;

#include <sofa/simulation/mechanicalvisitor/MechanicalBeginIntegrationVisitor.h>
using sofa::simulation::mechanicalvisitor::MechanicalBeginIntegrationVisitor;

#include <sofa/simulation/mechanicalvisitor/MechanicalVOpVisitor.h>
using sofa::simulation::mechanicalvisitor::MechanicalVOpVisitor;

Expand Down Expand Up @@ -299,8 +296,6 @@ void ConstraintAnimationLoop::freeMotion(const core::ExecParams* params, simulat
{
SCOPED_TIMER_VARNAME(freeMotionTimer, "Free Motion");

MechanicalBeginIntegrationVisitor(params, dt).execute(context);

////////////////// (optional) PREDICTIVE CONSTRAINT FORCES ///////////////////////////////////////////////////////////////////////////////////////////
/// When scheme Correction is used, the constraint forces computed at the previous time-step
/// are applied during the first motion, so which is no more a "free" motion but a "predictive" motion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@
#include <sofa/component/constraint/lagrangian/solver/BlockGaussSeidelConstraintSolver.h>
using sofa::simulation::mechanicalvisitor::MechanicalVInitVisitor;


#include <sofa/simulation/mechanicalvisitor/MechanicalBeginIntegrationVisitor.h>
using sofa::simulation::mechanicalvisitor::MechanicalBeginIntegrationVisitor;

#include <sofa/simulation/mechanicalvisitor/MechanicalVOpVisitor.h>
using sofa::simulation::mechanicalvisitor::MechanicalVOpVisitor;

Expand Down Expand Up @@ -225,13 +221,6 @@ void FreeMotionAnimationLoop::step(const sofa::core::ExecParams* params, SReal d

dmsg_info() << "updateInternal performed - beginVisitor called" ;


// MechanicalBeginIntegrationVisitor
MechanicalBeginIntegrationVisitor beginVisitor(params, dt);
node->execute(&beginVisitor);

dmsg_info() << "beginVisitor performed - SolveVisitor for freeMotion is called" ;

{
SCOPED_TIMER("MechanicalComputeGeometricStiffness");
MechanicalComputeGeometricStiffness geometricStiffnessVisitor(&mop.mparams, cparams.lambda());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class SOFA_CORE_API BaseMechanicalState : public virtual BaseState
/// @{

/// Called at the beginning of each integration step.
SOFA_CORE_DEPRECATED_BEGININTEGRATION()
virtual void beginIntegration(SReal /*dt*/)
{
// it is no longer necessary to switch forceId to internalForce here...
Expand Down
7 changes: 7 additions & 0 deletions Sofa/framework/Core/src/sofa/core/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ SOFA_ATTRIBUTE_DEPRECATED("v26.12", "v27.12", "Use BaseContext instead of Contex
SOFA_ATTRIBUTE_DEPRECATED("v26.12", "v27.12", "Use resetVec instead.")
#endif

#ifdef SOFA_BUILD_SOFA_CORE
#define SOFA_CORE_DEPRECATED_BEGININTEGRATION()
#else
#define SOFA_CORE_DEPRECATED_BEGININTEGRATION() \
SOFA_ATTRIBUTE_DEPRECATED("v26.12", "v27.12", "`beginIntegration` method was empty for a long time.")
#endif

#ifdef SOFA_BUILD_SOFA_CORE
#define SOFA_ATTRIBUTE_DEPRECATED__ADDDFORCE_OVERLOAD()
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,6 @@ void DefaultAnimationLoop::propagateAnimateBeginEvent(const core::ExecParams* pa
void DefaultAnimationLoop::beginIntegration(const core::ExecParams* params, SReal dt) const
{
propagateIntegrateBeginEvent(params);

SCOPED_TIMER("beginIntegration");
mechanicalvisitor::MechanicalBeginIntegrationVisitor beginVisitor(params, dt);
m_node->execute(&beginVisitor);
}

void DefaultAnimationLoop::propagateIntegrateBeginEvent(const core::ExecParams* params) const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,13 @@
SOFA_ATTRIBUTE_DEPRECATED("v26.12", "v27.06", "`MechanicalGetMomentumVisitor` was not used.")
#endif

#ifdef SOFA_BUILD_SOFA_SIMULATION_CORE
#define SOFA_ATTRIBUTE_DEPRECATED__MECHANICALBEGININTEGRATIONVISITOR()
#else
#define SOFA_ATTRIBUTE_DEPRECATED__MECHANICALBEGININTEGRATIONVISITOR() \
SOFA_ATTRIBUTE_DEPRECATED("v26.12", "v27.06", "This visitor calls a deprecated method `beginIntegration`.")
#endif

#ifdef SOFA_BUILD_SOFA_SIMULATION_CORE
#define SOFA_ATTRIBUTE_DEPRECATED__COMPUTEDF_OVERLOAD()
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* *
* Contact information: contact@sofa-framework.org *
******************************************************************************/

#define SOFA_SIMULATION_MECHANICALVISITOR_MECHANICALBEGININTEGRATIONVISITOR_CPP
#include <sofa/simulation/mechanicalvisitor/MechanicalBeginIntegrationVisitor.h>

#include <sofa/core/behavior/BaseMechanicalState.h>
Expand All @@ -39,4 +39,4 @@ Visitor::Result MechanicalBeginIntegrationVisitor::fwdMappedMechanicalState(simu
return RESULT_CONTINUE;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@

#include <sofa/simulation/BaseMechanicalVisitor.h>

#if !defined(SOFA_SIMULATION_MECHANICALVISITOR_MECHANICALBEGININTEGRATIONVISITOR_CPP)
SOFA_HEADER_DEPRECATED_NOT_REPLACED("v26.12", "v27.06")
#endif

namespace sofa::simulation::mechanicalvisitor
{

/** Visitor used to prepare a time integration step. Typically, does nothing.
*/
class SOFA_SIMULATION_CORE_API MechanicalBeginIntegrationVisitor : public BaseMechanicalVisitor
class SOFA_SIMULATION_CORE_API SOFA_ATTRIBUTE_DEPRECATED__MECHANICALBEGININTEGRATIONVISITOR() MechanicalBeginIntegrationVisitor : public BaseMechanicalVisitor
{
public:
SReal dt;
Expand All @@ -54,4 +58,4 @@ class SOFA_SIMULATION_CORE_API MechanicalBeginIntegrationVisitor : public BaseMe
return true;
}
};
}
}
Loading