18int main(
int argc,
char* argv[])
21 SlepcSession::getInstance(argc,argv);
24 cout <<
"=== EVP: real eigenvalue problem ====\n";
41 SparseLinearEigenSystem<double> system( &a, &b );
46 catch (
const std::runtime_error &error )
48 cout <<
" \033[1;31;48m * FAILED THROUGH EXCEPTION BEING RAISED \033[0m\n";
53 system.set_shift( 4 );
54 system.tag_eigenvalues_disc( +1, 2 );
56 lambdas = system.get_tagged_eigenvalues();
57 const double tol = 1.e-13;
60 if ( std::abs( lambdas[ 0 ] - 5.0 ) < tol )
62 cout <<
"\033[1;32;48m * PASSED \033[0m\n";
66 cout <<
"\033[1;31;48m * FAILED \033[0m\n";
68 cout <<
" Final error = " << std::abs( lambdas[ 0 ] - 5.0 ) <<
"\n";
Specification of the sparse linear eigensystem class.
An DenseVector class – a dense vector object.
void dump() const
Dump to std::cout.
A matrix class that constructs a SPARSE matrix as a row major std::vector of SparseVectors.
A collection of OO numerical routines aimed at simple (typical) applied problems in continuum mechani...