55 T *existed_matrix =
nullptr
68 T *existed_array =
nullptr
79 T *existed_array =
nullptr
99 const int *row_atom_begin,
100 const int *col_atom_begin,
102 T *existed_matrix =
nullptr);
112 const int *row_atom_begin,
113 const int *col_atom_begin,
115 T *existed_matrix =
nullptr);
133 void allocate(
T *data_array =
nullptr,
bool if_zero =
false);
162 void set_size(
const int &col_size_in,
const int &row_size_in);
182 bool identify(
const int &atom_i_,
const int &atom_j_)
const;
213 int find_R(
const int &rx_in,
const int &ry_in,
const int &rz_in)
const;
293 const std::complex<T> &kphase,
294 const int hk_type = 0)
const;
312 const int hk_type = 0)
const;
315 const std::complex<T> *hk,
317 const std::complex<T> &kphase,
318 const int hk_type = 0);
324 const int hk_type = 0);
338 const std::complex<T> *hk,
340 const std::complex<T> &kphase,
341 const int hk_type = 0);
359 const int hk_type = 0);
370 void add_to_array(
const int R_index, std::complex<T> *target_array,
const std::complex<T> &kphase)
const;
394 assert(this->R_index.size() == this->values.size());
397 return this->R_index.size();
407 std::vector<ModuleBase::Vector3<int>>
R_index;
Atom-local basis entries derived from basis indexing and distribution.
Definition atom_basis_view.h:16
3 elements vector
Definition vector3.h:21
Definition parallel_orbitals.h:16
Definition atom_pair.h:45
BaseMatrix< T > & get_HR_values(int rx_in, int ry_in, int rz_in)
get target BaseMatrix of target cell for const AtomPair, it will return a const BaseMatrix<T> object,...
Definition atom_pair.cpp:451
int atom_i
Definition atom_pair.h:416
void merge(const AtomPair< T > &other, bool skip_R=false)
merge another AtomPair to this AtomPair
Definition atom_pair.cpp:572
const Parallel_Orbitals * get_paraV() const
get Parallel_Orbitals pointer of this AtomPair for checking 2d-block parallel
Definition atom_pair.cpp:389
bool operator<(const AtomPair &other) const
Definition atom_pair.cpp:331
AtomPair(const int &atom_i_, const int &atom_j_, const Parallel_Orbitals *paraV_, T *existed_matrix=nullptr)
Definition atom_pair.cpp:22
const Parallel_Orbitals * paraV
Definition atom_pair.h:413
int get_size() const
get size = col_size * row_size
Definition atom_pair.h:167
const BaseMatrix< T > * find_matrix(const int &rx_in, const int &ry_in, const int &rz_in) const
Definition atom_pair.cpp:499
int get_col_size() const
get col_size for this AtomPair
Definition atom_pair.cpp:349
ModuleBase::Vector3< int > get_R_index(const int &index) const
Definition atom_pair.cpp:908
int row_size
Definition atom_pair.h:422
int col_ap
Definition atom_pair.h:421
int col_size
Definition atom_pair.h:423
bool identify(const AtomPair< T > &other) const
use atom_i and atom_j to identify the atom-pair
Definition atom_pair.cpp:396
AtomPair & operator=(const AtomPair &other)
Definition atom_pair.cpp:283
void set_size(const int &col_size_in, const int &row_size_in)
set col_size and row_size
Definition atom_pair.cpp:377
std::vector< BaseMatrix< T > > values
Definition atom_pair.h:410
T * get_pointer(int ir) const
get pointer of value from a submatrix
Definition atom_pair.cpp:950
size_t get_R_size() const
Definition atom_pair.h:391
void allocate(T *data_array=nullptr, bool if_zero=false)
allocate memory for all the BaseMatrix
Definition atom_pair.cpp:252
int find_R(const int &rx_in, const int &ry_in, const int &rz_in) const
Definition atom_pair.cpp:424
int get_row_size() const
get row_size for this AtomPair
Definition atom_pair.cpp:356
void merge_to_gamma()
merge all values in this AtomPair to one BaseMatrix with R-index (0, 0, 0) in this case,...
Definition atom_pair.cpp:610
int get_atom_j() const
Definition atom_pair.cpp:370
void add_from_matrix(const std::complex< T > *hk, const int ld_hk, const std::complex< T > &kphase, const int hk_type=0)
Definition atom_pair.cpp:636
T & get_value(const int R_index, const int &i) const
Get value at position i in the matrix values[R_index]. Thread-safe version: explicitly pass R_index.
Definition atom_pair.cpp:924
int get_begin_col() const
Definition atom_pair.h:144
void add_to_array(const int R_index, std::complex< T > *target_array, const std::complex< T > &kphase) const
Add this->value[R_index] * kphase to an array. Thread-safe version: explicitly pass R_index....
Definition atom_pair.cpp:890
void set_zero()
set values in every BaseMatrix to zero
Definition atom_pair.cpp:273
int atom_j
Definition atom_pair.h:417
int get_atom_i() const
get atom_i and atom_j for this AtomPair
Definition atom_pair.cpp:363
std::vector< ModuleBase::Vector3< int > > R_index
Definition atom_pair.h:407
void add_to_matrix(const int R_index, std::complex< T > *hk, const int ld_hk, const std::complex< T > &kphase, const int hk_type=0) const
Add this->value[R_index] * kphase as a block matrix of hk. Thread-safe version: explicitly pass R_ind...
Definition atom_pair.cpp:798
std::tuple< std::vector< int >, T * > get_matrix_values(int ir) const
get values of this->values[ir] for a whole matrix
Definition atom_pair.cpp:900
void set_paraV(const Parallel_Orbitals *paraV_in)
set Parallel_Orbitals pointer of this AtomPair for checking 2d-block parallel
Definition atom_pair.h:178
~AtomPair()
Definition atom_pair.cpp:16
void convert_add(const BaseMatrix< T > &target, int rx_in, int ry_in, int rz_in)
Definition atom_pair.cpp:557
int row_ap
Definition atom_pair.h:419
size_t get_memory_size() const
get total memory size of AtomPair
Definition atom_pair.cpp:961
int get_begin_row() const
get begin index of this AtomPair
Definition atom_pair.h:143
Definition base_matrix.h:20
#define T
Definition exp.cpp:237