|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Public Member Functions | |
| Parallel_Orbitals () | |
| ~Parallel_Orbitals () | |
| Parallel_Blkcyclic & | para_2d () |
| const Parallel_Blkcyclic & | para_2d () const |
| const Parallel_Blkcyclic & | wfc_layout () const |
| const Parallel_Blkcyclic & | mo_repr_layout () const |
| int | set_wfc_and_mo_sizes (const int &nmo, std::ofstream &ofs_running, std::ofstream &ofs_warning) |
| set the local sizes of the wavefunction and the MO representation | |
| void | set_wfc_and_mo_layouts (const int &nbasis, const int &nmo) |
| set the 2D-block-cyclic layouts of the wavefunction and the MO representation | |
| int | get_wfc_global_nbands () const |
| int | get_wfc_global_nbasis () const |
| void | set_atomic_trace (const int *iat2iwt, const int &nat, const int &nlocal) |
| set row and col begin index for each atom it should be called after: | |
| int | get_ncol_atom (int iat) const |
| dimension getters for 2D-block-cyclic division of Hamiltonian matrix ncloc() : total number of columns of Hamiltonian matrix in this processor nrloc() : total number of rows of Hamiltonian matrix in this processor get_ncol_atom(iat) : number of columns of Hamiltonian matrix in atom iat get_nrow_atom(iat) : number of rows of Hamiltonian matrix in atom iat | |
| int | get_nrow_atom (int iat) const |
| bool | is_invalid_atom_pair (int iat1, int iat2) const |
| int | get_nbands () const |
| std::vector< int > | get_indexes_row () const |
| gather global indexes of orbitals in this processor get_indexes_row() : global indexes (~NLOCAL) of rows of Hamiltonian matrix in this processor get_indexes_col() : global indexes (~NLOCAL) of columns of Hamiltonian matrix in this processor get_indexes_row(iat) : global indexes (~nw) of rows of Hamiltonian matrix in atom iat get_indexes_col(iat) : global indexes (~nw) of columns of Hamiltonian matrix in atom iat | |
| std::vector< int > | get_indexes_col () const |
| std::vector< int > | get_indexes_row (int iat) const |
| std::vector< int > | get_indexes_col (int iat) const |
Public Attributes | |
| int | ncol_bands |
| int | nrow_bands |
| long | nloc_wfc |
| ncol_bands*nrow | |
| int | lastband_in_proc |
| int | lastband_number |
| int | nnr =1 |
| std::vector< int > | nlocdim |
| std::vector< int > | nlocstart |
| int | desc_wfc [9] |
| int | nbands |
| std::vector< int > | atom_begin_row |
| std::vector< int > | atom_begin_col |
| const int * | iat2iwt_ = nullptr |
Private Attributes | |
| Parallel_Blkcyclic | para_2d_ |
| Parallel_Blkcyclic | wfc_layout_ |
| Parallel_Blkcyclic | mo_repr_layout_ |
This class packs the information of 2D-block-cyclic for LCAO code: parallel distribution of basis, wavefunction and matrix.
R4 (single storage): this class must never add a copy of any Parallel_Blkcyclic state field (nrow/ncol/nloc/nb/dim0/dim1/desc/blacs_ctxt). The only authoritative copy lives in the para_2d_ member below; re-deriving the distribution from a duplicated field would silently desynchronize the LCAO band/atom layers that are computed from it.
| LCAO_domain::Parallel_Orbitals::Parallel_Orbitals | ( | ) |
| LCAO_domain::Parallel_Orbitals::~Parallel_Orbitals | ( | ) |
| std::vector< int > LCAO_domain::Parallel_Orbitals::get_indexes_col | ( | ) | const |
| std::vector< int > LCAO_domain::Parallel_Orbitals::get_indexes_col | ( | int | iat | ) | const |
| std::vector< int > LCAO_domain::Parallel_Orbitals::get_indexes_row | ( | ) | const |
gather global indexes of orbitals in this processor get_indexes_row() : global indexes (~NLOCAL) of rows of Hamiltonian matrix in this processor get_indexes_col() : global indexes (~NLOCAL) of columns of Hamiltonian matrix in this processor get_indexes_row(iat) : global indexes (~nw) of rows of Hamiltonian matrix in atom iat get_indexes_col(iat) : global indexes (~nw) of columns of Hamiltonian matrix in atom iat
| std::vector< int > LCAO_domain::Parallel_Orbitals::get_indexes_row | ( | int | iat | ) | const |
| int LCAO_domain::Parallel_Orbitals::get_nbands | ( | ) | const |
| int LCAO_domain::Parallel_Orbitals::get_ncol_atom | ( | int | iat | ) | const |
dimension getters for 2D-block-cyclic division of Hamiltonian matrix ncloc() : total number of columns of Hamiltonian matrix in this processor nrloc() : total number of rows of Hamiltonian matrix in this processor get_ncol_atom(iat) : number of columns of Hamiltonian matrix in atom iat get_nrow_atom(iat) : number of rows of Hamiltonian matrix in atom iat
| int LCAO_domain::Parallel_Orbitals::get_nrow_atom | ( | int | iat | ) | const |
| int LCAO_domain::Parallel_Orbitals::get_wfc_global_nbands | ( | ) | const |
| int LCAO_domain::Parallel_Orbitals::get_wfc_global_nbasis | ( | ) | const |
| bool LCAO_domain::Parallel_Orbitals::is_invalid_atom_pair | ( | int | iat1, |
| int | iat2 ) const |
|
inline |
Block-cyclic layout of the MO representation: S and H represented in the MOs defined by the DFT reference determinant, i.e. Psi^dagger * S * Psi and Psi^dagger * H * Psi. The square global extent of this layout follows from the number nmo of MOs. Shares the process grid of para_2d_.
|
inline |
Access to the block-cyclic distribution information. The non-const overload exists only for the two cases a const getter cannot serve: non-const mutation by setup_2d_division, and test-side descriptor writes.
|
inline |
| void LCAO_domain::Parallel_Orbitals::set_atomic_trace | ( | const int * | iat2iwt, |
| const int & | nat, | ||
| const int & | nlocal ) |
set row and col begin index for each atom it should be called after:
| iat2iwt | : the map from atom index to global oribtal indexes |
| nat | : number of atoms |
| nlocal | : number of global orbitals |
| void LCAO_domain::Parallel_Orbitals::set_wfc_and_mo_layouts | ( | const int & | nbasis, |
| const int & | nmo ) |
set the 2D-block-cyclic layouts of the wavefunction and the MO representation
| int LCAO_domain::Parallel_Orbitals::set_wfc_and_mo_sizes | ( | const int & | nmo, |
| std::ofstream & | ofs_running, | ||
| std::ofstream & | ofs_warning ) |
set the local sizes of the wavefunction and the MO representation
| nmo | number of MOs |
|
inline |
Block-cyclic distribution of the wavefunction (nbasis x nbands). This is a distinct layout from the square Hamiltonian distribution, shared with the same process grid; it is a temporary adapter seam, not a duplicate of para_2d_.
| std::vector<int> LCAO_domain::Parallel_Orbitals::atom_begin_col |
| std::vector<int> LCAO_domain::Parallel_Orbitals::atom_begin_row |
| int LCAO_domain::Parallel_Orbitals::desc_wfc[9] |
| const int* LCAO_domain::Parallel_Orbitals::iat2iwt_ = nullptr |
| int LCAO_domain::Parallel_Orbitals::lastband_in_proc |
| int LCAO_domain::Parallel_Orbitals::lastband_number |
|
private |
Block-cyclic layout of S and H represented in the MOs defined by the DFT reference determinant. Its square global extent follows from the number nmo of MOs; it shares the process grid of para_2d_.
| int LCAO_domain::Parallel_Orbitals::nbands |
| int LCAO_domain::Parallel_Orbitals::ncol_bands |
local size of bands, used for 2d wavefunction must divided on dim1 because of elpa interface
| long LCAO_domain::Parallel_Orbitals::nloc_wfc |
ncol_bands*nrow
| std::vector<int> LCAO_domain::Parallel_Orbitals::nlocdim |
| std::vector<int> LCAO_domain::Parallel_Orbitals::nlocstart |
| int LCAO_domain::Parallel_Orbitals::nnr =1 |
| int LCAO_domain::Parallel_Orbitals::nrow_bands |
|
private |
Block-cyclic distribution of the Hamiltonian matrix. Single source of truth for nrow/ncol/nloc/nb/dim0/dim1/desc/blacs_ctxt (R4).
|
private |
Block-cyclic distribution of the wavefunction (nbasis x nbands), sharing the process grid of para_2d_. Temporary adapter seam for runtime consumers; not a duplicate of the Hamiltonian distribution.