ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
hamilt::HTransPara< T > Class Template Reference

#include <transfer.h>

Collaboration diagram for hamilt::HTransPara< T >:

Public Member Functions

 HTransPara (int n_processes, HContainer< T > *hr_in)
 ~HTransPara ()
void cal_orb_indexes (int irank, std::vector< int > *orb_indexes=nullptr)
 calculate Orbital indexes and will be send to irank the format of the return value is: [size_i, atom_i, number_orb_row, 0, 1, 2, 3, 8, 9, 10, 11, number_orb_col, ... atom_i, number_orb_row, 4, 5, 6, 7, atom_i, ... number_orb_col, ...] i refers to the ith atom in this->ap_indexes[irank] the function is called in plan_indexes
void receive_ap_indexes (int irank, const int *ap_indexes_in=nullptr, const long &size_ap_indexes_in=0)
 receive AtomPair_indexes from the ith rank save to this->ap_indexes[irank]
void send_orb_indexes (int irank, MPI_Request *request=nullptr)
 pack data in this->hr, and send to ith rank
void send_data (int irank, MPI_Request *request=nullptr)
 pack data in this->hr, and send to ith rank
void receive_data (int irank, const T *values=nullptr)
 receive data from ith rank, save them to this->hr
void pack_data (int irank, T *values=nullptr)
 pack BaseMatrix-values for ith rank
long get_max_size () const
void get_value_size (int *out) const

Private Member Functions

void unpack_data (int irank, const T *values)

Private Attributes

std::vector< std::vector< int > > ap_indexes
HContainer< T > * hr = nullptr
std::vector< std::vector< int > > atom_i_index
const Parallel_Orbitals * paraV = nullptr
std::vector< long > size_values

Constructor & Destructor Documentation

◆ HTransPara()

template<typename T>
hamilt::HTransPara< T >::HTransPara ( int n_processes,
HContainer< T > * hr_in )
Here is the call graph for this function:

◆ ~HTransPara()

template<typename T>
hamilt::HTransPara< T >::~HTransPara ( )

Member Function Documentation

◆ cal_orb_indexes()

template<typename T>
void hamilt::HTransPara< T >::cal_orb_indexes ( int irank,
std::vector< int > * orb_indexes = nullptr )

calculate Orbital indexes and will be send to irank the format of the return value is: [size_i, atom_i, number_orb_row, 0, 1, 2, 3, 8, 9, 10, 11, number_orb_col, ... atom_i, number_orb_row, 4, 5, 6, 7, atom_i, ... number_orb_col, ...] i refers to the ith atom in this->ap_indexes[irank] the function is called in plan_indexes

Parameters
irank
orb_indexes
Here is the caller graph for this function:

◆ get_max_size()

template<typename T>
long hamilt::HTransPara< T >::get_max_size ( ) const

◆ get_value_size()

template<typename T>
void hamilt::HTransPara< T >::get_value_size ( int * out) const
Here is the caller graph for this function:

◆ pack_data()

template<typename T>
void hamilt::HTransPara< T >::pack_data ( int irank,
T * values = nullptr )

pack BaseMatrix-values for ith rank

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

◆ receive_ap_indexes()

template<typename T>
void hamilt::HTransPara< T >::receive_ap_indexes ( int irank,
const int * ap_indexes_in = nullptr,
const long & size_ap_indexes_in = 0 )

receive AtomPair_indexes from the ith rank save to this->ap_indexes[irank]

Parameters
irank
Here is the caller graph for this function:

◆ receive_data()

template<typename T>
void hamilt::HTransPara< T >::receive_data ( int irank,
const T * values = nullptr )

receive data from ith rank, save them to this->hr

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

◆ send_data()

template<typename T>
void hamilt::HTransPara< T >::send_data ( int irank,
MPI_Request * request = nullptr )

pack data in this->hr, and send to ith rank

Parameters
irank
Here is the call graph for this function:

◆ send_orb_indexes()

template<typename T>
void hamilt::HTransPara< T >::send_orb_indexes ( int irank,
MPI_Request * request = nullptr )

pack data in this->hr, and send to ith rank

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

◆ unpack_data()

template<typename T>
void hamilt::HTransPara< T >::unpack_data ( int irank,
const T * values )
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ap_indexes

template<typename T>
std::vector<std::vector<int> > hamilt::HTransPara< T >::ap_indexes
private

◆ atom_i_index

template<typename T>
std::vector<std::vector<int> > hamilt::HTransPara< T >::atom_i_index
private

◆ hr

template<typename T>
HContainer<T>* hamilt::HTransPara< T >::hr = nullptr
private

◆ paraV

template<typename T>
const Parallel_Orbitals* hamilt::HTransPara< T >::paraV = nullptr
private

◆ size_values

template<typename T>
std::vector<long> hamilt::HTransPara< T >::size_values
private

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