FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
abacus-develop/source/source_esolver/pw_setup.cpp at develop · pplab/abacus-develop · GitHub
pplab
/
abacus-develop
Public
forked from
deepmodeling/abacus-develop
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
abacus-develop
/
source
/
source_esolver
/
pw_setup.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
52 lines (40 loc) · 1.29 KB
Breadcrumbs
abacus-develop
/
source
/
source_esolver
/
pw_setup.cpp
Copy path
File metadata and controls
52 lines (40 loc) · 1.29 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#
include
"
pw_setup.h
"
//
To get POOL_WORLD
#
include
"
source_base/parallel_comm.h
"
//
Print information
#
include
"
source_io/print_info.h
"
void
ModuleESolver::pw_setup
(
const
Input_para& inp,
const
UnitCell& ucell,
const
ModulePW::PW_Basis& pw_rho,
K_Vectors& kv,
ModulePW::PW_Basis_K& pw_wfc)
{
ModuleBase::TITLE
(
"
ModuleESolver
"
,
"
pw_setup
"
);
//
! new plane wave basis, fft grids, etc.
#
ifdef
__MPI
pw_wfc.
initmpi
(GlobalV::
NPROC_IN_POOL
, GlobalV::
RANK_IN_POOL
,
POOL_WORLD
);
#
endif
pw_wfc.
initgrids
(inp.
ref_cell_factor
* ucell.
lat0
,
ucell.
latvec
,
pw_rho.
nx
,
pw_rho.
ny
,
pw_rho.
nz
);
pw_wfc.
initparameters
(
false
, inp.
ecutwfc
, kv.
get_nks
(), kv.
kvec_d
.
data
());
#
ifdef
__MPI
if
(inp.
pw_seed
>
0
)
{
MPI_Allreduce
(
MPI_IN_PLACE
, &pw_wfc.
ggecut
,
1
,
MPI_DOUBLE
,
MPI_MAX
,
MPI_COMM_WORLD
);
}
//
qianrui add 2021-8-13 to make different kpar parameters can get the same
//
results
#
endif
pw_wfc.
fft_bundle
.
initfftmode
(inp.
fft_mode
);
pw_wfc.
setuptransform
();
//
! initialize the number of plane waves for each k point
for
(
int
ik =
0
; ik < kv.
get_nks
(); ++ik)
{
kv.
ngk
[ik] = pw_wfc.
npwk
[ik];
}
pw_wfc.
collect_local_pw
(inp.
erf_ecut
, inp.
erf_height
, inp.
erf_sigma
);
ModuleIO::print_wfcfft
(inp, pw_wfc, GlobalV::ofs_running);
}
Back
|
FazBrowse Home
|
New Git URL