Skip to content
Snippets Groups Projects
Commit 6f171412 authored by Christian Engwer's avatar Christian Engwer Committed by Carsten Gräser
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.
(cherry picked from commit e0ac8d9a)

Signed-off-by: default avatarCarsten Gräser <graeser@dune-project.org>
parent ec05f5b3
No related branches found
No related tags found
1 merge request!2512017-05 merge of upstream repository
......@@ -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