Skip to content

Commit 67409b9

Browse files
committed
Fix compilation regarding SOFA pr
1 parent 1b8dcaf commit 67409b9

4 files changed

Lines changed: 18 additions & 16 deletions

File tree

src/BeamAdapter/component/mapping/BeamLengthMapping.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,6 @@ class BeamLengthMapping : public Mapping<TIn, TOut>
156156
virtual void applyJ(const MechanicalParams *mparams, Data<VecDeriv>& out, const Data<InVecDeriv>& in) override;
157157
virtual void applyJT(const MechanicalParams *mparams, Data<InVecDeriv>& out, const Data<VecDeriv>& in) override;
158158
virtual void applyJT(const ConstraintParams *cparams, Data<InMatrixDeriv>& out, const Data<OutMatrixDeriv>& in) override;
159-
virtual void applyDJT(const MechanicalParams* mparams, core::MultiVecDerivId parentDfId, core::ConstMultiVecDerivId childDfId) override;
160-
161-
// interface of baseMapping.h
162-
virtual void updateK( const MechanicalParams* /*mparams*/, core::ConstMultiVecDerivId /*outForce*/ ) override;
163-
const linearalgebra::BaseMatrix* getK() override;
164159

165160

166161

@@ -179,6 +174,12 @@ class BeamLengthMapping : public Mapping<TIn, TOut>
179174
/* Vec3 F0_buf, F1_buf, F2_buf, F3_buf; // Used for debug */
180175
SparseKMatrixEigen K_geom;
181176

177+
virtual void doApplyDJT(const MechanicalParams* mparams, core::MultiVecDerivId parentDfId, core::ConstMultiVecDerivId childDfId) override;
178+
179+
// interface of baseMapping.h
180+
virtual void doUpdateK( const MechanicalParams* /*mparams*/, core::ConstMultiVecDerivId /*outForce*/ ) override;
181+
const linearalgebra::BaseMatrix* doGetK() override;
182+
182183
// used for applyJ on one beam
183184
void computeJSpline(Real &dlength, const Vec3& P0, const Vec3& P1, const Vec3& P2, const Vec3& P3,
184185
const Vec3& dP0, const Vec3& dP1, const Vec3& dP2, const Vec3& dP3);

src/BeamAdapter/component/mapping/BeamLengthMapping.inl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ void BeamLengthMapping< TIn, TOut>::applyJT(const core::ConstraintParams* cparam
419419
/// BeamLengthMapping::applyDJT(MultiVecDerivId parentDfId, const ConstMultiVecDerivId childDfId)
420420
/// this function computes the additional stiffness force created on the parents by the force on the child (due to mapping non-linearity)
421421
template <class TIn, class TOut>
422-
void BeamLengthMapping< TIn, TOut>::applyDJT(const MechanicalParams* mparams, core::MultiVecDerivId parentDfId, core::ConstMultiVecDerivId childDfId)
422+
void BeamLengthMapping< TIn, TOut>::doApplyDJT(const MechanicalParams* mparams, core::MultiVecDerivId parentDfId, core::ConstMultiVecDerivId childDfId)
423423
{
424424
const unsigned& geometricStiffness = d_geometricStiffness.getValue();
425425
if( !geometricStiffness ) return;
@@ -579,7 +579,7 @@ void BeamLengthMapping< TIn, TOut>::applyDJT(const MechanicalParams* mparams, co
579579
}
580580

581581
template <class TIn, class TOut>
582-
void BeamLengthMapping<TIn, TOut>::updateK(const core::MechanicalParams* mparams, core::ConstMultiVecDerivId childForceId )
582+
void BeamLengthMapping<TIn, TOut>::doUpdateK(const core::MechanicalParams* mparams, core::ConstMultiVecDerivId childForceId )
583583
{
584584
SOFA_UNUSED(mparams);
585585
const unsigned& geometricStiffness = d_geometricStiffness.getValue();
@@ -761,7 +761,7 @@ void BeamLengthMapping<TIn, TOut>::updateK(const core::MechanicalParams* mparams
761761

762762

763763
template <class TIn, class TOut>
764-
const sofa::linearalgebra::BaseMatrix* BeamLengthMapping<TIn, TOut>::getK()
764+
const sofa::linearalgebra::BaseMatrix* BeamLengthMapping<TIn, TOut>::doGetK()
765765
{
766766
return &K_geom;
767767
}

src/BeamAdapter/component/mapping/BeamProjectionDifferenceMultiMapping.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,20 +144,14 @@ class SOFA_BEAMADAPTER_API BeamProjectionDifferenceMultiMapping : public sofa::c
144144
const sofa::type::vector< In2DataVecDeriv*>& dataVecOut2RootForce,
145145
const sofa::type::vector<const OutDataVecDeriv*>& dataVecInForce) override;
146146

147-
void applyDJT(const sofa::core::MechanicalParams* mparams,
148-
sofa::core::MultiVecDerivId inForce,
149-
sofa::core::ConstMultiVecDerivId outForce) override;
150-
151147
virtual void applyJT(
152148
const sofa::core::ConstraintParams* cparams , const sofa::type::vector< In1DataMatrixDeriv*>& dataMatOut1Const ,
153149
const sofa::type::vector< In2DataMatrixDeriv*>& dataMatOut2Const ,
154150
const sofa::type::vector<const OutDataMatrixDeriv*>& dataMatInConst) override;
155151

156-
virtual const sofa::type::vector<sofa::linearalgebra::BaseMatrix*>* getJs() override;
157152

158153
void computeProjection(const In1VecCoord &xFrom, const In2VecCoord &xTo, const bool &updateOrientation);
159154

160-
public:
161155
sofa::Data<vector<unsigned int>> d_indices;
162156
sofa::Data<sofa::type::vector<bool>> d_directions;
163157
sofa::Data<bool> d_updateProjectionPosition;
@@ -171,6 +165,13 @@ class SOFA_BEAMADAPTER_API BeamProjectionDifferenceMultiMapping : public sofa::c
171165
using sofa::core::Multi2Mapping<TIn1, TIn2, TOut>::d_componentState ;
172166

173167
protected:
168+
169+
void doApplyDJT(const sofa::core::MechanicalParams* mparams,
170+
sofa::core::MultiVecDerivId inForce,
171+
sofa::core::ConstMultiVecDerivId outForce) override;
172+
virtual const sofa::type::vector<sofa::linearalgebra::BaseMatrix*>* doGetJs() override;
173+
174+
174175
sofa::core::State<In1>* m_fromModel1;
175176
sofa::core::State<In2>* m_fromModel2;
176177
sofa::core::State<Out>* m_toModel;

src/BeamAdapter/component/mapping/BeamProjectionDifferenceMultiMapping.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ void BeamProjectionDifferenceMultiMapping<TIn1, TIn2, TOut>::applyJT( const sofa
443443
}
444444

445445
template <class TIn1, class TIn2, class TOut>
446-
void BeamProjectionDifferenceMultiMapping<TIn1, TIn2, TOut>::applyDJT(const sofa::core::MechanicalParams* mparams,
446+
void BeamProjectionDifferenceMultiMapping<TIn1, TIn2, TOut>::doApplyDJT(const sofa::core::MechanicalParams* mparams,
447447
sofa::core::MultiVecDerivId inForce,
448448
sofa::core::ConstMultiVecDerivId outForce)
449449
{
@@ -453,7 +453,7 @@ void BeamProjectionDifferenceMultiMapping<TIn1, TIn2, TOut>::applyDJT(const sofa
453453
}
454454

455455
template <class TIn1, class TIn2, class TOut>
456-
const sofa::type::vector<sofa::linearalgebra::BaseMatrix*>* BeamProjectionDifferenceMultiMapping<TIn1, TIn2, TOut>::getJs()
456+
const sofa::type::vector<sofa::linearalgebra::BaseMatrix*>* BeamProjectionDifferenceMultiMapping<TIn1, TIn2, TOut>::doGetJs()
457457
{
458458
const OutVecCoord& out = m_toModel->read(sofa::core::vec_id::read_access::position)->getValue();
459459
const In1VecCoord& in1 = m_fromModel1->read(sofa::core::vec_id::read_access::position)->getValue();

0 commit comments

Comments
 (0)