Skip to content
Snippets Groups Projects
Commit ca8791f8 authored by Robert Klöfkorn's avatar Robert Klöfkorn
Browse files

added multTransposed to helper functions.

[[Imported from SVN: r2809]]
parent d08ba253
No related branches found
No related tags found
No related merge requests found
......@@ -1424,6 +1424,23 @@ namespace Dune {
return ret;
}
//! calculates ret = matrix^T * x
template <typename K, int dim>
static FieldVector<K,dim> multTransposed(const FieldMatrix<K,dim,dim> &matrix, const FieldVector<K,dim> & x)
{
FieldVector<K,dim> ret;
typedef typename FieldMatrix<K,dim,dim>::size_type size_type;
for(size_type i=0; i<dim; i++)
{
ret[i] = 0.0;
for(size_type j=0; j<dim; j++)
{
ret[i] += matrix[j][i]*x[j];
}
}
return ret;
}
} // end namespace FMatrixHelp
#ifdef DUNE_EXPRESSIONTEMPLATES
......
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