MADNESS 0.10.1
|
#include <exchangeoperator.h>
Classes | |
class | MacroTaskExchangeRow |
class | MacroTaskExchangeSimple |
Public Types | |
typedef Exchange< T, NDIM >::Algorithm | Algorithm |
Public Member Functions | |
ExchangeImpl (World &world, const double lo, const double thresh) | |
default ctor | |
ExchangeImpl (World &world, const Nemo *nemo, const int ispin) | |
ctor with a nemo calculation | |
ExchangeImpl (World &world, const SCF *calc, const int ispin) | |
ctor with a conventional calculation | |
std::string | info () const |
bool | is_symmetric () const |
vecfuncT | operator() (const vecfuncT &vket) const |
apply the exchange operator on a vector of functions | |
ExchangeImpl & | set_algorithm (const Algorithm &alg) |
void | set_bra_and_ket (const vecfuncT &bra, const vecfuncT &ket) |
set the bra and ket orbital spaces, and the occupation | |
ExchangeImpl & | set_printlevel (const long &level) |
ExchangeImpl & | set_taskq (std::shared_ptr< MacroTaskQ > taskq1) |
ExchangeImpl & | symmetric (const bool flag) |
Static Public Member Functions | |
static auto | set_poisson (World &world, const double lo, const double econv=FunctionDefaults< 3 >::get_thresh()) |
Public Attributes | |
Algorithm | algorithm_ = multiworld_efficient_row |
Private Types | |
typedef Function< T, NDIM > | functionT |
typedef std::vector< functionT > | vecfuncT |
Private Member Functions | |
bool | do_print_timings () const |
vecfuncT | K_large_memory (const vecfuncT &vket, const double mul_tol=0.0) const |
computing the upper triangle of the double sum (over vket and the K orbitals) | |
vecfuncT | K_macrotask_efficient (const vecfuncT &vket, const double mul_tol=0.0) const |
exchange using macrotasks, i.e. apply K on a function in individual worlds | |
vecfuncT | K_macrotask_efficient_row (const vecfuncT &vket, const double mul_tol=0.0) const |
exchange using macrotasks, i.e. apply K on a function in individual worlds row-wise | |
vecfuncT | K_small_memory (const vecfuncT &vket, const double mul_tol=0.0) const |
computing the full square of the double sum (over vket and the K orbitals) | |
bool | printdebug () const |
Static Private Member Functions | |
static vecfuncT | compute_K_tile (World &world, const vecfuncT &mo_bra, const vecfuncT &mo_ket, const vecfuncT &vket, std::shared_ptr< real_convolution_3d > poisson, const bool symmetric, const double mul_tol=0.0) |
computing the upper triangle of the double sum (over vket and the K orbitals) | |
static void | print_timer (World &world) |
static void | reset_timer () |
Private Attributes | |
double | lo = 1.e-4 |
vecfuncT | mo_bra |
is the exchange matrix symmetric? K phi_i = \sum_k \phi_k \int \phi_k \phi_i | |
vecfuncT | mo_ket |
MOs for bra and ket. | |
double | mul_tol = FunctionDefaults<NDIM>::get_thresh()*0.1 |
long | printlevel = 0 |
bool | symmetric_ = false |
std::shared_ptr< MacroTaskQ > | taskq |
double | thresh = FunctionDefaults<NDIM>::get_thresh() |
World & | world |
Static Private Attributes | |
static std::atomic< long > | apply_timer |
static std::atomic< long > | mul1_timer |
timing | |
static std::atomic< long > | mul2_timer |
typedef Exchange<T,NDIM>::Algorithm madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::Algorithm |
|
private |
|
private |
|
inline |
default ctor
madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::ExchangeImpl | ( | World & | world, |
const SCF * | calc, | ||
const int | ispin | ||
) |
ctor with a conventional calculation
References madness::SCF::amo, madness::SCF::bmo, madness::conj(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::mo_bra, madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::mo_ket, madness::nonlinear_vector_solver(), and madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::world.
madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::ExchangeImpl | ( | World & | world, |
const Nemo * | nemo, | ||
const int | ispin | ||
) |
ctor with a nemo calculation
References madness::Nemo::get_calc(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::mo_bra, madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::mo_ket, madness::mul(), madness::NemoBase::ncf, madness::nonlinear_vector_solver(), madness::truncate(), and madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::world.
|
staticprivate |
computing the upper triangle of the double sum (over vket and the K orbitals)
References madness::apply(), madness::compress(), madness::cpu_time(), madness::WorldGopInterface::fence(), madness::World::gop, ij(), madness::mul_sparse(), madness::nonlinear_vector_solver(), madness::norm_tree(), madness::reconstruct(), and madness::truncate().
|
inlineprivate |
References madness::nonlinear_vector_solver(), and madness::World::rank().
|
inline |
|
inline |
|
private |
computing the upper triangle of the double sum (over vket and the K orbitals)
References madness::Exchange< T, NDIM >::is_symmetric(), lo, madness::nonlinear_vector_solver(), set_poisson(), and madness::truncate().
|
private |
exchange using macrotasks, i.e. apply K on a function in individual worlds
apply the exchange operator by tiling the exchange matrix
compute the matrix N_{ik} = N \phi_i \phi_k by tiles, with i,k \in batches A,B, do a local reduce within the tiles: K_{iB} = \sum_{k \in batch B} \phi_k N_{ik} and a universe-wide reduce of the tiles: K\phi_i = \sum_{batches B} K_{iB} saving up to half of the cpu time compared to the naive algorithm
T | number type |
NDIM | physical dimension of the argument vket |
vf | argument of the exchange operator |
mul_tol | cutoff parameter for sparse multiplication |
References madness::nonlinear_vector_solver(), and madness::print().
|
private |
exchange using macrotasks, i.e. apply K on a function in individual worlds row-wise
compute each row of the exchange matrix in different subworlds
References madness::get_size(), lo, madness::nonlinear_vector_solver(), madness::print(), and madness::SCFOperatorBase< T, NDIM >::taskq.
|
private |
computing the full square of the double sum (over vket and the K orbitals)
was vtol
was vtol
References madness::apply(), madness::gaxpy(), lo, madness::mul_sparse(), madness::nonlinear_vector_solver(), set_poisson(), and madness::truncate().
std::vector< Function< T, NDIM > > madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::operator() | ( | const vecfuncT & | vket | ) | const |
apply the exchange operator on a vector of functions
note that only one spin is used (either alpha or beta orbitals)
[in] | vket | the orbitals |i> that the operator is applied on |
|
inlinestaticprivate |
|
inlineprivate |
|
inlinestaticprivate |
|
inline |
References madness::nonlinear_vector_solver().
|
inline |
set the bra and ket orbital spaces, and the occupation
[in] | bra | bra space, must be provided as complex conjugate |
[in] | ket | ket space |
References madness::copy().
|
inlinestatic |
References madness::CoulombOperatorPtr(), and lo.
|
inline |
|
inline |
|
inline |
References madness::nonlinear_vector_solver().
Algorithm madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::algorithm_ = multiworld_efficient_row |
|
inlinestaticprivate |
|
private |
|
private |
is the exchange matrix symmetric? K phi_i = \sum_k \phi_k \int \phi_k \phi_i
Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::ExchangeImpl(), and madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::ExchangeImpl().
|
private |
MOs for bra and ket.
Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::ExchangeImpl(), and madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::ExchangeImpl().
|
inlinestaticprivate |
timing
|
inlinestaticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |