22  cout << 
"=== Matrix: Example linear solver  ==================\n";
 
   27  const double tol = 1.e-10;
 
   41  std::cout << 
"     Simple 2x2 (dense) system solved by native Gauss Jordan routine.\n";
 
   48  catch ( 
const std::runtime_error &error )
 
   50    cout << 
" \033[1;31;48m  * FAILED THROUGH EXCEPTION BEING RAISED \033[0m\n";
 
   59    std::cout << 
" Simple 2x2 system was not solved correctly\n";
 
   60    std::cout << 
" residual vector's inf_norm = " << B.
inf_norm() << 
"\n";
 
   65    std::cout << 
"     Simple 2x2 `dense' solver works.\n";
 
   81  std::cout << 
"     Simple 2x2 (dense) complex system solved by native Gauss Jordan routine.\n";
 
   86    small_complex_system.
solve();
 
   88  catch ( 
const std::runtime_error &error )
 
   90    cout << 
" \033[1;31;48m  * FAILED THROUGH EXCEPTION BEING RAISED \033[0m\n";
 
   94  answer_complex[ 0 ] = 1.0;
 
   95  answer_complex[ 1 ] = 2.0;
 
   96  Bc.
sub( answer_complex );
 
   99    std::cout << 
" Simple 2x2 (complex) system was not solved correctly\n";
 
  100    std::cout << 
" residual vector's inf_norm = " << Bc.
inf_norm() << 
"\n";
 
  105    std::cout << 
"     Simple 2x2 `dense' complex solver works.\n";
 
  115    cout << 
"\033[1;31;48m  * FAILED \033[0m\n";
 
  120    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...