Skip to content
Snippets Groups Projects
Commit 61e11fba authored by Max Kahnt's avatar Max Kahnt
Browse files

Fix. Remove unused variable, use size_t counter.

parent 46adae78
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -21,8 +21,8 @@
#include <dune/solvers/iterationsteps/projectedgradientstep.hh>
#include <dune/solvers/test/common.hh>
template<class GridType, class MatrixType, class VectorType, class BitVector>
bool solveObstacleProblemByProjectedGradientSolver(const GridType& grid, const MatrixType& mat, VectorType& x, const VectorType& rhs, const BitVector& ignore, int maxIterations=10000, double tolerance=1.0e-10)
template<class MatrixType, class VectorType, class BitVector>
bool solveObstacleProblemByProjectedGradientSolver(const MatrixType& mat, VectorType& x, const VectorType& rhs, const BitVector& ignore, int maxIterations=10000, double tolerance=1.0e-10)
{
// create double obstacle constraints
const int blockSize = VectorType::block_type::dimension;
......@@ -31,7 +31,7 @@ bool solveObstacleProblemByProjectedGradientSolver(const GridType& grid, const M
BoxConstraintVector boxConstraints(rhs.size());
for (size_t i = 0; i < boxConstraints.size(); ++i)
{
for (int j = 0; j < blockSize; ++j)
for (size_t j = 0; j < blockSize; ++j)
{
boxConstraints[i].lower(j) = (ignore[i][j]==true) ? 0 : -1;
boxConstraints[i].upper(j) = (ignore[i][j]==true) ? 0 : 1;
......@@ -97,7 +97,7 @@ bool checkWithGrid(const GridType& grid, const std::string fileName, int maxIter
markBoundaryDOFs(gridView, ignore);
solveObstacleProblemByProjectedGradientSolver(grid, A, u, rhs, ignore, maxIterations);
solveObstacleProblemByProjectedGradientSolver(A, u, rhs, ignore, maxIterations);
if (fileName!="")
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment