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

added multAssignTransposed.

[[Imported from SVN: r3046]]
parent 25da7929
No related branches found
No related tags found
No related merge requests found
...@@ -1466,6 +1466,22 @@ namespace Dune { ...@@ -1466,6 +1466,22 @@ namespace Dune {
} }
} }
//! calculates ret = matrix * x
template <typename K, int dim>
static void multAssignTransposed( 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];
}
}
}
//! calculates ret = matrix * x //! calculates ret = matrix * x
template <typename K, int dim> template <typename K, int dim>
static FieldVector<K,dim> mult(const FieldMatrix<K,dim,dim> &matrix, const FieldVector<K,dim> & x) static FieldVector<K,dim> mult(const FieldMatrix<K,dim,dim> &matrix, const FieldVector<K,dim> & x)
......
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