Commit 7daf9226 authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[discretization] use index traits class to obtain indices

parent 4ba29c1c
......@@ -27,6 +27,7 @@
#include <dune/grid/common/mcmgmapper.hh>
#include <dumux/common/entitymap.hh>
#include <dumux/common/indextraits.hh>
#include <dumux/common/geometry/boundingboxtree.hh>
#include <dumux/common/geometry/geometricentityset.hh>
......@@ -52,7 +53,7 @@ class BaseFVGridGeometry
static constexpr int dim = GV::dimension;
static constexpr int dimWorld = GV::dimensionworld;
using IndexType = typename GV::IndexSet::IndexType;
using GridIndexType = typename IndexTraits<GV>::GridIndex;
using Element = typename GV::template Codim<0>::Entity;
using SubControlVolume = typename Traits::SubControlVolume;
......@@ -161,7 +162,7 @@ public:
{ return elementMap()[scv.elementIndex()]; }
//! Get an element from a global element index
Element element(IndexType eIdx) const
Element element(GridIndexType eIdx) const
{ return elementMap()[eIdx]; }
/*!
......
......@@ -29,6 +29,7 @@
#include <dune/geometry/referenceelements.hh>
#include <dune/localfunctions/lagrange/pqkfactory.hh>
#include <dumux/common/indextraits.hh>
#include <dumux/discretization/scvandscvfiterators.hh>
#include <dumux/discretization/box/boxgeometryhelper.hh>
......@@ -52,7 +53,8 @@ class BoxFVElementGeometry<GG, true>
using GridView = typename GG::GridView;
static constexpr int dim = GridView::dimension;
static constexpr int dimWorld = GridView::dimensionworld;
using LocalIndexType = unsigned int;
using GridIndexType = typename IndexTraits<GridView>::GridIndex;
using LocalIndexType = typename IndexTraits<GridView>::LocalIndex;
using Element = typename GridView::template Codim<0>::Entity;
using CoordScalar = typename GridView::ctype;
using FeLocalBasis = typename GG::FeCache::FiniteElementType::Traits::LocalBasisType;
......@@ -156,7 +158,7 @@ private:
const Element* elementPtr_;
const FVGridGeometry* fvGridGeometryPtr_;
typename GridView::IndexSet::IndexType eIdx_;
GridIndexType eIdx_;
};
//! specialization in case the FVElementGeometries are not stored
......@@ -166,7 +168,8 @@ class BoxFVElementGeometry<GG, false>
using GridView = typename GG::GridView;
static constexpr int dim = GridView::dimension;
static constexpr int dimWorld = GridView::dimensionworld;
using LocalIndexType = unsigned int;
using GridIndexType = typename IndexTraits<GridView>::GridIndex;
using LocalIndexType = typename IndexTraits<GridView>::LocalIndex;
using Element = typename GridView::template Codim<0>::Entity;
using CoordScalar = typename GridView::ctype;
using FeLocalBasis = typename GG::FeCache::FiniteElementType::Traits::LocalBasisType;
......@@ -347,7 +350,7 @@ private:
//! The bound element
const Element* elementPtr_;
typename GridView::IndexSet::IndexType eIdx_;
GridIndexType eIdx_;
//! The global geometry this is a restriction of
const FVGridGeometry* fvGridGeometryPtr_;
......
......@@ -32,6 +32,7 @@
#include <dune/localfunctions/lagrange/pqkfactory.hh>
#include <dumux/discretization/method.hh>
#include <dumux/common/indextraits.hh>
#include <dumux/common/defaultmappertraits.hh>
#include <dumux/discretization/basefvgridgeometry.hh>
#include <dumux/discretization/checkoverlapsize.hh>
......@@ -83,7 +84,8 @@ class BoxFVGridGeometry<Scalar, GV, true, Traits>
{
using ThisType = BoxFVGridGeometry<Scalar, GV, true, Traits>;
using ParentType = BaseFVGridGeometry<ThisType, GV, Traits>;
using IndexType = typename GV::IndexSet::IndexType;
using GridIndexType = typename IndexTraits<GV>::GridIndex;
using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
using Element = typename GV::template Codim<0>::Entity;
using CoordScalar = typename GV::ctype;
......@@ -182,7 +184,6 @@ public:
// construct the sub control volumes
scvs_[eIdx].resize(elementGeometry.corners());
using LocalIndexType = typename SubControlVolumeFace::Traits::LocalIndexType;
for (LocalIndexType scvLocalIdx = 0; scvLocalIdx < elementGeometry.corners(); ++scvLocalIdx)
{
const auto dofIdxGlobal = this->vertexMapper().subIndex(element, scvLocalIdx, dim);
......@@ -297,31 +298,31 @@ public:
{ return feCache_; }
//! Get the local scvs for an element
const std::vector<SubControlVolume>& scvs(IndexType eIdx) const
const std::vector<SubControlVolume>& scvs(GridIndexType eIdx) const
{ return scvs_[eIdx]; }
//! Get the local scvfs for an element
const std::vector<SubControlVolumeFace>& scvfs(IndexType eIdx) const
const std::vector<SubControlVolumeFace>& scvfs(GridIndexType eIdx) const
{ return scvfs_[eIdx]; }
//! If a vertex / d.o.f. is on the boundary
bool dofOnBoundary(unsigned int dofIdx) const
bool dofOnBoundary(GridIndexType dofIdx) const
{ return boundaryDofIndices_[dofIdx]; }
//! If a vertex / d.o.f. is on a periodic boundary
bool dofOnPeriodicBoundary(std::size_t dofIdx) const
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
{ return periodicVertexMap_.count(dofIdx); }
//! The index of the vertex / d.o.f. on the other side of the periodic boundary
std::size_t periodicallyMappedDof(std::size_t dofIdx) const
GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
{ return periodicVertexMap_.at(dofIdx); }
//! Returns the map between dofs across periodic boundaries
const std::unordered_map<std::size_t, std::size_t>& periodicVertexMap() const
const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
{ return periodicVertexMap_; }
//! Returns whether one of the geometry's scvfs lies on a boundary
bool hasBoundaryScvf(std::size_t eIdx) const
bool hasBoundaryScvf(GridIndexType eIdx) const
{ return hasBoundaryScvf_[eIdx]; }
private:
......@@ -340,7 +341,7 @@ private:
std::vector<bool> hasBoundaryScvf_;
// a map for periodic boundary vertices
std::unordered_map<std::size_t, std::size_t> periodicVertexMap_;
std::unordered_map<GridIndexType, GridIndexType> periodicVertexMap_;
};
/*!
......@@ -356,7 +357,7 @@ class BoxFVGridGeometry<Scalar, GV, false, Traits>
{
using ThisType = BoxFVGridGeometry<Scalar, GV, false, Traits>;
using ParentType = BaseFVGridGeometry<ThisType, GV, Traits>;
using IndexType = typename GV::IndexSet::IndexType;
using GridIndexType = typename IndexTraits<GV>::GridIndex;
static const int dim = GV::dimension;
static const int dimWorld = GV::dimensionworld;
......@@ -501,19 +502,19 @@ public:
{ return feCache_; }
//! If a vertex / d.o.f. is on the boundary
bool dofOnBoundary(std::size_t dofIdx) const
bool dofOnBoundary(GridIndexType dofIdx) const
{ return boundaryDofIndices_[dofIdx]; }
//! If a vertex / d.o.f. is on a periodic boundary
bool dofOnPeriodicBoundary(std::size_t dofIdx) const
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
{ return periodicVertexMap_.count(dofIdx); }
//! The index of the vertex / d.o.f. on the other side of the periodic boundary
std::size_t periodicallyMappedDof(std::size_t dofIdx) const
GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
{ return periodicVertexMap_.at(dofIdx); }
//! Returns the map between dofs across periodic boundaries
const std::unordered_map<std::size_t, std::size_t>& periodicVertexMap() const
const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
{ return periodicVertexMap_; }
private:
......@@ -530,7 +531,7 @@ private:
std::vector<bool> boundaryDofIndices_;
// a map for periodic boundary vertices
std::unordered_map<std::size_t, std::size_t> periodicVertexMap_;
std::unordered_map<GridIndexType, GridIndexType> periodicVertexMap_;
};
} // end namespace Dumux
......
......@@ -26,9 +26,10 @@
#include <dune/geometry/multilineargeometry.hh>
#include <dumux/common/math.hh>
#include <dumux/common/indextraits.hh>
#include <dumux/discretization/subcontrolvolumebase.hh>
#include <dumux/discretization/box/boxgeometryhelper.hh>
#include <dumux/common/math.hh>
namespace Dumux {
......@@ -66,8 +67,8 @@ struct BoxDefaultScvGeometryTraits
};
};
using GridIndexType = typename Grid::LeafGridView::IndexSet::IndexType;
using LocalIndexType = unsigned int;
using GridIndexType = typename IndexTraits<GridView>::GridIndex;
using LocalIndexType = typename IndexTraits<GridView>::LocalIndex;
using Scalar = typename Grid::ctype;
using Geometry = Dune::MultiLinearGeometry<Scalar, dim, dimWorld, ScvMLGTraits<Scalar>>;
using CornerStorage = typename ScvMLGTraits<Scalar>::template CornerStorage<dim, dimWorld>::Type;
......
......@@ -29,6 +29,7 @@
#include <dune/geometry/multilineargeometry.hh>
#include <dumux/common/boundaryflag.hh>
#include <dumux/common/indextraits.hh>
#include <dumux/discretization/subcontrolvolumefacebase.hh>
#include <dumux/discretization/box/boxgeometryhelper.hh>
......@@ -68,8 +69,8 @@ struct BoxDefaultScvfGeometryTraits
};
};
using GridIndexType = typename Grid::LeafGridView::IndexSet::IndexType;
using LocalIndexType = unsigned int;
using GridIndexType = typename IndexTraits<GridView>::GridIndex;
using LocalIndexType = typename IndexTraits<GridView>::LocalIndex;
using Scalar = typename Grid::ctype;
using Geometry = Dune::MultiLinearGeometry<Scalar, dim-1, dimWorld, ScvfMLGTraits<Scalar>>;
using CornerStorage = typename ScvfMLGTraits<Scalar>::template CornerStorage<dim-1, dimWorld>::Type;
......
......@@ -32,6 +32,8 @@
#include <dune/common/exceptions.hh>
#include <dune/common/reservedvector.hh>
#include <dumux/common/indextraits.hh>
#include <dumux/discretization/fluxstencil.hh>
namespace Dumux {
......@@ -51,13 +53,13 @@ class CCSimpleConnectivityMap
{
using FVElementGeometry = typename FVGridGeometry::LocalView;
using GridView = typename FVGridGeometry::GridView;
using IndexType = typename GridView::IndexSet::IndexType;
using GridIndexType = typename IndexTraits<GridView>::GridIndex;
using FluxStencil = Dumux::FluxStencil<FVElementGeometry>;
static constexpr int maxElemStencilSize = FVGridGeometry::maxElementStencilSize;
struct DataJ
{
IndexType globalJ;
GridIndexType globalJ;
typename FluxStencil::ScvfStencilIForJ scvfsJ;
// A list of additional scvfs is needed for compatibility
// reasons with more complex connectivity maps (see mpfa)
......@@ -79,7 +81,7 @@ public:
map_.resize(fvGridGeometry.gridView().size(0));
// container to store for each element J the elements I which have J in their flux stencil
Dune::ReservedVector<std::pair<IndexType, DataJ>, maxElemStencilSize> dataJForI;
Dune::ReservedVector<std::pair<GridIndexType, DataJ>, maxElemStencilSize> dataJForI;
for (const auto& element : elements(fvGridGeometry.gridView()))
{
......@@ -125,7 +127,7 @@ public:
}
}
const std::vector<DataJ>& operator[] (const IndexType globalI) const
const std::vector<DataJ>& operator[] (const GridIndexType globalI) const
{ return map_[globalI]; }
private:
......
......@@ -29,6 +29,7 @@
#include <algorithm>
#include <dune/common/reservedvector.hh>
#include <dumux/common/indextraits.hh>
namespace Dumux
{
......@@ -43,8 +44,8 @@ template<class GV>
struct NodalIndexSetDefaultTraits
{
using GridView = GV;
using GridIndexType = typename GV::IndexSet::IndexType;
using LocalIndexType = std::uint8_t;
using GridIndexType = typename IndexTraits<GV>::GridIndex;
using LocalIndexType = typename IndexTraits<GV>::SmallLocalIndex;
//! per default, we use dynamic data containers (iv size unknown)
template< class T > using NodalScvDataStorage = std::vector< T >;
......
......@@ -31,6 +31,7 @@
#include <dune/geometry/referenceelements.hh>
#include <dumux/common/parameters.hh>
#include <dumux/common/indextraits.hh>
#include <dumux/discretization/scvandscvfiterators.hh>
namespace Dumux
......@@ -59,7 +60,7 @@ class CCMpfaFVElementGeometry<GG, true>
using ThisType = CCMpfaFVElementGeometry<GG, true>;
using GridView = typename GG::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using GridIndexType = typename GridView::IndexSet::IndexType;
using GridIndexType = typename IndexTraits<GridView>::GridIndex;
static constexpr int dim = GridView::dimension;
......@@ -175,7 +176,7 @@ class CCMpfaFVElementGeometry<GG, false>
using ThisType = CCMpfaFVElementGeometry<GG, false>;
using GridView = typename GG::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using GridIndexType = typename GridView::IndexSet::IndexType;
using GridIndexType = typename IndexTraits<GridView>::GridIndex;
using MpfaHelper = typename GG::MpfaHelper;
static const int dim = GridView::dimension;
......
......@@ -29,6 +29,7 @@
#include <dune/geometry/referenceelements.hh>
#include <dumux/common/parameters.hh>
#include <dumux/common/indextraits.hh>
#include <dumux/discretization/method.hh>
#include <dumux/discretization/basefvgridgeometry.hh>
#include <dumux/discretization/checkoverlapsize.hh>
......@@ -78,7 +79,7 @@ class CCMpfaFVGridGeometry<GV, Traits, true>
using Element = typename GV::template Codim<0>::Entity;
using Vertex = typename GV::template Codim<dim>::Entity;
using Intersection = typename GV::Intersection;
using GridIndexType = typename GV::IndexSet::IndexType;
using GridIndexType = typename IndexTraits<GV>::GridIndex;
using CoordScalar = typename GV::ctype;
using ReferenceElements = typename Dune::ReferenceElements<CoordScalar, dim>;
......@@ -448,7 +449,7 @@ class CCMpfaFVGridGeometry<GV, Traits, false>
using Element = typename GV::template Codim<0>::Entity;
using Vertex = typename GV::template Codim<dim>::Entity;
using Intersection = typename GV::Intersection;
using GridIndexType = typename GV::IndexSet::IndexType;
using GridIndexType = typename IndexTraits<GV>::GridIndex;
using CoordScalar = typename GV::ctype;
using ReferenceElements = typename Dune::ReferenceElements<CoordScalar, dim>;
......
......@@ -52,7 +52,7 @@ public:
using PrimaryInteractionVolume = PI;
using SecondaryInteractionVolume = SI;
using GridIndexType = typename FVGridGeometry::GridView::IndexSet::IndexType;
using GridIndexType = typename NI::GridIndexType;
using DualGridIndexSet = CCMpfaDualGridIndexSet< NI >;
/*!
......
......@@ -26,11 +26,14 @@
#include <vector>
#include <array>
#include <dune/common/reservedvector.hh>
#include <dune/common/fvector.hh>
#include <dune/geometry/type.hh>
#include <dune/geometry/multilineargeometry.hh>
#include <dumux/common/indextraits.hh>
namespace Dumux {
/*!
......@@ -48,8 +51,8 @@ struct CCMpfaDefaultScvfGeometryTraits
static const int dimWorld = Grid::dimensionworld;
using Scalar = typename Grid::ctype;
using GridIndexType = typename Grid::LeafGridView::IndexSet::IndexType;
using LocalIndexType = unsigned int;
using GridIndexType = typename IndexTraits<GridView>::GridIndex;
using LocalIndexType = typename IndexTraits<GridView>::LocalIndex;
using OutsideGridIndexStorage = typename std::conditional_t< (dim<dimWorld),
std::vector<GridIndexType>,
Dune::ReservedVector<GridIndexType, 1> >;
......
......@@ -25,8 +25,10 @@
#define DUMUX_DISCRETIZATION_CC_SUBCONTROLVOLUME_HH
#include <dune/common/fvector.hh>
#include <dumux/discretization/subcontrolvolumebase.hh>
#include <dumux/common/optional.hh>
#include <dumux/common/indextraits.hh>
#include <dumux/discretization/subcontrolvolumebase.hh>
namespace Dumux {
......@@ -40,8 +42,8 @@ template<class GridView>
struct CCDefaultScvGeometryTraits
{
using Geometry = typename GridView::template Codim<0>::Geometry;
using GridIndexType = typename GridView::IndexSet::IndexType;
using LocalIndexType = unsigned int;
using GridIndexType = typename IndexTraits<GridView>::GridIndex;
using LocalIndexType = typename IndexTraits<GridView>::LocalIndex;
using Scalar = typename GridView::ctype;
using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
......
......@@ -31,6 +31,7 @@
#include <vector>
#include <dune/common/exceptions.hh>
#include <dumux/common/indextraits.hh>
#include <dune/common/iteratorrange.hh>
#include <dumux/discretization/scvandscvfiterators.hh>
......@@ -59,7 +60,7 @@ class CCTpfaFVElementGeometry<GG, true>
{
using ThisType = CCTpfaFVElementGeometry<GG, true>;
using GridView = typename GG::GridView;
using IndexType = typename GridView::IndexSet::IndexType;
using GridIndexType = typename IndexTraits<GridView>::GridIndex;
using Element = typename GridView::template Codim<0>::Entity;
public:
......@@ -80,21 +81,21 @@ public:
//! Get an elment sub control volume with a global scv index
//! We separate element and neighbor scvs to speed up mapping
const SubControlVolume& scv(IndexType scvIdx) const
const SubControlVolume& scv(GridIndexType scvIdx) const
{
return fvGridGeometry().scv(scvIdx);
}
//! Get an element sub control volume face with a global scvf index
//! We separate element and neighbor scvfs to speed up mapping
const SubControlVolumeFace& scvf(IndexType scvfIdx) const
const SubControlVolumeFace& scvf(GridIndexType scvfIdx) const
{
return fvGridGeometry().scvf(scvfIdx);
}
//! Get the scvf on the same face but from the other side
//! Note that e.g. the normals might be different in the case of surface grids
const SubControlVolumeFace& flipScvf(IndexType scvfIdx, unsigned int outsideScvIdx = 0) const
const SubControlVolumeFace& flipScvf(GridIndexType scvfIdx, unsigned int outsideScvIdx = 0) const
{
return fvGridGeometry().flipScvf(scvfIdx, outsideScvIdx);
}
......@@ -104,10 +105,10 @@ public:
//! This is a free function found by means of ADL
//! To iterate over all sub control volumes of this FVElementGeometry use
//! for (auto&& scv : scvs(fvGeometry))
friend inline Dune::IteratorRange< ScvIterator<SubControlVolume, std::array<IndexType, 1>, ThisType> >
friend inline Dune::IteratorRange< ScvIterator<SubControlVolume, std::array<GridIndexType, 1>, ThisType> >
scvs(const CCTpfaFVElementGeometry& fvGeometry)
{
using ScvIterator = Dumux::ScvIterator<SubControlVolume, std::array<IndexType, 1>, ThisType>;
using ScvIterator = Dumux::ScvIterator<SubControlVolume, std::array<GridIndexType, 1>, ThisType>;
return Dune::IteratorRange<ScvIterator>(ScvIterator(fvGeometry.scvIndices_.begin(), fvGeometry),
ScvIterator(fvGeometry.scvIndices_.end(), fvGeometry));
}
......@@ -117,12 +118,12 @@ public:
//! This is a free function found by means of ADL
//! To iterate over all sub control volume faces of this FVElementGeometry use
//! for (auto&& scvf : scvfs(fvGeometry))
friend inline Dune::IteratorRange< ScvfIterator<SubControlVolumeFace, std::vector<IndexType>, ThisType> >
friend inline Dune::IteratorRange< ScvfIterator<SubControlVolumeFace, std::vector<GridIndexType>, ThisType> >
scvfs(const CCTpfaFVElementGeometry& fvGeometry)
{
const auto& g = fvGeometry.fvGridGeometry();
const auto scvIdx = fvGeometry.scvIndices_[0];
using ScvfIterator = Dumux::ScvfIterator<SubControlVolumeFace, std::vector<IndexType>, ThisType>;
using ScvfIterator = Dumux::ScvfIterator<SubControlVolumeFace, std::vector<GridIndexType>, ThisType>;
return Dune::IteratorRange<ScvfIterator>(ScvfIterator(g.scvfIndicesOfScv(scvIdx).begin(), fvGeometry),
ScvfIterator(g.scvfIndicesOfScv(scvIdx).end(), fvGeometry));
}
......@@ -163,7 +164,7 @@ public:
private:
const Element* elementPtr_;
std::array<IndexType, 1> scvIndices_;
std::array<GridIndexType, 1> scvIndices_;
const FVGridGeometry* fvGridGeometryPtr_;
};
......@@ -177,7 +178,8 @@ class CCTpfaFVElementGeometry<GG, false>
{
using ThisType = CCTpfaFVElementGeometry<GG, false>;
using GridView = typename GG::GridView;
using IndexType = typename GridView::IndexSet::IndexType;
using GridIndexType = typename IndexTraits<GridView>::GridIndex;
using LocalIndexType = typename IndexTraits<GridView>::LocalIndex;
using Element = typename GridView::template Codim<0>::Entity;
static const int dim = GridView::dimension;
......@@ -201,7 +203,7 @@ public:
//! Get an elment sub control volume with a global scv index
//! We separate element and neighbor scvs to speed up mapping
const SubControlVolume& scv(IndexType scvIdx) const
const SubControlVolume& scv(GridIndexType scvIdx) const
{
if (scvIdx == scvIndices_[0])
return scvs_[0];
......@@ -211,7 +213,7 @@ public:
//! Get an element sub control volume face with a global scvf index
//! We separate element and neighbor scvfs to speed up mapping
const SubControlVolumeFace& scvf(IndexType scvfIdx) const
const SubControlVolumeFace& scvf(GridIndexType scvfIdx) const
{
auto it = std::find(scvfIndices_.begin(), scvfIndices_.end(), scvfIdx);
if (it != scvfIndices_.end())
......@@ -222,7 +224,7 @@ public:
//! Get the scvf on the same face but from the other side
//! Note that e.g. the normals might be different in the case of surface grids
const SubControlVolumeFace& flipScvf(IndexType scvfIdx, unsigned int outsideScvIdx = 0) const
const SubControlVolumeFace& flipScvf(GridIndexType scvfIdx, unsigned int outsideScvIdx = 0) const
{
auto it = std::find(scvfIndices_.begin(), scvfIndices_.end(), scvfIdx);
if (it != scvfIndices_.end())
......@@ -283,7 +285,7 @@ public:
neighborScvfIndices_.reserve(element.subEntities(1));
neighborScvfs_.reserve(element.subEntities(1));
std::vector<IndexType> handledNeighbors;
std::vector<GridIndexType> handledNeighbors;
handledNeighbors.reserve(element.subEntities(1));
for (const auto& intersection : intersections(fvGridGeometry().gridView(), element))
......@@ -361,7 +363,7 @@ public:
private:
IndexType findFlippedScvfIndex_(IndexType insideScvIdx, IndexType globalOutsideScvIdx)
GridIndexType findFlippedScvfIndex_(GridIndexType insideScvIdx, GridIndexType globalOutsideScvIdx)
{
for (unsigned int localNeighborScvfIdx = 0; localNeighborScvfIdx < neighborScvfs_.size(); ++localNeighborScvfIdx)
{
......@@ -440,7 +442,7 @@ private:
}
//! create the necessary scvs and scvfs of the neighbor elements to the bound elements
void makeNeighborGeometries(const Element& element, const IndexType eIdx)
void makeNeighborGeometries(const Element& element, const GridIndexType eIdx)
{
using ScvfGridIndexStorage = typename SubControlVolumeFace::Traits::GridIndexStorage;
......@@ -527,8 +529,8 @@ private:
}
}
const IndexType findLocalIndex(const IndexType idx,
const std::vector<IndexType>& indices) const
const LocalIndexType findLocalIndex(const GridIndexType idx,
const std::vector<GridIndexType>& indices) const
{
auto it = std::find(indices.begin(), indices.end(), idx);
assert(it != indices.end() && "Could not find the scv/scvf! Make sure to properly bind this class!");
......@@ -556,19 +558,19 @@ private:
const FVGridGeometry* fvGridGeometryPtr_; //!< the grid fvgeometry
// local storage after binding an element
std::array<IndexType, 1> scvIndices_;
std::array<GridIndexType, 1> scvIndices_;
std::array<SubControlVolume, 1> scvs_;
std::vector<IndexType> scvfIndices_;
std::vector<GridIndexType> scvfIndices_;
std::vector<SubControlVolumeFace> scvfs_;
std::vector<std::vector<IndexType>> flippedScvfIndices_;
std::vector<std::vector<GridIndexType>> flippedScvfIndices_;
std::vector<IndexType> neighborScvIndices_;
std::vector<GridIndexType> neighborScvIndices_;
std::vector<SubControlVolume> neighborScvs_;
std::vector<IndexType> neighborScvfIndices_;
std::vector<GridIndexType> neighborScvfIndices_;
std::vector<SubControlVolumeFace> neighborScvfs_;
std::vector<std::vector<IndexType>> flippedNeighborScvfIndices_;
std::vector<std::vector<GridIndexType>> flippedNeighborScvfIndices_;
bool hasBoundaryScvf_ = false;
};
......
......@@ -28,7 +28,9 @@
#include <algorithm>
#include <dumux/common/indextraits.hh>
#include <dumux/common/defaultmappertraits.hh>
#include <dumux/discretization/method.hh>
#include <dumux/discretization/basefvgridgeometry.hh>
#include <dumux/discretization/checkoverlapsize.hh>
......@@ -89,7 +91,7 @@ class CCTpfaFVGridGeometry<GV, true, Traits>
using ThisType = CCTpfaFVGridGeometry<GV,