Skip to content
Snippets Groups Projects
Commit 31625a0b authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Adjust fmatrixtest to use initializer lists.

parent ce508600
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#define DUNE_ISTL_WITH_CHECKING #define DUNE_ISTL_WITH_CHECKING
#endif #endif
#include <dune/common/fmatrix.hh> #include <dune/common/fmatrix.hh>
#include <dune/common/fassign.hh>
#include <dune/common/classname.hh> #include <dune/common/classname.hh>
#include <iostream> #include <iostream>
#include <algorithm> #include <algorithm>
...@@ -452,16 +451,16 @@ void test_ev() ...@@ -452,16 +451,16 @@ void test_ev()
* A small, nonzero eigenvalue * A small, nonzero eigenvalue
*/ */
Dune::FieldMatrix<ft,8,8> A; Dune::FieldMatrix<ft,8,8> A = {
A <<= { 611, 196, -192, 407, -8, -52, -49, 29 },
611, 196, -192, 407, -8, -52, -49, 29, Dune::nextRow, { 196, 899, 113, -192, -71, -43, -8, -44 },
196, 899, 113, -192, -71, -43, -8, -44, Dune::nextRow, { -192, 113, 899, 196, 61, 49, 8, 52 },
-192, 113, 899, 196, 61, 49, 8, 52, Dune::nextRow, { 407, -192, 196, 611, 8, 44, 59, -23 },
407, -192, 196, 611, 8, 44, 59, -23, Dune::nextRow, { -8, -71, 61, 8, 411, -599, 208, 208 },
-8, -71, 61, 8, 411, -599, 208, 208, Dune::nextRow, { -52, -43, 49, 44, -599, 411, 208, 208 },
-52, -43, 49, 44, -599, 411, 208, 208, Dune::nextRow, { -49, -8, 8, 59, 208, 208, 99, -911 },
-49, -8, 8, 59, 208, 208, 99, -911, Dune::nextRow, { 29, -44, 52, -23, 208, 208, -911, 99}
29, -44, 52, -23, 208, 208, -911, 99; };
// compute eigenvalues // compute eigenvalues
Dune::FieldVector<ft,8> eig; Dune::FieldVector<ft,8> eig;
...@@ -476,15 +475,14 @@ void test_ev() ...@@ -476,15 +475,14 @@ void test_ev()
> eig(rosser()) > eig(rosser())
*/ */
ref <<= ref = { -1.02004901843000e+03,
-1.02004901843000e+03,
-4.14362871168386e-14, -4.14362871168386e-14,
9.80486407214362e-02, 9.80486407214362e-02,
1.00000000000000e+03, 1.00000000000000e+03,
1.00000000000000e+03, 1.00000000000000e+03,
1.01990195135928e+03, 1.01990195135928e+03,
1.02000000000000e+03, 1.02000000000000e+03,
1.02004901843000e+03; 1.02004901843000e+03 };
if( (ref - eig).two_norm() > 1e-10 ) if( (ref - eig).two_norm() > 1e-10 )
{ {
......
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