Skip to content

Commit

Permalink
Merge pull request #7 from hugtalbot/202501_fix_compilation
Browse files Browse the repository at this point in the history
Fix compilation further to lifecycle v25.06
  • Loading branch information
alxbilger authored Feb 18, 2025
2 parents 7b59adc + 43275ff commit cdde44d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/ShapeMatchingPlugin/ShapeMatchingForceField.inl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void ShapeMatchingForceField<DataTypes>::addForce(const core::MechanicalParams*
const auto& vcm = l_rotationFinder->getCM();
const auto& vcm0 = l_rotationFinder->getCM0();
const auto& vNeighborhood = l_rotationFinder->getNeighborhood();
const auto& x0 = this->mstate->read(sofa::core::ConstVecCoordId::restPosition())->getValue();
const auto& x0 = this->mstate->read(sofa::core::vec_id::read_access::restPosition)->getValue();
Coord gi, xi;

f1.resize(p1.size());
Expand Down Expand Up @@ -109,7 +109,7 @@ void ShapeMatchingForceField<DataTypes>::addDForce(const core::MechanicalParams*
const auto& vDR = l_rotationFinder->getDRotations(dx.getValue());
const auto& vcm0 = l_rotationFinder->getCM0();
const auto& vNeighborhood = l_rotationFinder->getNeighborhood();
const auto& x0 = this->mstate->read(sofa::core::ConstVecCoordId::restPosition())->getValue();
const auto& x0 = this->mstate->read(sofa::core::vec_id::read_access::restPosition)->getValue();

df1.resize(dp1.size());
const Real fact = d_stiffness.getValue()*mparams->kFactorIncludingRayleighDamping(this->rayleighStiffness.getValue());
Expand Down
18 changes: 9 additions & 9 deletions src/ShapeMatchingPlugin/ShapeMatchingRotationFinder.inl
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void ShapeMatchingRotationFinder<DataTypes>::computeNeighborhood()
}
else
{
const VecCoord& X0 = l_mechanicalState->read(sofa::core::ConstVecCoordId::restPosition())->getValue();
const VecCoord& X0 = l_mechanicalState->read(sofa::core::vec_id::read_access::restPosition)->getValue();
type::vector< unsigned int > clusterInPoint;

clusterInPoint.resize(nbPoints);
Expand Down Expand Up @@ -262,7 +262,7 @@ void ShapeMatchingRotationFinder<DataTypes>::computeQT()
m_Xcm.resize(m_pointNeighborhood.size());
m_Xcm0.resize(m_pointNeighborhood.size());

const VecCoord& restPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::restPosition())->getValue();
const VecCoord& restPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::restPosition)->getValue();

for (unsigned int i=0;i<m_pointNeighborhood.size();++i)
{
Expand Down Expand Up @@ -295,8 +295,8 @@ void ShapeMatchingRotationFinder<DataTypes>::flipAxis(typename ShapeMatchingRota
template <class DataTypes>
const type::vector<typename ShapeMatchingRotationFinder<DataTypes>::Mat3x3>& ShapeMatchingRotationFinder<DataTypes>::getRotations()
{
const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::position())->getValue();
const VecCoord& restPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::restPosition())->getValue();
const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::position)->getValue();
const VecCoord& restPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::restPosition)->getValue();

if (currentPositions.size() < 3)
{
Expand Down Expand Up @@ -369,8 +369,8 @@ void ShapeMatchingRotationFinder<DataTypes>::getRotations(linearalgebra::BaseMat
{
if (auto* diag = dynamic_cast<linearalgebra::RotationMatrix<Real> *>(m))
{
const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::position())->getValue();
const VecCoord& restPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::restPosition())->getValue();
const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::position)->getValue();
const VecCoord& restPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::restPosition)->getValue();

if (currentPositions.size() < 3)
{
Expand Down Expand Up @@ -492,7 +492,7 @@ const type::vector<typename ShapeMatchingRotationFinder<DataTypes>::Mat3x3>& Sha
getDRotations();
}

const VecCoord& restPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::restPosition())->getValue();
const VecCoord& restPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::restPosition)->getValue();

const auto nbShapes = m_pointNeighborhood.size();

Expand Down Expand Up @@ -552,7 +552,7 @@ void ShapeMatchingRotationFinder<DataTypes>::draw(const core::visual::VisualPara
if (d_showRotations.getValue())
{

const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::position())->getValue();
const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::position)->getValue();

getRotations();

Expand Down Expand Up @@ -583,7 +583,7 @@ void ShapeMatchingRotationFinder<DataTypes>::draw(const core::visual::VisualPara

if (vparams->displayFlags().getShowForceFields())
{
const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::position())->getValue();
const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::position)->getValue();

if (!d_showRotations.getValue())
getRotations();
Expand Down

0 comments on commit cdde44d

Please sign in to comment.