Skip to content
Snippets Groups Projects
Commit ee598367 authored by Martin Nolte's avatar Martin Nolte
Browse files

merge patch 5467 from trunk

[[Imported from SVN: r5468]]
parent aa71a79b
No related branches found
No related tags found
No related merge requests found
......@@ -277,6 +277,14 @@ namespace Dune {
return *this;
}
//! vector space axpy operation (*this += k y)
FieldMatrix &axpy ( const K &k, const FieldMatrix &y )
{
for( size_type i = 0; i < n; ++i )
p[ i ].axpy( k, y[ i ] );
return *this;
}
//===== linear maps
//! y = A x
......@@ -1000,6 +1008,13 @@ namespace Dune {
return *this;
}
//! vector space axpy operation (*this += a y)
FieldMatrix &axpy ( const K &k, const FieldMatrix &y )
{
a[ 0 ] += k * y.a[ 0 ];
return *this;
}
//===== linear maps
//! y = A x
......
......@@ -219,6 +219,8 @@ void test_matrix()
std::cout << A << std::endl;
// print vector
std::cout << f << std::endl;
A.axpy( K( 1 ), A );
}
int main()
......
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