From 28e72fdda7973ce54777e3d3645e19dc2f196d6d Mon Sep 17 00:00:00 2001 From: Alex Bilger Date: Mon, 2 Sep 2024 09:43:10 +0200 Subject: [PATCH 1/2] Fix compilation after rename --- src/Cosserat/constraint/CosseratActuatorConstraint.h | 2 +- src/Cosserat/constraint/CosseratActuatorConstraint.inl | 4 ++-- src/Cosserat/constraint/CosseratNeedleSlidingConstraint.h | 2 +- src/Cosserat/constraint/CosseratNeedleSlidingConstraint.inl | 2 +- src/Cosserat/constraint/QPSlidingConstraint.h | 2 +- src/Cosserat/constraint/QPSlidingConstraint.inl | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Cosserat/constraint/CosseratActuatorConstraint.h b/src/Cosserat/constraint/CosseratActuatorConstraint.h index d2283522..7513e077 100644 --- a/src/Cosserat/constraint/CosseratActuatorConstraint.h +++ b/src/Cosserat/constraint/CosseratActuatorConstraint.h @@ -175,7 +175,7 @@ class CosseratActuatorConstraint : public CableModel using CableModel::d_displacement ; using CableModel::d_componentState ; using CableModel::m_nbLines ; - using CableModel::m_constraintIndex ; + using CableModel::d_constraintIndex ; using CableModel::m_state ; using CableModel::d_indices ; using CableModel::d_pullPoint; diff --git a/src/Cosserat/constraint/CosseratActuatorConstraint.inl b/src/Cosserat/constraint/CosseratActuatorConstraint.inl index 218e9967..34e5f453 100644 --- a/src/Cosserat/constraint/CosseratActuatorConstraint.inl +++ b/src/Cosserat/constraint/CosseratActuatorConstraint.inl @@ -104,8 +104,8 @@ void CosseratActuatorConstraint::buildConstraintMatrix(const Constrai SOFA_UNUSED(cParams); - m_constraintIndex.setValue(cIndex); - const auto& constraintIndex = sofa::helper::getReadAccessor(m_constraintIndex); + d_constraintIndex.setValue(cIndex); + const auto& constraintIndex = sofa::helper::getReadAccessor(d_constraintIndex); MatrixDeriv& matrix = *cMatrix.beginEdit(); diff --git a/src/Cosserat/constraint/CosseratNeedleSlidingConstraint.h b/src/Cosserat/constraint/CosseratNeedleSlidingConstraint.h index 3eec7ac4..bfb703cc 100644 --- a/src/Cosserat/constraint/CosseratNeedleSlidingConstraint.h +++ b/src/Cosserat/constraint/CosseratNeedleSlidingConstraint.h @@ -136,7 +136,7 @@ namespace sofa::component::constraintset //////////////////////////////////////////////////////////////////////////// /// \brief internalInit unsigned m_nbLines ; - using Constraint::m_constraintIndex ; + using Constraint::d_constraintIndex ; void internalInit(); }; diff --git a/src/Cosserat/constraint/CosseratNeedleSlidingConstraint.inl b/src/Cosserat/constraint/CosseratNeedleSlidingConstraint.inl index d579bbb8..d4f6f1b6 100644 --- a/src/Cosserat/constraint/CosseratNeedleSlidingConstraint.inl +++ b/src/Cosserat/constraint/CosseratNeedleSlidingConstraint.inl @@ -151,7 +151,7 @@ namespace sofa::component::constraintset //ReadAccessor> positions = this->mstate->readPositions(); const VecCoord positions = x.getValue(); type::Vec<3, bool> use = d_useDirections.getValue(); - const auto& constraintIndex = sofa::helper::getReadAccessor(m_constraintIndex); + const auto& constraintIndex = sofa::helper::getReadAccessor(d_constraintIndex); for (unsigned int i = 0; i < positions.size(); i++) { diff --git a/src/Cosserat/constraint/QPSlidingConstraint.h b/src/Cosserat/constraint/QPSlidingConstraint.h index 0531371a..282addb1 100644 --- a/src/Cosserat/constraint/QPSlidingConstraint.h +++ b/src/Cosserat/constraint/QPSlidingConstraint.h @@ -162,7 +162,7 @@ class QPSlidingConstraint : public softrobots::constraint::CableModel //////////////////////////////////////////////////////////////////////////// /// \brief internalInit using softrobots::constraint::SoftRobotsConstraint::m_nbLines ; - using softrobots::constraint::SoftRobotsConstraint::m_constraintIndex ; + using softrobots::constraint::SoftRobotsConstraint::d_constraintIndex ; void internalInit(); }; diff --git a/src/Cosserat/constraint/QPSlidingConstraint.inl b/src/Cosserat/constraint/QPSlidingConstraint.inl index 60a00a61..113b3dc1 100644 --- a/src/Cosserat/constraint/QPSlidingConstraint.inl +++ b/src/Cosserat/constraint/QPSlidingConstraint.inl @@ -118,8 +118,8 @@ void QPSlidingConstraint::buildConstraintMatrix(const ConstraintParam SOFA_UNUSED(cParams); MatrixDeriv& matrix = *cMatrix.beginEdit(); VecCoord positions = x.getValue(); - m_constraintIndex.setValue(cIndex); - const auto& constraintIndex = sofa::helper::getReadAccessor(m_constraintIndex); + d_constraintIndex.setValue(cIndex); + const auto& constraintIndex = sofa::helper::getReadAccessor(d_constraintIndex); for (unsigned int i=0; i::getConstraintViolation(const ConstraintPara SOFA_UNUSED(cParams); ReadAccessor> positions = m_state->readPositions(); - const auto& constraintIndex = sofa::helper::getReadAccessor(m_constraintIndex); + const auto& constraintIndex = sofa::helper::getReadAccessor(d_constraintIndex); if(Jdx->size()==0){ //std::cout << "Size JDX = "<< Jdx->size() << std::endl; From 4059e94dccf843d872762c7d83daef75361b25ae Mon Sep 17 00:00:00 2001 From: Alex Bilger Date: Tue, 3 Sep 2024 08:32:05 +0200 Subject: [PATCH 2/2] more fixes --- src/Cosserat/constraint/CosseratActuatorConstraint.inl | 2 +- src/Cosserat/constraint/CosseratNeedleSlidingConstraint.inl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Cosserat/constraint/CosseratActuatorConstraint.inl b/src/Cosserat/constraint/CosseratActuatorConstraint.inl index 34e5f453..179c06e7 100644 --- a/src/Cosserat/constraint/CosseratActuatorConstraint.inl +++ b/src/Cosserat/constraint/CosseratActuatorConstraint.inl @@ -169,7 +169,7 @@ void CosseratActuatorConstraint::getConstraintViolation(const Constra for (unsigned i=0;iset(m_constraintIndex.getValue(), dfree); + resV->set(d_constraintIndex.getValue(), dfree); } } diff --git a/src/Cosserat/constraint/CosseratNeedleSlidingConstraint.inl b/src/Cosserat/constraint/CosseratNeedleSlidingConstraint.inl index d4f6f1b6..a99f4e14 100644 --- a/src/Cosserat/constraint/CosseratNeedleSlidingConstraint.inl +++ b/src/Cosserat/constraint/CosseratNeedleSlidingConstraint.inl @@ -113,7 +113,7 @@ namespace sofa::component::constraintset SOFA_UNUSED(cParams); MatrixDeriv &matrix = *cMatrix.beginEdit(); VecCoord positions = x.getValue(); - m_constraintIndex.setValue(cIndex); + d_constraintIndex.setValue(cIndex); type::Vec<3, bool> use = d_useDirections.getValue(); @@ -131,7 +131,7 @@ namespace sofa::component::constraintset } } cMatrix.endEdit(); - m_nbLines = cIndex - m_constraintIndex.getValue(); + m_nbLines = cIndex - d_constraintIndex.getValue(); }