|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Domain decomposition for distributed and single-domain neighbor input. More...
#include <dom_decomp.h>
Classes | |
| struct | PackedAtom |
| struct | GhostExchangeSlot |
| struct | ForceRecord |
Public Member Functions | |
| DomainDecomposition () | |
| ~DomainDecomposition () | |
| DomainDecomposition (const DomainDecomposition &)=delete | |
| DomainDecomposition & | operator= (const DomainDecomposition &)=delete |
| void | init (const ModuleBase::CommunicationDomain &comm_domain, const ModuleBase::Matrix3 &latvec, double lat0, double cutoff, double skin) |
| std::vector< LocalAtom > | split_owned_atoms_from_ucell (const UnitCell &ucell) const |
| void | migrate_owned_atoms (MDCell &cell) |
| void | exchange_ghost_atoms (MDCell &cell) |
| void | update_ghost_atom_positions (MDCell &cell) |
| void | accumulate_ghost_forces (MDCell &cell) |
| void | prepare_neighbors (MDCell &cell) |
| int | owner_rank_from_frac (const ModuleBase::Vector3< double > &frac) const |
| const std::array< int, 3 > & | dims () const |
| const std::array< int, 3 > & | coords () const |
Private Member Functions | |
| void | update_geometry_ (const ModuleBase::Matrix3 &latvec, double lat0, double cutoff, double skin) |
| void | synchronize_geometry_ (MDCell &cell) |
| void | exchange_bytes_ (const void *send, std::size_t send_bytes, void *recv, std::size_t recv_bytes, int send_rank, int recv_rank, int tag) const |
| void | exchange_migration_ (const std::array< int, 6 > &neighbors, const std::array< std::vector< PackedAtom >, 6 > &send_atoms, const std::array< int, 6 > &send_counts, std::array< std::vector< PackedAtom >, 6 > &recv_atoms) const |
| ModuleBase::Vector3< double > | wrapped_frac_from_cart (const ModuleBase::Vector3< double > &cart) const |
| int | rank_from_coords (const std::array< int, 3 > &coords) const |
| int | neighbor_layer (int dim) const |
| void | target_for_offset (const std::array< int, 3 > &offset, std::array< int, 3 > &target_coords, std::array< int, 3 > &image_shift) const |
| std::array< int, 3 > | image_shift_for_update (const LocalAtom &atom, const std::array< double, 3 > &previous_frac, const std::array< int, 3 > &previous_image_shift, const GhostExchangeSlot &slot) const |
| void | build_ghost_exchange_slots (std::vector< GhostExchangeSlot > &slots) const |
| GhostExchangePlan | build_ghost_exchange_plan (const MDCell &cell) const |
| PackedAtom | pack_atom (const LocalAtom &atom, const std::array< int, 3 > &image_shift) const |
| LocalAtom | unpack_ghost_atom (const PackedAtom &packed) const |
| LocalAtom | unpack_owned_atom (const PackedAtom &packed) const |
Static Private Member Functions | |
| static double | wrap_fractional (double value) |
| static int | floor_div (int value, int divisor) |
| static int | positive_mod (int value, int divisor) |
Private Attributes | |
| bool | initialized_ = false |
| MPI_Comm | comm_ = MPI_COMM_NULL |
| MPI_Comm | cart_comm_ = MPI_COMM_NULL |
| bool | owns_cart_comm_ = false |
| int | rank_ |
| int | size_ |
| std::array< int, 3 > | dims_ |
| std::array< int, 3 > | coords_ |
| std::array< double, 3 > | margin_ |
| ModuleBase::Matrix3 | latvec_ |
| ModuleBase::Matrix3 | inv_latvec_ |
| double | lat0_ |
| double | cutoff_ |
| double | skin_ |
| std::vector< GhostExchangeSlot > | ghost_slots_ |
| bool | ghost_layout_valid_ = false |
Domain decomposition for distributed and single-domain neighbor input.
The decomposition is performed in fractional coordinates. Owned atoms are selected by wrapped fractional position, and ghost atoms are exchanged as shifted periodic images.
| DomainDecomposition::DomainDecomposition | ( | ) |
| DomainDecomposition::~DomainDecomposition | ( | ) |
|
delete |
| void DomainDecomposition::accumulate_ghost_forces | ( | MDCell & | cell | ) |
|
private |
|
private |
| const std::array< int, 3 > & DomainDecomposition::coords | ( | ) | const |
| const std::array< int, 3 > & DomainDecomposition::dims | ( | ) | const |
|
private |
| void DomainDecomposition::exchange_ghost_atoms | ( | MDCell & | cell | ) |
|
private |
|
staticprivate |
|
private |
| void DomainDecomposition::init | ( | const ModuleBase::CommunicationDomain & | comm_domain, |
| const ModuleBase::Matrix3 & | latvec, | ||
| double | lat0, | ||
| double | cutoff, | ||
| double | skin ) |
| void DomainDecomposition::migrate_owned_atoms | ( | MDCell & | cell | ) |
|
private |
|
delete |
| int DomainDecomposition::owner_rank_from_frac | ( | const ModuleBase::Vector3< double > & | frac | ) | const |
|
private |
|
staticprivate |
| void DomainDecomposition::prepare_neighbors | ( | MDCell & | cell | ) |
|
private |
| std::vector< LocalAtom > DomainDecomposition::split_owned_atoms_from_ucell | ( | const UnitCell & | ucell | ) | const |
|
private |
|
private |
|
private |
|
private |
|
private |
| void DomainDecomposition::update_ghost_atom_positions | ( | MDCell & | cell | ) |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |