Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fleur
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
51
Issues
51
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
fleur
fleur
Commits
0bf2eadd
Commit
0bf2eadd
authored
Apr 05, 2019
by
Miriam Hinzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Film-Case Kerker Preconditions in Film Region Only
parent
400cfea6
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
291 additions
and
288 deletions
+291
-288
cdn/cdntot.f90
cdn/cdntot.f90
+4
-2
main/mix.F90
main/mix.F90
+3
-3
mix/kerker.F90
mix/kerker.F90
+16
-10
types/types_potden.F90
types/types_potden.F90
+16
-0
vgen/VYukawaFilm.f90
vgen/VYukawaFilm.f90
+252
-273
No files found.
cdn/cdntot.f90
View file @
0bf2eadd
...
...
@@ -28,7 +28,6 @@ CONTAINS
REAL
::
q2
(
vacuum
%
nmz
),
w
,
rht1
(
vacuum
%
nmzd
,
2
,
input
%
jspins
)
COMPLEX
::
x
(
stars
%
ng3
)
CALL
timestart
(
"cdntot"
)
qtot
=
0.0
qistot
=
0.0
DO
jsp
=
1
,
input
%
jspins
...
...
@@ -109,7 +108,10 @@ CONTAINS
REAL
qmt
(
atoms
%
ntype
,
input
%
jspins
),
qvac
(
2
,
input
%
jspins
)
INTEGER
,
ALLOCATABLE
::
lengths
(:,:)
CHARACTER
(
LEN
=
20
)
::
attributes
(
6
),
names
(
6
)
CALL
timestart
(
"cdntot"
)
call
cdntot_integrate
(
stars
,
atoms
,
sym
,
vacuum
,
input
,
cell
,
oneD
,
den
,
&
q
,
qis
,
qmt
,
qvac
,
qtot
,
qistot
)
...
...
main/mix.F90
View file @
0bf2eadd
...
...
@@ -87,9 +87,9 @@ contains
! KERKER PRECONDITIONER
IF
(
input
%
preconditioning_param
/
=
0
)
THEN
CALL
timestart
(
"Preconditioner"
)
CALL
kerker
(
field
,
DIMENSION
,
mpi
,
&
stars
,
atoms
,
sphhar
,
vacuum
,
input
,
sym
,
cell
,
noco
,
&
oneD
,
inDen
,
outDen
,
fsm
(
it
)
)
CALL
kerker
(
field
,
DIMENSION
,
mpi
,
&
stars
,
atoms
,
sphhar
,
vacuum
,
input
,
sym
,
cell
,
noco
,
&
oneD
,
inDen
,
outDen
,
fsm
(
it
)
)
!Store modified density in history
CALL
mixing_history_store
(
fsm
(
it
))
CALL
timestop
(
"Preconditioner"
)
...
...
mix/kerker.F90
View file @
0bf2eadd
...
...
@@ -4,12 +4,15 @@
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE
m_kerker
CONTAINS
SUBROUTINE
kerker
(
field
,
DIMENSION
,
mpi
,
&
SUBROUTINE
kerker
(
field
,
DIMENSION
,
mpi
,
&
stars
,
atoms
,
sphhar
,
vacuum
,
input
,
sym
,
cell
,
noco
,
&
oneD
,
inDen
,
outDen
,
precon_v
)
!Implementation of the Kerker preconditioner by M.Hinzen
USE
m_vgen_coulomb
USE
m_VYukawaFilm
USE
m_juDFT
...
...
@@ -19,6 +22,7 @@ CONTAINS
USE
m_constants
USE
m_mpi_bc_potden
IMPLICIT
NONE
TYPE
(
t_oneD
),
INTENT
(
in
)
::
oneD
TYPE
(
t_input
),
INTENT
(
in
)
::
input
TYPE
(
t_vacuum
),
INTENT
(
in
)
::
vacuum
...
...
@@ -35,10 +39,9 @@ CONTAINS
TYPE
(
t_potden
),
INTENT
(
in
)
::
inDen
TYPE
(
t_mixvector
),
INTENT
(
INOUT
)
::
precon_v
!Locals
type
(
t_potden
)
::
resDen
,
vYukawa
real
::
fix
integer
::
lh
,
n
type
(
t_potden
)
::
resDen
,
vYukawa
,
resDenMod
real
::
fix
integer
::
lh
,
n
CALL
resDen
%
init
(
stars
,
atoms
,
sphhar
,
vacuum
,
noco
,
input
%
jspins
,
POTDEN_TYPE_DEN
)
CALL
vYukawa
%
init
(
stars
,
atoms
,
sphhar
,
vacuum
,
noco
,
input
%
jspins
,
4
)
...
...
@@ -53,8 +56,12 @@ CONTAINS
CALL
vgen_coulomb
(
1
,
mpi
,
DIMENSION
,
oneD
,
input
,
field
,
vacuum
,
sym
,
stars
,
cell
,
&
sphhar
,
atoms
,
resDen
,
vYukawa
)
ELSE
if
(
mpi
%
irank
==
0
)
then
call
resDenMod
%
init
(
stars
,
atoms
,
sphhar
,
vacuum
,
noco
,
input
%
jspins
,
POTDEN_TYPE_DEN
)
call
resDenMod
%
copyPotDen
(
resDen
)
end
if
vYukawa
%
iter
=
resDen
%
iter
CALL
VYukawaFilm
(
stars
,
vacuum
,
cell
,
sym
,
input
,
mpi
,
atoms
,
sphhar
,
DIMENSION
,
oneD
,
resDen
,
&
CALL
VYukawaFilm
(
stars
,
vacuum
,
cell
,
sym
,
input
,
mpi
,
atoms
,
sphhar
,
DIMENSION
,
oneD
,
noco
,
resDenMod
,
&
vYukawa
)
END
IF
...
...
@@ -67,8 +74,6 @@ CONTAINS
*
vYukawa
%
mt
(
1
:
atoms
%
jri
(
n
),
lh
,
n
,
1
)
*
atoms
%
rmsh
(
1
:
atoms
%
jri
(
n
),
n
)
**
2
END
DO
END
DO
resDen
%
vacz
=
resDen
%
vacz
-
input
%
preconditioning_param
**
2
/
fpi_const
*
vYukawa
%
vacz
resDen
%
vacxy
=
resDen
%
vacxy
-
input
%
preconditioning_param
**
2
/
fpi_const
*
vYukawa
%
vacxy
IF
(
input
%
jspins
==
2
)
CALL
resDen
%
ChargeAndMagnetisationToSpins
()
! fix the preconditioned density
CALL
outDen
%
addPotDen
(
resDen
,
inDen
)
...
...
@@ -76,6 +81,7 @@ CONTAINS
CALL
resDen
%
subPotDen
(
outDen
,
inDen
)
END
IF
MPI0_c
CALL
precon_v
%
from_density
(
resden
)
! end of preconditioner
END
SUBROUTINE
kerker
END
SUBROUTINE
kerker
END
MODULE
m_kerker
types/types_potden.F90
View file @
0bf2eadd
...
...
@@ -42,6 +42,7 @@ MODULE m_types_potden
procedure
::
ChargeAndMagnetisationToSpins
procedure
::
addPotDen
procedure
::
subPotDen
procedure
::
copyPotDen
procedure
::
distribute
procedure
::
collect
END
TYPE
t_potden
...
...
@@ -233,6 +234,21 @@ CONTAINS
end
subroutine
subroutine
copyPotDen
(
PotDenCopy
,
PotDen
)
implicit
none
class
(
t_potden
),
intent
(
in
)
::
PotDen
class
(
t_potden
),
intent
(
inout
)
::
PotDenCopy
PotDenCopy
%
iter
=
PotDen
%
iter
PotDenCopy
%
potdenType
=
PotDen
%
potdenType
PotDenCopy
%
mt
=
PotDen
%
mt
PotDenCopy
%
pw
=
PotDen
%
pw
PotDenCopy
%
vacz
=
PotDen
%
vacz
PotDenCopy
%
vacxy
=
PotDen
%
vacxy
end
subroutine
copyPotDen
SUBROUTINE
init_potden_types
(
pd
,
stars
,
atoms
,
sphhar
,
vacuum
,
noco
,
jspins
,
potden_type
)
USE
m_judft
USE
m_types_setup
...
...
vgen/VYukawaFilm.f90
View file @
0bf2eadd
This diff is collapsed.
Click to expand it.
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