Skip to content
Snippets Groups Projects
Commit fe1509ba authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Signed/unsigned types

parent aadbd0c5
No related branches found
No related tags found
No related merge requests found
...@@ -60,7 +60,7 @@ class GlobalNonlinearity { ...@@ -60,7 +60,7 @@ class GlobalNonlinearity {
} }
void addHessianIndices(Dune::MatrixIndexSet &indices) const { void addHessianIndices(Dune::MatrixIndexSet &indices) const {
for (size_t i = 0; i < indices.rows(); ++i) for (int i = 0; i < indices.rows(); ++i)
indices.add(i, i); indices.add(i, i);
} }
......
...@@ -110,7 +110,7 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { ...@@ -110,7 +110,7 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
// determine truncation pattern // determine truncation pattern
linearization.truncation.resize(u.size()); linearization.truncation.resize(u.size());
linearization.truncation.unsetAll(); linearization.truncation.unsetAll();
for (int i = 0; i < u.size(); ++i) for (size_t i = 0; i < u.size(); ++i)
// TODO: should ignoreNodes be truncated as well? // TODO: should ignoreNodes be truncated as well?
if (problem.phi.regularity(i, u[i]) > 1e8) // TODO if (problem.phi.regularity(i, u[i]) > 1e8) // TODO
linearization.truncation[i] = true; linearization.truncation[i] = true;
...@@ -125,7 +125,7 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { ...@@ -125,7 +125,7 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
linearization.A = 0.0; linearization.A = 0.0;
// compute quadratic part of hessian (linearization.A += problem.A) // compute quadratic part of hessian (linearization.A += problem.A)
for (int i = 0; i < problem.A.N(); ++i) { for (size_t i = 0; i < problem.A.N(); ++i) {
typename MatrixType::row_type::ConstIterator it = problem.A[i].begin(); typename MatrixType::row_type::ConstIterator it = problem.A[i].begin();
typename MatrixType::row_type::ConstIterator end = problem.A[i].end(); typename MatrixType::row_type::ConstIterator end = problem.A[i].end();
for (; it != end; ++it) for (; it != end; ++it)
...@@ -150,12 +150,12 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { ...@@ -150,12 +150,12 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
// apply truncation to system // apply truncation to system
typename Linearization::MatrixType::row_type::Iterator it; typename Linearization::MatrixType::row_type::Iterator it;
typename Linearization::MatrixType::row_type::Iterator end; typename Linearization::MatrixType::row_type::Iterator end;
for (int row = 0; row < linearization.A.N(); ++row) { for (size_t row = 0; row < linearization.A.N(); ++row) {
it = linearization.A[row].begin(); it = linearization.A[row].begin();
end = linearization.A[row].end(); end = linearization.A[row].end();
for (; it != end; ++it) { for (; it != end; ++it) {
int const col = it.index(); int const col = it.index();
for (int i = 0; i < it->N(); ++i) { for (size_t i = 0; i < it->N(); ++i) {
typename Linearization::MatrixType::block_type::row_type::Iterator typename Linearization::MatrixType::block_type::row_type::Iterator
blockIt = (*it)[i].begin(); blockIt = (*it)[i].begin();
typename Linearization::MatrixType::block_type::row_type:: typename Linearization::MatrixType::block_type::row_type::
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment