FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
abacus-develop/source/source_io/output_sk.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_io
/
output_sk.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
48 lines (41 loc) · 1.38 KB
Breadcrumbs
abacus-develop
/
source
/
source_io
/
output_sk.cpp
Copy path
File metadata and controls
48 lines (41 loc) · 1.38 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
#
include
"
output_sk.h
"
#
include
"
source_base/tool_quit.h
"
namespace
ModuleIO
{
template
<
typename
TK
>
Output_Sk<
TK
>::Output_Sk(hamilt::Hamilt<
TK
>* p_hamilt, Parallel_Orbitals* ParaV,
int
nspin,
int
nks)
: p_hamilt_(p_hamilt), ParaV_(ParaV), nspin_(nspin), nks_(nks)
{
}
template
<>
double
* Output_Sk<
double
>::get_Sk(
int
ik)
{
if
(ik <
0
|| ik >=
this
->
nks_
)
{
ModuleBase::WARNING_QUIT
(
"
Output_Sk::get_sk
"
,
"
ik out of range
"
);
}
return
dynamic_cast
<hamilt::HamiltLCAO<
double
,
double
>*>(
this
->
p_hamilt_
)->
getSk
();
}
template
<>
std::
complex
<
double
>* Output_Sk<std::
complex
<
double
>>::get_Sk(
int
ik)
{
if
(ik <
0
|| ik >=
this
->
nks_
)
{
ModuleBase::WARNING_QUIT
(
"
Output_Sk::get_sk
"
,
"
ik out of range
"
);
}
if
(
this
->
nspin_
==
4
)
{
dynamic_cast
<hamilt::HamiltLCAO<std::
complex
<
double
>, std::
complex
<
double
>>*>(
this
->
p_hamilt_
)
->
updateSk
(ik,
1
);
return
dynamic_cast
<hamilt::HamiltLCAO<std::
complex
<
double
>, std::
complex
<
double
>>*>(
this
->
p_hamilt_
)->
getSk
();
}
else
{
dynamic_cast
<hamilt::HamiltLCAO<std::
complex
<
double
>,
double
>*>(
this
->
p_hamilt_
)->
updateSk
(ik,
1
);
return
dynamic_cast
<hamilt::HamiltLCAO<std::
complex
<
double
>,
double
>*>(
this
->
p_hamilt_
)->
getSk
();
}
return
nullptr
;
}
template
class
Output_Sk
<
double
>;
template
class
Output_Sk
<std::
complex
<
double
>>;
}
//
namespace ModuleIO
Back
|
FazBrowse Home
|
New Git URL