ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
ModuleIO::Get_wf_pw< T, Device > Class Template Reference

Write real-space norms and complex components of selected PW states. More...

#include <get_wf_pw.h>

Collaboration diagram for ModuleIO::Get_wf_pw< T, Device >:

Classes

class  Workspace

Public Member Functions

 Get_wf_pw (const psi::Psi< T, Device > &psi, const ModulePW::PW_Basis_K &pw_wfc, const ModulePW::PW_Basis &pw_rho, const ModulePW::PW_Basis &pw_rhod, const int nspin, const int global_nbands)
 Bind the wavefunction, grids, and global band/spin configuration.
void begin (const UnitCell &ucell, const Parallel_Grid &pgrid, const K_Vectors &kv, const std::vector< int > &out_wfc_norm, const std::vector< int > &out_wfc_re_im, const std::string &global_out_dir, std::ofstream &ofs_running) const
 Write independently selected norm and Re/Im cubes for every k-point.

Private Member Functions

std::vector< int > select_bands (const std::vector< int > &selection, const std::string &parameter_name) const
void transform_band (const int global_band, const int ik, const Parallel::ParaBandOutput &band_output, Workspace *work) const
const std::complex< double > * transform_wfc (const T *coefficients, const int ik, const int component, Workspace *work) const
void write_norm (const int band, const UnitCell &ucell, const Parallel_Grid &pgrid, const K_Vectors &kv, const std::string &out_dir, const Parallel::ParaBandOutput &band_output, std::ofstream &ofs_running, Workspace *work) const
void write_complex (const int band, const UnitCell &ucell, const Parallel_Grid &pgrid, const K_Vectors &kv, const std::string &out_dir, const Parallel::ParaBandOutput &band_output, std::ofstream &ofs_running, Workspace *work) const
void calc_norm (const int spin_index, const double scale, Workspace *work) const
void calc_phase (const int ik, const K_Vectors &kv, std::vector< std::complex< double > > *phase) const
void calc_component (const std::vector< std::complex< double > > &component, const std::vector< std::complex< double > > &phase, const double scale, std::vector< double > *real, std::vector< double > *imag) const
void write_cube (const int band, const int component, const int k_number, const std::string &part, const UnitCell &ucell, const Parallel_Grid &pgrid, const std::string &out_dir, const std::vector< double > &values, std::ofstream &ofs_running) const

Private Attributes

const psi::Psi< T, Device > & psi_
const ModulePW::PW_Basis_K & pw_wfc_
const ModulePW::PW_Basis & pw_rho_
const ModulePW::PW_Basis & pw_rhod_
const int nspin_
const int global_nbands_

Detailed Description

template<typename T, typename Device>
class ModuleIO::Get_wf_pw< T, Device >

Write real-space norms and complex components of selected PW states.

The caller owns the wavefunction and bases, which must outlive this object. T follows the solver wavefunction precision; host grid processing uses double. Scratch buffers are local to each begin() call.

Constructor & Destructor Documentation

◆ Get_wf_pw()

template<typename T, typename Device>
ModuleIO::Get_wf_pw< T, Device >::Get_wf_pw ( const psi::Psi< T, Device > & psi,
const ModulePW::PW_Basis_K & pw_wfc,
const ModulePW::PW_Basis & pw_rho,
const ModulePW::PW_Basis & pw_rhod,
const int nspin,
const int global_nbands )

Bind the wavefunction, grids, and global band/spin configuration.

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

Member Function Documentation

◆ begin()

template<typename T, typename Device>
void ModuleIO::Get_wf_pw< T, Device >::begin ( const UnitCell & ucell,
const Parallel_Grid & pgrid,
const K_Vectors & kv,
const std::vector< int > & out_wfc_norm,
const std::vector< int > & out_wfc_re_im,
const std::string & global_out_dir,
std::ofstream & ofs_running ) const

Write independently selected norm and Re/Im cubes for every k-point.

A spinor has one combined norm and separate up/down complex components. Re/Im output includes the Bloch phase; all fields scale as omega^(-1/2).

Here is the call graph for this function:

◆ calc_component()

template<typename T, typename Device>
void ModuleIO::Get_wf_pw< T, Device >::calc_component ( const std::vector< std::complex< double > > & component,
const std::vector< std::complex< double > > & phase,
const double scale,
std::vector< double > * real,
std::vector< double > * imag ) const
private
Here is the caller graph for this function:

◆ calc_norm()

template<typename T, typename Device>
void ModuleIO::Get_wf_pw< T, Device >::calc_norm ( const int spin_index,
const double scale,
Workspace * work ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc_phase()

template<typename T, typename Device>
void ModuleIO::Get_wf_pw< T, Device >::calc_phase ( const int ik,
const K_Vectors & kv,
std::vector< std::complex< double > > * phase ) const
private
Here is the caller graph for this function:

◆ select_bands()

template<typename T, typename Device>
std::vector< int > ModuleIO::Get_wf_pw< T, Device >::select_bands ( const std::vector< int > & selection,
const std::string & parameter_name ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transform_band()

template<typename T, typename Device>
void ModuleIO::Get_wf_pw< T, Device >::transform_band ( const int global_band,
const int ik,
const Parallel::ParaBandOutput & band_output,
Workspace * work ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transform_wfc()

template<typename T, typename Device>
const std::complex< double > * ModuleIO::Get_wf_pw< T, Device >::transform_wfc ( const T * coefficients,
const int ik,
const int component,
Workspace * work ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_complex()

template<typename T, typename Device>
void ModuleIO::Get_wf_pw< T, Device >::write_complex ( const int band,
const UnitCell & ucell,
const Parallel_Grid & pgrid,
const K_Vectors & kv,
const std::string & out_dir,
const Parallel::ParaBandOutput & band_output,
std::ofstream & ofs_running,
Workspace * work ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_cube()

template<typename T, typename Device>
void ModuleIO::Get_wf_pw< T, Device >::write_cube ( const int band,
const int component,
const int k_number,
const std::string & part,
const UnitCell & ucell,
const Parallel_Grid & pgrid,
const std::string & out_dir,
const std::vector< double > & values,
std::ofstream & ofs_running ) const
private
Here is the call graph for this function:

◆ write_norm()

template<typename T, typename Device>
void ModuleIO::Get_wf_pw< T, Device >::write_norm ( const int band,
const UnitCell & ucell,
const Parallel_Grid & pgrid,
const K_Vectors & kv,
const std::string & out_dir,
const Parallel::ParaBandOutput & band_output,
std::ofstream & ofs_running,
Workspace * work ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ global_nbands_

template<typename T, typename Device>
const int ModuleIO::Get_wf_pw< T, Device >::global_nbands_
private

◆ nspin_

template<typename T, typename Device>
const int ModuleIO::Get_wf_pw< T, Device >::nspin_
private

◆ psi_

template<typename T, typename Device>
const psi::Psi<T, Device>& ModuleIO::Get_wf_pw< T, Device >::psi_
private

◆ pw_rho_

template<typename T, typename Device>
const ModulePW::PW_Basis& ModuleIO::Get_wf_pw< T, Device >::pw_rho_
private

◆ pw_rhod_

template<typename T, typename Device>
const ModulePW::PW_Basis& ModuleIO::Get_wf_pw< T, Device >::pw_rhod_
private

◆ pw_wfc_

template<typename T, typename Device>
const ModulePW::PW_Basis_K& ModuleIO::Get_wf_pw< T, Device >::pw_wfc_
private

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