ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
record_adj.h
Go to the documentation of this file.
1#ifndef RECORD_ADJ_H
2#define RECORD_ADJ_H
3
7
8//---------------------------------------------------
9// FUNCTION: record the adjacent atoms for each atom
10//---------------------------------------------------
12{
13 private:
14 bool info_modified = false;
15
16 public:
17 Record_adj();
19
20 //--------------------------------------------
21 // This will record the orbitals according to
22 // HPSEPS's 2D block division.
23 //--------------------------------------------
24 void for_2d(const UnitCell& ucell,
25 const Grid_Driver& grid_d,
27 bool gamma_only,
28 const std::vector<double>& orb_cutoff);
29
30
31 void delete_grid();
32
33 int na_proc=0;
34 int* na_each=nullptr;
35
36 //--------------------------------------------
37 // record sparse atom index in for_grid();
38 // Map iat(dense atom index) to sparse atom index
39 // Mainly removing the index dependency for OpenMP parallel loop
40 //
41 // Meaning:
42 // 1. if iat2ca[iat] > 0, it contains the sparse atom index
43 // 2. if iat2ca[iat] < 0, the sparse atom index of iat does not exist
44 //
45 // Usage:
46 // 1. iat2ca[iat] > 0 ? na_each[iat2ca[iat]] : 0
47 // 2. iat2ca[iat] > 0 ? info[iat2ca[iat]] : nullptr
48 //--------------------------------------------
49 int* iat2ca=nullptr;
50
51 //------------------------------------------------
52 // info will identify each atom in each unitcell.
53 //------------------------------------------------
54 int*** info=nullptr;
55
56 private:
57};
58
59#endif
Definition sltk_grid_driver.h:43
Definition parallel_orbitals.h:9
Definition record_adj.h:12
int na_proc
Definition record_adj.h:33
void delete_grid()
Definition record_adj.cpp:18
void for_2d(const UnitCell &ucell, const Grid_Driver &grid_d, Parallel_Orbitals &pv, bool gamma_only, const std::vector< double > &orb_cutoff)
Definition record_adj.cpp:45
int * iat2ca
Definition record_adj.h:49
bool info_modified
Definition record_adj.h:14
int *** info
Definition record_adj.h:54
Record_adj()
Definition tmp_mocks.cpp:115
int * na_each
Definition record_adj.h:34
~Record_adj()
Definition tmp_mocks.cpp:118
Definition unitcell.h:17