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
6
7//---------------------------------------------------
8// FUNCTION: record the adjacent atoms for each atom
9//---------------------------------------------------
11{
12 private:
13 bool info_modified = false;
14
15 public:
16 Record_adj();
18
19 //--------------------------------------------
20 // This will record the orbitals according to
21 // HPSEPS's 2D block division.
22 //--------------------------------------------
23 void for_2d(const UnitCell& ucell,
24 const Grid_Driver& grid_d,
26 bool gamma_only,
27 const std::vector<double>& orb_cutoff);
28
29 //--------------------------------------------
30 // This will record the orbitals according to
31 // grid division (cut along z direction)
32 //--------------------------------------------
33 void for_grid(const UnitCell& ucell,
34 const Grid_Driver& grid_d,
35 const Grid_Technique& gt,
36 const std::vector<double>& orb_cutoff);
37
38 void delete_grid();
39
40 int na_proc=0;
41 int* na_each=nullptr;
42
43 //--------------------------------------------
44 // record sparse atom index in for_grid(const Grid_Technique &gt);
45 // Map iat(dense atom index) to sparse atom index
46 // Mainly removing the index dependency for OpenMP parallel loop
47 //
48 // Meaning:
49 // 1. if iat2ca[iat] > 0, it contains the sparse atom index
50 // 2. if iat2ca[iat] < 0, the sparse atom index of iat does not exist
51 //
52 // Usage:
53 // 1. iat2ca[iat] > 0 ? na_each[iat2ca[iat]] : 0
54 // 2. iat2ca[iat] > 0 ? info[iat2ca[iat]] : nullptr
55 //--------------------------------------------
56 int* iat2ca=nullptr;
57
58 //------------------------------------------------
59 // info will identify each atom in each unitcell.
60 //------------------------------------------------
61 int*** info=nullptr;
62
63 private:
64};
65
66#endif
Definition sltk_grid_driver.h:43
Definition grid_technique.h:18
Definition parallel_orbitals.h:9
Definition record_adj.h:11
int na_proc
Definition record_adj.h:40
void for_grid(const UnitCell &ucell, const Grid_Driver &grid_d, const Grid_Technique &gt, const std::vector< double > &orb_cutoff)
Definition record_adj.cpp:290
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:56
bool info_modified
Definition record_adj.h:13
int *** info
Definition record_adj.h:61
Record_adj()
Definition tmp_mocks.cpp:111
int * na_each
Definition record_adj.h:41
~Record_adj()
Definition tmp_mocks.cpp:114
Definition unitcell.h:16