Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fleur
fleur
Commits
fbfc1ac9
Commit
fbfc1ac9
authored
Jun 11, 2018
by
Miriam Hinzen
Browse files
Fix mix and broadcast parameter
parent
ed1b48ad
Changes
4
Hide whitespace changes
Inline
Side-by-side
main/fleur.F90
View file @
fbfc1ac9
...
...
@@ -112,7 +112,7 @@ CONTAINS
#endif
mpi
%
mpi_comm
=
mpi_comm
CALL
timestart
(
"Initialization"
)
CALL
fleur_init
(
mpi
,
input
,
field
,
DIMENSION
,
atoms
,
sphhar
,
cell
,
stars
,
sym
,
noco
,
vacuum
,
forcetheo
,&
sliceplot
,
banddos
,
obsolete
,
enpara
,
xcpot
,
results
,
kpts
,
hybrid
,&
...
...
@@ -241,7 +241,6 @@ CONTAINS
#ifdef CPP_MPI
CALL
MPI_BARRIER
(
mpi
%
mpi_comm
,
ierr
)
#endif
...
...
@@ -250,7 +249,6 @@ CONTAINS
forcetheoloop
:
DO
WHILE
(
forcetheo
%
next_job
(
it
==
input
%
itmax
,
noco
))
CALL
timestart
(
"generation of hamiltonian and diagonalization (total)"
)
CALL
timestart
(
"eigen"
)
vTemp
=
vTot
...
...
@@ -299,6 +297,7 @@ CONTAINS
IF
(
(
mpi
%
irank
.EQ.
0
))
THEN
CALL
timestart
(
"determination of fermi energy"
)
write
(
657
,
*
)
'before fermie'
IF
(
noco
%
l_soc
.AND.
(
.NOT.
noco
%
l_noco
)
)
THEN
input
%
zelec
=
input
%
zelec
*
2
CALL
fermie
(
eig_id
,
mpi
,
kpts
,
obsolete
,&
...
...
@@ -311,6 +310,7 @@ CONTAINS
input
,
noco
,
enpara
%
epara_min
,
cell
,
results
)
ENDIF
CALL
timestop
(
"determination of fermi energy"
)
write
(
657
,
*
)
'after fermie'
!!$
!!$ !+Wannier
!!$ IF(wann%l_bs_comf)THEN
...
...
@@ -365,9 +365,11 @@ CONTAINS
enpara
,
cell
,
noco
,
vTot
,
results
,
oneD
,
coreSpecInput
,&
archiveType
,
outDen
)
write
(
657
,
*
)
'before rdmft'
IF
(
.FALSE.
)
CALL
rdmft
(
eig_id
,
mpi
,
input
,
kpts
,
banddos
,
cell
,
atoms
,
enpara
,
stars
,
vacuum
,
dimension
,&
sphhar
,
sym
,
field
,
vTot
,
oneD
,
noco
,
results
)
write
(
657
,
*
)
'after rdmft'
IF
(
noco
%
l_soc
.AND.
(
.NOT.
noco
%
l_noco
)
)
DIMENSION
%
neigd
=
DIMENSION
%
neigd
/
2
!+t3e
#ifdef CPP_MPI
...
...
@@ -419,6 +421,7 @@ CONTAINS
CALL
enpara
%
mix
(
mpi
,
atoms
,
vacuum
,
input
,
vTot
%
mt
(:,
0
,:,:),
vtot
%
vacz
)
field2
=
field
! ----> mix input and output densities
write
(
657
,
*
)
'before mix'
CALL
timestart
(
"mixing"
)
CALL
mix
(
field2
,
xcpot
,
dimension
,
obsolete
,
sliceplot
,
mpi
,
&
stars
,
atoms
,
sphhar
,
vacuum
,
input
,
sym
,
cell
,
noco
,
&
...
...
main/fleur_init.F90
View file @
fbfc1ac9
...
...
@@ -250,6 +250,7 @@
CALL
MPI_BCAST
(
input
%
jspins
,
1
,
MPI_INTEGER
,
0
,
mpi
%
mpi_comm
,
ierr
)
CALL
MPI_BCAST
(
atoms
%
n_u
,
1
,
MPI_INTEGER
,
0
,
mpi
%
mpi_comm
,
ierr
)
CALL
MPI_BCAST
(
atoms
%
lmaxd
,
1
,
MPI_INTEGER
,
0
,
mpi
%
mpi_comm
,
ierr
)
call
MPI_BCAST
(
input
%
preconditioning_param
,
1
,
MPI_DOUBLE
,
0
,
mpi
%
mpi_comm
,
ierr
)
#endif
CALL
ylmnorm_init
(
atoms
%
lmaxd
)
!
...
...
main/mix.F90
View file @
fbfc1ac9
...
...
@@ -36,6 +36,9 @@ contains
use
m_xmlOutput
use
m_umix
use
m_vgen_coulomb
#ifdef CPP_MPI
use
m_mpi_bc_potden
#endif
implicit
none
type
(
t_oneD
),
intent
(
in
)
::
oneD
...
...
@@ -172,24 +175,27 @@ contains
if
(
input
%
preconditioning_param
/
=
0
)
then
call
resDen
%
init
(
stars
,
atoms
,
sphhar
,
vacuum
,
input
%
jspins
,
noco
%
l_noco
,
1001
)
call
vYukawa
%
init
(
stars
,
atoms
,
sphhar
,
vacuum
,
input
%
jspins
,
noco
%
l_noco
,
4
)
if
(
mpi
%
irank
==
0
)
then
MPI0_b
:
if
(
mpi
%
irank
==
0
)
then
call
resDen
%
Residual
(
outDen
,
inDen
)
if
(
input
%
jspins
==
2
)
call
resDen
%
SpinsToChargeAndMagnetisation
()
end
if
end
if
MPI0_b
#ifdef CPP_MPI
call
mpi_bc_potden
(
mpi
,
stars
,
sphhar
,
atoms
,
input
,
vacuum
,
oneD
,
noco
,
resDen
)
#endif
call
vgen_coulomb
(
1
,
mpi
,
dimension
,
oneD
,
input
,
field
,
vacuum
,
sym
,
stars
,
cell
,
&
sphhar
,
atoms
,
resDen
,
vYukawa
)
resDen
%
pw
(
1
:
stars
%
ng3
,
1
)
=
resDen
%
pw
(
1
:
stars
%
ng3
,
1
)
-
input
%
preconditioning_param
**
2
/
fpi_const
*
vYukawa
%
pw
(
1
:
stars
%
ng3
,
1
)
do
n
=
1
,
atoms
%
ntype
do
lh
=
0
,
sphhar
%
nlhd
resDen
%
mt
(
1
:
atoms
%
jri
(
n
),
lh
,
n
,
1
)
=
resDen
%
mt
(
1
:
atoms
%
jri
(
n
),
lh
,
n
,
1
)
&
-
input
%
preconditioning_param
**
2
/
fpi_const
&
*
vYukawa
%
mt
(
1
:
atoms
%
jri
(
n
),
lh
,
n
,
1
)
*
atoms
%
rmsh
(
1
:
atoms
%
jri
(
n
),
n
)
**
2
end
do
end
do
if
(
input
%
jspins
==
2
)
call
resDen
%
ChargeAndMagnetisationToSpins
()
end
if
MPI0_
b
:
if
(
mpi
%
irank
==
0
)
then
MPI0_
c
:
if
(
mpi
%
irank
==
0
)
then
if
(
input
%
preconditioning_param
/
=
0
)
then
resDen
%
pw
(
1
:
stars
%
ng3
,
1
)
=
resDen
%
pw
(
1
:
stars
%
ng3
,
1
)
-
input
%
preconditioning_param
**
2
/
fpi_const
*
vYukawa
%
pw
(
1
:
stars
%
ng3
,
1
)
do
n
=
1
,
atoms
%
ntype
do
lh
=
0
,
sphhar
%
nlhd
resDen
%
mt
(
1
:
atoms
%
jri
(
n
),
lh
,
n
,
1
)
=
resDen
%
mt
(
1
:
atoms
%
jri
(
n
),
lh
,
n
,
1
)
&
-
input
%
preconditioning_param
**
2
/
fpi_const
&
*
vYukawa
%
mt
(
1
:
atoms
%
jri
(
n
),
lh
,
n
,
1
)
*
atoms
%
rmsh
(
1
:
atoms
%
jri
(
n
),
n
)
**
2
end
do
end
do
if
(
input
%
jspins
==
2
)
call
resDen
%
ChargeAndMagnetisationToSpins
()
call
brysh1
(
input
,
stars
,
atoms
,
sphhar
,
noco
,
vacuum
,
sym
,
oneD
,
&
intfac
,
vacfac
,
resDen
,
nmap
,
nmaph
,
mapmt
,
mapvac
,
mapvac2
,
fsm
)
end
if
...
...
@@ -320,7 +326,7 @@ contains
8020
FORMAT
(
4d25.14
)
8030
FORMAT
(
10i10
)
end
if
MPI0_
b
end
if
MPI0_
c
end
subroutine
mix
...
...
main/vgen.F90
View file @
fbfc1ac9
...
...
@@ -59,7 +59,6 @@ CONTAINS
if
(
mpi
%
irank
==
0
)
WRITE
(
6
,
FMT
=
8000
)
8000
FORMAT
(
/
,
/
,
t10
,
' p o t e n t i a l g e n e r a t o r'
,
/
)
CALL
vTot
%
resetPotDen
()
CALL
vCoul
%
resetPotDen
()
CALL
vx
%
resetPotDen
()
...
...
@@ -70,7 +69,7 @@ CONTAINS
!sum up both spins in den into workden
CALL
den
%
sum_both_spin
(
workden
)
CALL
vgen_coulomb
(
1
,
mpi
,
DIMENSION
,
oneD
,
input
,
field
,
vacuum
,
sym
,
stars
,
cell
,
&
sphhar
,
atoms
,
workden
,
vCoul
,
results
)
...
...
Write
Preview
Supports
Markdown
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