Skip to content
Snippets Groups Projects
Commit e0ac8d9a authored by Christian Engwer's avatar Christian Engwer
Browse files

[bugfix] make fvectortest compile and make ScalarOrderingTest pass for GMPField

the first problem was that I accidentially enabled the ScalarOrderingTest, but this forced me
to investigate further and I found out how this works, or not works.

We have to add the comparison operators to FieldVector, as the cast operator does not always
match, e.g. in the case of GMPField.
parent 045c6d93
No related branches found
No related tags found
No related merge requests found
......@@ -290,7 +290,35 @@ namespace Dune {
};
/* ----- FV / FV ----- */
/* not necessary as these operations are already covered via the cast operator */
/* mostly not necessary as these operations are already covered via the cast operator */
//! Binary compare, when using FieldVector<K,1> like K
template<class K>
inline bool operator> (const FieldVector<K,1>& a, const FieldVector<K,1>& b)
{
return a[0]>b[0];
}
//! Binary compare, when using FieldVector<K,1> like K
template<class K>
inline bool operator>= (const FieldVector<K,1>& a, const FieldVector<K,1>& b)
{
return a[0]>=b[0];
}
//! Binary compare, when using FieldVector<K,1> like K
template<class K>
inline bool operator< (const FieldVector<K,1>& a, const FieldVector<K,1>& b)
{
return a[0]<b[0];
}
//! Binary compare, when using FieldVector<K,1> like K
template<class K>
inline bool operator<= (const FieldVector<K,1>& a, const FieldVector<K,1>& b)
{
return a[0]<=b[0];
}
/* ----- FV / scalar ----- */
......
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