Skip to content

Commit f86574a

Browse files
authored
Fix compilation with Lifecycle v25.06 (#315)
1 parent fe6feea commit f86574a

12 files changed

+15
-21
lines changed

src/SoftRobots/component/constraint/model/SurfacePressureModel.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ void SurfacePressureModel<DataTypes>::init()
154154
internalInit();
155155

156156
// Compute initial cavity volume and store it (used in reset())
157-
ReadAccessor<Data<VecCoord> > positions = *m_state->read(VecCoordId::position());
157+
ReadAccessor<Data<VecCoord> > positions = *m_state->read(sofa::core::vec_id::read_access::position);
158158
Real volume = getCavityVolume(positions.ref());
159159
d_initialCavityVolume.setValue(volume);
160160
d_cavityVolume.setValue(volume);
@@ -170,7 +170,7 @@ void SurfacePressureModel<DataTypes>::bwdInit()
170170

171171
// The initial volume is computed in bwdInit so the mapping (if there is any)
172172
// will be considered
173-
ReadAccessor<Data<VecCoord> > positions = *m_state->read(VecCoordId::position());
173+
ReadAccessor<Data<VecCoord> > positions = *m_state->read(sofa::core::vec_id::read_access::position);
174174
Real volume = getCavityVolume(positions.ref());
175175
d_initialCavityVolume.setValue(volume);
176176
d_cavityVolume.setValue(volume);

src/SoftRobots/component/controller/AnimationEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void AnimationEditor<Rigid3Types>::updateAnimationWithInterpolation(const int st
5858
return;
5959
}
6060

61-
int nbPositions = m_state->read(sofa::core::ConstVecCoordId::position())->getValue().size();
61+
int nbPositions = m_state->read(sofa::core::vec_id::read_access::position)->getValue().size();
6262
int nbStep = endKey - startKey;
6363

6464
for (int i=0; i<nbStep+1; i++)

src/SoftRobots/component/controller/AnimationEditor.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ void AnimationEditor<DataTypes>::onBeginAnimationStep(const double dt)
329329
{
330330
m_isFrameDirty = false;
331331
if(d_cursor.getValue()<m_animation.size())
332-
m_state->write(sofa::core::VecCoordId::position())->setValue(m_animation[d_cursor.getValue()]);
332+
m_state->write(sofa::core::vec_id::write_access::position)->setValue(m_animation[d_cursor.getValue()]);
333333
}
334334
}
335335

src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void PREquivalentStiffnessForceField<DataTypes>::init()
9191

9292
// Read rest positions
9393
WriteAccessor<VecCoord> restPosWriter(m_restPos);
94-
ReadAccessor<DataVecCoord> restPosReader(*mstate->read(sofa::core::ConstVecCoordId::restPosition()));
94+
ReadAccessor<DataVecCoord> restPosReader(*mstate->read(sofa::core::vec_id::read_access::restPosition));
9595

9696
size_t nFrames = restPosReader.size();
9797
restPosWriter.resize(nFrames);

src/SoftRobots/component/forcefield/PartialRigidificationForceField.inl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void PartialRigidificationForceField<DataTypes1, DataTypes2>::addKToMatrix(const
106106
CompressedRowSparseMatrix< _3_3_Matrix_Type >* mappedFFMatrix = new CompressedRowSparseMatrix< _3_3_Matrix_Type > ( );
107107

108108
sofa::core::behavior::BaseMechanicalState* mstate = d_mappedForceField.get()->getContext()->getMechanicalState();
109-
mappedFFMatrix->resizeBloc( mstate->getSize() , mstate->getSize());
109+
mappedFFMatrix->resizeBlock( mstate->getSize() , mstate->getSize());
110110

111111
DefaultMultiMatrixAccessor* mappedFFMatrixAccessor;
112112
mappedFFMatrixAccessor = new DefaultMultiMatrixAccessor;
@@ -223,7 +223,7 @@ void PartialRigidificationForceField<DataTypes1, DataTypes2>::testBuildJacobian(
223223
CompressedRowSparseMatrix< _3_3_Matrix_Type >* mappedFFMatrix = new CompressedRowSparseMatrix< _3_3_Matrix_Type > ( );
224224

225225
sofa::core::behavior::BaseMechanicalState* mstate = d_mappedForceField.get()->getContext()->getMechanicalState();
226-
mappedFFMatrix->resizeBloc( mstate->getSize() , mstate->getSize());
226+
mappedFFMatrix->resizeBlock( mstate->getSize() , mstate->getSize());
227227

228228
DefaultMultiMatrixAccessor* mappedFFMatrixAccessor;
229229
mappedFFMatrixAccessor = new DefaultMultiMatrixAccessor;
@@ -243,7 +243,7 @@ void PartialRigidificationForceField<DataTypes1, DataTypes2>::testBuildJacobian(
243243
sofa::core::State<DataTypes1> * state = dynamic_cast<sofa::core::State<DataTypes1> *>(mstate);
244244
unsigned int stateSize = mstate->getSize();
245245

246-
sofa::core::MultiMatrixDerivId c = sofa::core::MatrixDerivId::mappingJacobian();
246+
sofa::core::MultiMatrixDerivId c = sofa::core::vec_id::write_access::mappingJacobian;
247247

248248
DataMatrixDeriv1* out = c[state].write();
249249

@@ -279,7 +279,7 @@ void PartialRigidificationForceField<DataTypes1, DataTypes2>::multMatrices(const
279279
size_t rBlockR = A.nBlockRow;
280280
size_t cBlockR = B.nBlockCol;
281281

282-
R.resizeBloc(rBlockR, cBlockR);
282+
R.resizeBlock(rBlockR, cBlockR);
283283

284284
typedef typename CompressedRowSparseMatrix<Mat<M, N, Real1> >::ColBlockConstIterator AColBlockIter;
285285
typedef typename CompressedRowSparseMatrix<Mat<M, N, Real1> >::BlockConstAccessor ABlockConstAccessor;
@@ -329,7 +329,7 @@ void PartialRigidificationForceField<DataTypes1, DataTypes2>::multMatricesT(cons
329329
size_t rBlockR = At.nBlockCol;
330330
size_t cBlockR = B.nBlockCol;
331331

332-
R.resizeBloc(rBlockR, cBlockR);
332+
R.resizeBlock(rBlockR, cBlockR);
333333

334334
typedef typename CompressedRowSparseMatrix<Mat<M, N, Real1> >::ColBlockConstIterator AColBlockIter;
335335
typedef typename CompressedRowSparseMatrix<Mat<M, N, Real1> >::BlockConstAccessor ABlockConstAccessor;

src/SoftRobots/component/forcefield/PipeForceField.inl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void PipeForceField<DataTypes>::addKToMatrix(const MechanicalParams* mparams,
148148

149149
DefaultMultiMatrixAccessor* mappedFFMatrixAccessor = new DefaultMultiMatrixAccessor;
150150
mappedFFMatrixAccessor->addMechanicalState(springState);
151-
mappedFFMatrix->resizeBloc(springState->getSize(),springState->getSize());
151+
mappedFFMatrix->resizeBlock(springState->getSize(),springState->getSize());
152152
mappedFFMatrixAccessor->setGlobalMatrix(mappedFFMatrix);
153153
mappedFFMatrixAccessor->setupMatrices();
154154

@@ -198,7 +198,7 @@ void PipeForceField<DataTypes>::multMatrices(const CompressedRowSparseMatrix<Mat
198198
size_t rBlockR = A.nBlockRow;
199199
size_t cBlockR = B.nBlockCol;
200200

201-
R.resizeBloc(rBlockR, cBlockR);
201+
R.resizeBlock(rBlockR, cBlockR);
202202

203203
typedef typename CompressedRowSparseMatrix<Mat<M, N, Real> >::ColBlockConstIterator AColBlockIter;
204204
typedef typename CompressedRowSparseMatrix<Mat<M, N, Real> >::BlockConstAccessor ABlockConstAccessor;
@@ -246,7 +246,7 @@ void PipeForceField<DataTypes>::multMatricesT(const CompressedRowSparseMatrix<Ma
246246
size_t rBlockR = At.nBlockCol;
247247
size_t cBlockR = B.nBlockCol;
248248

249-
R.resizeBloc(rBlockR, cBlockR);
249+
R.resizeBlock(rBlockR, cBlockR);
250250

251251
typedef typename CompressedRowSparseMatrix<Mat<M, N, Real> >::ColBlockConstIterator AColBlockIter;
252252
typedef typename CompressedRowSparseMatrix<Mat<M, N, Real> >::BlockConstAccessor ABlockConstAccessor;

tests/component/constraint/UnilateralPlaneConstraintTest.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ using sofa::simulation::SceneLoaderXML ;
4949
using sofa::simulation::Simulation ;
5050
#include <sofa/simulation/Node.h>
5151
using sofa::simulation::Node ;
52-
using sofa::simulation::setSimulation ;
5352
using sofa::core::objectmodel::New ;
5453
using sofa::core::objectmodel::BaseData ;
5554
using sofa::component::statecontainer::MechanicalObject ;

tests/component/controller/AnimationEditorTest.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ using sofa::core::objectmodel::Data ;
4545
using sofa::simulation::Simulation ;
4646
#include <sofa/simulation/Node.h>
4747
using sofa::simulation::Node ;
48-
using sofa::simulation::setSimulation ;
4948
using sofa::core::objectmodel::New ;
5049
using sofa::core::objectmodel::BaseData ;
5150
using sofa::component::statecontainer::MechanicalObject ;
@@ -224,13 +223,13 @@ struct AnimationEditorTest : public sofa::testing::BaseTest, controller::Animati
224223
d_maxKeyFrame.setValue(1);
225224

226225
m_keyFramesID.push_back(0);
227-
m_animation.resize(1,m_state->read(sofa::core::ConstVecCoordId::position())->getValue());
226+
m_animation.resize(1,m_state->read(sofa::core::vec_id::read_access::position)->getValue());
228227

229228
d_cursor.setValue(5);
230229
VecCoord newPosition;
231230
newPosition.resize(1);
232231
newPosition[0] = Coord(0.,12.5,0.);
233-
m_state->write(sofa::core::VecCoordId::position())->setValue(newPosition);
232+
m_state->write(sofa::core::vec_id::write_access::position)->setValue(newPosition);
234233
addKeyFrame();
235234
if(m_keyFramesID.size() != (unsigned int)2) return false;
236235
if(m_keyFramesID[1] != (unsigned int)5) return false;

tests/component/controller/DataVariationLimiterTest.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ using std::string ;
4141
using sofa::simulation::Simulation ;
4242
#include <sofa/simulation/Node.h>
4343
using sofa::simulation::Node ;
44-
using sofa::simulation::setSimulation ;
4544
using sofa::core::objectmodel::New ;
4645
using sofa::core::objectmodel::BaseData ;
4746

tests/component/controller/SerialPortBridgeGenericTest.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ using std::string ;
4040
using sofa::simulation::Simulation ;
4141
#include <sofa/simulation/Node.h>
4242
using sofa::simulation::Node ;
43-
using sofa::simulation::setSimulation ;
4443
using sofa::core::objectmodel::New ;
4544
using sofa::core::objectmodel::BaseData ;
4645

0 commit comments

Comments
 (0)