Skip to content
Snippets Groups Projects
Commit 6f70e871 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'issue/missing_fmatrix_operator' into 'develop'

added negation operator for FieldMatrix

See merge request spraetor/dune-amdis!68
parents 746bb31d bdf4739a
No related branches found
No related tags found
No related merge requests found
......@@ -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>>
......
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