Skip to content
Snippets Groups Projects
Commit 0151cdf3 authored by Markus Blatt's avatar Markus Blatt
Browse files

Make comparison correct for ParellelLocalIndex.

[[Imported from SVN: r6444]]
parent 9e3324b8
No related branches found
No related tags found
No related merge requests found
......@@ -1109,9 +1109,15 @@ namespace Dune
typedef typename ParallelIndexSet<TG,TL,N>::const_iterator Iter;
typedef typename ParallelIndexSet<TG1,TL1,N1>::const_iterator Iter1;
Iter iter=idxset.begin();
for(Iter1 iter1=idxset1.begin(); iter1 != idxset1.end(); ++iter, ++iter1)
if(*iter1!=*iter)
for(Iter1 iter1=idxset1.begin(); iter1 != idxset1.end(); ++iter, ++iter1) {
if(iter1->global()!=iter->global())
return false;
typedef typename ParallelIndexSet<TG,TL,N>::LocalIndex PI;
const PI& pi=iter->local(), pi1=iter1->local();
if(pi!=pi1)
return false;
}
return true;
}
......
......@@ -168,6 +168,25 @@ namespace Dune
};
template<typename T>
bool operator==(const ParallelLocalIndex<T>& p1,
const ParallelLocalIndex<T>& p2)
{
if(p1.local()!=p2.local())
return false;
if(p1.attribute()!=p2.attribute())
return false;
if(p1.isPublic()!=p2.isPublic())
return false;
return true;
}
template<typename T>
bool operator!=(const ParallelLocalIndex<T>& p1,
const ParallelLocalIndex<T>& p2)
{
return !(p1==p2);
}
template<typename T>
struct LocalIndexComparator<ParallelLocalIndex<T> >
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment