From 5564eb8bbc186d0d346fdfa27815476aac964192 Mon Sep 17 00:00:00 2001 From: Bernd Flemisch <bernd@iws.uni-stuttgart.de> Date: Fri, 16 Oct 2015 10:40:38 +0200 Subject: [PATCH] [range-for] remove unused iterator typedefs, clean up comments --- dumux/decoupled/2p/diffusion/fv/fvvelocity2padaptive.hh | 2 +- .../2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2p.hh | 8 ++++---- .../fvmpfa/lmethod/fvmpfal2dpressure2padaptive.hh | 8 ++++---- .../fvmpfa/lmethod/fvmpfal2dpressurevelocity2p.hh | 1 - .../fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh | 1 - .../fvmpfa/lmethod/fvmpfal2dvelocity2padaptive.hh | 3 --- .../2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh | 4 ++-- .../fvmpfa/lmethod/fvmpfal3dpressure2padaptive.hh | 4 ++-- .../fvmpfa/lmethod/fvmpfal3dpressurevelocity2p.hh | 1 - .../fvmpfa/lmethod/fvmpfal3dpressurevelocity2padaptive.hh | 1 - .../fvmpfa/lmethod/fvmpfal3dvelocity2padaptive.hh | 1 - .../2p/diffusion/fvmpfa/omethod/fvmpfao2dpressure2p.hh | 8 ++++---- dumux/decoupled/2p/diffusion/mimetic/mimetic2padaptive.hh | 4 +--- .../fvmpfal3d2p2cinteractionvolumecontaineradaptive.hh | 2 -- dumux/freeflow/stokesnc/stokesnclocalresidual.hh | 1 - dumux/implicit/cornerpoint/cpfvelementgeometry.hh | 1 - dumux/implicit/richards/richardsnewtoncontroller.hh | 1 - test/decoupled/1p/resultevaluation3d.hh | 2 -- test/geomechanics/el2p/el2pproblem.hh | 3 --- test/implicit/2pncmin/dissolutionspatialparams.hh | 2 -- test/implicit/mpnc/combustionproblem1c.hh | 1 - test/implicit/richards/richardslensproblem.hh | 1 - 22 files changed, 18 insertions(+), 42 deletions(-) diff --git a/dumux/decoupled/2p/diffusion/fv/fvvelocity2padaptive.hh b/dumux/decoupled/2p/diffusion/fv/fvvelocity2padaptive.hh index 12fe7379da..ec77a08f74 100644 --- a/dumux/decoupled/2p/diffusion/fv/fvvelocity2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/fv/fvvelocity2padaptive.hh @@ -204,7 +204,7 @@ void FVVelocity2PAdaptive<TypeTag>::calculateVelocity(const Intersection& inters // We are looking for two things: // IsIndexJ, the index of the interface from the neighbor-cell point of view // GlobalIdxK, the index of the third cell - // for efficienty this is done in one IntersectionIterator-Loop + // for efficienty this is done in one intersection loop // Intersectioniterator around cell I for (const auto& intersectionI : Dune::intersections(problem_.gridView(), elementI)) diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2p.hh index f1b092120c..d8d6380a68 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2p.hh @@ -614,12 +614,12 @@ void FvMpfaL2dPressure2p<TypeTag>::initializeMatrix() } } } - } // end of 'for' IntersectionIterator + } // end of intersection loop // set number of indices in row eIdxGlobalI to rowSize this->A_.setrowsize(eIdxGlobalI, rowSize); - } // end of 'for' ElementIterator + } // end of element loop // indicate that size of all rows is defined this->A_.endrowsizes(); @@ -671,8 +671,8 @@ void FvMpfaL2dPressure2p<TypeTag>::initializeMatrix() } } } - } // end of 'for' IntersectionIterator - } // end of 'for' ElementIterator + } // end of intersection loop + } // end of element loop // indicate that all indices are defined, check consistency this->A_.endindices(); diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2padaptive.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2padaptive.hh index 6438d6d080..07246af66a 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2padaptive.hh @@ -634,14 +634,14 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::initializeMatrix() } } - } // end of 'for' IntersectionIterator + } // end of intersection loop rowSize = std::min(rowSize, 13); //in 2-D // set number of indices in row eIdxGlobalI to rowSize this->A_.setrowsize(eIdxGlobalI, rowSize); - } // end of 'for' ElementIterator + } // end of element loop // indicate that size of all rows is defined this->A_.endrowsizes(); @@ -725,8 +725,8 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::initializeMatrix() } } } - } // end of 'for' IntersectionIterator - } // end of 'for' ElementIterator + } // end of intersection loop + } // end of element loop // indicate that all indices are defined, check consistency this->A_.endindices(); diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2p.hh index ce27be11c4..9f1eb3622c 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2p.hh @@ -73,7 +73,6 @@ template<class TypeTag> class FvMpfaL2dPressureVelocity2p: public FvMpfaL2dPress typedef typename GET_PROP_TYPE(TypeTag, FluidState) FluidState; typedef typename GridView::IndexSet IndexSet; - typedef typename GridView::IntersectionIterator IntersectionIterator; typedef typename GridView::Intersection Intersection; typedef typename ParentType::InteractionVolume InteractionVolume; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh index 802c20f849..efcc16d862 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh @@ -76,7 +76,6 @@ template<class TypeTag> class FvMpfaL2dPressureVelocity2pAdaptive: public FvMpfa typedef typename GridView::Grid Grid; typedef typename GridView::IndexSet IndexSet; - typedef typename GridView::IntersectionIterator IntersectionIterator; typedef typename GridView::Intersection Intersection; typedef typename Grid::template Codim<0>::Entity::Geometry Geometry; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dvelocity2padaptive.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dvelocity2padaptive.hh index b01058d450..9f6123ed8c 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dvelocity2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dvelocity2padaptive.hh @@ -80,9 +80,6 @@ template<class TypeTag> class FvMpfaL2dVelocity2pAdaptive : public FvMpfaL2dVelo typedef typename GridView::Traits::template Codim<0>::Entity Element; typedef typename GridView::Grid Grid; typedef typename GridView::IndexSet IndexSet; - typedef typename GridView::template Codim<0>::Iterator ElementIterator; - typedef typename GridView::template Codim<dim>::Iterator VertexIterator; - typedef typename GridView::IntersectionIterator IntersectionIterator; typedef typename Element::Geometry Geometry; typedef typename Geometry::JacobianTransposed JacobianTransposed; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh index 98fdcc42f0..0a018a22be 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh @@ -576,7 +576,7 @@ void FvMpfaL3dPressure2p<TypeTag>::initializeMatrixRowSize() } this->A_.setrowsize(eIdxGlobalI, neighborIndices.size()); - } // end of 'for' ElementIterator + } // end of element loop return; } @@ -611,7 +611,7 @@ void FvMpfaL3dPressure2p<TypeTag>::initializeMatrixIndices() } } } - } // end of 'for' ElementIterator + } // end of element loop return; } diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2padaptive.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2padaptive.hh index 15298b0af3..24aed8b55b 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2padaptive.hh @@ -356,7 +356,7 @@ void FvMpfaL3dPressure2pAdaptive<TypeTag>::initializeMatrixRowSize() } this->A_.setrowsize(globalIdxI, neighborIndices.size()); - } // end of 'for' ElementIterator + } // end of element loop return; } @@ -403,7 +403,7 @@ void FvMpfaL3dPressure2pAdaptive<TypeTag>::initializeMatrixIndices() } } } - } // end of 'for' ElementIterator + } // end of element loop return; } diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2p.hh index 9d72c4c505..4dfdf48ec6 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2p.hh @@ -83,7 +83,6 @@ template<class TypeTag> class FvMpfaL3dPressureVelocity2p: public FvMpfaL3dPress typedef typename Dune::ReferenceElement<Scalar, dim> ReferenceElement; typedef typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolume) InteractionVolume; - typedef typename GridView::IntersectionIterator IntersectionIterator; typedef typename GridView::Intersection Intersection; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2padaptive.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2padaptive.hh index 78c8d10016..6072966175 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2padaptive.hh @@ -84,7 +84,6 @@ template<class TypeTag> class FvMpfaL3dPressureVelocity2pAdaptive: public FvMpfa typedef typename Dune::ReferenceElement<Scalar, dim> ReferenceElement; typedef typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolume) InteractionVolume; - typedef typename GridView::IntersectionIterator IntersectionIterator; typedef typename GridView::Intersection Intersection; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2padaptive.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2padaptive.hh index f2b92037f8..2c0c116ee1 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2padaptive.hh @@ -84,7 +84,6 @@ template<class TypeTag> class FvMpfaL3dVelocity2pAdaptive: public FvMpfaL3dVeloc typedef typename GridView::Traits::template Codim<0>::Entity Element; typedef typename GridView::Grid Grid; typedef typename GridView::IndexSet IndexSet; - typedef typename GridView::IntersectionIterator IntersectionIterator; typedef typename GET_PROP_TYPE(TypeTag, GridTypeIndices) GridTypeIndices; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressure2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressure2p.hh index 50932d1672..d72bc0e982 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressure2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressure2p.hh @@ -591,12 +591,12 @@ void FvMpfaO2dPressure2p<TypeTag>::initializeMatrix() } } } - } // end of 'for' IntersectionIterator + } // end of intersection loop // set number of indices in row eIdxGlobalI to rowSize this->A_.setrowsize(eIdxGlobalI, rowSize); - } // end of 'for' ElementIterator + } // end of element loop // indicate that size of all rows is defined this->A_.endrowsizes(); @@ -648,8 +648,8 @@ void FvMpfaO2dPressure2p<TypeTag>::initializeMatrix() } } } - } // end of 'for' IntersectionIterator - } // end of 'for' ElementIterator + } // end of intersection loop + } // end of element loop // indicate that all indices are defined, check consistency this->A_.endindices(); diff --git a/dumux/decoupled/2p/diffusion/mimetic/mimetic2padaptive.hh b/dumux/decoupled/2p/diffusion/mimetic/mimetic2padaptive.hh index 5bec7b3bd3..0d8939673a 100644 --- a/dumux/decoupled/2p/diffusion/mimetic/mimetic2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/mimetic/mimetic2padaptive.hh @@ -733,9 +733,7 @@ void MimeticTwoPLocalStiffnessAdaptive<TypeTag>::assembleElementMatrices(const E template<class TypeTag> void MimeticTwoPLocalStiffnessAdaptive<TypeTag>::assembleBC(const Element& element, int k) { - // evaluate boundary conditions via intersection iterator - typedef typename GridView::IntersectionIterator IntersectionIterator; - + // evaluate boundary conditions via an intersection loop unsigned int faceIndex = 0; for (const auto& intersection : Dune::intersections(gridView_, element)) { diff --git a/dumux/decoupled/2p2c/fvmpfal3d2p2cinteractionvolumecontaineradaptive.hh b/dumux/decoupled/2p2c/fvmpfal3d2p2cinteractionvolumecontaineradaptive.hh index 45ad926ab9..6da5fb6230 100644 --- a/dumux/decoupled/2p2c/fvmpfal3d2p2cinteractionvolumecontaineradaptive.hh +++ b/dumux/decoupled/2p2c/fvmpfal3d2p2cinteractionvolumecontaineradaptive.hh @@ -68,9 +68,7 @@ class FvMpfaL3d2P2CInteractionVolumeContainerAdaptive : public FvMpfaL3dInteract typedef typename GridView::Traits::template Codim<0>::Entity Element; typedef typename Element::Geometry ElementGeometry; - typedef typename GridView::template Codim<0>::Iterator ElementIterator; typedef typename GridView::Traits::template Codim<dim>::Entity Vertex; - typedef typename GridView::template Codim<dim>::Iterator VertexIterator; typedef typename GridView::IntersectionIterator IntersectionIterator; typedef typename GridView::Intersection Intersection; diff --git a/dumux/freeflow/stokesnc/stokesnclocalresidual.hh b/dumux/freeflow/stokesnc/stokesnclocalresidual.hh index 8385687c8d..a766f08311 100644 --- a/dumux/freeflow/stokesnc/stokesnclocalresidual.hh +++ b/dumux/freeflow/stokesnc/stokesnclocalresidual.hh @@ -77,7 +77,6 @@ class StokesncLocalResidual : public StokesLocalResidual<TypeTag> typedef Dune::FieldVector<Scalar, dim> DimVector; typedef typename GridView::Intersection Intersection; - typedef typename GridView::IntersectionIterator IntersectionIterator; typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; static const bool calculateNavierStokes = GET_PROP_VALUE(TypeTag, EnableNavierStokes); diff --git a/dumux/implicit/cornerpoint/cpfvelementgeometry.hh b/dumux/implicit/cornerpoint/cpfvelementgeometry.hh index cff8a81644..101a539659 100644 --- a/dumux/implicit/cornerpoint/cpfvelementgeometry.hh +++ b/dumux/implicit/cornerpoint/cpfvelementgeometry.hh @@ -58,7 +58,6 @@ class CpFVElementGeometry typedef typename Element::Geometry Geometry; typedef Dune::FieldVector<CoordScalar,dimWorld> GlobalPosition; typedef Dune::FieldVector<CoordScalar,dim> LocalPosition; - typedef typename GridView::IntersectionIterator IntersectionIterator; public: struct SubControlVolume //! FV intersected with element diff --git a/dumux/implicit/richards/richardsnewtoncontroller.hh b/dumux/implicit/richards/richardsnewtoncontroller.hh index 67f17a84e0..e4aa3b4756 100644 --- a/dumux/implicit/richards/richardsnewtoncontroller.hh +++ b/dumux/implicit/richards/richardsnewtoncontroller.hh @@ -52,7 +52,6 @@ class RichardsNewtonController : public NewtonController<TypeTag> enum { pwIdx = Indices::pwIdx }; typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GridView::template Codim<0>::Iterator ElementIterator; enum { dim = GridView::dimension }; enum { isBox = GET_PROP_VALUE(TypeTag, ImplicitIsBox) }; enum { dofCodim = isBox ? dim : 0 }; diff --git a/test/decoupled/1p/resultevaluation3d.hh b/test/decoupled/1p/resultevaluation3d.hh index e80d92d3ca..7efbf3ac61 100644 --- a/test/decoupled/1p/resultevaluation3d.hh +++ b/test/decoupled/1p/resultevaluation3d.hh @@ -698,8 +698,6 @@ public: enum {dim=Grid::dimension, maxIntersections = 12}; typedef typename Grid::template Codim<0>::Entity Element; typedef typename Element::Geometry Geometry; - typedef typename GridView::template Codim<0>::Iterator ElementIterator; - typedef typename GridView::IntersectionIterator IntersectionIterator; typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout> ElementMapper; typedef typename Dune::ReferenceElements<Scalar, dim> ReferenceElements; typedef typename Dune::ReferenceElements<Scalar, dim-1> ReferenceFaces; diff --git a/test/geomechanics/el2p/el2pproblem.hh b/test/geomechanics/el2p/el2pproblem.hh index ba961971a8..efca6ef232 100644 --- a/test/geomechanics/el2p/el2pproblem.hh +++ b/test/geomechanics/el2p/el2pproblem.hh @@ -804,9 +804,6 @@ public: typedef typename Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGVertexLayout> VertexMapper; - typedef typename GridView::template Codim<GridView::dimension>::Iterator - VertexIterator; - /*! * \brief The constructor * diff --git a/test/implicit/2pncmin/dissolutionspatialparams.hh b/test/implicit/2pncmin/dissolutionspatialparams.hh index 97a1883dff..7a35bd0646 100644 --- a/test/implicit/2pncmin/dissolutionspatialparams.hh +++ b/test/implicit/2pncmin/dissolutionspatialparams.hh @@ -89,11 +89,9 @@ class DissolutionSpatialparams : public ImplicitSpatialParams<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GridView::template Codim<dim>::Iterator VertexIterator; typedef std::vector<Scalar> PermeabilityType; typedef std::vector<MaterialLawParams> MaterialLawParamsVector; - typedef typename GridView::template Codim<0>::Iterator ElementIterator; typedef typename GET_PROP(TypeTag, ParameterTree) ParameterTree; diff --git a/test/implicit/mpnc/combustionproblem1c.hh b/test/implicit/mpnc/combustionproblem1c.hh index c8cc5e5601..2f6083efc3 100644 --- a/test/implicit/mpnc/combustionproblem1c.hh +++ b/test/implicit/mpnc/combustionproblem1c.hh @@ -219,7 +219,6 @@ class CombustionProblemOneComponent: public ImplicitPorousMediaProblem<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - typedef typename GridView::template Codim<0>::Iterator ElementIterator; typedef typename GET_PROP_TYPE(TypeTag, ElementBoundaryTypes) ElementBoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables; diff --git a/test/implicit/richards/richardslensproblem.hh b/test/implicit/richards/richardslensproblem.hh index 32d68d8b06..cbd9a2405f 100644 --- a/test/implicit/richards/richardslensproblem.hh +++ b/test/implicit/richards/richardslensproblem.hh @@ -123,7 +123,6 @@ class RichardsLensProblem : public RichardsProblem<TypeTag> dimWorld = GridView::dimensionworld }; - typedef typename GridView::template Codim<0>::Iterator ElementIterator; typedef typename GridView::template Codim<0>::Entity Element; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; static const bool useHead = GET_PROP_VALUE(TypeTag, UseHead); -- GitLab