ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
HSOperatorMock< T > Class Template Reference

#include <diago_mock.h>

Inheritance diagram for HSOperatorMock< T >:
Collaboration diagram for HSOperatorMock< T >:

Public Member Functions

void update_k (const int ik) override
 switch H and S to k point ik; must precede hpsi()/spsi() for that k
void hpsi (const T *x, T *hx, const int ld, const int nvec) const override
 hx[:, 0:nvec) = H * x[:, 0:nvec), both with leading dimension ld
void spsi (const T *x, T *sx, const int ld, const int nvec) const override
 sx[:, 0:nvec) = S * x[:, 0:nvec), both with leading dimension ld
Public Member Functions inherited from hsolver::HSOperator< T, base_device::DEVICE_CPU >
virtual ~HSOperator ()=default
virtual void add_to_subspace_h (T *hcc, const int n) const
virtual void export_subspace_vec (const T *vcc, const int n, const int nband) const

Detailed Description

template<typename T>
class HSOperatorMock< T >

The test matrix seen through hsolver::HSOperator, which is all the iterative eigensolvers need. H is the dense (distributed) matrix DIAGOTEST::hmatrix_local, S is the identity.

Every process holds npw_local[mypnum] columns of H, so H*x is formed as a partial product, reduced over the pool and redistributed like psi.

Member Function Documentation

◆ hpsi()

template<typename T>
void HSOperatorMock< T >::hpsi ( const T * x,
T * hx,
const int ld,
const int nvec ) const
inlineoverridevirtual

hx[:, 0:nvec) = H * x[:, 0:nvec), both with leading dimension ld

Implements hsolver::HSOperator< T, base_device::DEVICE_CPU >.

Here is the call graph for this function:

◆ spsi()

template<typename T>
void HSOperatorMock< T >::spsi ( const T * x,
T * sx,
const int ld,
const int nvec ) const
inlineoverridevirtual

sx[:, 0:nvec) = S * x[:, 0:nvec), both with leading dimension ld

Implements hsolver::HSOperator< T, base_device::DEVICE_CPU >.

◆ update_k()

template<typename T>
void HSOperatorMock< T >::update_k ( const int ik)
inlineoverridevirtual

switch H and S to k point ik; must precede hpsi()/spsi() for that k

Implements hsolver::HSOperator< T, base_device::DEVICE_CPU >.


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