Commit 539d8f4f authored by Christoph Grueninger's avatar Christoph Grueninger
Browse files

Revert r13462, it broke compatibility with Dune 2.3.

As we use still ints for mapping face indices, there
is more work involved.
(thanks to bernd for the heads-up)


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@13466 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 92f4f15b
......@@ -51,7 +51,7 @@ class IntersectionMapper
typedef typename GridView::IntersectionIterator IntersectionIterator;
typedef typename GridView::Intersection Intersection;
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView,ElementLayout> ElementMapper;
typedef typename ElementMapper::Index ElementMapperIndex;
public:
......@@ -79,48 +79,48 @@ public:
return elementMapper_;
}
ElementMapperIndex map(const Element& element) const
auto map(const Element& element) const
{
return elementMapper_.map(element);
}
ElementMapperIndex map(int elemIdx, int faceIdx)
auto map(int elemIdx, int faceIdx)
{
return intersectionMapGlobal_[elemIdx][faceIdx];
}
ElementMapperIndex map(int elemIdx, int faceIdx) const
auto map(int elemIdx, int faceIdx) const
{
return (intersectionMapGlobal_[elemIdx].find(faceIdx))->second;//use find() for const function!
}
ElementMapperIndex map(const Element& element, int faceIdx)
auto map(const Element& element, int faceIdx)
{
return intersectionMapGlobal_[map(element)][faceIdx];
}
ElementMapperIndex map(const Element& element, int faceIdx) const
auto map(const Element& element, int faceIdx) const
{
return intersectionMapGlobal_[map(element)].find(faceIdx)->second;//use find() for const function!
}
ElementMapperIndex maplocal(int elemIdx, int faceIdx)
auto maplocal(int elemIdx, int faceIdx)
{
return intersectionMapLocal_[elemIdx][faceIdx];
}
ElementMapperIndex maplocal(int elemIdx, int faceIdx) const
auto maplocal(int elemIdx, int faceIdx) const
{
return (intersectionMapLocal_[elemIdx].find(faceIdx))->second;//use find() for const function!
}
ElementMapperIndex maplocal(const Element& element, int faceIdx)
auto maplocal(const Element& element, int faceIdx)
{
return intersectionMapLocal_[map(element)][faceIdx];
}
ElementMapperIndex maplocal(const Element& element, int faceIdx) const
auto maplocal(const Element& element, int faceIdx) const
{
return (intersectionMapLocal_[map(element)].find(faceIdx))->second;//use find() for const function!
}
......
......@@ -38,8 +38,6 @@ class VertexHandleSum
: public Dune::CommDataHandleIF< VertexHandleSum<FieldType, Container, VertexMapper>,
FieldType >
{
typedef typename VertexMapper::Index VertexMapperIndex;
public:
VertexHandleSum(Container &container,
const VertexMapper &mapper)
......@@ -70,14 +68,14 @@ public:
template<class MessageBufferImp, class EntityType>
void gather(MessageBufferImp &buff, const EntityType &e) const
{
VertexMapperIndex vIdx = mapper_.map(e);
auto vIdx = mapper_.map(e);
buff.write(container_[vIdx]);
}
template<class MessageBufferImp, class EntityType>
void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
{
VertexMapperIndex vIdx = mapper_.map(e);
auto vIdx = mapper_.map(e);
FieldType tmp;
buff.read(tmp);
......@@ -98,8 +96,6 @@ class VertexHandleMax
: public Dune::CommDataHandleIF< VertexHandleMax<FieldType, Container, VertexMapper>,
FieldType >
{
typedef typename VertexMapper::Index VertexMapperIndex;
public:
VertexHandleMax(Container &container,
const VertexMapper &mapper)
......@@ -130,14 +126,14 @@ public:
template<class MessageBufferImp, class EntityType>
void gather(MessageBufferImp &buff, const EntityType &e) const
{
VertexMapperIndex vIdx = mapper_.map(e);
auto vIdx = mapper_.map(e);
buff.write(container_[vIdx]);
}
template<class MessageBufferImp, class EntityType>
void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
{
VertexMapperIndex vIdx = mapper_.map(e);
auto vIdx = mapper_.map(e);
FieldType tmp;
buff.read(tmp);
......@@ -159,8 +155,6 @@ class VertexHandleMin
: public Dune::CommDataHandleIF< VertexHandleMin<FieldType, Container, VertexMapper>,
FieldType >
{
typedef typename VertexMapper::Index VertexMapperIndex;
public:
VertexHandleMin(Container &container,
const VertexMapper &mapper)
......@@ -191,14 +185,14 @@ public:
template<class MessageBufferImp, class EntityType>
void gather(MessageBufferImp &buff, const EntityType &e) const
{
VertexMapperIndex vIdx = mapper_.map(e);
auto vIdx = mapper_.map(e);
buff.write(container_[vIdx]);
}
template<class MessageBufferImp, class EntityType>
void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
{
VertexMapperIndex vIdx = mapper_.map(e);
auto vIdx = mapper_.map(e);
FieldType tmp;
buff.read(tmp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment