MADNESS 0.10.1
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
madness::EigSolver< T, NDIM > Class Template Reference

#include <eigsolver.h>

Collaboration diagram for madness::EigSolver< T, NDIM >:
Collaboration graph
[legend]

Public Types

typedef Function< T, NDIMfuncT
 
typedef Vector< double, NDIMkvecT
 
typedef SeparatedConvolution< double, NDIMoperatorT
 
typedef std::shared_ptr< operatorTpoperatorT
 

Public Member Functions

 EigSolver (World &world, std::vector< funcT > phis, std::vector< double > eigs, std::vector< EigSolverOp< T, NDIM > * > ops, ElectronicStructureParams params)
 Constructor for non-periodic system.
 
 EigSolver (World &world, std::vector< funcT > phis, std::vector< double > eigs, std::vector< EigSolverOp< T, NDIM > * > ops, std::vector< kvecT > kpoints, ElectronicStructureParams params)
 Constructor for periodic system.
 
virtual ~EigSolver ()
 Destructor.
 
void addObserver (IEigSolverObserver< T, NDIM > *obs)
 
const std::vector< double > & eigs ()
 
double get_eig (int indx)
 
funcT get_phi (int indx)
 
void make_bsh_operators ()
 Makes the BSH Green's functions for the parallel solver (multi_solve()).
 
T matrix_element (const funcT &phii, const funcT &phij)
 Computes a matrix element given the left and right functions.
 
void multi_solve (int maxits)
 
const std::vector< funcT > & phis ()
 
void prepare_ops ()
 Preprocesses the operators for doing an iteration of "eigensolving".
 
void print_matrix_elements (const funcT &phii, const funcT &phij)
 Prints a matrix element given the left and right functions.
 
void solve (int maxits)
 
void update_occupation ()
 

Static Public Member Functions

static funcT compute_rho (std::vector< funcT > phis, std::vector< double > occs, const World &world)
 Computes the electronic density.
 

Private Attributes

std::vector< poperatorT_bops
 
std::vector< double > _eigs
 List of the eigenvalues.
 
std::vector< kvecT_kpoints
 List of the ops.
 
std::vector< IEigSolverObserver< T, NDIM > * > _obs
 
std::vector< double > _occs
 
std::vector< EigSolverOp< T, NDIM > * > _ops
 List of the ops.
 
ElectronicStructureParams _params
 
std::vector< funcT_phis
 List of the functions.
 
Function< double, NDIM_rho
 
World_world
 

Detailed Description

template<typename T, int NDIM>
class madness::EigSolver< T, NDIM >

The EigSolver class is the class that is the workhorse of both the Hartree Fock and the DFT algorithms. This class relies on the wrapper class to give it a list of operators to implement as its potential. This should allow for much more reuse.

Member Typedef Documentation

◆ funcT

template<typename T , int NDIM>
typedef Function<T,NDIM> madness::EigSolver< T, NDIM >::funcT

◆ kvecT

template<typename T , int NDIM>
typedef Vector<double,NDIM> madness::EigSolver< T, NDIM >::kvecT

◆ operatorT

template<typename T , int NDIM>
typedef SeparatedConvolution<double,NDIM> madness::EigSolver< T, NDIM >::operatorT

◆ poperatorT

template<typename T , int NDIM>
typedef std::shared_ptr<operatorT> madness::EigSolver< T, NDIM >::poperatorT

Constructor & Destructor Documentation

◆ EigSolver() [1/2]

template<typename T , int NDIM>
madness::EigSolver< T, NDIM >::EigSolver ( World world,
std::vector< funcT phis,
std::vector< double >  eigs,
std::vector< EigSolverOp< T, NDIM > * >  ops,
std::vector< kvecT kpoints,
ElectronicStructureParams  params 
)

◆ EigSolver() [2/2]

template<typename T , int NDIM>
madness::EigSolver< T, NDIM >::EigSolver ( World world,
std::vector< funcT phis,
std::vector< double >  eigs,
std::vector< EigSolverOp< T, NDIM > * >  ops,
ElectronicStructureParams  params 
)

◆ ~EigSolver()

template<typename T , int NDIM>
madness::EigSolver< T, NDIM >::~EigSolver ( )
virtual

Destructor.

Member Function Documentation

◆ addObserver()

template<typename T , int NDIM>
void madness::EigSolver< T, NDIM >::addObserver ( IEigSolverObserver< T, NDIM > *  obs)
inline

◆ compute_rho()

template<typename T , int NDIM>
Function< T, NDIM > madness::EigSolver< T, NDIM >::compute_rho ( std::vector< funcT phis,
std::vector< double >  occs,
const World world 
)
static

◆ eigs()

template<typename T , int NDIM>
const std::vector< double > & madness::EigSolver< T, NDIM >::eigs ( )
inline

◆ get_eig()

template<typename T , int NDIM>
double madness::EigSolver< T, NDIM >::get_eig ( int  indx)
inline

◆ get_phi()

template<typename T , int NDIM>
funcT madness::EigSolver< T, NDIM >::get_phi ( int  indx)
inline

◆ make_bsh_operators()

template<typename T , int NDIM>
void madness::EigSolver< T, NDIM >::make_bsh_operators ( )

◆ matrix_element()

template<typename T , int NDIM>
T madness::EigSolver< T, NDIM >::matrix_element ( const funcT phii,
const funcT phij 
)

Computes a matrix element given the left and right functions.

References axis, diff(), madness::inner(), NDIM, oi, and op().

◆ multi_solve()

template<typename T , int NDIM>
void madness::EigSolver< T, NDIM >::multi_solve ( int  maxits)

This solver has been optimized for usage in parallel. This solver processes each eigenfunction in a parallel fashion.

References madness::apply(), madness::EigSolver< T, NDIM >::compute_rho(), madness::gaxpy(), madness::inner(), make_bsh_operators(), madness::Function< T, NDIM >::norm2(), madness::norm2(), oi, op(), pi, madness::scale(), and madness::truncate().

◆ phis()

template<typename T , int NDIM>
const std::vector< funcT > & madness::EigSolver< T, NDIM >::phis ( )
inline

◆ prepare_ops()

template<typename T , int NDIM>
void madness::EigSolver< T, NDIM >::prepare_ops ( )

Preprocesses the operators for doing an iteration of "eigensolving".

References oi, and op().

◆ print_matrix_elements()

template<typename T , int NDIM>
void madness::EigSolver< T, NDIM >::print_matrix_elements ( const funcT phii,
const funcT phij 
)

Prints a matrix element given the left and right functions.

References axis, DEBUG_STREAM, diff(), madness::inner(), oi, op(), and T().

◆ solve()

template<typename T , int NDIM>
void madness::EigSolver< T, NDIM >::solve ( int  maxits)

◆ update_occupation()

template<typename T , int NDIM>
void madness::EigSolver< T, NDIM >::update_occupation ( )

Member Data Documentation

◆ _bops

template<typename T , int NDIM>
std::vector<poperatorT> madness::EigSolver< T, NDIM >::_bops
private

◆ _eigs

template<typename T , int NDIM>
std::vector<double> madness::EigSolver< T, NDIM >::_eigs
private

◆ _kpoints

template<typename T , int NDIM>
std::vector<kvecT> madness::EigSolver< T, NDIM >::_kpoints
private

List of the ops.

Referenced by madness::EigSolver< T, NDIM >::EigSolver().

◆ _obs

template<typename T , int NDIM>
std::vector<IEigSolverObserver<T,NDIM>*> madness::EigSolver< T, NDIM >::_obs
private

◆ _occs

template<typename T , int NDIM>
std::vector<double> madness::EigSolver< T, NDIM >::_occs
private

◆ _ops

template<typename T , int NDIM>
std::vector< EigSolverOp<T,NDIM>* > madness::EigSolver< T, NDIM >::_ops
private

List of the ops.

◆ _params

template<typename T , int NDIM>
ElectronicStructureParams madness::EigSolver< T, NDIM >::_params
private

◆ _phis

template<typename T , int NDIM>
std::vector<funcT> madness::EigSolver< T, NDIM >::_phis
private

◆ _rho

template<typename T , int NDIM>
Function<double,NDIM> madness::EigSolver< T, NDIM >::_rho
private

◆ _world

template<typename T , int NDIM>
World& madness::EigSolver< T, NDIM >::_world
private

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