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

More auto

parent 4f910854
No related branches found
No related tags found
No related merge requests found
......@@ -171,9 +171,8 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
// compute quadratic part of hessian (linearization.A += problem.A)
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 end = problem.A[i].end();
for (; it != end; ++it)
auto const end = problem.A[i].end();
for (auto it = problem.A[i].begin(); it != end; ++it)
Arithmetic::addProduct(linearization.A[i][it.index()], 1.0, *it);
}
......@@ -310,9 +309,8 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject {
LocalMatrixType const *localA = nullptr;
LocalVectorType localb(problem.f[m]);
typename MatrixType::row_type::ConstIterator it;
typename MatrixType::row_type::ConstIterator end = problem.A[m].end();
for (it = problem.A[m].begin(); it != end; ++it) {
auto const end = problem.A[m].end();
for (auto it = problem.A[m].begin(); it != end; ++it) {
int const j = it.index();
if (j == m)
localA = &(*it); // localA = A[m][m]
......
......@@ -87,7 +87,7 @@ void setup_boundary(GridView const &gridView,
size_t dirichlet_nodes = 0;
size_t neumann_nodes = 0;
size_t frictional_nodes = 0;
for (VertexLeafIterator it = gridView.template begin<dim>();
for (auto it = gridView.template begin<dim>();
it != gridView.template end<dim>(); ++it) {
assert(it->geometry().corners() == 1);
Dune::FieldVector<double, dim> const coordinates = it->geometry().corner(0);
......
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