diff --git a/dune/gfe/rodassembler.hh b/dune/gfe/rodassembler.hh index b32e92e5861640c22923d5487825dab0633cad78..ffc5d222a0f6dd737532e5cde0fecd1570bb4b1b 100644 --- a/dune/gfe/rodassembler.hh +++ b/dune/gfe/rodassembler.hh @@ -45,16 +45,13 @@ public: { std::vector<RigidBodyMotion<double,3> > referenceConfiguration(basis.size()); - auto it = basis.gridView().template begin<gridDim>(); - auto endIt = basis.gridView().template end<gridDim>(); - - for (; it != endIt; ++it) { - - int idx = basis.gridView().indexSet().index(*it); + for (const auto vertex : Dune::vertices(basis.gridView())) + { + auto idx = basis.gridView().indexSet().index(vertex); referenceConfiguration[idx].r[0] = 0; referenceConfiguration[idx].r[1] = 0; - referenceConfiguration[idx].r[2] = it->geometry().corner(0)[0]; + referenceConfiguration[idx].r[2] = vertex.geometry().corner(0)[0]; referenceConfiguration[idx].q = Rotation<double,3>::identity(); }