Commit 18a5b967 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

added dot() for FieldMatrix with 1 row

parent 7b3241de
Pipeline #1131 passed with stage
in 3 minutes and 4 seconds
......@@ -53,6 +53,9 @@ namespace AMDiS
REQUIRES( N!=1 && M!=1 )>
auto operator*(FieldVector<T,N> const& v, FieldVector<T,M> const& w);
template <class T, class S, int N>
auto dot(FieldMatrix<T,1,N> const& vec1, FieldMatrix<S,1,N> const& vec2);
// ----------------------------------------------------------------------------
/// Sum of vector entires.
......
......@@ -85,6 +85,12 @@ auto operator*(FieldVector<T,N> const& v, FieldVector<T,M> const& w)
return v.dot(w);
}
template <class T, class S, int N>
auto dot(FieldMatrix<T,1,N> const& vec1, FieldMatrix<S,1,N> const& vec2)
{
return vec1[0].dot(vec2[0]);
}
// ----------------------------------------------------------------------------
namespace Impl
......
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