ergo
pur::Purification_scaled< Tmatrix > Class Template Reference

#include <Purification_scaled.h>

Classes

class  Time
 

Public Types

typedef Tmatrix::real real
 

Public Member Functions

 Purification_scaled (Tmatrix &F_and_D, mat::Interval< real > const &eigFInt, mat::Interval< real > const &hoF, mat::Interval< real > const &luF, real const toleratedEigenvalError, real const toleratedSubspaceError, int const max_steps, mat::normType normForTruncation, bool const use_scaling)
 
void purify ()
 
void get_homo_lumo_intervals (mat::Interval< real > &hoF, mat::Interval< real > &luF)
 Computed eigenvalues of F. More...
 
void mInfo (std::ostream &file) const
 
void mTime (std::ostream &file) const
 

Private Member Functions

void improve_homo_lumo_based_on_normXmX2 (mat::Interval< real > &homo, mat::Interval< real > &lumo, bool &homo_was_computed, bool &lumo_was_computed)
 Computes interval containing spectral norm of X-X^2 matrix. More...
 
real accumulated_error ()
 Total accumulated error due to removal of small matrix elements up to current iteration. More...
 
void propagate_homo_information ()
 Go through step vector and improve homo information in each step possible. More...
 
void propagate_lumo_information ()
 Go through step vector and improve lumo information in each step possible. More...
 
bool converged ()
 

Static Private Member Functions

static int get_poly (real const homo, real const lumo)
 
static int estimated_steps_left (mat::Interval< real > eig_homo, mat::Interval< real > eig_lumo, real const toleratedEigenvalError, int const max_steps, bool const use_scaling)
 Estimates number of remaining iterations. More...
 
static real get_threshold (real const gap, int const steps_left, real const acc_error, real const toleratedSubspaceError)
 Compute acceptable error due to truncation in an iteration based on the current band gap, the number of steps left, and the total tolerated error in the occupied subspace ( tolSubspaceError ) as measured by the largest canonical angle between exact and perturbed subspaces. More...
 

Private Attributes

Tmatrix & X
 
Tmatrix X2
 
int n
 
std::vector< Step< real > > puri_steps
 
mat::Interval< real > const & eigFInt
 
real const tolEigenvalError
 Tolerated error in eigenvalues at convergence. More...
 
real const tolSubspaceError
 Tolerated subspace error. More...
 
unsigned int current_step
 
mat::normType normTruncation
 
bool use_scaling
 
bool homo_is_computed
 
bool lumo_is_computed
 

Member Typedef Documentation

template<typename Tmatrix>
typedef Tmatrix::real pur::Purification_scaled< Tmatrix >::real

Constructor & Destructor Documentation

template<typename Tmatrix >
pur::Purification_scaled< Tmatrix >::Purification_scaled ( Tmatrix &  F_and_D,
mat::Interval< real > const &  eigFInt,
mat::Interval< real > const &  hoF,
mat::Interval< real > const &  luF,
real const  toleratedEigenvalError,
real const  toleratedSubspaceError,
int const  max_steps,
mat::normType  normForTruncation,
bool const  use_scaling 
)
Parameters
F_and_D(input/output) F on input, D on output
eigFInt(input) Interval containing all eigenvalues.
hoF(input) Interval containing the HOMO eigenvalue.
luF(input) Interval containing the LUMO eigenvalue.
toleratedEigenvalErrorTolerated deviation of eigenvalues from 0 and 1 in the final result.
toleratedSubspaceErrorTolerated error in the occupied subspace in the final result (measured by sin(theta)).
max_stepsMax nr of iterations.
normForTruncationNorm to use for truncation.
use_scalingUse scaling technique to speed up calculation.

References pur::Purification_scaled< Tmatrix >::accumulated_error(), pur::Purification_scaled< Tmatrix >::current_step, mat::Interval< Treal >::empty(), pur::Purification_scaled< Tmatrix >::estimated_steps_left(), pur::Purification_scaled< Tmatrix >::get_threshold(), mat::Interval< Treal >::increase(), mat::Interval< Treal >::intersect(), mat::Interval< Treal >::low(), pur::Purification_scaled< Tmatrix >::n, pur::Purification_scaled< Tmatrix >::normTruncation, pur::Purification_scaled< Tmatrix >::puri_steps, pur::Purification_scaled< Tmatrix >::Time::tic(), pur::Purification_scaled< Tmatrix >::Time::toc(), pur::Purification_scaled< Tmatrix >::tolEigenvalError, pur::Purification_scaled< Tmatrix >::tolSubspaceError, mat::Interval< Treal >::upp(), pur::Purification_scaled< Tmatrix >::use_scaling, pur::Purification_scaled< Tmatrix >::X, and pur::Purification_scaled< Tmatrix >::X2.

Member Function Documentation

template<typename Tmatrix >
Tmatrix::real pur::Purification_scaled< Tmatrix >::accumulated_error ( )
private

Total accumulated error due to removal of small matrix elements up to current iteration.

This value is (cheaply) recalculated in each iteration since information about HOMO/LUMO eigenvalues may have changed.

References pur::Purification_scaled< Tmatrix >::current_step, and pur::Purification_scaled< Tmatrix >::puri_steps.

Referenced by pur::Purification_scaled< Tmatrix >::get_poly(), pur::Purification_scaled< Tmatrix >::Purification_scaled(), and pur::Purification_scaled< Tmatrix >::purify().

template<typename Tmatrix >
int pur::Purification_scaled< Tmatrix >::estimated_steps_left ( mat::Interval< real eig_homo,
mat::Interval< real eig_lumo,
real const  toleratedEigenvalError,
int const  max_steps,
bool const  use_scaling 
)
staticprivate

Estimates number of remaining iterations.

Possible movements of eigenvalues due to truncation is not taken into account. The computed number is actually the number of truncations left and since the function is always called just before a truncation, it is always larger than or equal to 1.

References pur::Purification_scaled< Tmatrix >::get_poly(), pur::Purification_scaled< Tmatrix >::get_threshold(), mat::Interval< Treal >::low(), mat::Interval< Treal >::puriStep(), and mat::Interval< Treal >::upp().

Referenced by pur::Purification_scaled< Tmatrix >::get_poly(), pur::Purification_scaled< Tmatrix >::Purification_scaled(), and pur::Purification_scaled< Tmatrix >::purify().

template<typename Tmatrix >
Tmatrix::real pur::Purification_scaled< Tmatrix >::get_threshold ( real const  gap,
int const  steps_left,
real const  acc_error,
real const  toleratedSubspaceError 
)
staticprivate

Compute acceptable error due to truncation in an iteration based on the current band gap, the number of steps left, and the total tolerated error in the occupied subspace ( tolSubspaceError ) as measured by the largest canonical angle between exact and perturbed subspaces.

Information about the total error accumulated so far is also used.

References pur::Purification_scaled< Tmatrix >::improve_homo_lumo_based_on_normXmX2().

Referenced by pur::Purification_scaled< Tmatrix >::estimated_steps_left(), pur::Purification_scaled< Tmatrix >::get_poly(), pur::Purification_scaled< Tmatrix >::Purification_scaled(), and pur::Purification_scaled< Tmatrix >::purify().

template<typename Tmatrix >
void pur::Purification_scaled< Tmatrix >::improve_homo_lumo_based_on_normXmX2 ( mat::Interval< real > &  homo,
mat::Interval< real > &  lumo,
bool &  homo_was_computed,
bool &  lumo_was_computed 
)
private
template<typename Tmatrix >
void pur::Purification_scaled< Tmatrix >::propagate_homo_information ( )
private
template<typename Tmatrix >
void pur::Purification_scaled< Tmatrix >::propagate_lumo_information ( )
private

Member Data Documentation

template<typename Tmatrix>
mat::Interval<real> const& pur::Purification_scaled< Tmatrix >::eigFInt
private

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