ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Setup_Psi_pw Class Reference

#include <setup_psi_pw.h>

Collaboration diagram for Setup_Psi_pw:

Public Types

enum class  PrecisionType { Float = 0 , Double = 1 , ComplexFloat = 2 , ComplexDouble = 3 }

Public Member Functions

 Setup_Psi_pw ()
 ~Setup_Psi_pw ()
void before_runner (const UnitCell &ucell, const K_Vectors &kv, const Structure_Factor &sf, const ModulePW::PW_Basis_K &pw_wfc, const int &lmaxkb, const Input_para &inp)
void init (hamilt::HamiltBase *p_hamilt)
void update_psi_d ()
void copy_d2h ()
void sync_cpu ()
 Refresh the double CPU mirror from the native device and precision.
void clean ()
int get_nbands () const
int get_nk () const
int get_nbasis () const
std::size_t size () const
base_device::AbacusDevice_t get_device_type () const
PrecisionType get_precision_type () const
template<typename T, typename Device>
psi::Psi< T, Device > * get_psi_t ()
template<typename T, typename Device>
const psi::Psi< T, Device > * get_psi_t () const
template<typename T, typename Device>
psi::Psi< std::complex< double >, Device > * get_psi_d ()
template<typename T, typename Device>
const psi::Psi< std::complex< double >, Device > * get_psi_d () const

Public Attributes

psi::Psi< std::complex< double >, base_device::DEVICE_CPU > * psi_cpu = nullptr
psi::PSIPrepareBase * p_psi_init = nullptr

Private Member Functions

template<typename T, typename Device>
void before_runner_impl (const UnitCell &ucell, const K_Vectors &kv, const Structure_Factor &sf, const ModulePW::PW_Basis_K &pw_wfc, const int &lmaxkb, const Input_para &inp)
template<typename T, typename Device>
void init_impl (hamilt::Hamilt< T, Device > *p_hamilt)
template<typename T, typename Device>
void update_psi_d_impl ()
template<typename T, typename Device>
void clean_impl ()
template<typename T, typename Device>
void copy_d2h_impl ()
template<typename T, typename Device>
void castmem_d2h_impl (std::complex< double > *dst, const std::complex< double > *src, const std::size_t size)
template<typename T, typename Device>
void castmem_d2h_impl (std::complex< double > *dst, const std::complex< float > *src, const std::size_t size)

Private Attributes

void * psi_t = nullptr
void * psi_d = nullptr
bool already_initpsi = false
base_device::AbacusDevice_t device_type_ = base_device::CpuDevice
PrecisionType precision_type_ = PrecisionType::ComplexDouble

Member Enumeration Documentation

◆ PrecisionType

enum class Setup_Psi_pw::PrecisionType
strong
Enumerator
Float 
Double 
ComplexFloat 
ComplexDouble 

Constructor & Destructor Documentation

◆ Setup_Psi_pw()

Setup_Psi_pw::Setup_Psi_pw ( )

◆ ~Setup_Psi_pw()

Setup_Psi_pw::~Setup_Psi_pw ( )

Member Function Documentation

◆ before_runner()

void Setup_Psi_pw::before_runner ( const UnitCell & ucell,
const K_Vectors & kv,
const Structure_Factor & sf,
const ModulePW::PW_Basis_K & pw_wfc,
const int & lmaxkb,
const Input_para & inp )
Here is the call graph for this function:

◆ before_runner_impl()

template<typename T, typename Device>
template void Setup_Psi_pw::before_runner_impl< std::complex< double >, base_device::DEVICE_CPU > ( const UnitCell & ucell,
const K_Vectors & kv,
const Structure_Factor & sf,
const ModulePW::PW_Basis_K & pw_wfc,
const int & lmaxkb,
const Input_para & inp )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ castmem_d2h_impl() [1/2]

template<typename T, typename Device>
void Setup_Psi_pw::castmem_d2h_impl ( std::complex< double > * dst,
const std::complex< double > * src,
const std::size_t size )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ castmem_d2h_impl() [2/2]

template<typename T, typename Device>
void Setup_Psi_pw::castmem_d2h_impl ( std::complex< double > * dst,
const std::complex< float > * src,
const std::size_t size )
private
Here is the call graph for this function:

◆ clean()

void Setup_Psi_pw::clean ( )
Here is the call graph for this function:

◆ clean_impl()

template<typename T, typename Device>
template void Setup_Psi_pw::clean_impl< std::complex< double >, base_device::DEVICE_CPU > ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_d2h()

void Setup_Psi_pw::copy_d2h ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_d2h_impl()

template<typename T, typename Device>
void Setup_Psi_pw::copy_d2h_impl ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_device_type()

base_device::AbacusDevice_t Setup_Psi_pw::get_device_type ( ) const
inline

◆ get_nbands()

int Setup_Psi_pw::get_nbands ( ) const
inline
Here is the call graph for this function:

◆ get_nbasis()

int Setup_Psi_pw::get_nbasis ( ) const
inline
Here is the call graph for this function:

◆ get_nk()

int Setup_Psi_pw::get_nk ( ) const
inline
Here is the call graph for this function:

◆ get_precision_type()

PrecisionType Setup_Psi_pw::get_precision_type ( ) const
inline

◆ get_psi_d() [1/2]

template<typename T, typename Device>
psi::Psi< std::complex< double >, Device > * Setup_Psi_pw::get_psi_d ( )
inline
Here is the caller graph for this function:

◆ get_psi_d() [2/2]

template<typename T, typename Device>
const psi::Psi< std::complex< double >, Device > * Setup_Psi_pw::get_psi_d ( ) const
inline

◆ get_psi_t() [1/2]

template<typename T, typename Device>
psi::Psi< T, Device > * Setup_Psi_pw::get_psi_t ( )
inline
Here is the caller graph for this function:

◆ get_psi_t() [2/2]

template<typename T, typename Device>
const psi::Psi< T, Device > * Setup_Psi_pw::get_psi_t ( ) const
inline

◆ init()

void Setup_Psi_pw::init ( hamilt::HamiltBase * p_hamilt)
Here is the call graph for this function:

◆ init_impl()

template<typename T, typename Device>
template void Setup_Psi_pw::init_impl< std::complex< double >, base_device::DEVICE_CPU > ( hamilt::Hamilt< T, Device > * p_hamilt)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ size()

std::size_t Setup_Psi_pw::size ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sync_cpu()

void Setup_Psi_pw::sync_cpu ( )

Refresh the double CPU mirror from the native device and precision.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_psi_d()

void Setup_Psi_pw::update_psi_d ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_psi_d_impl()

template<typename T, typename Device>
template void Setup_Psi_pw::update_psi_d_impl< std::complex< double >, base_device::DEVICE_CPU > ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ already_initpsi

bool Setup_Psi_pw::already_initpsi = false
private

◆ device_type_

base_device::AbacusDevice_t Setup_Psi_pw::device_type_ = base_device::CpuDevice
private

◆ p_psi_init

psi::PSIPrepareBase* Setup_Psi_pw::p_psi_init = nullptr

◆ precision_type_

PrecisionType Setup_Psi_pw::precision_type_ = PrecisionType::ComplexDouble
private

◆ psi_cpu

psi::Psi<std::complex<double>, base_device::DEVICE_CPU>* Setup_Psi_pw::psi_cpu = nullptr

◆ psi_d

void* Setup_Psi_pw::psi_d = nullptr
private

◆ psi_t

void* Setup_Psi_pw::psi_t = nullptr
private

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