Unit tests for GMRES and PCG iterative linear solvers in Solver/Linear.hpp.
More...
#include "doctest.h"
#include "Solver/Linear.hpp"
#include <Eigen/Dense>
#include <iostream>
#include <iomanip>
Go to the source code of this file.
|
| | TEST_CASE ("GMRES: solve 3x3 SPD system exactly") |
| |
| | TEST_CASE ("GMRES: solve 10x10 random SPD system") |
| |
| | TEST_CASE ("GMRES: diagonal preconditioner improves convergence") |
| |
| | TEST_CASE ("PCG: solve 5x5 SPD system") |
| |
Unit tests for GMRES and PCG iterative linear solvers in Solver/Linear.hpp.
Tests solve Ax=b for small dense systems where the exact solution is known. Uses a thin Vec wrapper around Eigen::VectorXd.
Definition in file test_Linear.cpp.
◆ DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
| #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN |
◆ TEST_CASE() [1/4]
| TEST_CASE |
( |
"GMRES: diagonal preconditioner improves convergence" |
| ) |
|
◆ TEST_CASE() [2/4]
| TEST_CASE |
( |
"GMRES: solve 10x10 random SPD system" |
| ) |
|
◆ TEST_CASE() [3/4]
| TEST_CASE |
( |
"GMRES: solve 3x3 SPD system exactly" |
| ) |
|
◆ TEST_CASE() [4/4]
| TEST_CASE |
( |
"PCG: solve 5x5 SPD system" |
| ) |
|