From d76ef6cac5b5097009eb279242013cf01dd4f74c Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Tue, 2 Feb 2016 12:26:01 +0100 Subject: [PATCH] [range-based-for] Use ADL as intended by dune Argument dependent lookup deduces the Dune namespace from the function arguments that are also in namespace Dune. --- dumux/common/intersectionmapper.hh | 12 ++--- dumux/freeflow/stokes/localresidual.hh | 2 +- dumux/freeflow/stokes/model.hh | 4 +- dumux/freeflow/stokesnc/model.hh | 2 +- dumux/freeflow/stokesncni/model.hh | 2 +- dumux/freeflow/zeroeq/model.hh | 16 +++---- dumux/freeflow/zeroeqnc/model.hh | 6 +-- dumux/freeflow/zeroeqncni/model.hh | 6 +-- dumux/geomechanics/el1p2c/model.hh | 2 +- dumux/geomechanics/el2p/amgbackend.hh | 2 +- dumux/geomechanics/el2p/assembler.hh | 8 ++-- dumux/geomechanics/el2p/basemodel.hh | 8 ++-- dumux/geomechanics/el2p/localoperator.hh | 2 +- dumux/geomechanics/el2p/model.hh | 2 +- dumux/geomechanics/elastic/model.hh | 2 +- dumux/implicit/adaptive/adaptionhelper.hh | 6 +-- dumux/implicit/adaptive/gridadapt.hh | 8 ++-- .../gridadaptinitializationindicator.hh | 4 +- dumux/implicit/assembler.hh | 2 +- dumux/implicit/box/assembler.hh | 10 ++-- dumux/implicit/box/fvelementgeometry.hh | 2 +- dumux/implicit/box/intersectiontovertexbc.hh | 4 +- dumux/implicit/box/localresidual.hh | 2 +- dumux/implicit/cellcentered/assembler.hh | 12 ++--- .../cellcentered/elementboundarytypes.hh | 2 +- .../cellcentered/elementvolumevariables.hh | 2 +- .../cellcentered/fvelementgeometry.hh | 2 +- dumux/implicit/cellcentered/localresidual.hh | 6 +-- .../cornerpoint/elementvolumevariables.hh | 2 +- .../implicit/cornerpoint/fvelementgeometry.hh | 2 +- dumux/implicit/model.hh | 10 ++-- dumux/implicit/problem.hh | 2 +- dumux/io/artgridcreator.hh | 4 +- dumux/io/plotoverline2d.hh | 2 +- dumux/io/restart.hh | 4 +- dumux/linear/amgparallelhelpers.hh | 2 +- .../2p2cnicouplinglocalresidual.hh | 2 +- .../stokesncnicouplinglocalresidual.hh | 2 +- .../2cstokes2p2c/2p2ccouplinglocalresidual.hh | 2 +- .../stokesnccouplinglocalresidual.hh | 2 +- dumux/porousmediumflow/1p/implicit/model.hh | 2 +- .../diffusion/cellcentered/velocity.hh | 4 +- dumux/porousmediumflow/1p2c/implicit/model.hh | 2 +- .../2p/implicit/gridadaptindicator.hh | 4 +- dumux/porousmediumflow/2p/implicit/model.hh | 2 +- .../diffusion/cellcentered/pressure.hh | 4 +- .../cellcentered/pressureadaptive.hh | 2 +- .../diffusion/cellcentered/velocity.hh | 4 +- .../cellcentered/velocityadaptive.hh | 2 +- .../diffusion/mimetic/croperator.hh | 8 ++-- .../diffusion/mimetic/croperatoradaptive.hh | 4 +- .../sequential/diffusion/mimetic/mimetic.hh | 12 ++--- .../diffusion/mimetic/mimeticadaptive.hh | 10 ++-- .../sequential/diffusion/mimetic/operator.hh | 6 +-- .../diffusion/mimetic/operatoradaptive.hh | 6 +-- .../sequential/diffusion/mimetic/pressure.hh | 6 +-- .../diffusion/mimetic/pressureadaptive.hh | 6 +-- .../diffusion/mpfa/lmethod/2dpressure.hh | 32 ++++++------- .../mpfa/lmethod/2dpressureadaptive.hh | 46 +++++++++---------- .../mpfa/lmethod/2dpressurevelocity.hh | 2 +- .../lmethod/2dpressurevelocityadaptive.hh | 2 +- .../diffusion/mpfa/lmethod/2dvelocity.hh | 4 +- .../lmethod/3dinteractionvolumecontainer.hh | 8 ++-- .../3dinteractionvolumecontaineradaptive.hh | 34 +++++++------- .../diffusion/mpfa/lmethod/3dpressure.hh | 12 ++--- .../mpfa/lmethod/3dpressureadaptive.hh | 6 +-- .../mpfa/lmethod/3dpressurevelocity.hh | 2 +- .../lmethod/3dpressurevelocityadaptive.hh | 2 +- .../diffusion/mpfa/lmethod/3dvelocity.hh | 4 +- .../diffusion/mpfa/omethod/2dpressure.hh | 32 ++++++------- .../mpfa/omethod/2dpressurevelocity.hh | 2 +- .../diffusion/mpfa/omethod/2dvelocity.hh | 4 +- .../sequential/impes/gridadaptionindicator.hh | 4 +- .../impes/gridadaptionindicatorlocal.hh | 4 +- .../impes/gridadaptionindicatorlocalflux.hh | 4 +- .../transport/cellcentered/saturation.hh | 4 +- dumux/porousmediumflow/2p2c/implicit/model.hh | 10 ++-- .../2p2c/sequential/fv2dpressureadaptive.hh | 8 ++-- .../2p2c/sequential/fv2dtransportadaptive.hh | 2 +- .../2p2c/sequential/fv3dpressureadaptive.hh | 18 ++++---- .../2p2c/sequential/fv3dtransportadaptive.hh | 2 +- .../sequential/fvpressurecompositional.hh | 10 ++-- .../2p2c/sequential/fvpressuremultiphysics.hh | 10 ++-- .../2p2c/sequential/fvtransport.hh | 10 ++-- .../sequential/fvtransportmultiphysics.hh | 4 +- .../porousmediumflow/2pminc/implicit/model.hh | 2 +- dumux/porousmediumflow/2pnc/implicit/model.hh | 10 ++-- .../2pncmin/implicit/model.hh | 4 +- dumux/porousmediumflow/3p/implicit/model.hh | 2 +- dumux/porousmediumflow/3p3c/implicit/model.hh | 10 ++-- dumux/porousmediumflow/co2/implicit/model.hh | 2 +- .../implicit/velocityoutput.hh | 6 +-- dumux/porousmediumflow/mpnc/implicit/model.hh | 2 +- .../mpnc/implicit/modelkinetic.hh | 4 +- .../mpnc/implicit/vtkwriter.hh | 2 +- .../nonisothermal/implicit/model.hh | 2 +- .../richards/implicit/model.hh | 2 +- .../richards/implicit/newtoncontroller.hh | 2 +- .../sequential/cellcentered/pressure.hh | 14 +++--- .../sequential/cellcentered/transport.hh | 10 ++-- .../sequential/cellcentered/velocity.hh | 4 +- .../porousmediumflow/sequential/gridadapt.hh | 12 ++--- .../gridadaptinitializationindicator.hh | 4 +- .../sequential/impetproblem.hh | 2 +- .../sequential/onemodelproblem.hh | 4 +- .../sequential/variableclassadaptive.hh | 4 +- test/geomechanics/el2p/el2pproblem.hh | 8 ++-- .../2cnistokes2p2cniproblem.hh | 2 +- .../2cnizeroeq2p2cniproblem.hh | 2 +- .../2cstokes2p2c/2cstokes2p2cproblem.hh | 2 +- .../2czeroeq2p2c/2czeroeq2p2cproblem.hh | 2 +- .../1p/implicit/1pniconductionproblem.hh | 2 +- .../1p/implicit/1pniconvectionproblem.hh | 2 +- .../1p/sequential/resultevaluation.hh | 4 +- .../1p/sequential/resultevaluation3d.hh | 16 +++---- .../1p/sequential/test_1pspatialparams.hh | 2 +- .../1p/sequential/test_diffusionproblem.hh | 2 +- .../1p/sequential/test_diffusionproblem3d.hh | 2 +- .../sequential/test_diffusionspatialparams.hh | 4 +- .../1p2c/implicit/1p2cniconductionproblem.hh | 2 +- .../1p2c/implicit/1p2cniconvectionproblem.hh | 2 +- .../2p/implicit/cc2pcornerpointproblem.hh | 2 +- .../buckleyleverettanalyticsolution.hh | 4 +- .../sequential/mcwhorteranalyticsolution.hh | 4 +- .../2p/sequential/test_3d2pproblem.hh | 2 +- .../2p/sequential/test_transportproblem.hh | 4 +- .../2pnc/implicit/fuelcellproblem.hh | 2 +- .../3p/implicit/3pniconductionproblem.hh | 2 +- .../3p/implicit/3pniconvectionproblem.hh | 2 +- .../3p3c/implicit/columnxylolproblem.hh | 2 +- .../3p3c/implicit/infiltrationproblem.hh | 2 +- .../3p3c/implicit/kuevetteproblem.hh | 2 +- .../co2/implicit/heterogeneousproblem.hh | 2 +- .../co2/implicit/heterogeneousproblemni.hh | 2 +- .../heterogeneousspatialparameters.hh | 2 +- .../implicit/richardsanalyticalproblem.hh | 2 +- .../implicit/richardsniconductionproblem.hh | 2 +- .../implicit/richardsniconvectionproblem.hh | 2 +- 138 files changed, 369 insertions(+), 369 deletions(-) diff --git a/dumux/common/intersectionmapper.hh b/dumux/common/intersectionmapper.hh index 795a5b8100..4e0d07637a 100644 --- a/dumux/common/intersectionmapper.hh +++ b/dumux/common/intersectionmapper.hh @@ -55,7 +55,7 @@ public: const auto element = *gridView_.template begin<0>(); int fIdx = 0; - for (const auto& intersection : Dune::intersections(gridView_, element)) + for (const auto& intersection : intersections(gridView_, element)) { int idxInInside = intersection.indexInInside(); @@ -198,13 +198,13 @@ public: intersectionMapLocal_.clear(); intersectionMapLocal_.resize(elementMapper_.size()); - for (const auto& element : Dune::elements(gridView_)) + for (const auto& element : elements(gridView_)) { int eIdxGlobal = index(element); int fIdx = 0; // run through all intersections with neighbors - for (const auto& intersection : Dune::intersections(gridView_, element)) + for (const auto& intersection : intersections(gridView_, element)) { int indexInInside = intersection.indexInInside(); intersectionMapLocal_[eIdxGlobal][fIdx] = indexInInside; @@ -214,13 +214,13 @@ public: } int globalIntersectionIdx = 0; - for (const auto& element : Dune::elements(gridView_)) + for (const auto& element : elements(gridView_)) { int eIdxGlobal = index(element); int fIdx = 0; // run through all intersections with neighbors - for (const auto& intersection : Dune::intersections(gridView_, element)) + for (const auto& intersection : intersections(gridView_, element)) { if (intersection.neighbor()) { @@ -237,7 +237,7 @@ public: } else { - for (const auto& intersectionNeighbor : Dune::intersections(gridView_, neighbor)) + for (const auto& intersectionNeighbor : intersections(gridView_, neighbor)) { if (intersectionNeighbor.neighbor()) { diff --git a/dumux/freeflow/stokes/localresidual.hh b/dumux/freeflow/stokes/localresidual.hh index e09ae9bb47..cbe9c0825b 100644 --- a/dumux/freeflow/stokes/localresidual.hh +++ b/dumux/freeflow/stokes/localresidual.hh @@ -352,7 +352,7 @@ protected: // evaluate boundary conditions for the intersections of // the current element const BoundaryTypes &bcTypes = this->bcTypes_(scvIdx); - for (const auto& intersection : Dune::intersections(this->gridView_(), this->element_())) + for (const auto& intersection : intersections(this->gridView_(), this->element_())) { // handle only intersections on the boundary if (!intersection.boundary()) diff --git a/dumux/freeflow/stokes/model.hh b/dumux/freeflow/stokes/model.hh index 0e96eb29e5..c430a35301 100644 --- a/dumux/freeflow/stokes/model.hh +++ b/dumux/freeflow/stokes/model.hh @@ -104,7 +104,7 @@ public: ElementVolumeVariables elemVolVars; // Loop over elements - for (const auto& element : Dune::elements(this->problem_.gridView())) + for (const auto& element : elements(this->problem_.gridView())) { if (element.partitionType() != Dune::InteriorEntity) continue; @@ -158,7 +158,7 @@ public: VolumeVariables volVars; ElementBoundaryTypes elemBcTypes; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { int eIdx = this->elementMapper().index(element); diff --git a/dumux/freeflow/stokesnc/model.hh b/dumux/freeflow/stokesnc/model.hh index 58c6752c18..6d0c288823 100644 --- a/dumux/freeflow/stokesnc/model.hh +++ b/dumux/freeflow/stokesnc/model.hh @@ -132,7 +132,7 @@ public: VolumeVariables volVars; ElementBoundaryTypes elemBcTypes; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { int idx = this->elementMapper().index(element); diff --git a/dumux/freeflow/stokesncni/model.hh b/dumux/freeflow/stokesncni/model.hh index 44ec850d24..7e5d83834d 100644 --- a/dumux/freeflow/stokesncni/model.hh +++ b/dumux/freeflow/stokesncni/model.hh @@ -139,7 +139,7 @@ public: VolumeVariables volVars; ElementBoundaryTypes elemBcTypes; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { int idx = this->elementMapper().index(element); diff --git a/dumux/freeflow/zeroeq/model.hh b/dumux/freeflow/zeroeq/model.hh index 0ebd34a565..69b688bcc1 100644 --- a/dumux/freeflow/zeroeq/model.hh +++ b/dumux/freeflow/zeroeq/model.hh @@ -154,7 +154,7 @@ public: FVElementGeometry fvGeometry; VolumeVariables volVars; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { int idx = this->elementMapper().index(element); rank[idx] = this->gridView_().comm().rank(); @@ -199,7 +199,7 @@ public: asImp_().writeFluxVarsHeader(fluxVarsFile); fluxVarsFile << std::endl; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { fvGeometry.update(this->gridView_(), element); @@ -216,7 +216,7 @@ public: Scalar sumUPlus = 0.0; Scalar sumYPlus = 0.0; - for (const auto& intersection : Dune::intersections(this->gridView_(), element)) + for (const auto& intersection : intersections(this->gridView_(), element)) { int fIdx = intersection.indexInInside(); @@ -586,7 +586,7 @@ public: { FVElementGeometry fvGeometry; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { fvGeometry.update(this->gridView_(), element); @@ -665,7 +665,7 @@ public: { FVElementGeometry fvGeometry; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { fvGeometry.update(this->gridView_(), element); @@ -675,7 +675,7 @@ public: fvGeometry, false); - for (const auto& intersection : Dune::intersections(this->gridView_(), element)) + for (const auto& intersection : intersections(this->gridView_(), element)) { int fIdx = intersection.indexInInside(); FluxVariables fluxVars(this->problem_(), @@ -723,7 +723,7 @@ public: { FVElementGeometry fvGeometry; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { fvGeometry.update(this->gridView_(), element); @@ -734,7 +734,7 @@ public: false); const ReferenceElement &refElement = ReferenceElements::general(element.geometry().type()); - for (const auto& intersection : Dune::intersections(this->gridView_(), element)) + for (const auto& intersection : intersections(this->gridView_(), element)) { // handle only faces on the boundary if (!intersection.boundary()) diff --git a/dumux/freeflow/zeroeqnc/model.hh b/dumux/freeflow/zeroeqnc/model.hh index 41b790ef3a..827e247ed6 100644 --- a/dumux/freeflow/zeroeqnc/model.hh +++ b/dumux/freeflow/zeroeqnc/model.hh @@ -161,7 +161,7 @@ public: ElementBoundaryTypes elemBcTypes; VolumeVariables volVars; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { int idx = this->elementMapper().index(element); rank[idx] = this->gridView_().comm().rank(); @@ -227,7 +227,7 @@ public: asImp_().writeFluxVarsHeader(fluxFile); fluxFile << std::endl; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { fvGeometry.update(this->gridView_(), element); @@ -245,7 +245,7 @@ public: Scalar sumYPlus = 0.0; Scalar sumEddyDiffusivity = 0.0; - for (const auto& intersection : Dune::intersections(this->gridView_(), element)) + for (const auto& intersection : intersections(this->gridView_(), element)) { int fIdx = intersection.indexInInside(); diff --git a/dumux/freeflow/zeroeqncni/model.hh b/dumux/freeflow/zeroeqncni/model.hh index 7cb238c385..1e1cdb1d86 100644 --- a/dumux/freeflow/zeroeqncni/model.hh +++ b/dumux/freeflow/zeroeqncni/model.hh @@ -173,7 +173,7 @@ public: FVElementGeometry fvGeometry; VolumeVariables volVars; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { int idx = this->elementMapper().index(element); rank[idx] = this->gridView_().comm().rank(); @@ -242,7 +242,7 @@ public: asImp_().writeFluxVarsHeader(fluxFile); fluxFile << std::endl; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { fvGeometry.update(this->gridView_(), element); @@ -261,7 +261,7 @@ public: Scalar sumEddyDiffusivity = 0.0; Scalar sumEddyConducitivity = 0.0; - for (const auto& intersection : Dune::intersections(this->gridView_(), element)) + for (const auto& intersection : intersections(this->gridView_(), element)) { int fIdx = intersection.indexInInside(); diff --git a/dumux/geomechanics/el1p2c/model.hh b/dumux/geomechanics/el1p2c/model.hh index 1e5864d2a9..5b95f63465 100644 --- a/dumux/geomechanics/el1p2c/model.hh +++ b/dumux/geomechanics/el1p2c/model.hh @@ -246,7 +246,7 @@ public: // initialize start and end of element iterator // loop over all elements (cells) - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { diff --git a/dumux/geomechanics/el2p/amgbackend.hh b/dumux/geomechanics/el2p/amgbackend.hh index 1a8a04d6c7..bef3c01da0 100644 --- a/dumux/geomechanics/el2p/amgbackend.hh +++ b/dumux/geomechanics/el2p/amgbackend.hh @@ -99,7 +99,7 @@ private: // each vertex typedef std::set<int> NeighborSet; std::vector<NeighborSet> neighbors(numVertices); - for (const auto& element : Dune::elements(this->problem().gridView())) { + for (const auto& element : elements(this->problem().gridView())) { // loop over all element vertices int n = element.subEntities(dim); diff --git a/dumux/geomechanics/el2p/assembler.hh b/dumux/geomechanics/el2p/assembler.hh index 61cae07489..ca1daca18c 100644 --- a/dumux/geomechanics/el2p/assembler.hh +++ b/dumux/geomechanics/el2p/assembler.hh @@ -320,7 +320,7 @@ public: }; // Mark all red elements - for (const auto& element : Dune::elements(gridView_())) { + for (const auto& element : elements(gridView_())) { // find out whether the current element features a red // vertex bool isRed = false; @@ -343,7 +343,7 @@ public: } // Mark yellow vertices (as orange for the mean time) - for (const auto& element : Dune::elements(gridView_())) { + for (const auto& element : elements(gridView_())) { int eIdx = this->elementMapper_().index(element); if (elementColor_[eIdx] != Red) continue; // non-red elements do not tint vertices @@ -360,7 +360,7 @@ public: } // Mark yellow elements - for (const auto& element : Dune::elements(gridView_())) { + for (const auto& element : elements(gridView_())) { int eIdx = this->elementMapper_().index(element); if (elementColor_[eIdx] == Red) { continue; // element is red already! @@ -384,7 +384,7 @@ public: // Demote orange vertices to yellow ones if it has at least // one green element as a neighbor. - for (const auto& element : Dune::elements(gridView_())) { + for (const auto& element : elements(gridView_())) { int eIdx = this->elementMapper_().index(element); if (elementColor_[eIdx] != Green) continue; // yellow and red elements do not make diff --git a/dumux/geomechanics/el2p/basemodel.hh b/dumux/geomechanics/el2p/basemodel.hh index e79afb3c6e..e65c1053b8 100644 --- a/dumux/geomechanics/el2p/basemodel.hh +++ b/dumux/geomechanics/el2p/basemodel.hh @@ -242,7 +242,7 @@ public: { storage = 0; - for (const auto& element : Dune::elements(gridView_())) + for (const auto& element : elements(gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { @@ -836,7 +836,7 @@ protected: // // TODO: the initial condition needs to be unique for // each vertex. we should think about the API... - for (const auto& element : Dune::elements(gridView_())) { + for (const auto& element : elements(gridView_())) { // deal with the current element fvGeometry.update(gridView_(), element); @@ -905,11 +905,11 @@ protected: boundaryIndices_.resize(numDofs()); std::fill(boundaryIndices_.begin(), boundaryIndices_.end(), false); - for (const auto& element : Dune::elements(gridView_())) { + for (const auto& element : elements(gridView_())) { Dune::GeometryType geomType = element.geometry().type(); const ReferenceElement &refElement = ReferenceElements::general(geomType); - for (const auto& intersection : Dune::intersections(gridView_(), element)) { + for (const auto& intersection : intersections(gridView_(), element)) { if (intersection.boundary()) { if (isBox) { diff --git a/dumux/geomechanics/el2p/localoperator.hh b/dumux/geomechanics/el2p/localoperator.hh index 8903dcdf92..2dffdb4214 100644 --- a/dumux/geomechanics/el2p/localoperator.hh +++ b/dumux/geomechanics/el2p/localoperator.hh @@ -370,7 +370,7 @@ public: } // include boundary conditions // iterate over element intersections of codim dim-1 - for (const auto& intersection : Dune::intersections(model_.problem().gridView(), eg.entity())) + for (const auto& intersection : intersections(model_.problem().gridView(), eg.entity())) { // handle only faces on the boundary if (!intersection.boundary()) diff --git a/dumux/geomechanics/el2p/model.hh b/dumux/geomechanics/el2p/model.hh index 3bfdc6be6c..98a72cf4c2 100644 --- a/dumux/geomechanics/el2p/model.hh +++ b/dumux/geomechanics/el2p/model.hh @@ -326,7 +326,7 @@ public: const typename GridFunctionSpace::Ordering& ordering = gridFunctionSpace.ordering(); // initialize start and end of element iterator // loop over all elements (cells) - for (const auto& element : Dune::elements(this->gridView_())) { + for (const auto& element : elements(this->gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { diff --git a/dumux/geomechanics/elastic/model.hh b/dumux/geomechanics/elastic/model.hh index 96fdf270d9..58193a987f 100644 --- a/dumux/geomechanics/elastic/model.hh +++ b/dumux/geomechanics/elastic/model.hh @@ -118,7 +118,7 @@ public: VolumeVariables volVars; ElementBoundaryTypes elemBcTypes; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { diff --git a/dumux/implicit/adaptive/adaptionhelper.hh b/dumux/implicit/adaptive/adaptionhelper.hh index 9fb9be811c..8e39023440 100644 --- a/dumux/implicit/adaptive/adaptionhelper.hh +++ b/dumux/implicit/adaptive/adaptionhelper.hh @@ -125,7 +125,7 @@ public: if(!isBox) { - for (const auto& element : Dune::elements(levelView)) + for (const auto& element : elements(levelView)) { //get your map entry AdaptedValues &adaptedValues = adaptionMap_[element]; @@ -152,7 +152,7 @@ public: } else { - for (const auto& entity : Dune::entities(levelView, Dune::Codim<dofCodim>())) + for (const auto& entity : entities(levelView, Dune::Codim<dofCodim>())) { //get your map entry AdaptedValues &adaptedValues = adaptionMap_[entity]; @@ -190,7 +190,7 @@ public: { LevelGridView levelView = grid_.levelGridView(level); - for (const auto& element : Dune::elements(levelView)) + for (const auto& element : elements(levelView)) { // only treat non-ghosts, ghost data is communicated afterwards if (element.partitionType() == Dune::GhostEntity) diff --git a/dumux/implicit/adaptive/gridadapt.hh b/dumux/implicit/adaptive/gridadapt.hh index b2bc721fd3..351adbf29e 100644 --- a/dumux/implicit/adaptive/gridadapt.hh +++ b/dumux/implicit/adaptive/gridadapt.hh @@ -234,7 +234,7 @@ public: typedef std::unordered_map<int, int> CoarsenMarkerType; CoarsenMarkerType coarsenMarker; - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // only mark non-ghost elements if (element.partitionType() != Dune::GhostEntity) @@ -342,7 +342,7 @@ private: bool checkNeighborsRefine_(const Element &element, int level = 1) { // this also refines the neighbor elements - for(const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for(const auto& intersection : intersections(problem_.gridView(), element)) { if(!intersection.neighbor()) continue; @@ -386,14 +386,14 @@ private: { // run through all cells done=true; - for (const auto& element : Dune::elements(leafGridView)) + for (const auto& element : elements(leafGridView)) { // only mark non-ghost elements if (element.partitionType() == Dune::GhostEntity) continue; // run through all neighbor-cells (intersections) - for (const auto& intersection : Dune::intersections(leafGridView, element)) + for (const auto& intersection : intersections(leafGridView, element)) { if(!intersection.neighbor()) continue; diff --git a/dumux/implicit/adaptive/gridadaptinitializationindicator.hh b/dumux/implicit/adaptive/gridadaptinitializationindicator.hh index 04e8d08625..abf0076c17 100644 --- a/dumux/implicit/adaptive/gridadaptinitializationindicator.hh +++ b/dumux/implicit/adaptive/gridadaptinitializationindicator.hh @@ -209,7 +209,7 @@ public: // 1) calculate Indicator -> min, maxvalues // loop over all leaf elements - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int globalIdxI = problem_.elementMapper().index(element); @@ -251,7 +251,7 @@ public: if (indicatorVector_[globalIdxI] != refineCell && (refineAtDirichletBC_ || refineAtFluxBC_)) { // Calculate the boundary indicator for all boundary intersections - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { if (intersection.boundary()) { diff --git a/dumux/implicit/assembler.hh b/dumux/implicit/assembler.hh index 4689e94ea4..5a414bbde7 100644 --- a/dumux/implicit/assembler.hh +++ b/dumux/implicit/assembler.hh @@ -483,7 +483,7 @@ protected: greenElems_ = 0; // reassemble the elements... - for (const auto& element : Dune::elements(gridView_())) { + for (const auto& element : elements(gridView_())) { if (element.partitionType() == Dune::GhostEntity) { asImp_().assembleGhostElement_(element); diff --git a/dumux/implicit/box/assembler.hh b/dumux/implicit/box/assembler.hh index 35fb6b2a62..2afef02366 100644 --- a/dumux/implicit/box/assembler.hh +++ b/dumux/implicit/box/assembler.hh @@ -92,7 +92,7 @@ private: } // Mark all red elements - for (const auto& element : Dune::elements(this->gridView_())) { + for (const auto& element : elements(this->gridView_())) { // find out whether the current element features a red // vertex bool isRed = false; @@ -119,7 +119,7 @@ private: } // Mark yellow vertices (as orange for the mean time) - for (const auto& element : Dune::elements(this->gridView_())) { + for (const auto& element : elements(this->gridView_())) { int eIdx = this->elementMapper_().index(element); if (this->elementColor_[eIdx] != ParentType::Red) @@ -150,7 +150,7 @@ private: Dune::ForwardCommunication); // Mark yellow elements - for (const auto& element : Dune::elements(this->gridView_())) { + for (const auto& element : elements(this->gridView_())) { int eIdx = this->elementMapper_().index(element); if (this->elementColor_[eIdx] == ParentType::Red) { @@ -177,7 +177,7 @@ private: // Demote orange vertices to yellow ones if it has at least // one green element as a neighbor. - for (const auto& element : Dune::elements(this->gridView_())) { + for (const auto& element : elements(this->gridView_())) { int eIdx = this->elementMapper_().index(element); if (this->elementColor_[eIdx] != ParentType::Green) @@ -231,7 +231,7 @@ private: // each vertex typedef std::set<int> NeighborSet; std::vector<NeighborSet> neighbors(numVerticesGlobal); - for (const auto& element : Dune::elements(this->gridView_())) { + for (const auto& element : elements(this->gridView_())) { int numVerticesLocal = element.subEntities(dim); // if the element is not in the interior or the process diff --git a/dumux/implicit/box/fvelementgeometry.hh b/dumux/implicit/box/fvelementgeometry.hh index 4a757ff7b4..82446c27af 100644 --- a/dumux/implicit/box/fvelementgeometry.hh +++ b/dumux/implicit/box/fvelementgeometry.hh @@ -951,7 +951,7 @@ public: } // end loop over edges / sub control volume faces // fill boundary face data: - for (const auto& intersection : Dune::intersections(gridView, element)) + for (const auto& intersection : intersections(gridView, element)) if (intersection.boundary()) { int fIdx = intersection.indexInInside(); diff --git a/dumux/implicit/box/intersectiontovertexbc.hh b/dumux/implicit/box/intersectiontovertexbc.hh index a5f10109d6..077a324193 100644 --- a/dumux/implicit/box/intersectiontovertexbc.hh +++ b/dumux/implicit/box/intersectiontovertexbc.hh @@ -58,11 +58,11 @@ public: for (int vIdx = 0; vIdx < vertexBC.size(); vIdx++) vertexBC[vIdx].setAllNeumann(); - for (const auto& element : Dune::elements(problem.gridView())) { + for (const auto& element : elements(problem.gridView())) { Dune::GeometryType geomType = element.geometry().type(); const ReferenceElement &refElement = ReferenceElements::general(geomType); - for (const auto& intersection : Dune::intersections(problem.gridView(), element)) { + for (const auto& intersection : intersections(problem.gridView(), element)) { if (!intersection.boundary()) continue; diff --git a/dumux/implicit/box/localresidual.hh b/dumux/implicit/box/localresidual.hh index 118f679c78..4b69761d83 100644 --- a/dumux/implicit/box/localresidual.hh +++ b/dumux/implicit/box/localresidual.hh @@ -113,7 +113,7 @@ protected: Dune::GeometryType geoType = this->element_().geometry().type(); const ReferenceElement &refElement = ReferenceElements::general(geoType); - for (const auto& intersection : Dune::intersections(this->gridView_(), this->element_())) + for (const auto& intersection : intersections(this->gridView_(), this->element_())) { // handle only faces on the boundary if (intersection.boundary()) { diff --git a/dumux/implicit/cellcentered/assembler.hh b/dumux/implicit/cellcentered/assembler.hh index bdfcc15295..8619bc4870 100644 --- a/dumux/implicit/cellcentered/assembler.hh +++ b/dumux/implicit/cellcentered/assembler.hh @@ -73,7 +73,7 @@ private: // mark the red elements and update the tolerance of the // linearization which actually will get achieved this->nextReassembleAccuracy_ = 0; - for (const auto& element : Dune::elements(this->gridView_())) { + for (const auto& element : elements(this->gridView_())) { int eIdx = this->elementMapper_().index(element); if (this->delta_[eIdx] > relTol) @@ -91,7 +91,7 @@ private: } // mark the neighbors also red - for (const auto& element : Dune::elements(this->gridView_())) { + for (const auto& element : elements(this->gridView_())) { int eIdx = this->elementMapper_().index(element); if (this->elementColor_[eIdx] == ParentType::Red) @@ -100,7 +100,7 @@ private: if (this->delta_[eIdx] > relTol) { // also mark the neighbors - for (const auto& intersection : Dune::intersections(this->gridView_(), element)) + for (const auto& intersection : intersections(this->gridView_(), element)) { if (intersection.neighbor()) { @@ -130,7 +130,7 @@ private: // each element typedef std::set<int> NeighborSet; std::vector<NeighborSet> neighbors(numElements); - for (const auto& element : Dune::elements(this->gridView_())) { + for (const auto& element : elements(this->gridView_())) { int globalI = this->elementMapper_().index(element); @@ -142,7 +142,7 @@ private: // continue; // loop over all neighbors - for (const auto& intersection : Dune::intersections(this->gridView_(), element)) + for (const auto& intersection : intersections(this->gridView_(), element)) { if (intersection.neighbor()) { @@ -207,7 +207,7 @@ private: (*this->matrix_)[globalI][globalI] = this->model_().localJacobian().mat(0,0); int j = 0; - for (const auto& intersection : Dune::intersections(this->gridView_(), element)) + for (const auto& intersection : intersections(this->gridView_(), element)) { if (intersection.neighbor()) { diff --git a/dumux/implicit/cellcentered/elementboundarytypes.hh b/dumux/implicit/cellcentered/elementboundarytypes.hh index c6248e9d1c..90cf787b6e 100644 --- a/dumux/implicit/cellcentered/elementboundarytypes.hh +++ b/dumux/implicit/cellcentered/elementboundarytypes.hh @@ -89,7 +89,7 @@ public: if (!problem.model().onBoundary(element)) return; - for (const auto& intersection : Dune::intersections(problem.gridView(), element)) { + for (const auto& intersection : intersections(problem.gridView(), element)) { if (!intersection.boundary()) continue; diff --git a/dumux/implicit/cellcentered/elementvolumevariables.hh b/dumux/implicit/cellcentered/elementvolumevariables.hh index 54201aa192..4710013f4b 100644 --- a/dumux/implicit/cellcentered/elementvolumevariables.hh +++ b/dumux/implicit/cellcentered/elementvolumevariables.hh @@ -105,7 +105,7 @@ public: this->resize(numNeighbors + element.subEntities(1)); // add volume variables for the boundary faces - for (const auto& intersection : Dune::intersections(problem.gridView(), element)) { + for (const auto& intersection : intersections(problem.gridView(), element)) { if (!intersection.boundary()) continue; diff --git a/dumux/implicit/cellcentered/fvelementgeometry.hh b/dumux/implicit/cellcentered/fvelementgeometry.hh index dcafd0a54b..c69249454a 100644 --- a/dumux/implicit/cellcentered/fvelementgeometry.hh +++ b/dumux/implicit/cellcentered/fvelementgeometry.hh @@ -129,7 +129,7 @@ public: bool onBoundary = false; // fill neighbor information and control volume face data: - for (const auto& intersection : Dune::intersections(gridView, element)) + for (const auto& intersection : intersections(gridView, element)) { const auto isGeometry = intersection.geometry(); diff --git a/dumux/implicit/cellcentered/localresidual.hh b/dumux/implicit/cellcentered/localresidual.hh index 3f361adc0e..2e4b094e12 100644 --- a/dumux/implicit/cellcentered/localresidual.hh +++ b/dumux/implicit/cellcentered/localresidual.hh @@ -72,7 +72,7 @@ protected: */ void evalBoundaryFluxes_() { - for (const auto& intersection : Dune::intersections(this->gridView_(), this->element_())) + for (const auto& intersection : intersections(this->gridView_(), this->element_())) { // handle only faces on the boundary if (!intersection.boundary()) @@ -101,7 +101,7 @@ protected: */ void evalDirichlet_() { - for (const auto& intersection : Dune::intersections(this->gridView_(), this->element_())) + for (const auto& intersection : intersections(this->gridView_(), this->element_())) { // handle only faces on the boundary if (!intersection.boundary()) @@ -265,7 +265,7 @@ protected: // calculate the mass flux over the faces and subtract // it from the local rates int fIdx = -1; - for (const auto& intersection : Dune::intersections(this->gridView_(), this->element_())) { + for (const auto& intersection : intersections(this->gridView_(), this->element_())) { if (!intersection.neighbor()) continue; diff --git a/dumux/implicit/cornerpoint/elementvolumevariables.hh b/dumux/implicit/cornerpoint/elementvolumevariables.hh index 7a8da16acb..383200e7e7 100644 --- a/dumux/implicit/cornerpoint/elementvolumevariables.hh +++ b/dumux/implicit/cornerpoint/elementvolumevariables.hh @@ -105,7 +105,7 @@ public: this->resize(numNeighbors + numFaces); // add volume variables for the boundary faces - for (const auto& intersection : Dune::intersections(problem.gridView(), element)) { + for (const auto& intersection : intersections(problem.gridView(), element)) { if (!intersection.boundary()) continue; diff --git a/dumux/implicit/cornerpoint/fvelementgeometry.hh b/dumux/implicit/cornerpoint/fvelementgeometry.hh index d25af5ec81..f32af5f38e 100644 --- a/dumux/implicit/cornerpoint/fvelementgeometry.hh +++ b/dumux/implicit/cornerpoint/fvelementgeometry.hh @@ -127,7 +127,7 @@ public: bool onBoundary = false; // fill neighbor information and control volume face data: - for (const auto& intersection : Dune::intersections(gridView, element)) + for (const auto& intersection : intersections(gridView, element)) { const auto isGeometry = intersection.geometry(); diff --git a/dumux/implicit/model.hh b/dumux/implicit/model.hh index 8b15f6144d..a7ef850f6c 100644 --- a/dumux/implicit/model.hh +++ b/dumux/implicit/model.hh @@ -223,7 +223,7 @@ public: { residual = 0; - for (const auto& element : Dune::elements(gridView_())) { + for (const auto& element : elements(gridView_())) { localResidual().eval(element); if (isBox) @@ -268,7 +268,7 @@ public: { storage = 0; - for (const auto& element : Dune::elements(gridView_())) + for (const auto& element : elements(gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { @@ -902,7 +902,7 @@ protected: // // TODO: the initial condition needs to be unique for // each vertex. we should think about the API... - for (const auto& element : Dune::elements(gridView_())) { + for (const auto& element : elements(gridView_())) { // deal with the current element fvGeometry.update(gridView_(), element); @@ -971,11 +971,11 @@ protected: boundaryIndices_.resize(numDofs()); std::fill(boundaryIndices_.begin(), boundaryIndices_.end(), false); - for (const auto& element : Dune::elements(gridView_())) { + for (const auto& element : elements(gridView_())) { Dune::GeometryType geomType = element.geometry().type(); const ReferenceElement &refElement = ReferenceElements::general(geomType); - for (const auto& intersection : Dune::intersections(gridView_(), element)) { + for (const auto& intersection : intersections(gridView_(), element)) { if (intersection.boundary()) { if (isBox) { diff --git a/dumux/implicit/problem.hh b/dumux/implicit/problem.hh index 2aa443a17d..1a208cf7ce 100644 --- a/dumux/implicit/problem.hh +++ b/dumux/implicit/problem.hh @@ -109,7 +109,7 @@ public: , newtonCtl_(asImp_()) { // calculate the bounding box of the local partition of the grid view - for (const auto& vertex : Dune::vertices(gridView)) { + for (const auto& vertex : vertices(gridView)) { for (int i=0; i<dimWorld; i++) { bBoxMin_[i] = std::min(bBoxMin_[i], vertex.geometry().corner(0)[i]); bBoxMax_[i] = std::max(bBoxMax_[i], vertex.geometry().corner(0)[i]); diff --git a/dumux/io/artgridcreator.hh b/dumux/io/artgridcreator.hh index 3ef41f7075..f3a6f6303e 100644 --- a/dumux/io/artgridcreator.hh +++ b/dumux/io/artgridcreator.hh @@ -525,7 +525,7 @@ public: fractureEdgesIdx_.resize(nEdges); std::fill(isDuneFractureEdge_.begin(), isDuneFractureEdge_.end(), false); - for (const auto& element : Dune::elements(gridView_)) + for (const auto& element : elements(gridView_)) { Dune::GeometryType geomType = element.geometry().type(); @@ -592,7 +592,7 @@ public: #if PLOT int i=0; - for (const auto& vertex : Dune::vertices(gridView_)) + for (const auto& vertex : vertices(gridView_)) { Dune::GeometryType geomType = vertex.type(); std::cout << "visiting " << geomType diff --git a/dumux/io/plotoverline2d.hh b/dumux/io/plotoverline2d.hh index 3cd8b555e5..c5a8102f50 100644 --- a/dumux/io/plotoverline2d.hh +++ b/dumux/io/plotoverline2d.hh @@ -139,7 +139,7 @@ public: } // Looping over all elements of the domain - for (const auto& element : Dune::elements(problem.gridView())) + for (const auto& element : elements(problem.gridView())) { // updating the volume variables fvGeometry.update(problem.gridView(), element); diff --git a/dumux/io/restart.hh b/dumux/io/restart.hh index b639a245d6..366b8b0020 100644 --- a/dumux/io/restart.hh +++ b/dumux/io/restart.hh @@ -140,7 +140,7 @@ public: serializeSectionBegin(cookie); // write entity data - for (const auto& entity : Dune::entities(gridView, Dune::Codim<codim>())) { + for (const auto& entity : entities(gridView, Dune::Codim<codim>())) { serializer.serializeEntity(outStream_, entity); outStream_ << "\n"; } @@ -253,7 +253,7 @@ public: std::string curLine; // read entity data - for (const auto& entity : Dune::entities(gridView, Dune::Codim<codim>())) { + for (const auto& entity : entities(gridView, Dune::Codim<codim>())) { if (!inStream_.good()) { DUNE_THROW(Dune::IOError, "Restart file is corrupted"); diff --git a/dumux/linear/amgparallelhelpers.hh b/dumux/linear/amgparallelhelpers.hh index 33ce909f7d..80a65acdc8 100644 --- a/dumux/linear/amgparallelhelpers.hh +++ b/dumux/linear/amgparallelhelpers.hh @@ -511,7 +511,7 @@ public: const GridView& gridView = problem.gridView(); - for (const auto& entity : Dune::entities(gridView, Dune::Codim<dofCodim>())) + for (const auto& entity : entities(gridView, Dune::Codim<dofCodim>())) { if (entity.partitionType() == Dune::BorderEntity) { diff --git a/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh b/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh index b8b1df939f..be851508dd 100644 --- a/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh +++ b/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh @@ -103,7 +103,7 @@ public: continue; // evaluate boundary conditions for the intersections of the current element - for (const auto& intersection : Dune::intersections(this->gridView_(), this->element_())) + for (const auto& intersection : intersections(this->gridView_(), this->element_())) { // handle only intersections on the boundary if (!intersection.boundary()) diff --git a/dumux/multidomain/2cnistokes2p2cni/stokesncnicouplinglocalresidual.hh b/dumux/multidomain/2cnistokes2p2cni/stokesncnicouplinglocalresidual.hh index 52bb8793a6..468048d043 100644 --- a/dumux/multidomain/2cnistokes2p2cni/stokesncnicouplinglocalresidual.hh +++ b/dumux/multidomain/2cnistokes2p2cni/stokesncnicouplinglocalresidual.hh @@ -107,7 +107,7 @@ public: const BoundaryTypes &bcTypes = this->bcTypes_(scvIdx); // evaluate boundary conditions for the intersections of the current element - for (const auto& intersection : Dune::intersections(this->gridView_(), this->element_())) + for (const auto& intersection : intersections(this->gridView_(), this->element_())) { // handle only intersections on the boundary if (!intersection.boundary()) diff --git a/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh b/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh index 69f154653a..2ed3755b60 100644 --- a/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh +++ b/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh @@ -103,7 +103,7 @@ public: continue; // evaluate boundary conditions for the intersections of the current element - for (const auto& intersection : Dune::intersections(this->gridView_(), this->element_())) + for (const auto& intersection : intersections(this->gridView_(), this->element_())) { // handle only intersections on the boundary if (!intersection.boundary()) diff --git a/dumux/multidomain/2cstokes2p2c/stokesnccouplinglocalresidual.hh b/dumux/multidomain/2cstokes2p2c/stokesnccouplinglocalresidual.hh index b4a9154875..bfa130aa15 100644 --- a/dumux/multidomain/2cstokes2p2c/stokesnccouplinglocalresidual.hh +++ b/dumux/multidomain/2cstokes2p2c/stokesnccouplinglocalresidual.hh @@ -118,7 +118,7 @@ public: const BoundaryTypes &bcTypes = this->bcTypes_(scvIdx); // evaluate boundary conditions for the intersections of the current element - for (const auto& intersection : Dune::intersections(this->gridView_(), this->element_())) + for (const auto& intersection : intersections(this->gridView_(), this->element_())) { // handle only intersections on the boundary if (!intersection.boundary()) diff --git a/dumux/porousmediumflow/1p/implicit/model.hh b/dumux/porousmediumflow/1p/implicit/model.hh index 27878b7e11..fa02787342 100644 --- a/dumux/porousmediumflow/1p/implicit/model.hh +++ b/dumux/porousmediumflow/1p/implicit/model.hh @@ -101,7 +101,7 @@ public: unsigned numElements = this->gridView_().size(0); ScalarField *rank = writer.allocateManagedBuffer(numElements); - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { diff --git a/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/velocity.hh b/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/velocity.hh index 8f3610329b..eaf903ec20 100644 --- a/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/velocity.hh +++ b/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/velocity.hh @@ -112,7 +112,7 @@ public: problem_.gridView().size(0))); // compute update vector - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int eIdxGlobal = problem_.variables().index(element); @@ -129,7 +129,7 @@ public: std::vector<Scalar> flux(numberOfFaces,0); // run through all intersections with neighbors and boundary - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { int isIndex = intersection.indexInInside(); diff --git a/dumux/porousmediumflow/1p2c/implicit/model.hh b/dumux/porousmediumflow/1p2c/implicit/model.hh index f8d8a9fad7..edfa45fe06 100644 --- a/dumux/porousmediumflow/1p2c/implicit/model.hh +++ b/dumux/porousmediumflow/1p2c/implicit/model.hh @@ -129,7 +129,7 @@ public: unsigned numElements = this->gridView_().size(0); ScalarField &rank = *writer.allocateManagedBuffer(numElements); - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { diff --git a/dumux/porousmediumflow/2p/implicit/gridadaptindicator.hh b/dumux/porousmediumflow/2p/implicit/gridadaptindicator.hh index 89f8b80233..70faf4e2de 100644 --- a/dumux/porousmediumflow/2p/implicit/gridadaptindicator.hh +++ b/dumux/porousmediumflow/2p/implicit/gridadaptindicator.hh @@ -90,7 +90,7 @@ public: // 1) calculate Indicator -> min, maxvalues // loop over all leaf-elements - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // calculate minimum and maximum saturation // index of the current leaf-elements @@ -122,7 +122,7 @@ public: globalMax = std::max(satI, globalMax); // calculate refinement indicator in all cells - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { // Only consider internal intersections if (intersection.neighbor()) diff --git a/dumux/porousmediumflow/2p/implicit/model.hh b/dumux/porousmediumflow/2p/implicit/model.hh index 418ec905b6..024e032b46 100644 --- a/dumux/porousmediumflow/2p/implicit/model.hh +++ b/dumux/porousmediumflow/2p/implicit/model.hh @@ -138,7 +138,7 @@ public: unsigned numElements = this->gridView_().size(0); ScalarField *rank = writer.allocateManagedBuffer(numElements); - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressure.hh index 66a35159e4..89c04798f3 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressure.hh @@ -301,7 +301,7 @@ public: void storePressureSolution() { // iterate through leaf grid - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { asImp_().storePressureSolution(element); } @@ -1060,7 +1060,7 @@ const Intersection& intersection, const CellData& cellData, const bool first) template<class TypeTag> void FVPressure2P<TypeTag>::updateMaterialLaws() { - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int eIdxGlobal = problem_.variables().index(element); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressureadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressureadaptive.hh index fc800e29d0..0a8bf5a15a 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressureadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressureadaptive.hh @@ -304,7 +304,7 @@ void FVPressure2PAdaptive<TypeTag>::getFlux(EntryType& entry, const Intersection // IsIndexJ, the index of the interface from the neighbor-cell point of view // GlobalIdxK, the index of the third cell // Intersectioniterator around cell I - for (const auto& intersectionI : Dune::intersections(problem_.gridView(), elementI)) + for (const auto& intersectionI : intersections(problem_.gridView(), elementI)) { if (intersectionI.neighbor()) { diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocity.hh index 7947670826..5a66c5516e 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocity.hh @@ -188,7 +188,7 @@ public: *(writer.template allocateManagedBuffer<Scalar, dim>(problem_.gridView().size(0))); // compute update vector - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int eIdxGlobal = problem_.variables().index(element); @@ -206,7 +206,7 @@ public: std::vector<Scalar> fluxNw(numberOfFaces,0); // run through all intersections with neighbors and boundary - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { int isIndex = intersection.indexInInside(); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocityadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocityadaptive.hh index 3b7541d1b9..f3407c4bfd 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocityadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocityadaptive.hh @@ -207,7 +207,7 @@ void FVVelocity2PAdaptive<TypeTag>::calculateVelocity(const Intersection& inters // for efficienty this is done in one intersection loop // Intersectioniterator around cell I - for (const auto& intersectionI : Dune::intersections(problem_.gridView(), elementI)) + for (const auto& intersectionI : intersections(problem_.gridView(), elementI)) { if (intersectionI.neighbor()) { diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperator.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperator.hh index b2af47a476..cdd1c40c79 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperator.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperator.hh @@ -132,7 +132,7 @@ public: std::vector<bool> visited(size_, false); // LOOP 1 : Compute row sizes - for (const auto& element : Dune::elements(gridView_)) + for (const auto& element : elements(gridView_)) { int numFaces = element.subEntities(1); @@ -159,7 +159,7 @@ public: visited.assign(size_, false); // LOOP 2 : insert the nonzeros - for (const auto& element : Dune::elements(gridView_)) + for (const auto& element : elements(gridView_)) { int numFaces = element.subEntities(1); @@ -248,7 +248,7 @@ public: Dune::FieldVector<int, 2*dim> local2Global(0); // run over all leaf elements - for (const auto& element : Dune::elements(gridView_)) + for (const auto& element : elements(gridView_)) { unsigned int numFaces = element.subEntities(1); @@ -285,7 +285,7 @@ public: } } // run over all leaf elements - for (const auto& element : Dune::elements(gridView_)) + for (const auto& element : elements(gridView_)) { unsigned int numFaces = element.subEntities(1); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperatoradaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperatoradaptive.hh index 4f87a2d7d6..769875020d 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperatoradaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperatoradaptive.hh @@ -263,7 +263,7 @@ void CROperatorAssemblerTwoPAdaptive<TypeTag>::assemble(LocalStiffness& loc, Vec std::vector<int> local2Global(2*dim); // run over all leaf elements - for (const auto& element : Dune::elements(gridView_)) + for (const auto& element : elements(gridView_)) { // build local stiffness matrix for CR elements // inludes rhs and boundary condition information @@ -302,7 +302,7 @@ void CROperatorAssemblerTwoPAdaptive<TypeTag>::assemble(LocalStiffness& loc, Vec } // run over all leaf elements - for (const auto& element : Dune::elements(gridView_)) + for (const auto& element : elements(gridView_)) { int eIdxGlobal = intersectionMapper_.index(element); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimetic.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimetic.hh index 2706c0019d..9c470abe74 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimetic.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimetic.hh @@ -268,7 +268,7 @@ public: int eIdxGlobal = problem_.variables().index(element); Dune::FieldVector<Scalar, 2 * dim> faceVol(0); - for (const auto& intersection : Dune::intersections(gridView_, element)) + for (const auto& intersection : intersections(gridView_, element)) { faceVol[intersection.indexInInside()] = intersection.geometry().volume(); } @@ -285,7 +285,7 @@ public: int eIdxGlobal = problem_.variables().index(element); Dune::FieldVector<Scalar, 2 * dim> faceVol(0); - for (const auto& intersection : Dune::intersections(gridView_, element)) + for (const auto& intersection : intersections(gridView_, element)) { faceVol[intersection.indexInInside()] = intersection.geometry().volume(); } @@ -302,7 +302,7 @@ public: Dune::FieldVector<Scalar, 2 * dim> c(0); Dune::FieldMatrix<Scalar, 2 * dim, 2 * dim> Pi(0); - for (const auto& intersection : Dune::intersections(gridView_, element)) + for (const auto& intersection : intersections(gridView_, element)) { // local number of facet int idx = intersection.indexInInside(); @@ -471,7 +471,7 @@ void MimeticTwoPLocalStiffness<TypeTag>::assembleElementMatrices(const Element& Scalar gravPot = (problem_.bBoxMax() - centerGlobal) * problem_.gravity() * (density_[nPhaseIdx] - density_[wPhaseIdx]); - for (const auto& intersection : Dune::intersections(gridView_, element)) + for (const auto& intersection : intersections(gridView_, element)) { // local number of facet int fIdx = intersection.indexInInside(); @@ -606,7 +606,7 @@ void MimeticTwoPLocalStiffness<TypeTag>::assembleElementMatrices(const Element& // std::cout << "Pi = \dim" << Pi << "c = " << c << ", F = " << F << std::endl; //accumulate fluxes due to capillary potential (pc + gravity!) - for (const auto& intersection : Dune::intersections(gridView_, element)) + for (const auto& intersection : intersections(gridView_, element)) { int idx = intersection.indexInInside(); @@ -707,7 +707,7 @@ template<class TypeTag> void MimeticTwoPLocalStiffness<TypeTag>::assembleBC(const Element& element, int k) { // evaluate boundary conditions via intersection iterator - for (const auto& intersection : Dune::intersections(gridView_, element)) + for (const auto& intersection : intersections(gridView_, element)) { int faceIndex = intersection.indexInInside(); if (intersection.boundary()) diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimeticadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimeticadaptive.hh index ae95ed75eb..c567349667 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimeticadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimeticadaptive.hh @@ -294,7 +294,7 @@ public: Dune::FieldVector<Scalar, 2*dim> faceVolumeReal(0.0); int idx = 0; - for (const auto& intersection : Dune::intersections(gridView_, element)) + for (const auto& intersection : intersections(gridView_, element)) { faceVol[idx] = intersection.geometry().volume(); int indexInInside = intersection.indexInInside(); @@ -326,7 +326,7 @@ public: Dune::DynamicMatrix<Scalar> Pi(numFaces, numFaces); int idx = 0; - for (const auto& intersection : Dune::intersections(gridView_, element)) + for (const auto& intersection : intersections(gridView_, element)) { Scalar faceVol = intersection.geometry().volume(); @@ -494,7 +494,7 @@ void MimeticTwoPLocalStiffnessAdaptive<TypeTag>::assembleElementMatrices(const E * (density_[nPhaseIdx] - density_[wPhaseIdx]); int idx = 0; - for (const auto& intersection : Dune::intersections(gridView_, element)) + for (const auto& intersection : intersections(gridView_, element)) { // local number of facet @@ -635,7 +635,7 @@ void MimeticTwoPLocalStiffnessAdaptive<TypeTag>::assembleElementMatrices(const E //accumulate fluxes due to capillary potential (pc + gravity!) idx = 0; - for (const auto& intersection : Dune::intersections(gridView_, element)) + for (const auto& intersection : intersections(gridView_, element)) { Scalar fracFlow = 0; @@ -735,7 +735,7 @@ void MimeticTwoPLocalStiffnessAdaptive<TypeTag>::assembleBC(const Element& eleme { // evaluate boundary conditions via an intersection loop unsigned int faceIndex = 0; - for (const auto& intersection : Dune::intersections(gridView_, element)) + for (const auto& intersection : intersections(gridView_, element)) { if (intersection.neighbor()) { diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operator.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operator.hh index 2930af5881..bb812b1e06 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operator.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operator.hh @@ -117,7 +117,7 @@ public: } // run over all level elements - for (const auto& element : Dune::elements(this->gridView_)) + for (const auto& element : elements(this->gridView_)) { int eIdxGlobal = problem.variables().index(element); @@ -125,7 +125,7 @@ public: FieldVector globalPos = element.geometry().center(); // get local to global id map and pressure traces - for (const auto& intersection : Dune::intersections(problem.gridView(), element)) + for (const auto& intersection : intersections(problem.gridView(), element)) { int indexInInside = intersection.indexInInside(); @@ -201,7 +201,7 @@ public: } } - for (const auto& intersection : Dune::intersections(problem.gridView(), element)) + for (const auto& intersection : intersections(problem.gridView(), element)) { int idxInInside = intersection.indexInInside(); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operatoradaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operatoradaptive.hh index d27585e740..97ab748a3c 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operatoradaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/operatoradaptive.hh @@ -116,7 +116,7 @@ public: } // run over all level elements - for (const auto& element : Dune::elements(this->gridView_)) + for (const auto& element : elements(this->gridView_)) { int eIdxGlobal = problem.variables().index(element); @@ -133,7 +133,7 @@ public: int intersectionIdx = -1; // get local to global id map and pressure traces - for (const auto& intersection : Dune::intersections(problem.gridView(), element)) + for (const auto& intersection : intersections(problem.gridView(), element)) { ++intersectionIdx; @@ -208,7 +208,7 @@ public: loc.constructVelocity(element, velocityNw, pressTraceNw, cellData.potential(nPhaseIdx)); intersectionIdx = -1; - for (const auto& intersection : Dune::intersections(problem.gridView(), element)) + for (const auto& intersection : intersections(problem.gridView(), element)) { ++intersectionIdx; int idxInInside = intersection.indexInInside(); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressure.hh index af656edd93..0ce383f91b 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressure.hh @@ -241,7 +241,7 @@ public: } - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int eIdxGlobal = problem_.variables().index(element); CellData& cellData = problem_.variables().cellData(eIdxGlobal); @@ -284,7 +284,7 @@ public: std::vector<Scalar> fluxNw(numberOfFaces,0); // run through all intersections with neighbors and boundary - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { int isIndex = intersection.indexInInside(); @@ -485,7 +485,7 @@ template<class TypeTag> void MimeticPressure2P<TypeTag>::updateMaterialLaws() { // iterate through leaf grid an evaluate c0 at cell center - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int eIdxGlobal = problem_.variables().index(element); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureadaptive.hh index 00341c67d1..7c0e3b8e30 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureadaptive.hh @@ -253,7 +253,7 @@ public: } - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int eIdxGlobal = problem_.variables().index(element); CellData& cellData = problem_.variables().cellData(eIdxGlobal); @@ -296,7 +296,7 @@ public: std::vector<Scalar> fluxNw(numberOfFaces,0); // run through all intersections with neighbors and boundary - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { int isIndex = intersection.indexInInside(); @@ -497,7 +497,7 @@ template<class TypeTag> void MimeticPressure2PAdaptive<TypeTag>::updateMaterialLaws() { // iterate through leaf grid an evaluate c0 at cell center - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int eIdxGlobal = problem_.variables().index(element); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh index 5ed4fedfd9..9c3444e5ef 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh @@ -225,7 +225,7 @@ public: */ void storePressureSolution() { - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { storePressureSolution(element); } @@ -360,7 +360,7 @@ public: ScalarSolutionType *potentialSecond = writer.allocateManagedBuffer(size); ScalarSolutionType *pc = writer.allocateManagedBuffer(size); - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int idx = problem_.variables().index(element); CellData& cellData = problem_.variables().cellData(idx); @@ -578,7 +578,7 @@ template<class TypeTag> void FvMpfaL2dPressure2p<TypeTag>::initializeMatrix() { // determine matrix row sizes - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int eIdxGlobalI = problem_.variables().index(element); @@ -600,9 +600,9 @@ void FvMpfaL2dPressure2p<TypeTag>::initializeMatrix() if (intersection.neighbor() && nextIntersection.neighbor()) { for (const auto& innerIntersection - : Dune::intersections(problem_.gridView(), intersection.outside())) + : intersections(problem_.gridView(), intersection.outside())) for (const auto& innerNextIntersection - : Dune::intersections(problem_.gridView(), nextIntersection.outside())) + : intersections(problem_.gridView(), nextIntersection.outside())) { if (innerIntersection.neighbor() && innerNextIntersection.neighbor()) { @@ -625,7 +625,7 @@ void FvMpfaL2dPressure2p<TypeTag>::initializeMatrix() this->A_.endrowsizes(); // determine position of matrix entries - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int eIdxGlobalI = problem_.variables().index(element); @@ -653,9 +653,9 @@ void FvMpfaL2dPressure2p<TypeTag>::initializeMatrix() if (intersection.neighbor() && nextIntersection.neighbor()) { for (const auto& innerIntersection - : Dune::intersections(problem_.gridView(), intersection.outside())) + : intersections(problem_.gridView(), intersection.outside())) for (const auto& innerNextIntersection - : Dune::intersections(problem_.gridView(), nextIntersection.outside())) + : intersections(problem_.gridView(), nextIntersection.outside())) { if (innerIntersection.neighbor() && innerNextIntersection.neighbor()) { @@ -707,7 +707,7 @@ void FvMpfaL2dPressure2p<TypeTag>::storeInteractionVolumeInfo() BoundaryTypes bcType; // run through all elements - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // get common geometry information for the following computation @@ -843,12 +843,12 @@ void FvMpfaL2dPressure2p<TypeTag>::storeInteractionVolumeInfo() GlobalPosition globalPosFace34(0); for (const auto& intersection23 - : Dune::intersections(problem_.gridView(), element2)) + : intersections(problem_.gridView(), element2)) { bool finished = false; for (const auto& intersection43 - : Dune::intersections(problem_.gridView(), element4)) + : intersections(problem_.gridView(), element4)) { if (intersection23.neighbor() && intersection43.neighbor()) { @@ -946,7 +946,7 @@ void FvMpfaL2dPressure2p<TypeTag>::storeInteractionVolumeInfo() bool finished = false; for (const auto& intersection2 - : Dune::intersections(problem_.gridView(), element2)) + : intersections(problem_.gridView(), element2)) { if (intersection2.boundary()) { @@ -1077,7 +1077,7 @@ void FvMpfaL2dPressure2p<TypeTag>::storeInteractionVolumeInfo() // get the information of the face 'isIt34' between cell3 and cell4 (locally numbered) for (const auto& intersection4 - : Dune::intersections(problem_.gridView(), element4)) + : intersections(problem_.gridView(), element4)) { if (intersection4.boundary()) { @@ -1164,7 +1164,7 @@ void FvMpfaL2dPressure2p<TypeTag>::assemble() this->f_ = 0; // run through all vertices - for (const auto& vertex : Dune::vertices(problem_.gridView())) + for (const auto& vertex : vertices(problem_.gridView())) { int vIdxGlobal = problem_.variables().index(vertex); @@ -1803,7 +1803,7 @@ void FvMpfaL2dPressure2p<TypeTag>::assemble() if (problem_.gridView().comm().size() > 1) { // set ghost and overlap element entries - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { if (element.partitionType() == Dune::InteriorEntity) continue; @@ -1828,7 +1828,7 @@ template<class TypeTag> void FvMpfaL2dPressure2p<TypeTag>::updateMaterialLaws() { // iterate through leaf grid an evaluate c0 at cell center - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int eIdxGlobal = problem_.variables().index(element); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh index 2ab367aaaf..aa48172cd7 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh @@ -232,7 +232,7 @@ public: void storePressureSolution() { // iterate through leaf grid an evaluate c0 at cell center - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { storePressureSolution(element); } @@ -394,7 +394,7 @@ public: ScalarSolutionType *potentialSecond = writer.allocateManagedBuffer(size); ScalarSolutionType *pc = writer.allocateManagedBuffer(size); - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int idx = problem_.variables().index(element); CellData& cellData = problem_.variables().cellData(idx); @@ -582,7 +582,7 @@ template<class TypeTag> void FvMpfaL2dPressure2pAdaptive<TypeTag>::initializeMatrix() { // determine matrix row sizes - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int eIdxGlobalI = problem_.variables().index(element); @@ -607,10 +607,10 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::initializeMatrix() bool isCorner = true; for (const auto& innerIntersection - : Dune::intersections(problem_.gridView(), intersection.outside())) + : intersections(problem_.gridView(), intersection.outside())) { for (const auto& innerNextIntersection - : Dune::intersections(problem_.gridView(), nextIntersection.outside())) + : intersections(problem_.gridView(), nextIntersection.outside())) { if (innerIntersection.neighbor() && innerNextIntersection.neighbor()) { @@ -646,7 +646,7 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::initializeMatrix() // indicate that size of all rows is defined this->A_.endrowsizes(); // determine position of matrix entries - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int eIdxGlobalI = problem_.variables().index(element); @@ -686,10 +686,10 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::initializeMatrix() } for (const auto& innerIntersection - : Dune::intersections(problem_.gridView(), intersection.outside())) + : intersections(problem_.gridView(), intersection.outside())) { for (const auto& innerNextIntersection - : Dune::intersections(problem_.gridView(), nextIntersection.outside())) + : intersections(problem_.gridView(), nextIntersection.outside())) { if (innerIntersection.neighbor() && innerNextIntersection.neighbor()) { @@ -761,7 +761,7 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::storeInteractionVolumeInfo() BoundaryTypes bcType; // run through all elements - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // get index int eIdxGlobal1 = problem_.variables().index(element); @@ -899,11 +899,11 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::storeInteractionVolumeInfo() bool isHangingNode = false; for (const auto& intersection2 - : Dune::intersections(problem_.gridView(), element2)) + : intersections(problem_.gridView(), element2)) { bool breakLoop = false; for (const auto& intersection4 - : Dune::intersections(problem_.gridView(), element4)) + : intersections(problem_.gridView(), element4)) { if (intersection2.neighbor() && intersection4.neighbor()) { @@ -974,10 +974,10 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::storeInteractionVolumeInfo() bool regularNode = false; for (const auto& intersection2 - : Dune::intersections(problem_.gridView(), element2)) + : intersections(problem_.gridView(), element2)) { for (const auto& intersection4 - : Dune::intersections(problem_.gridView(), element4)) + : intersections(problem_.gridView(), element4)) { if (intersection4.neighbor()) { @@ -1039,7 +1039,7 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::storeInteractionVolumeInfo() if (element32.level() > element2.level()) { for (const auto& intersection3 - : Dune::intersections(problem_.gridView(), element32)) + : intersections(problem_.gridView(), element32)) { if (intersection3.neighbor()) { @@ -1064,7 +1064,7 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::storeInteractionVolumeInfo() if (element34.level() > element4.level()) { for (const auto& intersection3 - : Dune::intersections(problem_.gridView(), element34)) + : intersections(problem_.gridView(), element34)) { if (intersection3.neighbor()) { @@ -1108,10 +1108,10 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::storeInteractionVolumeInfo() { bool regularNode = false; for (const auto& intersection2 - : Dune::intersections(problem_.gridView(), element2)) + : intersections(problem_.gridView(), element2)) { for (const auto& intersection4 - : Dune::intersections(problem_.gridView(), element4)) + : intersections(problem_.gridView(), element4)) { if (intersection4.neighbor()) { @@ -1229,7 +1229,7 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::storeInteractionVolumeInfo() finished = false; for (const auto& intersection2 - : Dune::intersections(problem_.gridView(), element2)) + : intersections(problem_.gridView(), element2)) { if (intersection2.boundary()) { @@ -1462,7 +1462,7 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::storeInteractionVolumeInfo() // get the information of the face 'isIt34' between cell3 and cell4 (locally numbered) for (const auto& intersection4 - : Dune::intersections(problem_.gridView(), element4)) + : intersections(problem_.gridView(), element4)) { if (intersection4.boundary()) { @@ -1553,7 +1553,7 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::storeInteractionVolumeInfo() template<class TypeTag> void FvMpfaL2dPressure2pAdaptive<TypeTag>::printInteractionVolumes() { - for (const auto& vertex : Dune::vertices(problem_.gridView())) + for (const auto& vertex : vertices(problem_.gridView())) { int vIdxGlobal = problem_.variables().index(vertex); @@ -1607,7 +1607,7 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::assemble() this->f_ = 0; // run through all vertices - for (const auto& vertex : Dune::vertices(problem_.gridView())) + for (const auto& vertex : vertices(problem_.gridView())) { int vIdxGlobal = problem_.variables().index(vertex); @@ -2514,7 +2514,7 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::assemble() if (problem_.gridView().comm().size() > 1) { // set ghost and overlap element entries - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { if (element.partitionType() == Dune::InteriorEntity) continue; @@ -2539,7 +2539,7 @@ template<class TypeTag> void FvMpfaL2dPressure2pAdaptive<TypeTag>::updateMaterialLaws() { // iterate through leaf grid an evaluate c0 at cell center - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int eIdxGlobal = problem_.variables().index(element); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh index c603bf6de8..ad986141b2 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh @@ -218,7 +218,7 @@ template<class TypeTag> void FvMpfaL2dPressureVelocity2p<TypeTag>::calculateVelocity() { // run through all elements - for (const auto& vertex : Dune::vertices(problem_.gridView())) + for (const auto& vertex : vertices(problem_.gridView())) { int vIdxGlobal = problem_.variables().index(vertex); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh index 9efa28a227..91e9a31b69 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh @@ -227,7 +227,7 @@ template<class TypeTag> void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity() { // run through all elements - for (const auto& vertex : Dune::vertices(problem_.gridView())) + for (const auto& vertex : vertices(problem_.gridView())) { int vIdxGlobal = problem_.variables().index(vertex); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocity.hh index 5537f5ef89..b75effed29 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocity.hh @@ -182,7 +182,7 @@ public: = *(writer.template allocateManagedBuffer<Scalar,dim>(problem_.gridView().size(0))); // compute update vector - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int eIdxGlobal = problem_.variables().index(element); @@ -193,7 +193,7 @@ public: Dune::FieldVector < Scalar, 2 * dim > fluxNw(0); // run through all intersections with neighbors and boundary - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { int isIndex = intersection.indexInInside(); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontainer.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontainer.hh index 68cd6e2fae..d950ade0f2 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontainer.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontainer.hh @@ -375,7 +375,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E int levelI = element.level(); // run through all intersections - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { int indexInInside = intersection.indexInInside(); @@ -1992,7 +1992,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeInteractionVolumeInfo() std::vector < std::vector<int> > elemVertMap(problem_.gridView().size(dim), std::vector<int>(8, -1)); //Add elements to the interaction volumes and store element-vertex map - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) storeSubVolumeElements(element, elemVertMap); for (unsigned int i = 0; i < interactionVolumes_.size(); i++) @@ -2000,12 +2000,12 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeInteractionVolumeInfo() interactionVolumes_[i].printInteractionVolumeInfo(); // Store information related to DUNE intersections for all interaction volumes - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) storeIntersectionInfo(element, elemVertMap); // Complete storage of the interaction volumes using the previously stored information // about the orientation and relationship of the DUNE elements in the interaction volumes (see doc/docextra/3dmpfa) - for (const auto& vertex : Dune::vertices(problem_.gridView())) + for (const auto& vertex : vertices(problem_.gridView())) { int vIdxGlobal = problem_.variables().index(vertex); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontaineradaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontaineradaptive.hh index 19537768bb..aa342558f6 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontaineradaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontaineradaptive.hh @@ -515,7 +515,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter auto element1 = interactionVolume.getSubVolumeElement(0); - for (const auto& intersection : Dune::intersections(problem_.gridView(), element1)) + for (const auto& intersection : intersections(problem_.gridView(), element1)) { int idxInInside = intersection.indexInInside(); @@ -548,13 +548,13 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter auto element45 = interactionVolume.getSubVolumeElement(4); auto element23 = interactionVolume.getSubVolumeElement(2); - for (const auto& intersection1 : Dune::intersections(problem_.gridView(), element45)) + for (const auto& intersection1 : intersections(problem_.gridView(), element45)) { if (intersection1.neighbor()) { auto element45Outside = intersection1.outside(); - for (const auto& intersection2 : Dune::intersections(problem_.gridView(), element23)) + for (const auto& intersection2 : intersections(problem_.gridView(), element23)) { if (intersection2.neighbor()) { @@ -772,7 +772,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter auto outside1 = element1; auto outside4 = element4; - for (const auto& intersection1 : Dune::intersections(problem_.gridView(), element1)) + for (const auto& intersection1 : intersections(problem_.gridView(), element1)) { if (intersection1.neighbor()) { @@ -783,7 +783,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter } } } - for (const auto& intersection4 : Dune::intersections(problem_.gridView(), element4)) + for (const auto& intersection4 : intersections(problem_.gridView(), element4)) { if (intersection4.neighbor()) { @@ -866,7 +866,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter faceArea = crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0; interactionVolume.setFaceArea(faceArea, 11); - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { if (intersection.indexInInside() == interactionVolume.getIndexOnElement(0, 2)) { @@ -894,7 +894,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter auto element3 = interactionVolume.getSubVolumeElement(2); auto element4 = interactionVolume.getSubVolumeElement(3); - for (const auto& intersection1 : Dune::intersections(problem_.gridView(), element1)) + for (const auto& intersection1 : intersections(problem_.gridView(), element1)) { if (intersection1.neighbor()) { @@ -908,7 +908,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter } } } - for (const auto& intersection2 : Dune::intersections(problem_.gridView(), element2)) + for (const auto& intersection2 : intersections(problem_.gridView(), element2)) { if (intersection2.neighbor()) { @@ -924,7 +924,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter } } } - for (const auto& intersection3 : Dune::intersections(problem_.gridView(), element3)) + for (const auto& intersection3 : intersections(problem_.gridView(), element3)) { if (intersection3.neighbor()) { @@ -939,7 +939,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter } } } - for (const auto& intersection4 : Dune::intersections(problem_.gridView(), element4)) + for (const auto& intersection4 : intersections(problem_.gridView(), element4)) { if (intersection4.neighbor()) { @@ -1023,7 +1023,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter interactionVolume.setFacePosition(element5.geometry().center(), 4); interactionVolume.setFacePosition(element7.geometry().center(), 6); - for (const auto& intersection : Dune::intersections(problem_.gridView(), element5)) + for (const auto& intersection : intersections(problem_.gridView(), element5)) { if (intersection.neighbor()) { @@ -1073,7 +1073,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter interactionVolume.setFacePosition(element5.geometry().center(), 7); interactionVolume.setFacePosition(globalPosFace, 6); - for (const auto& intersection : Dune::intersections(problem_.gridView(), element5)) + for (const auto& intersection : intersections(problem_.gridView(), element5)) { if (intersection.neighbor()) { @@ -1344,7 +1344,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter bool hasFaceOne = false; bool hasFaceTwo = false; - for (const auto& intersection : Dune::intersections(problem_.gridView(), element1)) + for (const auto& intersection : intersections(problem_.gridView(), element1)) { if (intersection.indexInInside() == interactionVolume.getIndexOnElement(0, 1)) { @@ -1481,7 +1481,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter auto element3 = interactionVolume.getSubVolumeElement(2); - for (const auto& intersection : Dune::intersections(problem_.gridView(), element3)) + for (const auto& intersection : intersections(problem_.gridView(), element3)) { if (intersection.indexInInside() == interactionVolume.getIndexOnElement(2, 2)) { @@ -1592,7 +1592,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeInteractionVolum std::vector < std::vector<int> > elemVertMap(problem_.gridView().size(dim), std::vector<int>(8, -1)); //Add elements to the interaction volumes and store element-vertex map - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) asImp_().storeSubVolumeElements(element, elemVertMap); for (unsigned int i = 0; i < asImp_().interactionVolumes_.size(); i++) @@ -1600,7 +1600,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeInteractionVolum asImp_().interactionVolumes_[i].printInteractionVolumeInfo(); // Store information related to DUNE intersections for all interaction volumes - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) asImp_().storeIntersectionInfo(element, elemVertMap); faceVertices_.clear(); @@ -1608,7 +1608,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeInteractionVolum // Complete storage of the interaction volumes using the previously stored information // about the orientation and relationship of the DUNE elements in the interaction volumes (see doc/docextra/3dmpfa) - for (const auto& vertex : Dune::vertices(problem_.gridView())) + for (const auto& vertex : vertices(problem_.gridView())) { int vIdxGlobal = problem_.variables().index(vertex); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressure.hh index c3b08bd57f..d96ae57c0f 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressure.hh @@ -206,7 +206,7 @@ public: void storePressureSolution() { // iterate through leaf grid an evaluate c0 at cell center - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { storePressureSolution(element); } @@ -401,7 +401,7 @@ public: ScalarSolutionType *potentialSecond = writer.allocateManagedBuffer(size); ScalarSolutionType *pc = writer.allocateManagedBuffer(size); - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int idx = problem_.variables().index(element); CellData& cellData = problem_.variables().cellData(idx); @@ -549,7 +549,7 @@ template<class TypeTag> void FvMpfaL3dPressure2p<TypeTag>::initializeMatrixRowSize() { // determine matrix row sizes - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int eIdxGlobalI = problem_.variables().index(element); @@ -586,7 +586,7 @@ template<class TypeTag> void FvMpfaL3dPressure2p<TypeTag>::initializeMatrixIndices() { // determine position of matrix entries - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int eIdxGlobalI = problem_.variables().index(element); @@ -624,7 +624,7 @@ void FvMpfaL3dPressure2p<TypeTag>::assemble() this->f_ = 0; // run through all vertices - for (const auto& vertex : Dune::vertices(problem_.gridView())) + for (const auto& vertex : vertices(problem_.gridView())) { int vIdxGlobal = problem_.variables().index(vertex); @@ -2474,7 +2474,7 @@ template<class TypeTag> void FvMpfaL3dPressure2p<TypeTag>::updateMaterialLaws() { // iterate through leaf grid an evaluate c0 at cell center - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int eIdxGlobal = problem_.variables().index(element); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressureadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressureadaptive.hh index 947162e748..37d58fa5bf 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressureadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressureadaptive.hh @@ -282,7 +282,7 @@ template<class TypeTag> void FvMpfaL3dPressure2pAdaptive<TypeTag>::initializeMatrixRowSize() { // determine matrix row sizes - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int globalIdxI = problem_.variables().index(element); @@ -366,7 +366,7 @@ template<class TypeTag> void FvMpfaL3dPressure2pAdaptive<TypeTag>::initializeMatrixIndices() { // determine position of matrix entries - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int globalIdxI = problem_.variables().index(element); @@ -417,7 +417,7 @@ void FvMpfaL3dPressure2pAdaptive<TypeTag>::assemble() this->f_ = 0; // run through all vertices - for (const auto& vertex : Dune::vertices(problem_.gridView())) + for (const auto& vertex : vertices(problem_.gridView())) { #if HAVE_MPI if (vertex.partitionType() != Dune::InteriorEntity && vertex.partitionType() != Dune::BorderEntity) diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh index 5f33ebc166..315b693d8d 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh @@ -212,7 +212,7 @@ template<class TypeTag> void FvMpfaL3dPressureVelocity2p<TypeTag>::calculateVelocity() { // run through all vertices - for (const auto& vertex : Dune::vertices(problem_.gridView())) + for (const auto& vertex : vertices(problem_.gridView())) { int vIdxGlobal = problem_.variables().index(vertex); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocityadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocityadaptive.hh index 21fdc039f8..09017e8165 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocityadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocityadaptive.hh @@ -213,7 +213,7 @@ template<class TypeTag> void FvMpfaL3dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity() { // run through all vertices - for (const auto& vertex : Dune::vertices(problem_.gridView())) + for (const auto& vertex : vertices(problem_.gridView())) { int vIdxGlobal = problem_.variables().index(vertex); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dvelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dvelocity.hh index 4a2ef9b723..907f252f47 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dvelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dvelocity.hh @@ -197,7 +197,7 @@ public: dim>(problem_.gridView().size(0))); // compute update vector - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int eIdxGlobal = problem_.variables().index(element); @@ -208,7 +208,7 @@ public: Dune::FieldVector < Scalar, 2 * dim > fluxNw(0); // run through all intersections with neighbors and boundary - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { int isIndex = intersection.indexInInside(); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh index a1cd9a14ba..8077e33396 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh @@ -251,7 +251,7 @@ public: void storePressureSolution() { // iterate through leaf grid an evaluate c0 at cell center - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { storePressureSolution(element); } @@ -344,7 +344,7 @@ public: ScalarSolutionType *potentialSecond = writer.allocateManagedBuffer(size); ScalarSolutionType *pc = writer.allocateManagedBuffer(size); - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int idx = problem_.variables().index(element); CellData& cellData = problem_.variables().cellData(idx); @@ -555,7 +555,7 @@ template<class TypeTag> void FvMpfaO2dPressure2p<TypeTag>::initializeMatrix() { // determine matrix row sizes - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int eIdxGlobalI = problem_.variables().index(element); @@ -577,9 +577,9 @@ void FvMpfaO2dPressure2p<TypeTag>::initializeMatrix() if (intersection.neighbor() && nextIntersection.neighbor()) { for (const auto& innerIntersection - : Dune::intersections(problem_.gridView(), intersection.outside())) + : intersections(problem_.gridView(), intersection.outside())) for (const auto& innerNextIntersection - : Dune::intersections(problem_.gridView(), nextIntersection.outside())) + : intersections(problem_.gridView(), nextIntersection.outside())) { if (innerIntersection.neighbor() && innerNextIntersection.neighbor()) { @@ -602,7 +602,7 @@ void FvMpfaO2dPressure2p<TypeTag>::initializeMatrix() this->A_.endrowsizes(); // determine position of matrix entries - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int eIdxGlobalI = problem_.variables().index(element); @@ -630,9 +630,9 @@ void FvMpfaO2dPressure2p<TypeTag>::initializeMatrix() if (intersection.neighbor() && nextIntersection.neighbor()) { for (const auto& innerIntersection - : Dune::intersections(problem_.gridView(), intersection.outside())) + : intersections(problem_.gridView(), intersection.outside())) for (const auto& innerNextIntersection - : Dune::intersections(problem_.gridView(), nextIntersection.outside())) + : intersections(problem_.gridView(), nextIntersection.outside())) { if (innerIntersection.neighbor() && innerNextIntersection.neighbor()) { @@ -695,7 +695,7 @@ void FvMpfaO2dPressure2p<TypeTag>::storeInteractionVolumeInfo() BoundaryTypes bcType; // run through all elements - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // get common geometry information for the following computation @@ -860,12 +860,12 @@ void FvMpfaO2dPressure2p<TypeTag>::storeInteractionVolumeInfo() GlobalPosition globalPosFace34(0); for (const auto& intersection2 - : Dune::intersections(problem_.gridView(), element2)) + : intersections(problem_.gridView(), element2)) { bool finished = false; for (const auto& intersection4 - : Dune::intersections(problem_.gridView(), element4)) + : intersections(problem_.gridView(), element4)) { if (intersection2.neighbor() && intersection4.neighbor()) { @@ -1000,7 +1000,7 @@ void FvMpfaO2dPressure2p<TypeTag>::storeInteractionVolumeInfo() bool finished = false; for (const auto& intersection2 - : Dune::intersections(problem_.gridView(), element2)) + : intersections(problem_.gridView(), element2)) { if (intersection2.boundary()) { @@ -1146,7 +1146,7 @@ void FvMpfaO2dPressure2p<TypeTag>::storeInteractionVolumeInfo() // get the information of the face 'isIt34' between cell3 and cell4 (locally numbered) for (const auto& intersection4 - : Dune::intersections(problem_.gridView(), element4)) + : intersections(problem_.gridView(), element4)) { if (intersection4.boundary()) { @@ -1246,7 +1246,7 @@ void FvMpfaO2dPressure2p<TypeTag>::assemble() this->f_ = 0; // run through all vertices - for (const auto& vertex : Dune::vertices(problem_.gridView())) + for (const auto& vertex : vertices(problem_.gridView())) { int vIdxGlobal = problem_.variables().index(vertex); @@ -1894,7 +1894,7 @@ void FvMpfaO2dPressure2p<TypeTag>::assemble() if (problem_.gridView().comm().size() > 1) { // set ghost and overlap element entries - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { if (element.partitionType() == Dune::InteriorEntity) continue; @@ -1920,7 +1920,7 @@ template<class TypeTag> void FvMpfaO2dPressure2p<TypeTag>::updateMaterialLaws() { // iterate through leaf grid an evaluate c0 at cell center - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int eIdxGlobal = problem_.variables().index(element); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh index 4f9165a10a..06b6061a28 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh @@ -219,7 +219,7 @@ template<class TypeTag> void FvMpfaO2dPressureVelocity2p<TypeTag>::calculateVelocity() { // run through all elements - for (const auto& vertex : Dune::vertices(problem_.gridView())) + for (const auto& vertex : vertices(problem_.gridView())) { int vIdxGlobal = problem_.variables().index(vertex); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dvelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dvelocity.hh index d464efca51..30f054984c 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dvelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dvelocity.hh @@ -180,7 +180,7 @@ public: dim>(problem_.gridView().size(0))); // compute update vector - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int eIdxGlobal = problem_.variables().index(element); @@ -191,7 +191,7 @@ public: Dune::FieldVector < Scalar, 2 * dim > fluxNw(0); // run through all intersections with neighbors and boundary - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { int isIndex = intersection.indexInInside(); diff --git a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicator.hh b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicator.hh index 76337cfe7e..c37bb95f9b 100644 --- a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicator.hh +++ b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicator.hh @@ -79,7 +79,7 @@ public: // 1) calculate Indicator -> min, maxvalues // loop over all leaf-elements - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // calculate minimum and maximum saturation // index of the current leaf-elements @@ -100,7 +100,7 @@ public: globalMax = std::max(satI, globalMax); // calculate refinement indicator in all cells - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { // Only consider internal intersections if (intersection.neighbor()) diff --git a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocal.hh b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocal.hh index 53bcc44145..792d9f6238 100644 --- a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocal.hh +++ b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocal.hh @@ -82,7 +82,7 @@ public: // 1) calculate Indicator -> min, maxvalues // loop over all leaf-elements - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // calculate minimum and maximum saturation // index of the current leaf-elements @@ -122,7 +122,7 @@ public: globalMax = std::max(satI, globalMax); // calculate refinement indicator in all cells - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { if (indicatorVector_[globalIdxI] == 10) { diff --git a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocalflux.hh b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocalflux.hh index c15ac2d6ad..0adca7a758 100644 --- a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocalflux.hh +++ b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocalflux.hh @@ -147,7 +147,7 @@ public: // 1) calculate Indicator -> min, maxvalues // Schleife über alle Leaf-Elemente - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // Bestimme maximale und minimale Sättigung // Index des aktuellen Leaf-Elements @@ -216,7 +216,7 @@ public: std::vector<Scalar> flux(numberOfFaces,0); // Calculate refinement indicator on all cells - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { if (isSpecialCell) { diff --git a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/saturation.hh b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/saturation.hh index 851f73f4a3..465eaccdbb 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/saturation.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/saturation.hh @@ -1130,7 +1130,7 @@ void FVSaturation2P<TypeTag>::initialize() } // iterate through leaf grid an evaluate c0 at cell center - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { PrimaryVariables initSol(0.0); problem_.initial(initSol, element); @@ -1173,7 +1173,7 @@ template<class TypeTag> void FVSaturation2P<TypeTag>::updateMaterialLaws() { // iterate through leaf grid an evaluate c0 at cell center - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int eIdxGlobal = problem_.variables().index(element); diff --git a/dumux/porousmediumflow/2p2c/implicit/model.hh b/dumux/porousmediumflow/2p2c/implicit/model.hh index d298e467b3..34aa67a6ec 100644 --- a/dumux/porousmediumflow/2p2c/implicit/model.hh +++ b/dumux/porousmediumflow/2p2c/implicit/model.hh @@ -154,7 +154,7 @@ public: setSwitched_(false); // check, if velocity output can be used (works only for cubes so far) - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { if (!isBox) // i.e. cell-centered discretization { @@ -174,7 +174,7 @@ public: if (isBox) // i.e. vertex-centered discretization { - for (const auto& vertex : Dune::vertices(this->gridView_())) + for (const auto& vertex : vertices(this->gridView_())) { int vIdxGlobal = this->dofMapper().index(vertex); const GlobalPosition &globalPos = vertex.geometry().corner(0); @@ -201,7 +201,7 @@ public: { storage = 0; - for (const auto& element : Dune::elements(this->gridView_())) { + for (const auto& element : elements(this->gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { @@ -321,7 +321,7 @@ public: unsigned numElements = this->gridView_().size(0); ScalarField *rank = writer.allocateManagedBuffer(numElements); - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { @@ -481,7 +481,7 @@ public: FVElementGeometry fvGeometry; static VolumeVariables volVars; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { fvGeometry.update(this->gridView_(), element); for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) diff --git a/dumux/porousmediumflow/2p2c/sequential/fv2dpressureadaptive.hh b/dumux/porousmediumflow/2p2c/sequential/fv2dpressureadaptive.hh index ab0dc6fdcf..8c85d225f2 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fv2dpressureadaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fv2dpressureadaptive.hh @@ -226,7 +226,7 @@ void FV2dPressure2P2CAdaptive<TypeTag>::initializeMatrix() this->f_.resize(gridSize_); // determine matrix row sizes - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { // cell index int globalIdxI = problem().variables().index(element); @@ -273,7 +273,7 @@ void FV2dPressure2P2CAdaptive<TypeTag>::initializeMatrix() { bool increaseRowSize = true; //check if additional cell is ordinary neighbor of eIt - for (const auto& intersection2 : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection2 : intersections(problem_.gridView(), element)) { if(!intersection2.neighbor()) continue; @@ -301,7 +301,7 @@ void FV2dPressure2P2CAdaptive<TypeTag>::initializeMatrix() this->A_.endrowsizes(); // determine position of matrix entries - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { // cell index int globalIdxI = problem().variables().index(element); @@ -372,7 +372,7 @@ void FV2dPressure2P2CAdaptive<TypeTag>::assemble(bool first) this->A_ = 0; this->f_ = 0; - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { // get the global index of the cell int globalIdxI = problem().variables().index(element); diff --git a/dumux/porousmediumflow/2p2c/sequential/fv2dtransportadaptive.hh b/dumux/porousmediumflow/2p2c/sequential/fv2dtransportadaptive.hh index a27e7bcdba..f7a6b1cc7f 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fv2dtransportadaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fv2dtransportadaptive.hh @@ -192,7 +192,7 @@ void FV2dTransport2P2CAdaptive<TypeTag>::update(const Scalar t, Scalar& dt, Tran Dune::FieldVector<Scalar, 2> entries(0.), timestepFlux(0.); // compute update vector - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { // get cell infos int globalIdxI = problem().variables().index(element); diff --git a/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh b/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh index 72009677ef..17b92e1209 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh @@ -218,7 +218,7 @@ public: int gridSize = problem().gridView().size(0); this->pressure().resize(gridSize); - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { // get the global index of the cell int eIdxGlobalI = problem().variables().index(element); @@ -332,7 +332,7 @@ template<class TypeTag> void FV3dPressure2P2CAdaptive<TypeTag>::initializeMatrixRowSize() { // determine matrix row sizes - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { // cell index int eIdxGlobalI = problem().variables().index(element); @@ -349,7 +349,7 @@ void FV3dPressure2P2CAdaptive<TypeTag>::initializeMatrixRowSize() int numberOfIntersections = 0; // run through all intersections with neighbors - for (const auto& intersection : Dune::intersections(problem().gridView(), element)) + for (const auto& intersection : intersections(problem().gridView(), element)) { cellDataI.perimeter() += intersection.geometry().volume(); numberOfIntersections++; @@ -386,7 +386,7 @@ void FV3dPressure2P2CAdaptive<TypeTag>::initializeMatrixRowSize() std::multimap<int,int>::iterator rangeIt; // second loop for further sub-faces - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { // cell index int eIdxGlobalI = problem().variables().index(element); @@ -443,7 +443,7 @@ void FV3dPressure2P2CAdaptive<TypeTag>::initializeMatrixRowSize() bool additional2isNeighbor(false), additional3isNeighbor(false); // run through all intersections with neighbors if eIt for (const auto& checkIntersection - : Dune::intersections(problem().gridView(), element)) + : intersections(problem().gridView(), element)) { if (checkIntersection.neighbor()) { @@ -503,7 +503,7 @@ void FV3dPressure2P2CAdaptive<TypeTag>::initializeMatrixRowSize() additional2isNeighbor = additional3isNeighbor = false; // run through all intersections with neighbors of J for (const auto& checkIntersection - : Dune::intersections(problem().gridView(), intersection.outside())) + : intersections(problem().gridView(), intersection.outside())) { if (checkIntersection.neighbor()) { @@ -575,7 +575,7 @@ template<class TypeTag> void FV3dPressure2P2CAdaptive<TypeTag>::initializeMatrixIndices() { // determine position of matrix entries - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { // cell index int eIdxGlobalI = problem().variables().index(element); @@ -650,7 +650,7 @@ void FV3dPressure2P2CAdaptive<TypeTag>::assemble(bool first) this->A_ = 0; this->f_ = 0; - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { // get the global index of the cell int eIdxGlobalI = problem().variables().index(element); @@ -1292,7 +1292,7 @@ void FV3dPressure2P2CAdaptive<TypeTag>::updateMaterialLaws(bool fromPostTimestep { Scalar maxError = 0.; // iterate through leaf grid an evaluate c0 at cell center - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { int eIdxGlobal = problem().variables().index(element); CellData& cellData = problem().variables().cellData(eIdxGlobal); diff --git a/dumux/porousmediumflow/2p2c/sequential/fv3dtransportadaptive.hh b/dumux/porousmediumflow/2p2c/sequential/fv3dtransportadaptive.hh index 2b6c530e21..5a231b0682 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fv3dtransportadaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fv3dtransportadaptive.hh @@ -201,7 +201,7 @@ void FV3dTransport2P2CAdaptive<TypeTag>::update(const Scalar t, Scalar& dt, Dune::FieldVector<Scalar, 2> entries(0.), timestepFlux(0.); // compute update vector - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { // get cell infos int globalIdxI = problem().variables().index(element); diff --git a/dumux/porousmediumflow/2p2c/sequential/fvpressurecompositional.hh b/dumux/porousmediumflow/2p2c/sequential/fvpressurecompositional.hh index 092b1e18a6..d9dcc42b7f 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvpressurecompositional.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvpressurecompositional.hh @@ -316,7 +316,7 @@ public: Dune::BlockVector<Dune::FieldVector<double,1> > poro_(0.), perm_(0.); poro_.resize(size_); perm_.resize(size_); // iterate over all elements of domain - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // get index int eIdxGlobal = problem_.variables().index(element); @@ -335,7 +335,7 @@ public: Dune::BlockVector<Dune::FieldVector<double,1> > permY_(0.), permZ_(0.); permY_.resize(size_); permZ_.resize(size_); // iterate over all elements of domain - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // get index int eIdxGlobal = problem_.variables().index(element); @@ -525,7 +525,7 @@ template<class TypeTag> void FVPressureCompositional<TypeTag>::initialMaterialLaws(bool compositional) { // iterate through leaf grid an evaluate c0 at cell center - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // get global coordinate of cell center GlobalPosition globalPos = element.geometry().center(); @@ -678,7 +678,7 @@ void FVPressureCompositional<TypeTag>::initialMaterialLaws(bool compositional) if(!compositional) { // run through all intersections with neighbors - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { cellData.perimeter() += intersection.geometry().volume(); @@ -707,7 +707,7 @@ void FVPressureCompositional<TypeTag>::updateMaterialLaws(bool postTimeStep) { Scalar maxError = 0.; // iterate through leaf grid an evaluate c0 at cell center - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { int eIdxGlobal = problem().variables().index(element); diff --git a/dumux/porousmediumflow/2p2c/sequential/fvpressuremultiphysics.hh b/dumux/porousmediumflow/2p2c/sequential/fvpressuremultiphysics.hh index a0a2123089..d3ae37c791 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvpressuremultiphysics.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvpressuremultiphysics.hh @@ -262,7 +262,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::assemble(bool first) this->A_ = 0; this->f_ = 0; - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { // get the global index of the cell int eIdxGlobalI = problem().variables().index(element); @@ -285,7 +285,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::assemble(bool first) /***** flux term ***********/ // iterate over all faces of the cell - for (const auto& intersection : Dune::intersections(problem().gridView(), element)) + for (const auto& intersection : intersections(problem().gridView(), element)) { /************* handle interior face *****************/ if (intersection.neighbor()) @@ -781,7 +781,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::updateMaterialLaws(bool postTimeStep) nextSubdomain = -1; // reduce complexity after first TS // Loop A) through leaf grid - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { // get global coordinate of cell center int eIdxGlobal = problem().variables().index(element); @@ -805,7 +805,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::updateMaterialLaws(bool postTimeStep) nextSubdomain[eIdxGlobal] = 2; // mark neighbors - for (const auto& intersection : Dune::intersections(problem().gridView(), element)) + for (const auto& intersection : intersections(problem().gridView(), element)) { if (intersection.neighbor()) { @@ -842,7 +842,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::updateMaterialLaws(bool postTimeStep) // Loop B) thorugh leaf grid // investigate cells that were "simple" in current TS - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { int eIdxGlobal = problem().variables().index(element); CellData& cellData = problem().variables().cellData(eIdxGlobal); diff --git a/dumux/porousmediumflow/2p2c/sequential/fvtransport.hh b/dumux/porousmediumflow/2p2c/sequential/fvtransport.hh index 9336a21887..d417607e8d 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvtransport.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvtransport.hh @@ -385,7 +385,7 @@ void FVTransport2P2C<TypeTag>::update(const Scalar t, Scalar& dt, ComponentVector entries(0.); EntryType timestepFlux(0.); // compute update vector - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { // get cell infos int eIdxGlobalI = problem().variables().index(element); @@ -396,7 +396,7 @@ void FVTransport2P2C<TypeTag>::update(const Scalar t, Scalar& dt, double sumfactorout = 0; // run through all intersections with neighbors and boundary - for (const auto& intersection : Dune::intersections(problem().gridView(), element)) + for (const auto& intersection : intersections(problem().gridView(), element)) { int indexInInside = intersection.indexInInside(); @@ -1183,7 +1183,7 @@ void FVTransport2P2C<TypeTag>::updatedTargetDt_(Scalar &dt) dt = std::numeric_limits<Scalar>::max(); // update target time-step-sizes - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { #if HAVE_MPI if (element.partitionType() != Dune::InteriorEntity) @@ -1202,7 +1202,7 @@ void FVTransport2P2C<TypeTag>::updatedTargetDt_(Scalar &dt) FaceDt faceDt; // run through all intersections with neighbors and boundary - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { int indexInInside = intersection.indexInInside(); @@ -1264,7 +1264,7 @@ void FVTransport2P2C<TypeTag>::updatedTargetDt_(Scalar &dt) localDataI.faceTargetDt[it->first] += subCFLFactor_ * it->second; } - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { if (intersection.neighbor()) { diff --git a/dumux/porousmediumflow/2p2c/sequential/fvtransportmultiphysics.hh b/dumux/porousmediumflow/2p2c/sequential/fvtransportmultiphysics.hh index ac18ff0109..5a4c15dab6 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvtransportmultiphysics.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvtransportmultiphysics.hh @@ -142,7 +142,7 @@ void FVTransport2P2CMultiPhysics<TypeTag>::update(const Scalar t, Scalar& dt, Tr PhaseVector entries(0.), timestepFlux(0.); // compute update vector - for (const auto& element : Dune::elements(problem().gridView())) + for (const auto& element : elements(problem().gridView())) { // get cell infos int globalIdxI = problem().variables().index(element); @@ -155,7 +155,7 @@ void FVTransport2P2CMultiPhysics<TypeTag>::update(const Scalar t, Scalar& dt, Tr double sumfactorout = 0; // run through all intersections with neighbors and boundary - for (const auto& intersection : Dune::intersections(problem().gridView(), element)) + for (const auto& intersection : intersections(problem().gridView(), element)) { int indexInInside = intersection.indexInInside(); diff --git a/dumux/porousmediumflow/2pminc/implicit/model.hh b/dumux/porousmediumflow/2pminc/implicit/model.hh index 301b4497f4..0c0c1c9d5a 100644 --- a/dumux/porousmediumflow/2pminc/implicit/model.hh +++ b/dumux/porousmediumflow/2pminc/implicit/model.hh @@ -154,7 +154,7 @@ public: unsigned numElements = this->gridView_().size(0); ScalarField *rank = writer.allocateManagedBuffer(numElements); - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { int eIdx = this->elementMapper().index(element); (*rank)[eIdx] = this->gridView_().comm().rank(); diff --git a/dumux/porousmediumflow/2pnc/implicit/model.hh b/dumux/porousmediumflow/2pnc/implicit/model.hh index 7daf35faac..5adcc75331 100644 --- a/dumux/porousmediumflow/2pnc/implicit/model.hh +++ b/dumux/porousmediumflow/2pnc/implicit/model.hh @@ -166,7 +166,7 @@ public: setSwitched_(false); - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { if (!isBox) // i.e. cell-centered discretization { @@ -186,7 +186,7 @@ public: if (isBox) // i.e. vertex-centered discretization { - for (const auto& vertex : Dune::vertices(this->gridView_())) + for (const auto& vertex : vertices(this->gridView_())) { int dofIdxGlobal = this->dofMapper().index(vertex); const GlobalPosition &globalPos = vertex.geometry().corner(0); @@ -213,7 +213,7 @@ public: { storage = 0; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { @@ -343,7 +343,7 @@ public: VolumeVariables volVars; ElementVolumeVariables elemVolVars; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { int eIdxGlobal = this->problem_().elementMapper().index(element); (*rank)[eIdxGlobal] = this->gridView_().comm().rank(); @@ -510,7 +510,7 @@ public: FVElementGeometry fvGeometry; static VolumeVariables volVars; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { fvGeometry.update(this->gridView_(), element); for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) diff --git a/dumux/porousmediumflow/2pncmin/implicit/model.hh b/dumux/porousmediumflow/2pncmin/implicit/model.hh index 9649493ab9..9eb8121599 100644 --- a/dumux/porousmediumflow/2pncmin/implicit/model.hh +++ b/dumux/porousmediumflow/2pncmin/implicit/model.hh @@ -237,7 +237,7 @@ public: VolumeVariables volVars; ElementVolumeVariables elemVolVars; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { int idx = this->problem_().elementMapper().index(element); (*rank)[idx] = this->gridView_().comm().rank(); @@ -380,7 +380,7 @@ public: FVElementGeometry fvGeometry; static VolumeVariables volVars; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { fvGeometry.update(this->gridView_(), element); for (int i = 0; i < fvGeometry.numScv; ++i) diff --git a/dumux/porousmediumflow/3p/implicit/model.hh b/dumux/porousmediumflow/3p/implicit/model.hh index ac6cd11709..29975622d2 100644 --- a/dumux/porousmediumflow/3p/implicit/model.hh +++ b/dumux/porousmediumflow/3p/implicit/model.hh @@ -135,7 +135,7 @@ public: unsigned numElements = this->gridView_().size(0); ScalarField *rank = writer.allocateManagedBuffer (numElements); - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { diff --git a/dumux/porousmediumflow/3p3c/implicit/model.hh b/dumux/porousmediumflow/3p3c/implicit/model.hh index 6801ed9d4d..ba335420e8 100644 --- a/dumux/porousmediumflow/3p3c/implicit/model.hh +++ b/dumux/porousmediumflow/3p3c/implicit/model.hh @@ -155,7 +155,7 @@ public: if (isBox) { - for (const auto& vertex : Dune::vertices(this->gridView_())) + for (const auto& vertex : vertices(this->gridView_())) { int vIdxGlobal = this->dofMapper().index(vertex); @@ -173,7 +173,7 @@ public: } else { - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { int eIdxGlobal = this->dofMapper().index(element); const GlobalPosition &globalPos = element.geometry().center(); @@ -201,7 +201,7 @@ public: { storage = 0; - for (const auto& element : Dune::elements(this->gridView_())) { + for (const auto& element : elements(this->gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { this->localResidual().evalPhaseStorage(element, phaseIdx); @@ -321,7 +321,7 @@ public: unsigned numElements = this->gridView_().size(0); ScalarField *rank = writer.allocateManagedBuffer (numElements); - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { @@ -469,7 +469,7 @@ public: FVElementGeometry fvGeometry; static VolumeVariables volVars; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { fvGeometry.update(this->gridView_(), element); for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) diff --git a/dumux/porousmediumflow/co2/implicit/model.hh b/dumux/porousmediumflow/co2/implicit/model.hh index f4e5867e04..7994eb2b45 100644 --- a/dumux/porousmediumflow/co2/implicit/model.hh +++ b/dumux/porousmediumflow/co2/implicit/model.hh @@ -107,7 +107,7 @@ public: FVElementGeometry fvGeometry; static VolumeVariables volVars; - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { fvGeometry.update(this->gridView_(), element); diff --git a/dumux/porousmediumflow/implicit/velocityoutput.hh b/dumux/porousmediumflow/implicit/velocityoutput.hh index 3bbc8116a2..7e36ed451b 100644 --- a/dumux/porousmediumflow/implicit/velocityoutput.hh +++ b/dumux/porousmediumflow/implicit/velocityoutput.hh @@ -85,7 +85,7 @@ public: { cellNum_.assign(problem_.gridView().size(dofCodim), 0); - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { FVElementGeometry fvGeometry; fvGeometry.update(problem_.gridView(), element); @@ -213,7 +213,7 @@ public: std::vector<Scalar> scvfFluxes(element.subEntities(1), 0); int fIdxInner = 0; - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { int fIdx = intersection.indexInInside(); @@ -248,7 +248,7 @@ public: // Neumann conditions. if (element.hasBoundaryIntersections()) { - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { if (intersection.boundary()) { diff --git a/dumux/porousmediumflow/mpnc/implicit/model.hh b/dumux/porousmediumflow/mpnc/implicit/model.hh index e60daf5b2a..82575820fc 100644 --- a/dumux/porousmediumflow/mpnc/implicit/model.hh +++ b/dumux/porousmediumflow/mpnc/implicit/model.hh @@ -179,7 +179,7 @@ public: { phaseStorage = 0; - for (const auto& element : Dune::elements(this->gridView_())) { + for (const auto& element : elements(this->gridView_())) { this->localResidual().addPhaseStorage(phaseStorage, element, phaseIdx); } diff --git a/dumux/porousmediumflow/mpnc/implicit/modelkinetic.hh b/dumux/porousmediumflow/mpnc/implicit/modelkinetic.hh index 1351801017..79aad87daf 100644 --- a/dumux/porousmediumflow/mpnc/implicit/modelkinetic.hh +++ b/dumux/porousmediumflow/mpnc/implicit/modelkinetic.hh @@ -132,7 +132,7 @@ public: } // loop all elements - for (const auto& element : Dune::elements(this->gridView_())){ + for (const auto& element : elements(this->gridView_())){ //obtaining the elementVolumeVariables needed for the Fluxvariables FVElementGeometry fvGeometry; ElementVolumeVariables elemVolVars; @@ -193,7 +193,7 @@ public: // void checkPlausibility() const // { // // Looping over all elements of the domain -// for (const auto& element : Dune::elements(this->gridView_())) +// for (const auto& element : elements(this->gridView_())) // { // ElementVolumeVariables elemVolVars; // FVElementGeometry fvGeometry; diff --git a/dumux/porousmediumflow/mpnc/implicit/vtkwriter.hh b/dumux/porousmediumflow/mpnc/implicit/vtkwriter.hh index d8d43a0b71..9fd84683c1 100644 --- a/dumux/porousmediumflow/mpnc/implicit/vtkwriter.hh +++ b/dumux/porousmediumflow/mpnc/implicit/vtkwriter.hh @@ -75,7 +75,7 @@ public: ElementVolumeVariables elemVolVars; ElementBoundaryTypes elemBcTypes; - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { if(element.partitionType() == Dune::InteriorEntity) { diff --git a/dumux/porousmediumflow/nonisothermal/implicit/model.hh b/dumux/porousmediumflow/nonisothermal/implicit/model.hh index 318cbb4805..1372b4eba0 100644 --- a/dumux/porousmediumflow/nonisothermal/implicit/model.hh +++ b/dumux/porousmediumflow/nonisothermal/implicit/model.hh @@ -95,7 +95,7 @@ public: typedef Dune::BlockVector<Dune::FieldVector<double, 1> > ScalarField; ScalarField &temperature = *writer.allocateManagedBuffer(numDofs); - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { diff --git a/dumux/porousmediumflow/richards/implicit/model.hh b/dumux/porousmediumflow/richards/implicit/model.hh index 06ac8baf9e..92a7cc6826 100644 --- a/dumux/porousmediumflow/richards/implicit/model.hh +++ b/dumux/porousmediumflow/richards/implicit/model.hh @@ -174,7 +174,7 @@ public: unsigned numElements = this->gridView_().size(0); ScalarField *rank = writer.allocateManagedBuffer (numElements); - for (const auto& element : Dune::elements(this->gridView_())) + for (const auto& element : elements(this->gridView_())) { if(element.partitionType() == Dune::InteriorEntity) { diff --git a/dumux/porousmediumflow/richards/implicit/newtoncontroller.hh b/dumux/porousmediumflow/richards/implicit/newtoncontroller.hh index 6195d8a3f5..35e7c78841 100644 --- a/dumux/porousmediumflow/richards/implicit/newtoncontroller.hh +++ b/dumux/porousmediumflow/richards/implicit/newtoncontroller.hh @@ -91,7 +91,7 @@ public: // clamp saturation change to at most 20% per iteration FVElementGeometry fvGeometry; const GridView &gridView = this->problem_().gridView(); - for (const auto& element : Dune::elements(gridView)) { + for (const auto& element : elements(gridView)) { fvGeometry.update(gridView, element); for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) { diff --git a/dumux/porousmediumflow/sequential/cellcentered/pressure.hh b/dumux/porousmediumflow/sequential/cellcentered/pressure.hh index c8390eeb5d..afdec6a788 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/pressure.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/pressure.hh @@ -126,7 +126,7 @@ protected: //result in better convergence of the linear solver! void initializePressure() { - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { PrimaryVariables initValues; problem_.initial(initValues, element); @@ -340,7 +340,7 @@ template<class TypeTag> void FVPressure<TypeTag>::initializeMatrixRowSize() { // determine matrix row sizes - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int eIdxGlobalI = problem_.variables().index(element); @@ -349,7 +349,7 @@ void FVPressure<TypeTag>::initializeMatrixRowSize() int rowSize = 1; // run through all intersections with neighbors - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { if (intersection.neighbor()) rowSize++; @@ -363,7 +363,7 @@ template<class TypeTag> void FVPressure<TypeTag>::initializeMatrixIndices() { // determine position of matrix entries - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell index int eIdxGlobalI = problem_.variables().index(element); @@ -372,7 +372,7 @@ void FVPressure<TypeTag>::initializeMatrixIndices() A_.addindex(eIdxGlobalI, eIdxGlobalI); // run through all intersections with neighbors - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) if (intersection.neighbor()) { // access neighbor @@ -402,7 +402,7 @@ void FVPressure<TypeTag>::assemble(bool first) A_ = 0; f_ = 0; - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // get the global index of the cell int eIdxGlobalI = problem_.variables().index(element); @@ -421,7 +421,7 @@ void FVPressure<TypeTag>::assemble(bool first) /***** flux term ***********/ // iterate over all faces of the cell - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { /************* handle interior face *****************/ if (intersection.neighbor()) diff --git a/dumux/porousmediumflow/sequential/cellcentered/transport.hh b/dumux/porousmediumflow/sequential/cellcentered/transport.hh index a2a04311d5..054f0f1c9f 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/transport.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/transport.hh @@ -293,7 +293,7 @@ void FVTransport<TypeTag>::update(const Scalar t, Scalar& dt, TransportSolutionT updateVec = 0.0; // compute update vector - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { #if HAVE_MPI if (element.partitionType() != Dune::InteriorEntity) @@ -323,7 +323,7 @@ void FVTransport<TypeTag>::update(const Scalar t, Scalar& dt, TransportSolutionT } // run through all intersections with neighbors and boundary - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { GlobalPosition unitOuterNormal = intersection.centerUnitOuterNormal(); if (switchNormals_) @@ -446,7 +446,7 @@ void FVTransport<TypeTag>::updatedTargetDt_(Scalar &dt) dt = std::numeric_limits<Scalar>::max(); // update target time-step-sizes - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { #if HAVE_MPI if (element.partitionType() != Dune::InteriorEntity) @@ -465,7 +465,7 @@ void FVTransport<TypeTag>::updatedTargetDt_(Scalar &dt) FaceDt faceDt; // run through all intersections with neighbors and boundary - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { int indexInInside = intersection.indexInInside(); @@ -527,7 +527,7 @@ void FVTransport<TypeTag>::updatedTargetDt_(Scalar &dt) localDataI.faceTargetDt[it->first] += subCFLFactor_ * it->second; } - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { if (intersection.neighbor()) { diff --git a/dumux/porousmediumflow/sequential/cellcentered/velocity.hh b/dumux/porousmediumflow/sequential/cellcentered/velocity.hh index 6b1980cc0b..9d75b386f1 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/velocity.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/velocity.hh @@ -95,7 +95,7 @@ private: template<class TypeTag, class Velocity> void FVVelocity<TypeTag, Velocity>::calculateVelocity() { - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // cell information int globalIdxI = problem_.variables().index(element); @@ -103,7 +103,7 @@ void FVVelocity<TypeTag, Velocity>::calculateVelocity() /***** flux term ***********/ // iterate over all faces of the cell - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { /************* handle interior face *****************/ if (intersection.neighbor()) diff --git a/dumux/porousmediumflow/sequential/gridadapt.hh b/dumux/porousmediumflow/sequential/gridadapt.hh index f4a00947de..48f6e77c3b 100644 --- a/dumux/porousmediumflow/sequential/gridadapt.hh +++ b/dumux/porousmediumflow/sequential/gridadapt.hh @@ -210,7 +210,7 @@ public: CoarsenMarkerType coarsenMarker; const typename Grid::Traits::LocalIdSet& idSet(problem_.grid().localIdSet()); - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // only mark non-ghost elements if (element.partitionType() == Dune::GhostEntity) @@ -240,7 +240,7 @@ public: } } // coarsen - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // only mark non-ghost elements if (element.partitionType() == Dune::GhostEntity) @@ -257,7 +257,7 @@ public: { // check if coarsening is possible bool coarsenPossible = true; - for(const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for(const auto& intersection : intersections(problem_.gridView(), element)) { if(intersection.neighbor()) { @@ -356,7 +356,7 @@ private: bool checkNeighborsRefine_(const Element &entity, int level = 1) { // this also refines the neighbor elements - for(const auto& intersection : Dune::intersections(problem_.gridView(), entity)) + for(const auto& intersection : intersections(problem_.gridView(), entity)) { if(!intersection.neighbor()) continue; @@ -400,14 +400,14 @@ private: { // run through all cells done=true; - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // only mark non-ghost elements if (element.partitionType() == Dune::GhostEntity) continue; // run through all neighbor-cells (intersections) - for (const auto& intersection : Dune::intersections(leafGridView, element)) + for (const auto& intersection : intersections(leafGridView, element)) { if(!intersection.neighbor()) continue; diff --git a/dumux/porousmediumflow/sequential/gridadaptinitializationindicator.hh b/dumux/porousmediumflow/sequential/gridadaptinitializationindicator.hh index b5c7c30550..b12090fa6c 100644 --- a/dumux/porousmediumflow/sequential/gridadaptinitializationindicator.hh +++ b/dumux/porousmediumflow/sequential/gridadaptinitializationindicator.hh @@ -236,7 +236,7 @@ public: // 1) calculate Indicator -> min, maxvalues // Schleife über alle Leaf-Elemente - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { int globalIdxI = problem_.variables().index(element); @@ -268,7 +268,7 @@ public: if (indicatorVector_[globalIdxI] != refineCell && (refineAtDirichletBC_ || refineAtFluxBC_)) { // Berechne Verfeinerungsindikator an allen Zellen - for (const auto& intersection : Dune::intersections(problem_.gridView(), element)) + for (const auto& intersection : intersections(problem_.gridView(), element)) { if (intersection.boundary() && indicatorVector_[globalIdxI] != refineCell) { diff --git a/dumux/porousmediumflow/sequential/impetproblem.hh b/dumux/porousmediumflow/sequential/impetproblem.hh index 1b598046b1..aad34221fc 100644 --- a/dumux/porousmediumflow/sequential/impetproblem.hh +++ b/dumux/porousmediumflow/sequential/impetproblem.hh @@ -107,7 +107,7 @@ public: vtkOutputLevel_(-1) { // calculate the bounding box of the grid view - for (const auto& vertex : Dune::vertices(gridView)) { + for (const auto& vertex : vertices(gridView)) { for (int i=0; i<dim; i++) { bBoxMin_[i] = std::min(bBoxMin_[i], vertex.geometry().center()[i]); bBoxMax_[i] = std::max(bBoxMax_[i], vertex.geometry().center()[i]); diff --git a/dumux/porousmediumflow/sequential/onemodelproblem.hh b/dumux/porousmediumflow/sequential/onemodelproblem.hh index 980fe892ab..e8d8ca6338 100644 --- a/dumux/porousmediumflow/sequential/onemodelproblem.hh +++ b/dumux/porousmediumflow/sequential/onemodelproblem.hh @@ -97,7 +97,7 @@ public: outputTimeInterval_(0) { // calculate the bounding box of the grid view - for (const auto& vertex : Dune::vertices(gridView)) { + for (const auto& vertex : vertices(gridView)) { for (int i=0; i<dim; i++) { bBoxMin_[i] = std::min(bBoxMin_[i], vertex.geometry().center()[i]); bBoxMax_[i] = std::max(bBoxMax_[i], vertex.geometry().center()[i]); @@ -123,7 +123,7 @@ public: outputTimeInterval_(0) { // calculate the bounding box of the grid view - for (const auto& vertex : Dune::vertices(gridView)) { + for (const auto& vertex : vertices(gridView)) { for (int i=0; i<dim; i++) { bBoxMin_[i] = std::min(bBoxMin_[i], vertex.geometry().center()[i]); bBoxMax_[i] = std::max(bBoxMax_[i], vertex.geometry().center()[i]); diff --git a/dumux/porousmediumflow/sequential/variableclassadaptive.hh b/dumux/porousmediumflow/sequential/variableclassadaptive.hh index bc29bf7c19..77719ca79e 100644 --- a/dumux/porousmediumflow/sequential/variableclassadaptive.hh +++ b/dumux/porousmediumflow/sequential/variableclassadaptive.hh @@ -94,7 +94,7 @@ public: //get grid view on level grid LevelGridView levelView = grid_.levelGridView(level); - for (const auto& element : Dune::elements(levelView)) + for (const auto& element : elements(levelView)) { //get your map entry AdaptedValues &adaptedValues = adaptationMap_[element]; @@ -144,7 +144,7 @@ public: { LevelGridView levelView = grid_.levelGridView(level); - for (const auto& element : Dune::elements(levelView)) + for (const auto& element : elements(levelView)) { // only treat non-ghosts, ghost data is communicated afterwards if (element.partitionType() == Dune::GhostEntity) diff --git a/test/geomechanics/el2p/el2pproblem.hh b/test/geomechanics/el2p/el2pproblem.hh index 60f9365bd2..ea161cd420 100644 --- a/test/geomechanics/el2p/el2pproblem.hh +++ b/test/geomechanics/el2p/el2pproblem.hh @@ -276,7 +276,7 @@ public: void initializePressure() { - for(const auto& vertex : Dune::vertices(gridView_)) + for(const auto& vertex : vertices(gridView_)) { int vIdxGlobal = this->vertexMapper().index(vertex); GlobalPosition globalPos = vertex.geometry().corner(0); @@ -316,7 +316,7 @@ public: this->setInitializationRun(initializationRun_); std::cout<<"El2P_TestProblem: initialized pressure field copied to pInit_"<<std::endl; - for(const auto& vertex : Dune::vertices(gridView_)) + for(const auto& vertex : vertices(gridView_)) { int vIdxGlobal = this->vertexMapper().index(vertex); pInit_[vIdxGlobal] = -this->model().curSol().base()[vIdxGlobal*2][0]; @@ -789,7 +789,7 @@ public: valueSet = false; // loop over all vertices - for (const auto& vertex : Dune::vertices(gridView_)) + for (const auto& vertex : vertices(gridView_)) { // get global index of current vertex int vIdxGlobal = vertexMapper_.index(vertex); @@ -831,7 +831,7 @@ public: void setPressure(std::vector<Scalar> pInit) { std::cout << "InitialPressSat: setPressure function called" << std::endl; - for (const auto& vertex : Dune::vertices(gridView_)) + for (const auto& vertex : vertices(gridView_)) { int vIdxGlobal = vertexMapper_.index(vertex); pInit_[vIdxGlobal] = -pInit[vIdxGlobal]; diff --git a/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh b/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh index a322b57de6..b05808c40d 100644 --- a/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh +++ b/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh @@ -175,7 +175,7 @@ public: mdGrid.startSubDomainMarking(); // subdivide grid in two subdomains - for (const auto& element : Dune::elements(mdGrid.leafGridView())) + for (const auto& element : elements(mdGrid.leafGridView())) { // this is required for parallelization, checks if element is within a partition if (element.partitionType() != Dune::InteriorEntity) diff --git a/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh b/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh index e8bd4f59be..e30ffb212e 100644 --- a/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh +++ b/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh @@ -160,7 +160,7 @@ public: mdGrid.startSubDomainMarking(); // subdivide grid in two subdomains - for (const auto& element : Dune::elements(mdGrid.leafGridView())) + for (const auto& element : elements(mdGrid.leafGridView())) { // this is required for parallelization checks if element is within a partition if (element.partitionType() != Dune::InteriorEntity) diff --git a/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh b/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh index 257feded92..391d3a6933 100644 --- a/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh +++ b/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh @@ -174,7 +174,7 @@ public: mdGrid.startSubDomainMarking(); // subdivide grid in two subdomains - for (const auto& element : Dune::elements(mdGrid.leafGridView())) + for (const auto& element : elements(mdGrid.leafGridView())) { // this is required for parallelization, checks if element is within a partition if (element.partitionType() != Dune::InteriorEntity) diff --git a/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh b/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh index 9bb2b2b4ab..d5dea14c09 100644 --- a/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh +++ b/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh @@ -158,7 +158,7 @@ public: mdGrid.startSubDomainMarking(); // subdivide grid in two subdomains - for (const auto& element : Dune::elements(mdGrid.leafGridView())) + for (const auto& element : elements(mdGrid.leafGridView())) { // this is required for parallelization // checks if element is within a partition diff --git a/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh b/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh index a94981e1a7..68b8d07ffe 100644 --- a/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh +++ b/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh @@ -201,7 +201,7 @@ public: Scalar time = std::max(this->timeManager().time() + this->timeManager().timeStepSize(), 1e-10); - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { fvGeometry.update(this->gridView(), element); for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) diff --git a/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh b/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh index a2b29c5a4b..b62f5c8fe9 100644 --- a/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh +++ b/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh @@ -210,7 +210,7 @@ public: Scalar retardedFrontVelocity = darcyVelocity_*storageW/storageTotal/porosity; std::cout<<"retarded velocity: "<<retardedFrontVelocity<<std::endl; - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { fvGeometry.update(this->gridView(), element); for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) diff --git a/test/porousmediumflow/1p/sequential/resultevaluation.hh b/test/porousmediumflow/1p/sequential/resultevaluation.hh index e66922746b..c9c0afe339 100644 --- a/test/porousmediumflow/1p/sequential/resultevaluation.hh +++ b/test/porousmediumflow/1p/sequential/resultevaluation.hh @@ -98,7 +98,7 @@ public: double denominatorGrad = 0; double numeratorFlux = 0; double denominatorFlux = 0; - for (const auto& element : Dune::elements(gridView)) + for (const auto& element : elements(gridView)) { // element geometry const Geometry& geometry = element.geometry(); @@ -131,7 +131,7 @@ public: int isIdx = -1; Dune::FieldVector<Scalar,2*dim> fluxVector; Dune::FieldVector<Scalar,dim> exactGradient; - for (const auto& intersection : Dune::intersections(gridView, element)) + for (const auto& intersection : intersections(gridView, element)) { // local number of facet int fIdx = intersection.indexInInside(); diff --git a/test/porousmediumflow/1p/sequential/resultevaluation3d.hh b/test/porousmediumflow/1p/sequential/resultevaluation3d.hh index 5973d17959..606cb9b0a3 100644 --- a/test/porousmediumflow/1p/sequential/resultevaluation3d.hh +++ b/test/porousmediumflow/1p/sequential/resultevaluation3d.hh @@ -102,7 +102,7 @@ public: uMean = 0; double domainVolume = 0; - for (const auto& element : Dune::elements(gridview)) + for (const auto& element : elements(gridview)) { // get volume double volume = element.geometry().volume(); @@ -155,7 +155,7 @@ public: double numeratorFlux = 0; double denominatorFlux = 0; bool exactOutput = true; - for (const auto& element : Dune::elements(gridview)) + for (const auto& element : elements(gridview)) { // element geometry const Geometry& geometry = element.geometry(); @@ -205,7 +205,7 @@ public: int i = -1; Dune::FieldVector<ct,2*dim> fluxVector; Dune::FieldVector<ct,dim> exactGradient; - for (const auto& intersection : Dune::intersections(gridview, element)) + for (const auto& intersection : intersections(gridview, element)) { // local number of facet i = intersection.indexInInside(); @@ -460,7 +460,7 @@ public: double numeratorFluxIn = 0; double denominatorFluxIn = 0; bool exactOutput = true; - for (const auto& element : Dune::elements(gridView)) + for (const auto& element : elements(gridView)) { // element geometry const Geometry& geometry = element.geometry(); @@ -489,7 +489,7 @@ public: // calculate the relative error for inner cells bool bndCell = false; - for (const auto& intersection : Dune::intersections(gridView, element)) + for (const auto& intersection : intersections(gridView, element)) { if (intersection.boundary()) { @@ -527,7 +527,7 @@ public: int isIdx = -1; Dune::FieldVector<Scalar,2*dim> fluxVector; Dune::FieldVector<Scalar,dim> exactGradient; - for (const auto& intersection : Dune::intersections(gridView, element)) + for (const auto& intersection : intersections(gridView, element)) { // local number of facet int fIdx = intersection.indexInInside(); @@ -713,7 +713,7 @@ public: Scalar maxFlux = -1; Scalar numerator = 0; Scalar denominator = 0; - for (const auto& element : Dune::elements(gridView)) + for (const auto& element : elements(gridView)) { // element geometry const Geometry& geometry = element.geometry(); @@ -748,7 +748,7 @@ public: int i = -1; Dune::FieldVector<Scalar,dim> exactGradient; - for (const auto& intersection : Dune::intersections(gridView, element)) + for (const auto& intersection : intersections(gridView, element)) { // get geometry type of face Dune::GeometryType gtf = intersection.geometryInInside().type(); diff --git a/test/porousmediumflow/1p/sequential/test_1pspatialparams.hh b/test/porousmediumflow/1p/sequential/test_1pspatialparams.hh index 8c6c35390b..a4ab72f60b 100644 --- a/test/porousmediumflow/1p/sequential/test_1pspatialparams.hh +++ b/test/porousmediumflow/1p/sequential/test_1pspatialparams.hh @@ -67,7 +67,7 @@ public: delta_ = delta; permeability_.resize(gridView_.size(0)); - for(const auto& element : Dune::elements(gridView_)) + for(const auto& element : elements(gridView_)) { setPermeability_(permeability_[indexSet_.index(element)], element.geometry().center()); } diff --git a/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh b/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh index 2674490eff..e7bf53dec0 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh +++ b/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh @@ -219,7 +219,7 @@ public: { ScalarSolution *exactPressure = this->resultWriter().allocateManagedBuffer(this->gridView().size(0)); - for(const auto& element : Dune::elements(this->gridView())) + for(const auto& element : elements(this->gridView())) { (*exactPressure)[this->elementMapper().index(element)][0] = exact(element.geometry().center()); } diff --git a/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh b/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh index 8ed21af052..54d652ce36 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh +++ b/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh @@ -171,7 +171,7 @@ public: { ScalarSolution *exactPressure = this->resultWriter().allocateManagedBuffer(this->gridView().size(0)); - for(const auto& element : Dune::elements(this->gridView())) + for(const auto& element : elements(this->gridView())) { (*exactPressure)[this->elementMapper().index(element)][0] = exact(element.geometry().center()); } diff --git a/test/porousmediumflow/1p/sequential/test_diffusionspatialparams.hh b/test/porousmediumflow/1p/sequential/test_diffusionspatialparams.hh index aff66dfd9e..0e4345b730 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusionspatialparams.hh +++ b/test/porousmediumflow/1p/sequential/test_diffusionspatialparams.hh @@ -104,7 +104,7 @@ public: delta_ = delta; permeability_.resize(gridView_.size(0)); - for(const auto& element : Dune::elements(gridView_)) + for(const auto& element : elements(gridView_)) { perm(permeability_[indexSet_.index(element)], element.geometry().center()); } @@ -118,7 +118,7 @@ public: ScalarSolution *permXY = writer.allocateManagedBuffer(gridView_.size(0)); ScalarSolution *permYY = writer.allocateManagedBuffer(gridView_.size(0)); - for(const auto& element : Dune::elements(gridView_)) + for(const auto& element : elements(gridView_)) { int eIdxGlobal = indexSet_.index(element); (*permXX)[eIdxGlobal][0] = permeability_[eIdxGlobal][0][0]; diff --git a/test/porousmediumflow/1p2c/implicit/1p2cniconductionproblem.hh b/test/porousmediumflow/1p2c/implicit/1p2cniconductionproblem.hh index 410c452d5a..7afc484701 100644 --- a/test/porousmediumflow/1p2c/implicit/1p2cniconductionproblem.hh +++ b/test/porousmediumflow/1p2c/implicit/1p2cniconductionproblem.hh @@ -215,7 +215,7 @@ public: Scalar time = std::max(this->timeManager().time() + this->timeManager().timeStepSize(), 1e-10); - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { fvGeometry.update(this->gridView(), element); for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) diff --git a/test/porousmediumflow/1p2c/implicit/1p2cniconvectionproblem.hh b/test/porousmediumflow/1p2c/implicit/1p2cniconvectionproblem.hh index c73de2d7b5..c0d753713e 100644 --- a/test/porousmediumflow/1p2c/implicit/1p2cniconvectionproblem.hh +++ b/test/porousmediumflow/1p2c/implicit/1p2cniconvectionproblem.hh @@ -219,7 +219,7 @@ public: Scalar retardedFrontVelocity = darcyVelocity_*storageW/storageTotal/porosity; std::cout<<"retarded velocity: "<<retardedFrontVelocity<<std::endl; - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { fvGeometry.update(this->gridView(), element); for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) diff --git a/test/porousmediumflow/2p/implicit/cc2pcornerpointproblem.hh b/test/porousmediumflow/2p/implicit/cc2pcornerpointproblem.hh index 6cd8eefd64..b69a6f0fd3 100644 --- a/test/porousmediumflow/2p/implicit/cc2pcornerpointproblem.hh +++ b/test/porousmediumflow/2p/implicit/cc2pcornerpointproblem.hh @@ -313,7 +313,7 @@ public: ScalarField *permX = this->resultWriter().allocateManagedBuffer(numElements); ScalarField *permZ = this->resultWriter().allocateManagedBuffer(numElements); - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { FVElementGeometry fvGeometry; fvGeometry.update(this->gridView(), element); diff --git a/test/porousmediumflow/2p/sequential/buckleyleverettanalyticsolution.hh b/test/porousmediumflow/2p/sequential/buckleyleverettanalyticsolution.hh index 905242001e..c96947d06d 100644 --- a/test/porousmediumflow/2p/sequential/buckleyleverettanalyticsolution.hh +++ b/test/porousmediumflow/2p/sequential/buckleyleverettanalyticsolution.hh @@ -195,7 +195,7 @@ private: Scalar globalVolume = 0; Scalar errorNorm = 0.0; - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // get entity int index = problem_.variables().index(element); @@ -237,7 +237,7 @@ private: Scalar xMax = frontParams_[0].second * time; // iterate over vertices and get analytic saturation solution - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // get global coordinate of cell center GlobalPosition globalPos = element.geometry().center(); diff --git a/test/porousmediumflow/2p/sequential/mcwhorteranalyticsolution.hh b/test/porousmediumflow/2p/sequential/mcwhorteranalyticsolution.hh index 7d34eb4742..bb59894484 100644 --- a/test/porousmediumflow/2p/sequential/mcwhorteranalyticsolution.hh +++ b/test/porousmediumflow/2p/sequential/mcwhorteranalyticsolution.hh @@ -94,7 +94,7 @@ private: Scalar globalVolume = 0; Scalar errorNorm = 0.0; - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // get entity int index = problem_.variables().index(element); @@ -299,7 +299,7 @@ private: // std::cout<<" xf_ = "<<xf_<<std::endl; // iterate over vertices and get analytical saturation solution - for (const auto& element : Dune::elements(problem_.gridView())) + for (const auto& element : elements(problem_.gridView())) { // get global coordinate of cell center const GlobalPosition& globalPos = element.geometry().center(); diff --git a/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh b/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh index 0b19a2275d..8b3316d62a 100644 --- a/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh @@ -194,7 +194,7 @@ ParentType(timeManager, gridView), inflowEdge_(0), outflowEdge_(0) Scalar maxDist = this->bBoxMin().two_norm(); // calculate the bounding box of the grid view - for (const auto& vertex : Dune::vertices(gridView)) { + for (const auto& vertex : vertices(gridView)) { GlobalPosition vertexCoord(vertex.geometry().center()); Scalar dist = vertexCoord.two_norm(); diff --git a/test/porousmediumflow/2p/sequential/test_transportproblem.hh b/test/porousmediumflow/2p/sequential/test_transportproblem.hh index c88bb8a2dd..b6b4bb3438 100644 --- a/test/porousmediumflow/2p/sequential/test_transportproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_transportproblem.hh @@ -137,7 +137,7 @@ public: vel[0] = 1e-5; // compute update vector - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { // cell index int eIdxGlobal = this->elementMapper().index(element); @@ -145,7 +145,7 @@ public: CellData& cellData = this->variables().cellData(eIdxGlobal); // run through all intersections with neighbors and boundary - for (const auto& intersection : Dune::intersections(this->gridView(), element)) + for (const auto& intersection : intersections(this->gridView(), element)) { // local number of facet int indexInInside = intersection.indexInInside(); diff --git a/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh b/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh index 11189632d5..a06a097eb0 100644 --- a/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh +++ b/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh @@ -322,7 +322,7 @@ public: ScalarField *reactionSourceH2O = this->resultWriter().allocateManagedBuffer (numDofs); ScalarField *reactionSourceO2 = this->resultWriter().allocateManagedBuffer (numDofs); - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { FVElementGeometry fvGeometry; fvGeometry.update(this->gridView(), element); diff --git a/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh b/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh index 73fc8efef0..549b535f10 100644 --- a/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh +++ b/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh @@ -204,7 +204,7 @@ public: Scalar time = std::max(this->timeManager().time() + this->timeManager().timeStepSize(), 1e-10); - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { fvGeometry.update(this->gridView(), element); for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) diff --git a/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh b/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh index e4ca5e69f2..90ce0bdc11 100644 --- a/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh +++ b/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh @@ -210,7 +210,7 @@ public: Scalar retardedFrontVelocity = darcyVelocity_*storageW/storageTotal/porosity; std::cout<<"retarded velocity: "<<retardedFrontVelocity<<std::endl; - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { fvGeometry.update(this->gridView(), element); for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) diff --git a/test/porousmediumflow/3p3c/implicit/columnxylolproblem.hh b/test/porousmediumflow/3p3c/implicit/columnxylolproblem.hh index c69b26b143..1184695241 100644 --- a/test/porousmediumflow/3p3c/implicit/columnxylolproblem.hh +++ b/test/porousmediumflow/3p3c/implicit/columnxylolproblem.hh @@ -292,7 +292,7 @@ public: FVElementGeometry fvGeometry; - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { fvGeometry.update(this->gridView(), element); diff --git a/test/porousmediumflow/3p3c/implicit/infiltrationproblem.hh b/test/porousmediumflow/3p3c/implicit/infiltrationproblem.hh index 35ea253fb0..6c94ee7d5d 100644 --- a/test/porousmediumflow/3p3c/implicit/infiltrationproblem.hh +++ b/test/porousmediumflow/3p3c/implicit/infiltrationproblem.hh @@ -351,7 +351,7 @@ public: FVElementGeometry fvGeometry; - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { fvGeometry.update(this->gridView(), element); diff --git a/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh b/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh index 0e7e14ad4a..693121d4bb 100644 --- a/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh +++ b/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh @@ -299,7 +299,7 @@ public: FVElementGeometry fvGeometry; - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { fvGeometry.update(this->gridView(), element); diff --git a/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh b/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh index 5f6df5ba8d..04130b70c0 100644 --- a/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh +++ b/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh @@ -264,7 +264,7 @@ public: FVElementGeometry fvGeometry; VolumeVariables volVars; - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { int eIdx = this->elementMapper().index(element); (*rank)[eIdx] = this->gridView().comm().rank(); diff --git a/test/porousmediumflow/co2/implicit/heterogeneousproblemni.hh b/test/porousmediumflow/co2/implicit/heterogeneousproblemni.hh index 2938672092..6d10e33efd 100644 --- a/test/porousmediumflow/co2/implicit/heterogeneousproblemni.hh +++ b/test/porousmediumflow/co2/implicit/heterogeneousproblemni.hh @@ -271,7 +271,7 @@ public: FVElementGeometry fvGeometry; VolumeVariables volVars; - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { int eIdx = this->elementMapper().index(element); (*rank)[eIdx] = this->gridView().comm().rank(); diff --git a/test/porousmediumflow/co2/implicit/heterogeneousspatialparameters.hh b/test/porousmediumflow/co2/implicit/heterogeneousspatialparameters.hh index 13d0684209..88cb7c3435 100644 --- a/test/porousmediumflow/co2/implicit/heterogeneousspatialparameters.hh +++ b/test/porousmediumflow/co2/implicit/heterogeneousspatialparameters.hh @@ -135,7 +135,7 @@ public: int numElements = gridView_.size(0); paramIdx_.resize(numElements); - for (const auto& element : Dune::elements(gridView_)) + for (const auto& element : elements(gridView_)) { int eIdx = gridView_.indexSet().index(element); int param = GridCreator::parameters(element)[0]; diff --git a/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh b/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh index 81a1a6e9ab..06da3f3ddb 100644 --- a/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh +++ b/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh @@ -342,7 +342,7 @@ public: Scalar l2analytic = 0.0; const Scalar time = this->timeManager().time() + this->timeManager().timeStepSize(); - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { // value from numerical approximation Scalar numericalSolution = diff --git a/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh b/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh index 7ae220530d..df706668e0 100644 --- a/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh +++ b/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh @@ -187,7 +187,7 @@ public: firstElement, fvGeometry, 0); Scalar time = std::max(this->timeManager().time() + this->timeManager().timeStepSize(), 1e-10); - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { fvGeometry.update(this->gridView(), element); for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) diff --git a/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh b/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh index 7548de4ba4..c9b66a728f 100644 --- a/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh +++ b/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh @@ -198,7 +198,7 @@ public: Scalar retardedFrontVelocity = darcyVelocity_*storageW/storageTotal/porosity; std::cout<<"retarded velocity: "<<retardedFrontVelocity<<std::endl; - for (const auto& element : Dune::elements(this->gridView())) + for (const auto& element : elements(this->gridView())) { fvGeometry.update(this->gridView(), element); for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) -- GitLab