Skip to content

Commit 280b0bb

Browse files
Merge pull request #42 from fredroy/fix_compilation_2112
Fix for compilation v21.12
2 parents 7cdfe83 + 0eac233 commit 280b0bb

16 files changed

+24
-24
lines changed

src/ModelOrderReduction/component/contact/MORUnilateralInteractionConstraint.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ class MORUnilateralInteractionConstraint : public UnilateralInteractionConstrain
118118
// in position and stores it into resolution global vector
119119
// ///
120120
// /// @param v Global resolution vector
121-
virtual void getPositionViolation(defaulttype::BaseVector *v) override;
121+
virtual void getPositionViolation(linearalgebra::BaseVector *v) override;
122122

123123
// ///Computes constraint violation in velocity and stores it into resolution global vector
124124
// ///
125125
// /// @param v Global resolution vector
126-
// virtual void getVelocityViolation(defaulttype::BaseVector *v);
126+
// virtual void getVelocityViolation(linearalgebra::BaseVector *v);
127127

128128
public:
129129

@@ -145,7 +145,7 @@ class MORUnilateralInteractionConstraint : public UnilateralInteractionConstrain
145145
void buildConstraintMatrix(const core::ConstraintParams* cParams, DataMatrixDeriv &c1, DataMatrixDeriv &c2, unsigned int &cIndex
146146
, const DataVecCoord &x1, const DataVecCoord &x2) override;
147147

148-
void getConstraintViolation(const core::ConstraintParams* cParams, defaulttype::BaseVector *v, const DataVecCoord &x1, const DataVecCoord &x2
148+
void getConstraintViolation(const core::ConstraintParams* cParams, linearalgebra::BaseVector *v, const DataVecCoord &x1, const DataVecCoord &x2
149149
, const DataVecDeriv &v1, const DataVecDeriv &v2) override;
150150

151151

src/ModelOrderReduction/component/contact/MORUnilateralInteractionConstraint.inl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
#include <SofaConstraint/UnilateralInteractionConstraint.inl>
2727
#include <sofa/core/visual/VisualParams.h>
2828
#include <sofa/type/Vec.h>
29-
#include <sofa/defaulttype/RGBAColor.h>
29+
#include <sofa/type/RGBAColor.h>
30+
#include <sofa/linearalgebra/BaseVector.h>
3031
#include "../loader/MatrixLoader.h"
3132
#include "../loader/MatrixLoader.inl"
3233

@@ -235,7 +236,7 @@ void MORUnilateralInteractionConstraint<DataTypes>::buildConstraintMatrix(const
235236
}
236237

237238
template<class DataTypes>
238-
void MORUnilateralInteractionConstraint<DataTypes>::getConstraintViolation(const core::ConstraintParams *cparams, defaulttype::BaseVector *v, const DataVecCoord &, const DataVecCoord &
239+
void MORUnilateralInteractionConstraint<DataTypes>::getConstraintViolation(const core::ConstraintParams *cparams, linearalgebra::BaseVector *v, const DataVecCoord &, const DataVecCoord &
239240
, const DataVecDeriv &, const DataVecDeriv &)
240241
{
241242
switch (cparams->constOrder())
@@ -257,7 +258,7 @@ void MORUnilateralInteractionConstraint<DataTypes>::getConstraintViolation(const
257258
}
258259

259260
template<class DataTypes>
260-
void MORUnilateralInteractionConstraint<DataTypes>::getPositionViolation(defaulttype::BaseVector *v)
261+
void MORUnilateralInteractionConstraint<DataTypes>::getPositionViolation(linearalgebra::BaseVector *v)
261262
{
262263
const VecCoord &PfreeVec = this->getMState2()->read(core::ConstVecCoordId::freePosition())->getValue();
263264
const VecCoord &QfreeVec = this->getMState1()->read(core::ConstVecCoordId::freePosition())->getValue();

src/ModelOrderReduction/component/forcefield/HyperReducedRestShapeSpringsForceField.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <sofa/helper/config.h>
2525
#include <sofa/defaulttype/VecTypes.h>
2626
#include <sofa/defaulttype/RigidTypes.h>
27-
#include <sofa/defaulttype/RGBAColor.h>
27+
#include <sofa/type/RGBAColor.h>
2828

2929
#include <assert.h>
3030
#include <iostream>
@@ -43,7 +43,7 @@ using helper::ReadAccessor;
4343
using core::behavior::BaseMechanicalState;
4444
using core::behavior::MultiMatrixAccessor;
4545
using core::behavior::ForceField;
46-
using defaulttype::BaseMatrix;
46+
using linearalgebra::BaseMatrix;
4747
using core::VecCoordId;
4848
using core::MechanicalParams;
4949
using type::Vector3;

src/ModelOrderReduction/component/forcefield/HyperReducedTetrahedralCorotationalFEMForceField.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class HyperReducedTetrahedralCorotationalFEMForceField : public virtual Tetrahed
140140
virtual void addForce(const core::MechanicalParams* mparams, DataVecDeriv& d_f, const DataVecCoord& d_x, const DataVecDeriv& d_v) override;
141141
virtual void addDForce(const core::MechanicalParams* mparams, DataVecDeriv& d_df, const DataVecDeriv& d_dx) override;
142142

143-
virtual void addKToMatrix(sofa::defaulttype::BaseMatrix *m, SReal kFactor, unsigned int &offset) override;
143+
virtual void addKToMatrix(sofa::linearalgebra::BaseMatrix *m, SReal kFactor, unsigned int &offset) override;
144144

145145
void draw(const core::visual::VisualParams* vparams) override;
146146

src/ModelOrderReduction/component/forcefield/HyperReducedTetrahedralCorotationalFEMForceField.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ void HyperReducedTetrahedralCorotationalFEMForceField<DataTypes>::draw(const cor
695695

696696

697697
template<class DataTypes>
698-
void HyperReducedTetrahedralCorotationalFEMForceField<DataTypes>::addKToMatrix(sofa::defaulttype::BaseMatrix *mat, SReal k, unsigned int &offset)
698+
void HyperReducedTetrahedralCorotationalFEMForceField<DataTypes>::addKToMatrix(sofa::linearalgebra::BaseMatrix *mat, SReal k, unsigned int &offset)
699699
{
700700
// Build Matrix Block for this ForceField
701701
unsigned int i,j,n1, n2, row, column, ROW, COLUMN;

src/ModelOrderReduction/component/forcefield/HyperReducedTetrahedronFEMForceField.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ class HyperReducedTetrahedronFEMForceField : public virtual TetrahedronFEMForceF
242242
// Make other overloaded version of getPotentialEnergy() to show up in subclass.
243243
using TetrahedronFEMForceField<DataTypes>::getPotentialEnergy;
244244

245-
virtual void addKToMatrix(sofa::defaulttype::BaseMatrix *m, SReal kFactor, unsigned int &offset) override;
245+
virtual void addKToMatrix(sofa::linearalgebra::BaseMatrix *m, SReal kFactor, unsigned int &offset) override;
246246
virtual void addKToMatrix(const core::MechanicalParams* /*mparams*/, const sofa::core::behavior::MultiMatrixAccessor* /*matrix*/ ) override;
247247

248248
void draw(const core::visual::VisualParams* vparams) override;

src/ModelOrderReduction/component/forcefield/HyperReducedTetrahedronFEMForceField.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ void HyperReducedTetrahedronFEMForceField<DataTypes>::addKToMatrix(const core::M
635635
}
636636

637637
template<class DataTypes>
638-
void HyperReducedTetrahedronFEMForceField<DataTypes>::addKToMatrix(sofa::defaulttype::BaseMatrix *mat, SReal k, unsigned int &offset)
638+
void HyperReducedTetrahedronFEMForceField<DataTypes>::addKToMatrix(sofa::linearalgebra::BaseMatrix *mat, SReal k, unsigned int &offset)
639639
{
640640
// Build Matrix Block for this ForceField
641641
unsigned int i,j,n1, n2, row, column, ROW, COLUMN , IT;

src/ModelOrderReduction/component/forcefield/HyperReducedTetrahedronHyperelasticityFEMForceField.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ namespace forcefield
3535
{
3636
using namespace std;
3737
using namespace sofa::defaulttype;
38-
using namespace sofa::component::topology;
3938
using namespace sofa::core::topology;
4039

4140
//***************** Tetrahedron FEM code for several elastic models: TotalLagrangianForceField************************//
@@ -128,7 +127,7 @@ public :
128127

129128
virtual void addForce(const core::MechanicalParams* mparams /* PARAMS FIRST */, DataVecDeriv& d_f, const DataVecCoord& d_x, const DataVecDeriv& d_v) override;
130129
virtual void addDForce(const core::MechanicalParams* mparams /* PARAMS FIRST */, DataVecDeriv& d_df, const DataVecDeriv& d_dx) override;
131-
virtual void addKToMatrix(sofa::defaulttype::BaseMatrix *mat, SReal k, unsigned int &offset) override;
130+
virtual void addKToMatrix(sofa::linearalgebra::BaseMatrix *mat, SReal k, unsigned int &offset) override;
132131

133132
void draw(const core::visual::VisualParams* vparams) override;
134133

src/ModelOrderReduction/component/forcefield/HyperReducedTetrahedronHyperelasticityFEMForceField.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ void HyperReducedTetrahedronHyperelasticityFEMForceField<DataTypes>::addDForce(c
504504
}
505505

506506
template <class DataTypes>
507-
void HyperReducedTetrahedronHyperelasticityFEMForceField<DataTypes>::addKToMatrix(sofa::defaulttype::BaseMatrix *mat, SReal k, unsigned int &offset)
507+
void HyperReducedTetrahedronHyperelasticityFEMForceField<DataTypes>::addKToMatrix(sofa::linearalgebra::BaseMatrix *mat, SReal k, unsigned int &offset)
508508
{
509509

510510
/// if the matrix needs to be updated

src/ModelOrderReduction/component/forcefield/HyperReducedTriangleFEMForceField.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ protected :
157157
void applyStiffnessLarge( VecCoord& f, Real h, const VecCoord& x, const SReal &kFactor );
158158

159159
//// stiffness matrix assembly
160-
void addKToMatrix(sofa::defaulttype::BaseMatrix *mat, SReal k, unsigned int &offset) override; // compute and add all the element stiffnesses to the global stiffness matrix
160+
void addKToMatrix(sofa::linearalgebra::BaseMatrix *mat, SReal k, unsigned int &offset) override; // compute and add all the element stiffnesses to the global stiffness matrix
161161

162162
};
163163

src/ModelOrderReduction/component/forcefield/HyperReducedTriangleFEMForceField.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ void HyperReducedTriangleFEMForceField<DataTypes>::draw(const core::visual::Visu
376376

377377

378378
template<class DataTypes>
379-
void HyperReducedTriangleFEMForceField<DataTypes>::addKToMatrix(sofa::defaulttype::BaseMatrix *mat, SReal k, unsigned int &offset)
379+
void HyperReducedTriangleFEMForceField<DataTypes>::addKToMatrix(sofa::linearalgebra::BaseMatrix *mat, SReal k, unsigned int &offset)
380380
{
381381
if (d_performECSW.getValue())
382382
{

src/ModelOrderReduction/component/forcefield/MechanicalMatrixMapperMOR.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ void MechanicalMatrixMapperMOR<DataTypes1, DataTypes2>::addPrecomputedMassToSyst
243243
typedef typename DataTypes1::Real Real1;
244244

245245
typedef typename CompressedRowSparseMatrix<Real1>::Range Range;
246-
typedef sofa::defaulttype::BaseVector::Index Index;
246+
typedef sofa::linearalgebra::BaseVector::Index Index;
247247

248248

249249

src/ModelOrderReduction/component/mapping/MORContactMapping.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class MORContactMapping : public core::Mapping<TIn, TOut>
125125

126126
void applyJT(const core::ConstraintParams *cparams, Data<InMatrixDeriv>& out, const Data<MatrixDeriv>& in) override;
127127

128-
const sofa::defaulttype::BaseMatrix* getJ() override;
128+
const sofa::linearalgebra::BaseMatrix* getJ() override;
129129

130130
void handleTopologyChange() override;
131131

@@ -135,7 +135,7 @@ class MORContactMapping : public core::Mapping<TIn, TOut>
135135
typedef linearsolver::EigenSparseMatrix<TIn, TOut> eigen_type;
136136
eigen_type J;
137137

138-
typedef type::vector< defaulttype::BaseMatrix* > js_type;
138+
typedef type::vector< linearalgebra::BaseMatrix* > js_type;
139139
js_type Js;
140140

141141
Eigen::MatrixXd m_matrix;

src/ModelOrderReduction/component/mapping/MORContactMapping.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ void MORContactMapping<TIn, TOut>::handleTopologyChange()
231231
}
232232

233233
template <class TIn, class TOut>
234-
const sofa::defaulttype::BaseMatrix* MORContactMapping<TIn, TOut>::getJ()
234+
const sofa::linearalgebra::BaseMatrix* MORContactMapping<TIn, TOut>::getJ()
235235
{
236236
return &J;
237237
}

src/ModelOrderReduction/component/mapping/ModelOrderReductionMapping.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class ModelOrderReductionMapping : public core::Mapping<TIn, TOut>
9090
typedef core::topology::BaseMeshTopology::SeqTetrahedra VecElement;
9191

9292
typedef linearsolver::EigenSparseMatrix<TIn, TOut> eigen_type;
93-
typedef type::vector< defaulttype::BaseMatrix* > js_type;
93+
typedef type::vector< linearalgebra::BaseMatrix* > js_type;
9494

9595

9696
enum
@@ -144,7 +144,7 @@ class ModelOrderReductionMapping : public core::Mapping<TIn, TOut>
144144

145145
void applyJT(const core::ConstraintParams *cparams, Data<InMatrixDeriv>& out, const Data<MatrixDeriv>& in) override;
146146

147-
const sofa::defaulttype::BaseMatrix* getJ() override;
147+
const sofa::linearalgebra::BaseMatrix* getJ() override;
148148

149149

150150

src/ModelOrderReduction/component/mapping/ModelOrderReductionMapping.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ void ModelOrderReductionMapping<TIn, TOut>::applyJT(const core::ConstraintParams
262262

263263

264264
template <class TIn, class TOut>
265-
const sofa::defaulttype::BaseMatrix* ModelOrderReductionMapping<TIn, TOut>::getJ()
265+
const sofa::linearalgebra::BaseMatrix* ModelOrderReductionMapping<TIn, TOut>::getJ()
266266
{
267267
// updateJ();
268268
return &m_J;

0 commit comments

Comments
 (0)