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

Typedefs

using HybridDensityRow = std::map<std::pair<int, std::array<int, 3>>, RI::Tensor<std::complex<double>>>
using HybridSpinDensity = std::map<int, HybridDensityRow>
using HybridGaugeComplexDensity = std::vector<HybridSpinDensity>
using HybridDensityBlock = std::tuple<int, int, std::array<int, 3>, std::vector<std::size_t>>
using HybridDensityLayout = std::vector<std::vector<HybridDensityBlock>>
using ImageCell = std::array<int, 3>
using TA = int
using Tcell = int
using TC = std::array<Tcell, Ndim>
using TAC = std::pair<TA, TC>

Enumerations

enum class  HybridDensityTime { Left , Right }

Functions

std::complex< double > hybrid_input_phase (const ModuleBase::Vector3< double > &vector_potential, const ModuleBase::Vector3< double > &lattice_translation)
HybridDensityTime hybrid_density_time (const int step, const int iteration)
HybridDensityLayout hybrid_density_layout (const HybridGaugeComplexDensity &density)
std::vector< std::vector< std::complex< double > > > flatten_hybrid_density (const HybridGaugeComplexDensity &density)
void assign_flat_hybrid_density (const std::vector< const std::vector< std::complex< double > > * > &flat, const HybridDensityLayout &expected_layout, HybridGaugeComplexDensity &density)
void apply_hybrid_input_phase (const ModuleBase::Matrix3 &lattice, const double lat0, const ModuleBase::Vector3< double > &source_A, HybridGaugeComplexDensity &density)
std::array< double, 3 > hybrid_input_phase_per_cell (const ModuleBase::Matrix3 &lattice, const double lat0, const ModuleBase::Vector3< double > &source_A)
void mix_common_frame_density (const bool restart, Mix_DMk_2D< std::complex< double > > &mixer, HybridDensityLayout &history_layout, HybridGaugeComplexDensity &density)
void mix_hybrid_density (const ModuleBase::Matrix3 &lattice, const double lat0, const ModuleBase::Vector3< double > &source_A, const bool restart, Mix_DMk_2D< std::complex< double > > &mixer, HybridDensityLayout &history_layout, HybridGaugeComplexDensity &density)
ImageCell centered_image (const ImageCell &cell, const ImageCell &period)
template<typename T>
ImageCell retained_image_extent (std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< T > > > &blocks, const double threshold)
ImageCell hybrid_image_period (const ImageCell &c_extent, const ImageCell &v_extent)
template<typename T>
void unfold_hybrid_images (std::vector< std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< T > > > > &density, const ImageCell &physical_period, const ImageCell &image_period, const std::array< double, 3 > &mesh_origin, const std::array< double, 3 > &input_phase_per_cell)
template<typename T>
void decode_hybrid_images (std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< T > > > &blocks, const ImageCell &period)
template ImageCell retained_image_extent< double > (std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< double > > > &, const double)
template void unfold_hybrid_images< double > (std::vector< std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< double > > > > &, const ImageCell &, const ImageCell &, const std::array< double, 3 > &, const std::array< double, 3 > &)
template void decode_hybrid_images< double > (std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< double > > > &, const ImageCell &)
template ImageCell retained_image_extent< std::complex< double > > (std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< std::complex< double > > > > &, const double)
template void unfold_hybrid_images< std::complex< double > > (std::vector< std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< std::complex< double > > > > > &, const ImageCell &, const ImageCell &, const std::array< double, 3 > &, const std::array< double, 3 > &)
template void decode_hybrid_images< std::complex< double > > (std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< std::complex< double > > > > &, const ImageCell &)
template<typename Tdata, typename Tmatrix>
std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > split_m2D_ktoR (const UnitCell &ucell, const K_Vectors &kv, const std::vector< const Tmatrix * > &mks_2D, const Parallel_Blkcyclic &pv, const int nspin, const bool spgsym=false)
template<typename Tdata, typename Tmatrix>
std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > split_m2D_ktoR_gamma (const UnitCell &ucell, const std::vector< const Tmatrix * > &mks_2D, const Parallel_Blkcyclic &pv, const int nspin)
template<typename Tdata, typename Tmatrix>
std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > split_m2D_ktoR_k (const UnitCell &ucell, const K_Vectors &kv, const std::vector< const Tmatrix * > &mks_2D, const Parallel_Blkcyclic &pv, const int nspin, const bool spgsym=false)
std::vector< std::tuple< std::set< TA >, std::set< TA > > > get_2D_judge (const UnitCell &ucell, const Parallel_Blkcyclic &pv)
template<typename Tdata, typename TK>
void add_Hexx (const UnitCell &ucell, const K_Vectors &kv, const int ik, const double alpha, const std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > &Hs, const Parallel_Orbitals &pv, TK *hk)
template<typename Tdata, typename TR>
void add_HexxR (const int current_spin, const double alpha, const std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > &Hs, const Parallel_Orbitals &pv, const int npol, hamilt::HContainer< TR > &HlocR, const RI::Cell_Nearest< int, int, 3, double, 3 > *const cell_nearest=nullptr)
template<typename Tdata>
std::vector< std::vector< Tdata > > Hexxs_to_Hk (const K_Vectors &kv, const Parallel_Orbitals &pv, const std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > &Hexxs, const int ik)
template<typename Tdata>
std::vector< std::vector< Tdata > > pulay_mixing (const Parallel_Orbitals &pv, std::deque< std::vector< std::vector< Tdata > > > &Hk_seq, const std::vector< std::vector< Tdata > > &Hk_new, const double mixing_beta, const std::string mixing_mode)
template<typename TR, typename Tdata>
std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > dm_container_to_Ds (const std::vector< hamilt::HContainer< TR > * > &dm_container, const UnitCell &ucell, const Parallel_Orbitals &pv, const int nspin)
std::vector< int > get_ik_list (const K_Vectors &kv, const int is_k)
std::tuple< int, int, int > get_iat_iw_is_block (const UnitCell &ucell, const int &iwt)
int get_is_block (const int is_k, const int is_row_b, const int is_col_b)
std::tuple< int, int > split_is_block (const int is_b)
int get_iwt (const UnitCell &ucell, const int iat, const int iw_b, const int is_b)
template<typename TA, typename TAC, typename T>
std::map< TA, std::map< TAC, T > > comm_map2_first (const MPI_Comm &mpi_comm, const std::map< TA, std::map< TAC, T > > &Ds_in, const std::set< TA > &s0, const std::set< TA > &s1)
template<typename TA, typename TAC, typename T, typename Tjudge>
std::map< TA, std::map< TAC, T > > comm_map2 (const MPI_Comm &mpi_comm, const std::map< TA, std::map< TAC, T > > &Ds_in, const Tjudge &judge)
template<typename Tkey, typename Tvalue>
void set_value_add (Tkey &&key, Tvalue &&value, std::map< Tkey, Tvalue > &data)
template<typename Tkey0, typename Tkey1, typename Tvalue>
void set_value_add (std::tuple< Tkey0, Tkey1 > &&key, Tvalue &&value, std::map< Tkey0, std::map< Tkey1, Tvalue > > &data)
template<typename Tkey, typename Tvalue>
void add_datas (std::map< Tkey, Tvalue > &&data_local, std::map< Tkey, Tvalue > &data_recv)
template<typename Tkey0, typename Tkey1, typename Tvalue>
void add_datas (std::map< Tkey0, std::map< Tkey1, Tvalue > > &&data_local, std::map< Tkey0, std::map< Tkey1, Tvalue > > &data_recv)

Typedef Documentation

◆ HybridDensityBlock

using RI_2D_Comm::HybridDensityBlock = std::tuple<int, int, std::array<int, 3>, std::vector<std::size_t>>

◆ HybridDensityLayout

using RI_2D_Comm::HybridDensityLayout = std::vector<std::vector<HybridDensityBlock>>

◆ HybridDensityRow

using RI_2D_Comm::HybridDensityRow = std::map<std::pair<int, std::array<int, 3>>, RI::Tensor<std::complex<double>>>

◆ HybridGaugeComplexDensity

◆ HybridSpinDensity

◆ ImageCell

using RI_2D_Comm::ImageCell = std::array<int, 3>

◆ TA

using RI_2D_Comm::TA = int

◆ TAC

using RI_2D_Comm::TAC = std::pair<TA, TC>

◆ TC

using RI_2D_Comm::TC = std::array<Tcell, Ndim>

◆ Tcell

using RI_2D_Comm::Tcell = int

Enumeration Type Documentation

◆ HybridDensityTime

enum class RI_2D_Comm::HybridDensityTime
strong
Enumerator
Left 
Right 

Function Documentation

◆ add_datas() [1/2]

template<typename Tkey, typename Tvalue>
void RI_2D_Comm::add_datas ( std::map< Tkey, Tvalue > && data_local,
std::map< Tkey, Tvalue > & data_recv )
extern
Here is the caller graph for this function:

◆ add_datas() [2/2]

template<typename Tkey0, typename Tkey1, typename Tvalue>
void RI_2D_Comm::add_datas ( std::map< Tkey0, std::map< Tkey1, Tvalue > > && data_local,
std::map< Tkey0, std::map< Tkey1, Tvalue > > & data_recv )
extern
Here is the call graph for this function:

◆ add_Hexx()

template<typename Tdata, typename TK>
void RI_2D_Comm::add_Hexx ( const UnitCell & ucell,
const K_Vectors & kv,
const int ik,
const double alpha,
const std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > & Hs,
const Parallel_Orbitals & pv,
TK * hk )
extern
Here is the call graph for this function:

◆ add_HexxR()

template<typename Tdata, typename TR>
void RI_2D_Comm::add_HexxR ( const int current_spin,
const double alpha,
const std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > & Hs,
const Parallel_Orbitals & pv,
const int npol,
hamilt::HContainer< TR > & HlocR,
const RI::Cell_Nearest< int, int, 3, double, 3 > *const cell_nearest = nullptr )
extern
Here is the call graph for this function:
Here is the caller graph for this function:

◆ apply_hybrid_input_phase()

void RI_2D_Comm::apply_hybrid_input_phase ( const ModuleBase::Matrix3 & lattice,
const double lat0,
const ModuleBase::Vector3< double > & source_A,
HybridGaugeComplexDensity & density )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ assign_flat_hybrid_density()

void RI_2D_Comm::assign_flat_hybrid_density ( const std::vector< const std::vector< std::complex< double > > * > & flat,
const HybridDensityLayout & expected_layout,
HybridGaugeComplexDensity & density )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ centered_image()

ImageCell RI_2D_Comm::centered_image ( const ImageCell & cell,
const ImageCell & period )
Here is the caller graph for this function:

◆ comm_map2()

template<typename TA, typename TAC, typename T, typename Tjudge>
std::map< TA, std::map< TAC, T > > RI_2D_Comm::comm_map2 ( const MPI_Comm & mpi_comm,
const std::map< TA, std::map< TAC, T > > & Ds_in,
const Tjudge & judge )
extern
Here is the call graph for this function:
Here is the caller graph for this function:

◆ comm_map2_first()

template<typename TA, typename TAC, typename T>
std::map< TA, std::map< TAC, T > > RI_2D_Comm::comm_map2_first ( const MPI_Comm & mpi_comm,
const std::map< TA, std::map< TAC, T > > & Ds_in,
const std::set< TA > & s0,
const std::set< TA > & s1 )
extern
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_hybrid_images()

template<typename T>
void RI_2D_Comm::decode_hybrid_images ( std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< T > > > & blocks,
const ImageCell & period )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_hybrid_images< double >()

template void RI_2D_Comm::decode_hybrid_images< double > ( std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< double > > > & ,
const ImageCell &  )

◆ decode_hybrid_images< std::complex< double > >()

template void RI_2D_Comm::decode_hybrid_images< std::complex< double > > ( std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< std::complex< double > > > > & ,
const ImageCell &  )
Here is the call graph for this function:

◆ dm_container_to_Ds()

template<typename TR, typename Tdata>
std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > RI_2D_Comm::dm_container_to_Ds ( const std::vector< hamilt::HContainer< TR > * > & dm_container,
const UnitCell & ucell,
const Parallel_Orbitals & pv,
const int nspin )
extern

◆ flatten_hybrid_density()

std::vector< std::vector< std::complex< double > > > RI_2D_Comm::flatten_hybrid_density ( const HybridGaugeComplexDensity & density)
Here is the caller graph for this function:

◆ get_2D_judge()

std::vector< std::tuple< std::set< TA >, std::set< TA > > > RI_2D_Comm::get_2D_judge ( const UnitCell & ucell,
const Parallel_Blkcyclic & pv )
extern
Here is the caller graph for this function:

◆ get_iat_iw_is_block()

std::tuple< int, int, int > RI_2D_Comm::get_iat_iw_is_block ( const UnitCell & ucell,
const int & iwt )
extern

◆ get_ik_list()

std::vector< int > RI_2D_Comm::get_ik_list ( const K_Vectors & kv,
const int is_k )
extern
Here is the call graph for this function:

◆ get_is_block()

int RI_2D_Comm::get_is_block ( const int is_k,
const int is_row_b,
const int is_col_b )
extern

◆ get_iwt()

int RI_2D_Comm::get_iwt ( const UnitCell & ucell,
const int iat,
const int iw_b,
const int is_b )
extern
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Hexxs_to_Hk()

template<typename Tdata>
std::vector< std::vector< Tdata > > RI_2D_Comm::Hexxs_to_Hk ( const K_Vectors & kv,
const Parallel_Orbitals & pv,
const std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > & Hexxs,
const int ik )
extern

◆ hybrid_density_layout()

HybridDensityLayout RI_2D_Comm::hybrid_density_layout ( const HybridGaugeComplexDensity & density)
Here is the caller graph for this function:

◆ hybrid_density_time()

HybridDensityTime RI_2D_Comm::hybrid_density_time ( const int step,
const int iteration )
Here is the caller graph for this function:

◆ hybrid_image_period()

ImageCell RI_2D_Comm::hybrid_image_period ( const ImageCell & c_extent,
const ImageCell & v_extent )
Here is the caller graph for this function:

◆ hybrid_input_phase()

std::complex< double > RI_2D_Comm::hybrid_input_phase ( const ModuleBase::Vector3< double > & vector_potential,
const ModuleBase::Vector3< double > & lattice_translation )
Here is the caller graph for this function:

◆ hybrid_input_phase_per_cell()

std::array< double, 3 > RI_2D_Comm::hybrid_input_phase_per_cell ( const ModuleBase::Matrix3 & lattice,
const double lat0,
const ModuleBase::Vector3< double > & source_A )
Here is the caller graph for this function:

◆ mix_common_frame_density()

void RI_2D_Comm::mix_common_frame_density ( const bool restart,
Mix_DMk_2D< std::complex< double > > & mixer,
HybridDensityLayout & history_layout,
HybridGaugeComplexDensity & density )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mix_hybrid_density()

void RI_2D_Comm::mix_hybrid_density ( const ModuleBase::Matrix3 & lattice,
const double lat0,
const ModuleBase::Vector3< double > & source_A,
const bool restart,
Mix_DMk_2D< std::complex< double > > & mixer,
HybridDensityLayout & history_layout,
HybridGaugeComplexDensity & density )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pulay_mixing()

template<typename Tdata>
std::vector< std::vector< Tdata > > RI_2D_Comm::pulay_mixing ( const Parallel_Orbitals & pv,
std::deque< std::vector< std::vector< Tdata > > > & Hk_seq,
const std::vector< std::vector< Tdata > > & Hk_new,
const double mixing_beta,
const std::string mixing_mode )

◆ retained_image_extent()

template<typename T>
ImageCell RI_2D_Comm::retained_image_extent ( std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< T > > > & blocks,
const double threshold )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retained_image_extent< double >()

template ImageCell RI_2D_Comm::retained_image_extent< double > ( std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< double > > > & ,
const double  )

◆ retained_image_extent< std::complex< double > >()

template ImageCell RI_2D_Comm::retained_image_extent< std::complex< double > > ( std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< std::complex< double > > > > & ,
const double  )
Here is the call graph for this function:

◆ set_value_add() [1/2]

template<typename Tkey0, typename Tkey1, typename Tvalue>
void RI_2D_Comm::set_value_add ( std::tuple< Tkey0, Tkey1 > && key,
Tvalue && value,
std::map< Tkey0, std::map< Tkey1, Tvalue > > & data )
extern
Here is the call graph for this function:

◆ set_value_add() [2/2]

template<typename Tkey, typename Tvalue>
void RI_2D_Comm::set_value_add ( Tkey && key,
Tvalue && value,
std::map< Tkey, Tvalue > & data )
extern
Here is the caller graph for this function:

◆ split_is_block()

std::tuple< int, int > RI_2D_Comm::split_is_block ( const int is_b)
extern
Here is the caller graph for this function:

◆ split_m2D_ktoR()

template<typename Tdata, typename Tmatrix>
std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > RI_2D_Comm::split_m2D_ktoR ( const UnitCell & ucell,
const K_Vectors & kv,
const std::vector< const Tmatrix * > & mks_2D,
const Parallel_Blkcyclic & pv,
const int nspin,
const bool spgsym = false )
extern
Here is the caller graph for this function:

◆ split_m2D_ktoR_gamma()

template<typename Tdata, typename Tmatrix>
std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > RI_2D_Comm::split_m2D_ktoR_gamma ( const UnitCell & ucell,
const std::vector< const Tmatrix * > & mks_2D,
const Parallel_Blkcyclic & pv,
const int nspin )
extern

◆ split_m2D_ktoR_k()

template<typename Tdata, typename Tmatrix>
std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > RI_2D_Comm::split_m2D_ktoR_k ( const UnitCell & ucell,
const K_Vectors & kv,
const std::vector< const Tmatrix * > & mks_2D,
const Parallel_Blkcyclic & pv,
const int nspin,
const bool spgsym = false )
extern

◆ unfold_hybrid_images()

template<typename T>
void RI_2D_Comm::unfold_hybrid_images ( std::vector< std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< T > > > > & density,
const ImageCell & physical_period,
const ImageCell & image_period,
const std::array< double, 3 > & mesh_origin,
const std::array< double, 3 > & input_phase_per_cell )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unfold_hybrid_images< double >()

template void RI_2D_Comm::unfold_hybrid_images< double > ( std::vector< std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< double > > > > & ,
const ImageCell & ,
const ImageCell & ,
const std::array< double, 3 > & ,
const std::array< double, 3 > &  )

◆ unfold_hybrid_images< std::complex< double > >()

template void RI_2D_Comm::unfold_hybrid_images< std::complex< double > > ( std::vector< std::map< int, std::map< std::pair< int, ImageCell >, RI::Tensor< std::complex< double > > > > > & ,
const ImageCell & ,
const ImageCell & ,
const std::array< double, 3 > & ,
const std::array< double, 3 > &  )
Here is the call graph for this function: