28 cout <<
"=== Matrix: Example linear solver ==================\n";
33 const double tol = 1.e-10;
47 std::cout <<
" Simple 2x2 system solved by LAPACK LU.\n";
54 catch (
const std::runtime_error &error )
56 cout <<
" \033[1;31;48m * FAILED THROUGH EXCEPTION BEING RAISED \033[0m\n";
65 std::cout <<
" Simple 2x2 system was not solved correctly\n";
66 std::cout <<
" residual vector's inf_norm = " << B.
inf_norm() <<
"\n";
71 std::cout <<
" Simple 2x2 `dense' solver works.\n";
79 cout <<
"\033[1;31;48m * FAILED \033[0m\n";
84 cout <<
"\033[1;32;48m * PASSED \033[0m\n";
Specification of the linear system class.
Specification of the linear system class.
A spec for the CppNoddy Timer object.
A spec for a collection of utility functions.
A linear system class for vector right-hand sides.
void solve()
Solve the sparse system.
A matrix class that constructs a DENSE matrix as a row major std::vector of DenseVectors.
An DenseVector class – a dense vector object.
double inf_norm() const
Infinity norm.
void sub(const DenseVector< _Type > &x)
Subtract a vector, element wise, equivalent to -=.
A collection of OO numerical routines aimed at simple (typical) applied problems in continuum mechani...