42 #include <tests/myratest.h> 53 myra::out() << typestring<Number>() << std::endl;
59 auto forward = make_GemmAction(A) + make_GemmAction(P)*make_GemmAction(P,
'T');
69 auto result = gmres(preconditioner,forward,b,x,tolerance);
71 Precision residual = euclidean(forward*x-b) / euclidean(b);
72 myra::out() <<
"residual = " << residual << std::endl;
74 myra::out() <<
"history = " << result.history << std::endl;
76 REQUIRE(residual < tolerance*100.0);
77 REQUIRE(result.history.size() <= K+5);
82 ADD_TEST(
"compose_action2",
"[iterative]")
85 test<NumberD>(100,5,1.0e-8);
86 test<NumberZ>(100,5,1.0e-8);
Routines for computing euclidean norm of a Vector/VectorRange, or normalizing a Vector/VectorRange to...
Interface class for representing subranges of DiagonalMatrix's.
Interface class for representing subranges of dense Matrix's.
Interface class for representing subranges of dense Vector's.
Applies the "Action" of a linear operator, b := A*x, used in iterative solution algorithms.
static Matrix< Number > random(int I, int J)
Generates a random Matrix of specified size.
Definition: Matrix.cpp:353
Linear system solution via gmres (for invertible action A)
Computes all eigenpairs of general Matrix.
static Vector< Number > random(int N)
Generates a random Vector of specified size.
Definition: Vector.cpp:276
Overloads expr() for Matrix<Number>, LowerMatrix<Number>, Vector<Number> and DiagonalMatrix<Number> ...
Definition: stlprint.h:32
Action< typename ReflectNumber< Solver >::type > make_SolveAction(const Solver &solver, char op='N')
Free function for making SolveAction's.
Definition: SolveAction.h:67
Routines for printing the contents of various std::container's to a std::ostream using operator <<...
Various utility functions/classes related to scalar Number types.
Composes two Action's A and B, yielding an Action that applies (A+B)*X.
static Vector< Number > zeros(int N)
Generates a zeros Vector of specified size.
Definition: Vector.cpp:280
Composes two Action's A and B, yielding an Action that cascades A*(B*X)
General purpose dense matrix container, O(i*j) storage.
Container for either a column vector or row vector (depends upon the usage context) ...
Reflects Precision trait for a Number, scalar Number types should specialize it.
Definition: Number.h:33
General purpose linear solver, no symmetry/definiteness assumptions upon A (just square) ...
Prints an Expression, by evaluate()'ing it at every Index i.
Function overloads (sin, exp, etc) for Expression's.
Adapts a class with a .solve() method into an Action.
An Action for multiplying by a dense Matrix or SparseMatrix using gemm().
Factors a square matrix A into L*U, presents solve methods.
Definition: LUSolver.h:30
Container for a diagonal matrix, O(n) storage. Used by SVD, row/column scaling, etc.