Skip to content

Commit 6248867

Browse files
fredroybakpaul
andauthored
[Framework] BaseMatrix:: Remove warnings about overloaded-virtual about add() (#5931)
remove warning about overloaded-virtual Co-authored-by: Paul Baksic <30337881+bakpaul@users.noreply.github.com>
1 parent cc9041b commit 6248867

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed

Sofa/framework/Core/src/sofa/core/behavior/MatrixAPICompatibility.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ class AddToMatrixCompatMatrix : public sofa::linearalgebra::BaseMatrix
112112

113113
msg_error(component) << compatibilityMessage << "set is not a supported operation in the compatibility";
114114
}
115+
using linearalgebra::BaseMatrix::add;
115116
void add(Index row, Index col, double v) override
116117
{
117118
if constexpr (c == matrixaccumulator::Contribution::MASS)
@@ -215,6 +216,7 @@ class ApplyConstraintCompat : public sofa::linearalgebra::BaseMatrix
215216
SOFA_UNUSED(j);
216217
SOFA_UNUSED(v);
217218
}
219+
using linearalgebra::BaseMatrix::add;
218220
void add(Index row, Index col, double v) override
219221
{
220222
SOFA_UNUSED(row);

Sofa/framework/LinearAlgebra/src/sofa/linearalgebra/BTDMatrix.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ class BTDMatrix : public linearalgebra::BaseMatrix
177177

178178
void set(Index i, Index j, double v) override;
179179

180+
using BaseMatrix::add;
180181
void add(Index i, Index j, double v) override;
181182

182183
/**

Sofa/framework/LinearAlgebra/src/sofa/linearalgebra/BlockFullMatrix.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ class BlockFullMatrix : public linearalgebra::BaseMatrix
155155

156156
void set(Index i, Index j, double v) override;
157157

158+
using BaseMatrix::add;
158159
void add(Index i, Index j, double v) override;
159160

160161
void clear(Index i, Index j) override;

Sofa/framework/LinearAlgebra/src/sofa/linearalgebra/CompressedRowSparseMatrixMechanical.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ class CompressedRowSparseMatrixMechanical final // final is used to allow the co
262262
traits::vset(*this->wblock(i, j, true), bi, bj, static_cast<Real>(v) );
263263
}
264264

265+
using BaseMatrix::add;
266+
265267
/**
266268
* \brief add scalar v at element i, j of matrix
267269
**/

Sofa/framework/LinearAlgebra/src/sofa/linearalgebra/EigenBaseSparseMatrix.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ class EigenBaseSparseMatrix : public linearalgebra::BaseMatrix
112112

113113

114114

115+
using BaseMatrix::add;
116+
115117
/// Schedule the addition of the value at the given place. Scheduled additions must be finalized using function compress().
116118
void add( Index row, Index col, double value ) override{
117119
if( value!=0.0 ) incoming.push_back( Triplet(row,col,(Real)value) );

0 commit comments

Comments
 (0)