#include <sltk_grid.h>
|
| bool | pbc =false |
| | Data.
|
| double | sradius2 =0.0 |
| | searching radius squared (unit:lat0)
|
| double | sradius =0.0 |
| | searching radius (unit:lat0)
|
| double | x_min =0.0 |
| | coordinate range of the input atom (unit:lat0)
|
| double | y_min =0.0 |
| double | z_min =0.0 |
| double | x_max =0.0 |
| double | y_max =0.0 |
| double | z_max =0.0 |
| double | box_edge_length =0.0 |
| | box edge length (equal to sradius)
|
| int | box_nx =0 |
| | number of boxes in x direction
|
| int | box_ny =0 |
| | number of boxes in y direction
|
| int | box_nz =0 |
| | number of boxes in z direction
|
| std::vector< std::vector< std::vector< AtomMap > > > | atoms_in_box |
| | Stores the atoms after box partitioning.
|
| std::vector< std::vector< std::vector< FAtom * > > > | all_adj_info |
| | Stores the adjacent information of atoms. [ntype][natom][adj list].
|
|
| int | test_grid |
| | test flag
|
| int | glayerX =0 |
| | number of periodic images in positive x direction
|
| int | glayerX_minus =0 |
| | number of periodic images in negative x direction
|
| int | glayerY =0 |
| | number of periodic images in positive y direction
|
| int | glayerY_minus =0 |
| | number of periodic images in negative y direction
|
| int | glayerZ =0 |
| | number of periodic images in positive z direction
|
| int | glayerZ_minus =0 |
| | number of periodic images in negative z direction
|
|
| class | SltkGridTest |
| | the unit test drives the private setMemberVariables() directly
|
◆ Grid() [1/2]
Default constructor.
Grid is Global class, so init it with constant number.
◆ Grid() [2/2]
| Grid::Grid |
( |
const int & | test_grid_in | ) |
|
Constructor with test flag.
- Parameters
-
◆ ~Grid()
◆ Check_Expand_Condition()
| void Grid::Check_Expand_Condition |
( |
const UnitCell & | ucell | ) |
|
|
private |
Check expansion condition for periodic images.
- Parameters
-
◆ clear_adj_info()
| void Grid::clear_adj_info |
( |
| ) |
|
|
inline |
Clear adjacent information only.
Here we don't need to free the memory because the pointers point to the memory in vector atoms_in_box.
◆ clear_atoms()
| void Grid::clear_atoms |
( |
| ) |
|
|
inline |
Clear all atoms and adjacent information.
We have to clear the all_adj_info because the pointers point to the memory in vector atoms_in_box.
◆ Construct_Adjacent()
| void Grid::Construct_Adjacent |
( |
const UnitCell & | ucell | ) |
|
|
private |
Construct adjacent atom information.
- Parameters
-
◆ Construct_Adjacent_final()
| void Grid::Construct_Adjacent_final |
( |
const FAtom & | fatom1, |
|
|
FAtom * | fatom2 ) |
|
private |
Finalize adjacent atom information for a pair of atoms.
- Parameters
-
| fatom1 | first atom |
| fatom2 | second atom |
◆ Construct_Adjacent_near_box()
| void Grid::Construct_Adjacent_near_box |
( |
const FAtom & | fatom | ) |
|
|
private |
Construct adjacent atom information for nearby boxes.
- Parameters
-
| fatom | atom for which to find neighbors |
◆ getBox()
| void Grid::getBox |
( |
int & | bx, |
|
|
int & | by, |
|
|
int & | bz, |
|
|
const double & | x, |
|
|
const double & | y, |
|
|
const double & | z ) |
|
inline |
Get box indices for given coordinates.
- Parameters
-
| bx | box index in x direction (output) |
| by | box index in y direction (output) |
| bz | box index in z direction (output) |
| x | x coordinate |
| y | y coordinate |
| z | z coordinate |
◆ getGlayerX()
| int Grid::getGlayerX |
( |
| ) |
const |
|
inline |
◆ getGlayerX_minus()
| int Grid::getGlayerX_minus |
( |
| ) |
const |
|
inline |
◆ getGlayerY()
| int Grid::getGlayerY |
( |
| ) |
const |
|
inline |
◆ getGlayerY_minus()
| int Grid::getGlayerY_minus |
( |
| ) |
const |
|
inline |
◆ getGlayerZ()
| int Grid::getGlayerZ |
( |
| ) |
const |
|
inline |
◆ getGlayerZ_minus()
| int Grid::getGlayerZ_minus |
( |
| ) |
const |
|
inline |
◆ init()
| void Grid::init |
( |
std::ofstream & | ofs, |
|
|
const UnitCell & | ucell, |
|
|
const double | radius_in, |
|
|
const bool | boundary = true ) |
Initialize the grid.
- Parameters
-
| ofs | output file stream |
| ucell | unit cell |
| radius_in | searching radius |
| boundary | whether to apply boundary conditions |
◆ operator=()
◆ setMemberVariables()
| void Grid::setMemberVariables |
( |
std::ofstream & | ofs_in, |
|
|
const UnitCell & | ucell ) |
|
private |
Set member variables.
- Parameters
-
| ofs_in | output file stream |
| ucell | unit cell |
◆ SltkGridTest
the unit test drives the private setMemberVariables() directly
◆ all_adj_info
| std::vector<std::vector< std::vector<FAtom *> > > Grid::all_adj_info |
Stores the adjacent information of atoms. [ntype][natom][adj list].
◆ atoms_in_box
| std::vector<std::vector<std::vector<AtomMap> > > Grid::atoms_in_box |
Stores the atoms after box partitioning.
◆ box_edge_length
| double Grid::box_edge_length =0.0 |
box edge length (equal to sradius)
◆ box_nx
number of boxes in x direction
◆ box_ny
number of boxes in y direction
◆ box_nz
number of boxes in z direction
◆ glayerX
number of periodic images in positive x direction
◆ glayerX_minus
| int Grid::glayerX_minus =0 |
|
private |
number of periodic images in negative x direction
◆ glayerY
number of periodic images in positive y direction
◆ glayerY_minus
| int Grid::glayerY_minus =0 |
|
private |
number of periodic images in negative y direction
◆ glayerZ
number of periodic images in positive z direction
◆ glayerZ_minus
| int Grid::glayerZ_minus =0 |
|
private |
number of periodic images in negative z direction
◆ pbc
Data.
When pbc is set to false, periodic boundary conditions are explicitly ignored.
◆ sradius
| double Grid::sradius =0.0 |
searching radius (unit:lat0)
◆ sradius2
| double Grid::sradius2 =0.0 |
searching radius squared (unit:lat0)
◆ test_grid
◆ x_max
◆ x_min
coordinate range of the input atom (unit:lat0)
◆ y_max
◆ y_min
◆ z_max
◆ z_min
The documentation for this class was generated from the following files:
- /home/runner/work/abacus-develop/abacus-develop/source/source_cell/module_neighbor/sltk_grid.h
- /home/runner/work/abacus-develop/abacus-develop/source/source_cell/module_neighbor/sltk_grid.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_estate/module_dm/unittests/tmp_mocks.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_lcao/module_operator_lcao/test/tmp_mocks.cpp