// ---------------------------------------------------------------------
#include "../tests.h"
-#include "../lapack/create_matrix.h"
// adaptation of /scalapack/scalapack_02.cc to a quick test
#include <iostream>
+
+template <typename FullMatrix>
+void create_spd (FullMatrix &A)
+{
+ const unsigned int size = A.n();
+ Assert (size == A.m(), ExcDimensionMismatch(size,A.m()));
+
+ for (unsigned int i = 0; i < size; ++i)
+ for (unsigned int j = i; j < size; ++j)
+ {
+ const double val = random_value<typename FullMatrix::value_type>();
+ Assert (val >= 0. && val <= 1.,
+ ExcInternalError());
+ if (i==j)
+ // since A(i,j) < 1 and
+ // a symmetric diagonally dominant matrix is SPD
+ A(i,j) = val + size;
+ else
+ {
+ A(i,j) = val;
+ A(j,i) = val;
+ }
+ }
+}
+
+
+
template <typename NumberType>
void test(const unsigned int size, const unsigned int block_size)
{