DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
test_Linear.cpp File Reference

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>
Include dependency graph for test_Linear.cpp:

Go to the source code of this file.

Classes

struct  DVec
 

Macros

#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
 

Functions

 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")
 

Detailed Description

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.

Macro Definition Documentation

◆ DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN

#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN

Definition at line 9 of file test_Linear.cpp.

Function Documentation

◆ TEST_CASE() [1/4]

TEST_CASE ( "GMRES: diagonal preconditioner improves convergence"  )

Definition at line 100 of file test_Linear.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [2/4]

TEST_CASE ( "GMRES: solve 10x10 random SPD system"  )

Definition at line 73 of file test_Linear.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [3/4]

TEST_CASE ( "GMRES: solve 3x3 SPD system exactly"  )

Definition at line 44 of file test_Linear.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [4/4]

TEST_CASE ( "PCG: solve 5x5 SPD system"  )

Definition at line 152 of file test_Linear.cpp.

Here is the call graph for this function: