Eigenvalue solver using JDBSYM. More...

#include <jdbsym.hh>

Inheritance diagram for eigensolver::JdbSym:
eigensolver::EigenSolver< Real > concepts::OutputOperator

Public Member Functions

virtual uint converged () const
 
virtual uint converged () const=0
 Returns the number of converged eigen pairs. More...
 
virtual const concepts::Array< concepts::Vector< Real > * > & getEF ()
 
virtual const concepts::Array< Real > & getEV ()
 Returns an array with the eigen values. More...
 
virtual uint iterations () const
 
virtual uint iterations () const=0
 Returns the number of iterations. More...
 
 JdbSym (concepts::Operator< Real > &stiff, concepts::Operator< Real > &mass, Real tol, uint maxit=150, Real tau=0.0, uint jdtype=1, uint kmax=1, concepts::SolverFabric< Real > *fabric=0, const concepts::Array< concepts::Vector< Real > * > *start=0)
 Constructor. More...
 
virtual ~JdbSym ()
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 

Private Member Functions

void compute_ ()
 The real compute routine. More...
 

Private Attributes

bool computed_
 If false, the code will have to compute, otherwise not. More...
 
concepts::Array< Real > eigenvectors_
 Storage space for eigenvectors. More...
 
concepts::Array< concepts::Vector< Real > * > ev_
 References into storage for eigenvectors. More...
 
concepts::SolverFabric< Real > * fabric_
 
int it_
 Actual number of iterations. More...
 
const uint jdtype_
 Type of eigen value solver. More...
 
int k_conv_
 Number of converged eigenpais. More...
 
uint kmax_
 Number of eigenvalues. More...
 
concepts::Array< Real > lambda_
 Storage space for eigenvalues. More...
 
concepts::Operator< Real > & mass_
 Mass matrix (ie. More...
 
uint massCounter_
 
uint maxit_
 Maximal number of iterations. More...
 
const concepts::Array< concepts::Vector< Real > * > * start_
 
concepts::Operator< Real > & stiff_
 Stiffness matrix (ie. discretazation of spatial problem) More...
 
uint stiffCounter_
 Statistics, counts number of evaluations of matrix vector product. More...
 
Real tau_
 Target value for the eigenvalues. More...
 
Real tol_
 Tolerance. More...
 

Static Private Attributes

static int jdbsymLock_
 Lock for the eigen value solver. More...
 

Detailed Description

Eigenvalue solver using JDBSYM.

JDBSYM is an implementation of the Jacobi-Davidson method optimized for symmetric eigenvalue problems. It solves eigenproblems of the form $ A x = \lambda x $ and $ A x = \lambda B x $ with or without preconditioning, where A is symmetric and B is symmetric positive definite. The implementation supports blocking.

See also
Roman Geus and Oscar Chinellato, JDBSYM 0.14, 2000.
Roman Geus. The Jacobi-Davidson algorithm for solving large sparse symmetric eigenvalue problems with application to the design of accelerator cavities. PhD thesis 14734, Swiss Federal Institute of Technology Zurich, 2002.
Test:

test::GolubExample

test::GolubExampleSum

test::MaxwellTransmissionEVP

Author
Norbert Fernandes, 2002

Definition at line 48 of file jdbsym.hh.

Constructor & Destructor Documentation

◆ JdbSym()

eigensolver::JdbSym::JdbSym ( concepts::Operator< Real > &  stiff,
concepts::Operator< Real > &  mass,
Real  tol,
uint  maxit = 150,
Real  tau = 0.0,
uint  jdtype = 1,
uint  kmax = 1,
concepts::SolverFabric< Real > *  fabric = 0,
const concepts::Array< concepts::Vector< Real > * > *  start = 0 
)

Constructor.

Initializes the JdbSym class. As parameter it takes the few most important variables that are needed for the Jacobi-Davidson algorithm. The rest of the parameters are given as default and work in most cases. The class then solves the problem $ A x = \lambda B x $ where A, B are the stiffness and the mass matrices respectively.

The computation is only perfomed if getEV or getEF is called.

Parameters
stiffStiffness matrix A
massMass matrix B
fabricSolver fabric for a linear solver (preconditioner for the shifted stiffness matrix)
tolConvergence tolerance for the eigenpairs. For a pair $ (\lambda, u) $ convergence is defined by $ \| A u - \lambda B u \| < tol $
maxitMaximal number of iterations
tauTarget value of Jacobi-Davidson algorithm. The code will find the kmax eigenvalues closest to tau.
jdtypeType of solver required. An older solver and a newer solver are possible to use.
kmaxNumber of eigenpairs to be computed
startStarting vectors. Used to build the initial search subspace

◆ ~JdbSym()

virtual eigensolver::JdbSym::~JdbSym ( )
virtual

Member Function Documentation

◆ compute_()

void eigensolver::JdbSym::compute_ ( )
private

The real compute routine.

Fills lambda_ and ev_

See also
computed_

◆ converged() [1/2]

virtual uint eigensolver::JdbSym::converged ( ) const
inlinevirtual

Definition at line 84 of file jdbsym.hh.

◆ converged() [2/2]

virtual uint eigensolver::EigenSolver< Real >::converged ( ) const
pure virtualinherited

Returns the number of converged eigen pairs.

Implemented in eigensolver::ArPack< Real >.

◆ getEF()

virtual const concepts::Array<concepts::Vector<Real>*>& eigensolver::JdbSym::getEF ( )
virtual

◆ getEV()

virtual const concepts::Array<Real>& eigensolver::JdbSym::getEV ( )
virtual

Returns an array with the eigen values.

Deprecated:
: this interface requires that the returned array must be hold as a member variable of the class.

(use std::auto_pointer or similar)

Implements eigensolver::EigenSolver< Real >.

◆ info()

virtual std::ostream& eigensolver::JdbSym::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from eigensolver::EigenSolver< Real >.

◆ iterations() [1/2]

virtual uint eigensolver::JdbSym::iterations ( ) const
inlinevirtual

Definition at line 83 of file jdbsym.hh.

◆ iterations() [2/2]

virtual uint eigensolver::EigenSolver< Real >::iterations ( ) const
pure virtualinherited

Returns the number of iterations.

Implemented in eigensolver::ArPack< Real >.

Member Data Documentation

◆ computed_

bool eigensolver::JdbSym::computed_
private

If false, the code will have to compute, otherwise not.

Definition at line 93 of file jdbsym.hh.

◆ eigenvectors_

concepts::Array<Real> eigensolver::JdbSym::eigenvectors_
private

Storage space for eigenvectors.

Definition at line 118 of file jdbsym.hh.

◆ ev_

concepts::Array<concepts::Vector<Real>*> eigensolver::JdbSym::ev_
private

References into storage for eigenvectors.

Definition at line 120 of file jdbsym.hh.

◆ fabric_

concepts::SolverFabric<Real>* eigensolver::JdbSym::fabric_
private

Definition at line 125 of file jdbsym.hh.

◆ it_

int eigensolver::JdbSym::it_
private

Actual number of iterations.

Definition at line 111 of file jdbsym.hh.

◆ jdbsymLock_

int eigensolver::JdbSym::jdbsymLock_
staticprivate

Lock for the eigen value solver.

Definition at line 129 of file jdbsym.hh.

◆ jdtype_

const uint eigensolver::JdbSym::jdtype_
private

Type of eigen value solver.

Definition at line 107 of file jdbsym.hh.

◆ k_conv_

int eigensolver::JdbSym::k_conv_
private

Number of converged eigenpais.

Definition at line 113 of file jdbsym.hh.

◆ kmax_

uint eigensolver::JdbSym::kmax_
private

Number of eigenvalues.

Definition at line 109 of file jdbsym.hh.

◆ lambda_

concepts::Array<Real> eigensolver::JdbSym::lambda_
private

Storage space for eigenvalues.

Definition at line 116 of file jdbsym.hh.

◆ mass_

concepts::Operator<Real>& eigensolver::JdbSym::mass_
private

Mass matrix (ie.

discretization of the right hand side of $ A u = \lambda u $

Definition at line 99 of file jdbsym.hh.

◆ massCounter_

uint eigensolver::JdbSym::massCounter_
private

Definition at line 123 of file jdbsym.hh.

◆ maxit_

uint eigensolver::JdbSym::maxit_
private

Maximal number of iterations.

Definition at line 103 of file jdbsym.hh.

◆ start_

const concepts::Array<concepts::Vector<Real>*>* eigensolver::JdbSym::start_
private

Definition at line 126 of file jdbsym.hh.

◆ stiff_

concepts::Operator<Real>& eigensolver::JdbSym::stiff_
private

Stiffness matrix (ie. discretazation of spatial problem)

Definition at line 95 of file jdbsym.hh.

◆ stiffCounter_

uint eigensolver::JdbSym::stiffCounter_
private

Statistics, counts number of evaluations of matrix vector product.

Definition at line 123 of file jdbsym.hh.

◆ tau_

Real eigensolver::JdbSym::tau_
private

Target value for the eigenvalues.

Definition at line 105 of file jdbsym.hh.

◆ tol_

Real eigensolver::JdbSym::tol_
private

Tolerance.

Definition at line 101 of file jdbsym.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich