TBTK
|
Need a break? Support the development by playing Polarity Puzzles |
Solves a Model using Arnoldi iteration. More...
#include <ArnoldiIterator.h>
Public Types | |
enum | Mode { Normal, ShiftAndInvert } |
Public Member Functions | |
ArnoldiIterator () | |
void | setMode (Mode mode) |
Mode | getMode () const |
void | setNumEigenValues (int numEigenValues) |
int | getNumEigenValues () const |
void | setCalculateEigenVectors (bool calculateEigenVectors) |
bool | getCalculateEigenVectors () const |
void | setNumLanczosVectors (int numLanczosVectors) |
int | getNumLanczosVectors () const |
void | setTolerance (double tolerance) |
void | setMaxIterations (int maxIterations) |
void | setCentralValue (double centralValue) |
void | run () |
const CArray< std::complex< double > > & | getEigenValues () const |
const double | getEigenValue (int state) const |
const std::complex< double > | getAmplitude (int state, const Index &index) |
Public Member Functions inherited from TBTK::Solver::Solver | |
Solver () | |
virtual | ~Solver () |
virtual void | setModel (Model &model) |
Model & | getModel () |
const Model & | getModel () const |
Public Member Functions inherited from TBTK::Communicator | |
Communicator (bool verbose) | |
void | setVerbose (bool verbose) |
bool | getVerbose () const |
Additional Inherited Members | |
Static Public Member Functions inherited from TBTK::Communicator | |
static void | setGlobalVerbose (bool globalVerbose) |
static bool | getGlobalVerbose () |
Solves a Model using Arnoldi iteration.
The ArnoldiIterator calculates a selected number of eigenvalues and eigenvectors using Arnoldi iteration. Use the PropertyExtractor::ArnoldiIterator to extract Properties.
The ArnoldiIterator is particularly suited for large problems where information from a small energy interval is needed. Compared to the Diagonalizer, the ArnoldiIterator can treat much larger problems as long as only a few eigenvalues or eigenvectors are needed.
Normal mode:
In the normal mode, the ArnoldiIterator calculates eigenvalues and eigenvectors with extremal eigenvalues.
Shift-and-invert mode:
In the shift-and-invert mode, the ArnoldiIterator calculates the eigenvalues and eigenvectors closest to a given "central value".
|
strong |
Enum class describing the different modes of operation.
Normal: Lanczos like iteration for finding extreme eigenvalues and corresponding eigen vectors.
ShiftAndInvert: Shift and invert iteration for finding eigen values around a given value and the corresponding eigen vectors.
TBTK::Solver::ArnoldiIterator::ArnoldiIterator | ( | ) |
Constructs a Solver::ArnoldiIterator.
|
inline |
Get amplitude for given eigen vector \(n\) and physical index \(x\): \(\Psi_{n}(x)\).
state | Eigen state number \(n\). |
index | Physical index \(\). |
|
inline |
Get wether eigen vectors are calculated or not.
|
inline |
Get eigen value.
|
inline |
Get eigenValues.
|
inline |
Get mode of operation.
|
inline |
Get number of eigenvalues.
|
inline |
Get the number of Lanczos vectors to use. (Dimension of the Krylov space).
void TBTK::Solver::ArnoldiIterator::run | ( | ) |
Run the implicitly restarted Arnoldi algorithm.
|
inline |
Set whether eigen vectors should be calculated.
calculateEigenVectors | True to enable the calculation of eigenvectors. |
|
inline |
Set amount by which eigenvalues will be shifted during calculations. I.e. the calculation is caried out on \(H -\sigma I\) rather than \(H\). Eigenvalues are shifted back, so this does not affect the eigenvalues. However, since Arnoldi iteration calculates extreme eigenvalues in the normal mode and eigenvalues closest to zero in shift-and-invert mode, it does affect which eigenvalues that are calculated.
Note: The shift is not yet implemented in for the normal mode.
centralValue | The value \(\sigma\) by which the Hamiltonian is shifted. |
|
inline |
Set the maixmum number of iterations in the implicitly restarted Arnoldi algorithm.
maxIterations | The maximum number of iterations performed in the implicitly restarted Arnoldi algorithm. |
|
inline |
Set mode of operation.
mode | The mode of operation to use. |
|
inline |
Set the number of eigenvalues to calculate.
numEigenValues | The number of eigenvalues to calculate. |
|
inline |
Set the number of Lanczos vectors to use. (Dimension of the Krylov space).
numLanczosVectors | The dimension of the Krylov space used. |
|
inline |
Set the accpeted tolerance. Passed to the ARPACK functions [d/z]naupd and [d/z]neupd. See the TOL parameter in the ARPACK documentation for more information.
tolerance | Tolerance used by ARPACK. |