Skip to content
Snippets Groups Projects
Commit 978ca904 authored by Jö Fahlke's avatar Jö Fahlke
Browse files

Merge branch 'fix/signed-unsigned-warnings' into 'master'

[Warnings] Fix a signed/unsigned warning.

See merge request core/dune-istl!126
parents 3d1547ed d39963f3
No related branches found
No related tags found
1 merge request!126[Warnings] Fix a signed/unsigned warning.
Pipeline #
......@@ -5,6 +5,8 @@
#include <memory>
#include <dune/common/rangeutilities.hh>
#include <dune/istl/bcrsmatrix.hh>
/** \file
......@@ -81,12 +83,12 @@ namespace Dune {
size, // columns
size); // nonzeros
for (int i=0; i<size; i++)
for (auto i : range(size))
this->BCRSMatrix<B,A>::setrowsize(i, 1);
this->BCRSMatrix<B,A>::endrowsizes();
for (int i=0; i<size; i++)
for (auto i : range(size))
this->BCRSMatrix<B,A>::addindex(i, i);
this->BCRSMatrix<B,A>::endindices();
......
......@@ -26,6 +26,7 @@ extern "C"
#include <dune/common/parallel/indexset.hh>
#include <dune/common/parallel/indicessyncer.hh>
#include <dune/common/parallel/remoteindices.hh>
#include <dune/common/rangeutilities.hh>
#include <dune/istl/owneroverlapcopy.hh>
#include <dune/istl/paamg/graph.hh>
......@@ -1442,7 +1443,7 @@ namespace Dune
#ifdef DEBUG_REPART
std::cout<<mype<<": myDomain: "<<myDomain<<std::endl;
std::cout<<mype<<": DomainMapping: ";
for(int j=0; j<nparts; j++) {
for(auto j : range(nparts)) {
std::cout<<" do: "<<j<<" pe: "<<domainMapping[j]<<" ";
}
std::cout<<std::endl;
......
......@@ -117,7 +117,7 @@ int main(int argc, char **argv)
for (int row = 0; row < N; ++row) {
double factor = 0.8 + 0.2 * ((double)row / N);
for (int i = -10; i <= 10; i++) {
if (row+i >= 0 && row+i < T.N())
if (row+i >= 0 && row+i < int(T.N()))
T[row][row+i] = -1.0 * factor;
}
T[row][row] = 20.0 * factor;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment