BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
belfem::fem::dofmgr::EigenValues Class Reference

#include <cl_FEM_DofMgr_EigenValues.hpp>

Public Member Functions

 EigenValues (DofManager *aParent)
 ~EigenValues ()
 EigenValues (const EigenValues &)=delete
 EigenValues (EigenValues &&)=delete
EigenValuesoperator= (const EigenValues &)=delete
EigenValuesoperator= (EigenValues &&)=delete
void set_num_minvals (const index_t aNumMinVals)
void set_num_maxvals (const index_t aNumMaxVals)
void set_tolerance (const real aTolerance)
 relative accuracy demanded of each Ritz value.
void set_subspace_size (const index_t aSubspaceSize)
 floor for the Krylov subspace.
void set_max_iterations (const index_t aNumMaxIter)
 restart budget handed to ( p )dnaupd.
void set_symmetric (const bool aSymmetric)
 declare the matrix symmetric, selecting dsaupd / dseupd over dnaupd / dneupd.
bool is_symmetric () const
 whether the spectral ratio this object returns may be called kappa_2.
real compute_conditioning ()
real compute_lambda_max ()
real compute_smallest_eigenvalues ()
 compute the eigenvalues at one end of the spectrum and return the extremal magnitude found there.
real compute_largest_eigenvalues ()
const Vector< real > & lambda_real () const
 real and imaginary parts of the values found by the last call above.
const Vector< real > & lambda_imag () const
int_t number_of_converged_values () const
 how many of the requested values actually converged
const stringbackend_label () const
 "ARPACK" or "PARPACK", whichever drove the last call
EigenOutcome outcome () const
 how the last compute_conditioning() ended.
void reset ()

Constructor & Destructor Documentation

◆ EigenValues() [1/3]

belfem::fem::dofmgr::EigenValues::EigenValues ( DofManager * aParent)

◆ ~EigenValues()

belfem::fem::dofmgr::EigenValues::~EigenValues ( )

◆ EigenValues() [2/3]

belfem::fem::dofmgr::EigenValues::EigenValues ( const EigenValues & )
delete

◆ EigenValues() [3/3]

belfem::fem::dofmgr::EigenValues::EigenValues ( EigenValues && )
delete

Member Function Documentation

◆ backend_label()

const string & belfem::fem::dofmgr::EigenValues::backend_label ( ) const
inline

"ARPACK" or "PARPACK", whichever drove the last call

◆ compute_conditioning()

real belfem::fem::dofmgr::EigenValues::compute_conditioning ( )

◆ compute_lambda_max()

real belfem::fem::dofmgr::EigenValues::compute_lambda_max ( )

◆ compute_largest_eigenvalues()

real belfem::fem::dofmgr::EigenValues::compute_largest_eigenvalues ( )

◆ compute_smallest_eigenvalues()

real belfem::fem::dofmgr::EigenValues::compute_smallest_eigenvalues ( )

compute the eigenvalues at one end of the spectrum and return the extremal magnitude found there.

how many are computed is set by set_num_minvals / set_num_maxvals ; the full set is exposed through lambda_real / lambda_imag

◆ is_symmetric()

bool belfem::fem::dofmgr::EigenValues::is_symmetric ( ) const
inline

whether the spectral ratio this object returns may be called kappa_2.

That needs symmetry AND a positive definite spectrum – real eigenvalues alone are not enough

◆ lambda_imag()

const Vector< real > & belfem::fem::dofmgr::EigenValues::lambda_imag ( ) const
inline

◆ lambda_real()

const Vector< real > & belfem::fem::dofmgr::EigenValues::lambda_real ( ) const
inline

real and imaginary parts of the values found by the last call above.

Which ranks hold them depends on the build:

  • serial, or PARPACK: valid on every rank. pdneupd returns the same spectrum everywhere
  • multi-rank without PARPACK: valid on the MASTER ONLY. The master computes alone and only the scalar extremum is broadcast, so a worker's buffers stay stale

The same split applies to number_of_converged_values().

◆ number_of_converged_values()

int_t belfem::fem::dofmgr::EigenValues::number_of_converged_values ( ) const
inline

how many of the requested values actually converged

◆ operator=() [1/2]

EigenValues & belfem::fem::dofmgr::EigenValues::operator= ( const EigenValues & )
delete

◆ operator=() [2/2]

EigenValues & belfem::fem::dofmgr::EigenValues::operator= ( EigenValues && )
delete

◆ outcome()

EigenOutcome belfem::fem::dofmgr::EigenValues::outcome ( ) const
inline

how the last compute_conditioning() ended.

Identical on every rank – it is broadcast before it is stored

◆ reset()

void belfem::fem::dofmgr::EigenValues::reset ( )

◆ set_max_iterations()

void belfem::fem::dofmgr::EigenValues::set_max_iterations ( const index_t aNumMaxIter)

restart budget handed to ( p )dnaupd.

There is no matvec budget: one restart does NOT cost ncv - nev products ( ARPACK boosts nev internally between restarts, so np shrinks; measured 10.1 and 12.2 products per restart at ncv - nev = 19 ), so this bounds the restart count and the achieved product count is REPORTED rather than modeled

◆ set_num_maxvals()

void belfem::fem::dofmgr::EigenValues::set_num_maxvals ( const index_t aNumMaxVals)

◆ set_num_minvals()

void belfem::fem::dofmgr::EigenValues::set_num_minvals ( const index_t aNumMinVals)

◆ set_subspace_size()

void belfem::fem::dofmgr::EigenValues::set_subspace_size ( const index_t aSubspaceSize)

floor for the Krylov subspace.

Larger usually means fewer matrix-vector products but a bigger basis ( n x ncv )

◆ set_symmetric()

void belfem::fem::dofmgr::EigenValues::set_symmetric ( const bool aSymmetric)

declare the matrix symmetric, selecting dsaupd / dseupd over dnaupd / dneupd.

Lanczos is cheaper and its workspace is smaller, and for a symmetric matrix the spectral ratio IS kappa_2 – which the nonsymmetric driver cannot promise.

This is an ASSERTION BY THE CALLER, not a measurement. A matrix wrongly declared symmetric gives a wrong answer with no diagnostic: dsaupd only ever references one triangle's worth of information through the matvec, so an unsymmetric part is silently ignored rather than detected

◆ set_tolerance()

void belfem::fem::dofmgr::EigenValues::set_tolerance ( const real aTolerance)

relative accuracy demanded of each Ritz value.

The small end of the spectrum is only reachable while this stays above eps_mach * kappa – see the note at mEpsilon before lowering it. Non-positive values are rejected: ARPACK reads <= 0 as "use machine precision", which is exactly the unreachable setting on an ill conditioned matrix


The documentation for this class was generated from the following files: