Commit bdf4739a authored by Praetorius, Simon's avatar Praetorius, Simon

added negation operator for FieldMatrix

parent 746bb31d
Pipeline #1520 passed with stage
in 20 minutes and 16 seconds
......@@ -197,6 +197,9 @@ namespace Dune
template <class T, int M, int N>
FieldMatrix<T,N,M> trans(FieldMatrix<T, M, N> const& A);
template <class T, int M, int N>
FieldMatrix<T,M,N> operator-(FieldMatrix<T, M, N> A);
template <class T, int M, int N, class S,
std::enable_if_t<std::is_convertible<S,T>::value, int> = 0>
......
......@@ -349,6 +349,11 @@ FieldMatrix<T,N,M> trans(FieldMatrix<T, M, N> const& A)
return At;
}
template <class T, int M, int N>
FieldMatrix<T,M,N> operator-(FieldMatrix<T,M,N> A)
{
return A *= -1;
}
template <class T, int M, int N, class S,
std::enable_if_t<std::is_convertible<S,T>::value, int>>
......
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