Skip to content

Commit ac1db62

Browse files
committed
Merge branch 'master' of https://github.com/sofa-framework/sofa
2 parents f2d2677 + fe29b35 commit ac1db62

File tree

6 files changed

+18
-3
lines changed

6 files changed

+18
-3
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/Helper/src/sofa/helper/system/FileSystem.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,21 +198,28 @@ bool FileSystem::createDirectory(const std::string& path)
198198
struct stat st_buf;
199199
if (stat(path.c_str(), &st_buf) == 0)
200200
{
201-
if ((st_buf.st_mode & S_IFMT) != S_IFDIR) {
202-
msg_error(error) << path << ": File exists and is not a directoy";
201+
if ((st_buf.st_mode & S_IFMT) != S_IFDIR)
202+
{
203+
msg_error(error) << path << ": File exists and is not a directory";
203204
return true;
204205
}
205206
else
206207
{
208+
// 'path' was already created and is a folder
207209
return false;
208210
}
209211
}
210-
212+
else
213+
{
214+
msg_error(error) << path << ": Unknown error while trying to create this directory.";
215+
return true;
216+
}
211217
}
212218
}
213219
#endif
214220
else
215221
{
222+
// 'path' has been created sucessfully
216223
return false;
217224
}
218225
}

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)