8 #ifndef TEST_ASSIMILATION_SOLVEMATRIXEQUATION_H_
9 #define TEST_ASSIMILATION_SOLVEMATRIXEQUATION_H_
14 #include "eckit/testing/Test.h"
25 #include "oops/util/Expect.h"
26 #include "oops/util/FloatCompare.h"
34 template <
typename MINIMIZER>
49 const int maxiter = 10;
50 const double tolerance = 1e-9;
52 const double normReduction = minimizer(x, b, A, precond, maxiter, tolerance);
53 EXPECT(oops::is_close_absolute(x.
x(), 3.0, 1.0e-9));
54 EXPECT(oops::is_close_absolute(x.
y(), 3.0, 1.0e-9));
55 EXPECT(oops::is_close_absolute(x.
z(), 4.0, 1.0e-9));
56 EXPECT(oops::is_close_absolute(normReduction, 0.0, 1.0e-9));
59 CASE(
"assimilation/SolveMatrixEquation/FGMRES") {
63 CASE(
"assimilation/SolveMatrixEquation/GMRESR") {
67 CASE(
"assimilation/SolveMatrixEquation/MINRES") {
71 CASE(
"assimilation/SolveMatrixEquation/IPCG") {
75 CASE(
"assimilation/SolveMatrixEquation/PCG") {
79 CASE(
"assimilation/SolveMatrixEquation/PLanczos") {
85 std::string
testid()
const override {
return "test::SolveMatrixEquation";}
Inexact-Preconditioned Conjugate Gradients solver.
Preconditioned Conjugate Gradients solver.
Preconditioned Lanczos solver.
std::string testid() const override
void register_tests() const override
void clear() const override
void test_SolveMatrixEquation(MINIMIZER minimizer)
oops::DiagonalMatrix< Vector3D > Matrix3D
CASE("test_linearmodelparameterswrapper_valid_name")