Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fleur
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
57
Issues
57
List
Boards
Labels
Milestones
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
fleur
fleur
Commits
8ea58cfa
Commit
8ea58cfa
authored
Jul 21, 2017
by
Daniel Wortmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed initializations of variables
parent
c3d29487
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
28 additions
and
31 deletions
+28
-31
eigen/eigen.F90
eigen/eigen.F90
+4
-2
global/types.F90
global/types.F90
+1
-0
global/types_rcmat.F90
global/types_rcmat.F90
+2
-0
hybrid/add_Vnonlocal.F90
hybrid/add_Vnonlocal.F90
+4
-6
hybrid/exchange_val_hf.F90
hybrid/exchange_val_hf.F90
+9
-12
hybrid/hf_setup.F90
hybrid/hf_setup.F90
+1
-4
hybrid/hsfock.F90
hybrid/hsfock.F90
+2
-3
hybrid/hybrid.F90
hybrid/hybrid.F90
+1
-0
io/io_hybrid.F90
io/io_hybrid.F90
+4
-4
No files found.
eigen/eigen.F90
View file @
8ea58cfa
...
...
@@ -222,9 +222,11 @@ CONTAINS
WRITE
(
*
,
*
)
'the Hamilton Matrix: '
,
err
,
' size: '
,
matsize
CALL
juDFT_error
(
"eigen: Error during allocation of Hamilton"
//
"matrix"
,
calledby
=
"eigen"
)
ENDIF
IF
(
l_real
)
THEN
IF
(
l_real
)
THEN
ALLOCATE
(
hamOvlp
%
b_c
(
0
))
ALLOCATE
(
hamOvlp
%
b_r
(
matsize
),
stat
=
err
)
ELSE
ELSE
ALLOCATE
(
hamOvlp
%
b_r
(
0
))
ALLOCATE
(
hamOvlp
%
b_c
(
matsize
),
stat
=
err
)
ENDIF
...
...
global/types.F90
View file @
8ea58cfa
...
...
@@ -431,6 +431,7 @@ MODULE m_types
REAL
,
ALLOCATABLE
::
basm1
(:,:,:,:)
COMPLEX
,
ALLOCATABLE
::
d_wgn2
(:,:,:,:)
INTEGER
,
ALLOCATABLE
::
ne_eig
(:),
nbands
(:),
nobd
(:)
!alloc in eigen_HF_init
REAL
,
ALLOCATABLE
::
div_vv
(:,:,:)
END
TYPE
t_hybrid
TYPE
prodtype
...
...
global/types_rcmat.F90
View file @
8ea58cfa
...
...
@@ -36,9 +36,11 @@ module m_types_rcmat
IF
(
mat
%
l_real
)
THEN
ALLOCATE
(
mat
%
data_r
(
mat
%
matsize1
,
mat
%
matsize2
),
STAT
=
err
)
ALLOCATE
(
mat
%
data_c
(
0
,
0
))
mat
%
data_r
=
0.0
ELSE
ALLOCATE
(
mat
%
data_r
(
0
,
0
))
ALLOCATE
(
mat
%
data_c
(
mat
%
matsize1
,
mat
%
matsize2
),
STAT
=
err
)
mat
%
data_c
=
0.0
ENDIF
IF
(
err
>
0
)
CALL
judft_error
(
"Allocation of memmory failed for mat datatype"
,
hint
=
"You probably run out of memory"
)
...
...
hybrid/add_Vnonlocal.F90
View file @
8ea58cfa
...
...
@@ -68,8 +68,6 @@ MODULE m_add_vnonlocal
INTEGER
::
iband
REAL
::
a_ex
! - local arrays -
REAL
::
div_vv
(
hybrid
%
nbands
(
nk
))
TYPE
(
t_mat
)
::
olap
,
tmp
,
v_x
,
z
COMPLEX
::
exch
(
dimension
%
neigd
,
dimension
%
neigd
)
...
...
@@ -102,7 +100,7 @@ MODULE m_add_vnonlocal
IF
(
hybrid
%
l_calhf
)
THEN
WRITE
(
6
,
'(A)'
)
new_line
(
'n'
)//
new_line
(
'n'
)//
' ### '
//
' diagonal HF exchange elements (eV) ###'
WRITE
(
6
,
'(A)'
)
new_line
(
'n'
)
//
' k-point '
//
'band tail pole
input%
total(valence+core)'
WRITE
(
6
,
'(A)'
)
new_line
(
'n'
)
//
' k-point '
//
'band tail pole total(valence+core)'
END
IF
...
...
@@ -117,7 +115,7 @@ MODULE m_add_vnonlocal
! calculate exchange contribution of current k-point nk to total energy (te_hfex)
! in the case of a spin-unpolarized calculation the factor 2 is added in eigen
_hf.F TODO
! in the case of a spin-unpolarized calculation the factor 2 is added in eigen
.F90
if
(
.not.
v_x
%
l_real
)
v_x
%
data_c
=
conjg
(
v_x
%
data_c
)
exch
=
0
print
*
,
"sizes:"
,
shape
(
z
%
data_r
),
shape
(
v_x
%
data_r
)
...
...
@@ -133,8 +131,8 @@ MODULE m_add_vnonlocal
END
IF
IF
(
hybrid
%
l_calhf
)
THEN
WRITE
(
6
,
'(
''
(
''
,F5.3,
''
,
''
,F5.3,
''
,
''
,F5.3,
''
)
''
,I4,4X,3F10.5)'
)&
&
kpts
%
bkf
(:,
nk
),
iband
,
(
REAL
(
exch
(
iband
,
iband
))
-
div_vv
(
iband
))
*
(
-27.211608
),&
&
div_vv
(
iband
)
*
(
-27.211608
),
REAL
(
exch
(
iband
,
iband
))
*
(
-27.211608
)
&
kpts
%
bkf
(:,
nk
),
iband
,
(
REAL
(
exch
(
iband
,
iband
))
-
hybrid
%
div_vv
(
iband
,
nk
,
jsp
))
*
(
-27.211608
),&
&
hybrid
%
div_vv
(
iband
,
nk
,
jsp
)
*
(
-27.211608
),
REAL
(
exch
(
iband
,
iband
))
*
(
-27.211608
)
END
IF
END
DO
...
...
hybrid/exchange_val_hf.F90
View file @
8ea58cfa
...
...
@@ -54,7 +54,7 @@
cell
,
dimension
,
input
,
jsp
,
hybdat
,
mnobd
,
lapw
,&
eig_irr
,
results
,
parent
,
pointer_EIBZ
,
n_q
,
wl_iks
,&
it
,
xcpot
,
noco
,
nsest
,
indx_sest
,&
mpi
,
irank2
,
isize2
,
comm
,
div_vv
,
mat_ex
)
mpi
,
irank2
,
isize2
,
comm
,
mat_ex
)
USE
m_wrapper
...
...
@@ -106,8 +106,7 @@
REAL
,
INTENT
(
IN
)
::
eig_irr
(
dimension
%
neigd
,
kpts
%
nkpt
)
REAL
,
INTENT
(
IN
)
::
wl_iks
(
dimension
%
neigd
,
kpts
%
nkptf
)
REAL
,
INTENT
(
OUT
)
::
div_vv
(
hybrid
%
nbands
(
nk
))
TYPE
(
t_mat
),
INTENT
(
INOUT
)::
mat_ex
! - local scalars -
...
...
@@ -250,11 +249,11 @@
! read in coulomb matrix from direct access file coulomb
#if( !defined CPP_NOSPMVEC && !defined CPP_IRAPPROX )
if
(
mat_ex
%
l_real
)
THEN
call
read_coulomb_spm_r
(
kpts
%
bkp
(
ikpt0
),
coulomb_mt1
,
coulomb_mt2_r
,
coulomb_mt3_r
,
coulomb_mtir_r
)
else
call
read_coulomb_spm_c
(
kpts
%
bkp
(
ikpt0
),
coulomb_mt1
,
coulomb_mt2_c
,
coulomb_mt3_c
,
coulomb_mtir_c
)
end
if
IF
(
mat_ex
%
l_real
)
THEN
CALL
read_coulomb_spm_r
(
kpts
%
bkp
(
ikpt0
),
coulomb_mt1
,
coulomb_mt2_r
,
coulomb_mt3_r
,
coulomb_mtir_r
)
ELSE
CALL
read_coulomb_spm_c
(
kpts
%
bkp
(
ikpt0
),
coulomb_mt1
,
coulomb_mt2_c
,
coulomb_mt3_c
,
coulomb_mtir_c
)
END
IF
#else
call
read_coulomb
(
kpts
%
bkp
(
ikpt0
),
coulomb
)
#endif
...
...
@@ -533,15 +532,13 @@ endif
! due to the symmetrization afterwards the factor 1/n_q(1) must be added
IF
(
n1
.
eq.
nn2
)
div_vv
(
n1
)
=
real
(
cdum2
)
IF
(
n1
.
EQ.
nn2
)
hybrid
%
div_vv
(
n1
,
nk
,
jsp
)
=
REAL
(
cdum2
)
exch_vv
(
nn2
,
n1
)
=
exch_vv
(
nn2
,
n1
)
+
(
exch0
+
cdum2
)/
n_q
(
1
)
END
DO
!n2
END
DO
!n1
ELSE
div_vv
=
0.
END
IF
! xcpot%icorr .ne. icorr_hse
END
IF
! xcpot%icorr .ne. icorr_hse
if
(
.not.
mat_ex
%
l_real
)
THEN
...
...
hybrid/hf_setup.F90
View file @
8ea58cfa
...
...
@@ -77,11 +77,8 @@ CONTAINS
ALLOCATE
(
zmat
(
nk
)
%
z_c
(
dimension
%
nbasfcn
,
dimension
%
neigd2
))
ALLOCATE
(
zmat
(
nk
)
%
z_r
(
0
,
0
))
endif
print
*
,
"eigen_HF_Setup: read_eig:"
,
nk
print
*
,
zmat
(
nk
)
%
nbasfcn
,
zmat
(
nk
)
%
nbands
,
hybrid
%
ne_eig
(
nk
)
CALL
read_eig
(
eig_id_hf
,
nk
,
jsp
,
el
=
el_eig
,
ello
=
ello_eig
,
neig
=
hybrid
%
ne_eig
(
nk
),
eig
=
eig_irr
(:,
nk
),
w_iks
=
results
%
w_iks
(:,
nk
,
jsp
),
kveclo
=
hybdat
%
kveclo_eig
(:,
nk
),
zmat
=
zmat
(
nk
))
print
*
,
"Done"
END
DO
!Allocate further space
DO
nk
=
kpts
%
nkpt
+1
,
kpts
%
nkptf
...
...
hybrid/hsfock.F90
View file @
8ea58cfa
...
...
@@ -112,8 +112,7 @@ MODULE m_hsfock
INTEGER
,
ALLOCATABLE
::
n_q
(:)
REAL
::
wl_iks
(
dimension
%
neigd
,
kpts
%
nkptf
)
REAL
::
div_vv
(
hybrid
%
nbands
(
nk
))
TYPE
(
t_mat
)
::
olap
,
trafo
,
invtrafo
,
ex
,
tmp
,
v_x
,
z
COMPLEX
::
exch
(
dimension
%
neigd
,
dimension
%
neigd
)
COMPLEX
,
ALLOCATABLE
::
carr
(:)
...
...
@@ -194,7 +193,7 @@ MODULE m_hsfock
&
it
,
xcpot
,&
&
noco
,
nsest
,
indx_sest
,&
&
mpi
,
irank2
,
isize2
,
comm
,&
&
div_vv
,
ex
)
&
ex
)
DEALLOCATE
(
rep_c
)
CALL
timestop
(
"valence exchange calculation"
)
...
...
hybrid/hybrid.F90
View file @
8ea58cfa
...
...
@@ -62,6 +62,7 @@ CONTAINS
IF
(
init_vex
)
THEN
ALLOCATE
(
hybrid
%
ne_eig
(
kpts
%
nkpt
),
hybrid
%
nbands
(
kpts
%
nkpt
),
hybrid
%
nobd
(
kpts
%
nkptf
))
ALLOCATE
(
hybrid
%
nbasm
(
kpts
%
nkptf
))
ALLOCATE
(
hybrid
%
div_vv
(
DIMENSION
%
neigd
,
kpts
%
nkpt
,
input
%
jspins
))
init_vex
=
.false.
ENDIF
hybrid
%
l_calhf
=
.TRUE.
...
...
io/io_hybrid.F90
View file @
8ea58cfa
...
...
@@ -80,8 +80,8 @@ contains
subroutine
write_coulomb
(
nk
,
l_real
,
coulomb
)
implicit
none
complex
,
intent
(
in
)
::
coulomb
(:)
integer
,
intent
(
in
)
::
l_real
logical
,
intent
(
in
)
::
nk
integer
,
intent
(
in
)
::
nk
logical
,
intent
(
in
)
::
l_real
if
(
l_real
)
THEN
write
(
id_coulomb
,
rec
=
nk
)
real
(
coulomb
)
...
...
@@ -134,7 +134,7 @@ contains
subroutine
read_coulomb_r
(
nk
,
coulomb
)
implicit
none
real
,
intent
(
out
)
::
coulomb
(:)
logical
,
intent
(
in
)
::
nk
integer
,
intent
(
in
)
::
nk
read
(
id_coulomb
,
rec
=
nk
)
coulomb
end
subroutine
read_coulomb_r
...
...
@@ -142,7 +142,7 @@ contains
subroutine
read_coulomb_c
(
nk
,
coulomb
)
implicit
none
complex
,
intent
(
out
)
::
coulomb
(:)
logical
,
intent
(
in
)
::
nk
integer
,
intent
(
in
)
::
nk
read
(
id_coulomb
,
rec
=
nk
)
coulomb
end
subroutine
read_coulomb_c
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment