MADNESS 0.10.1
madness::BSHApply< T, NDIM > Class Template Reference

apply the BSH operator on a vector of functions with corresponding potentials More...

#include <BSHApply.h>

Collaboration diagram for madness::BSHApply< T, NDIM >:

Public Types

enum  return_value { update , residual }

Public Member Functions

 BSHApply (World &world)
std::vector< Function< T, NDIM > > add_coupling_and_levelshift (const std::vector< Function< T, NDIM > > psi, const Tensor< T > fock1) const
double eps_in_green (const T eps) const
 limit the orbital energy (diagonal fock matrix element) entering the Green's function parameter mu
std::vector< Function< T, NDIM > > make_bra (const std::vector< Function< T, NDIM > > &rhs) const
MolecularOrbitals< T, NDIM > operator() (const MolecularOrbitals< T, NDIM > &arg, const std::vector< Function< T, NDIM > > &Vpsi) const
 apply the BSH operator on the vector of functions and respective potentials
std::tuple< std::vector< Function< T, NDIM > >, Tensor< double > > operator() (const std::vector< Function< T, NDIM > > psi, const Tensor< T > eps, const std::vector< Function< T, NDIM > > &Vpsi1) const
 apply the BSH operator on the vector of functions and respective potentials

Public Attributes

double bshtol =1.e-5
bool destroy_Vpsi =false
double levelshift =0.0
double lo =1.e-6
Function< double, NDIM > metric
bool printme =false
return_value ret_value =residual
World & world

Detailed Description

template<typename T, std::size_t NDIM>
class madness::BSHApply< T, NDIM >

apply the BSH operator on a vector of functions with corresponding potentials

this class

  • constructs the bsh operator with the appropriate exponents
  • performs a level shift if necessary
  • adds coupling terms: ( T - fock(i,i) ) psi_i = -V psi_i + \sum_{j\neq i} psi_j fock(j,i) TODO: adding a level shift seems to make the operation less precise, why??

Member Enumeration Documentation

◆ return_value

template<typename T, std::size_t NDIM>
enum madness::BSHApply::return_value
Enumerator
update 
residual 

Constructor & Destructor Documentation

◆ BSHApply()

template<typename T, std::size_t NDIM>
madness::BSHApply< T, NDIM >::BSHApply ( World & world)
inline

References bshtol, metric, printme, and world.

Member Function Documentation

◆ add_coupling_and_levelshift()

template<typename T, std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::BSHApply< T, NDIM >::add_coupling_and_levelshift ( const std::vector< Function< T, NDIM > > psi,
const Tensor< T > fock1 ) const
inline

◆ eps_in_green()

template<typename T, std::size_t NDIM>
double madness::BSHApply< T, NDIM >::eps_in_green ( const T eps) const
inline

limit the orbital energy (diagonal fock matrix element) entering the Green's function parameter mu

References levelshift, and MADNESS_EXCEPTION.

Referenced by add_coupling_and_levelshift(), and operator()().

◆ make_bra()

template<typename T, std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::BSHApply< T, NDIM >::make_bra ( const std::vector< Function< T, NDIM > > & rhs) const
inline

References metric.

Referenced by operator()().

◆ operator()() [1/2]

template<typename T, std::size_t NDIM>
MolecularOrbitals< T, NDIM > madness::BSHApply< T, NDIM >::operator() ( const MolecularOrbitals< T, NDIM > & arg,
const std::vector< Function< T, NDIM > > & Vpsi ) const
inline

apply the BSH operator on the vector of functions and respective potentials

Parameters
[in]argthe MO structure holding MOs and orbital energies
[in]Vpsivector of functions V*MOs
Returns
an MO structure holding the residuals and the orbital energy updates

References madness::arg(), madness::MolecularOrbitals< T, NDIM >::get_mos(), and operator()().

◆ operator()() [2/2]

template<typename T, std::size_t NDIM>
std::tuple< std::vector< Function< T, NDIM > >, Tensor< double > > madness::BSHApply< T, NDIM >::operator() ( const std::vector< Function< T, NDIM > > psi,
const Tensor< T > eps,
const std::vector< Function< T, NDIM > > & Vpsi1 ) const
inline

apply the BSH operator on the vector of functions and respective potentials

Parameters
[in]epsorbital energies or the square fock matrix
[in]Vpsivector of functions V*MOs
Returns
an MO structure holding the residuals and the orbital energy updates

References add_coupling_and_levelshift(), madness::apply(), madness::BSHOperatorPtr(), bshtol, madness::copy(), madness::cpu_time(), madness::BaseTensor::dim(), eps_in_green(), madness::FunctionDefaults< NDIM >::get_thresh(), madness::inner(), lo, MADNESS_EXCEPTION, make_bra(), madness::BaseTensor::ndim(), madness::print(), printme, psi(), madness::real(), residual, ret_value, madness::BaseTensor::size(), madness::truncate(), update, and world.

Referenced by operator()().

Member Data Documentation

◆ bshtol

template<typename T, std::size_t NDIM>
double madness::BSHApply< T, NDIM >::bshtol =1.e-5

Referenced by BSHApply(), and operator()().

◆ destroy_Vpsi

template<typename T, std::size_t NDIM>
bool madness::BSHApply< T, NDIM >::destroy_Vpsi =false

◆ levelshift

template<typename T, std::size_t NDIM>
double madness::BSHApply< T, NDIM >::levelshift =0.0

◆ lo

template<typename T, std::size_t NDIM>
double madness::BSHApply< T, NDIM >::lo =1.e-6

◆ metric

template<typename T, std::size_t NDIM>
Function<double,NDIM> madness::BSHApply< T, NDIM >::metric

◆ printme

template<typename T, std::size_t NDIM>
bool madness::BSHApply< T, NDIM >::printme =false

◆ ret_value

template<typename T, std::size_t NDIM>
return_value madness::BSHApply< T, NDIM >::ret_value =residual

Referenced by operator()().

◆ world

template<typename T, std::size_t NDIM>
World& madness::BSHApply< T, NDIM >::world

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