Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
west-public
West
Commits
d55d9e8f
Commit
d55d9e8f
authored
Feb 08, 2018
by
Marco Govoni
Browse files
Proposed changes II. Untested.
parent
01b546ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Modules/westcom.f90
View file @
d55d9e8f
...
...
@@ -113,7 +113,8 @@ MODULE wstat_center
LOGICAL
::
l_kinetic_only
LOGICAL
::
l_minimize_exx_if_active
LOGICAL
::
l_use_ecutrho
INTEGER
::
nq
(
3
)
!INTEGER :: nq(3)
INTEGER
,
ALLOCATABLE
::
qlist
(:)
!
! Common workspace
!
...
...
Tools/class_bz_grid.f90
View file @
d55d9e8f
...
...
@@ -23,7 +23,7 @@ MODULE class_bz_grid
TYPE
,
PUBLIC
::
bz_grid
!
INTEGER
::
ngrid
(
3
)
=
(/
1
,
1
,
1
/)
! number of points in each direction
INTEGER
::
np
=
1
! total number of points = ngrid(1) * ngrid(2) * ngrid(3)
INTEGER
::
np
=
1
! total number of points = ngrid(1) * ngrid(2) * ngrid(3)
**** NOOOOOO ******
INTEGER
::
ns
=
1
! total number of spin = nspin
INTEGER
::
nps
=
1
! total number of points and spins = np * ns
INTEGER
,
ALLOCATABLE
::
ip
(:)
! given ips --> ip
...
...
@@ -53,8 +53,9 @@ MODULE class_bz_grid
USE
start_k
,
ONLY
:
nk1
,
nk2
,
nk3
USE
pwcom
,
ONLY
:
nspin
USE
control_flags
,
ONLY
:
gamma_only
USE
westcom
,
ONLY
:
nq
!
USE westcom, ONLY : nq
USE
constants
,
ONLY
:
eps8
USE
westcom
,
ONLY
:
qlist
!
IMPLICIT
NONE
!
...
...
@@ -67,6 +68,7 @@ MODULE class_bz_grid
!
INTEGER
::
ip
,
iq1
,
iq2
,
iq3
,
ips
INTEGER
::
i
,
j
,
k
INTEGER
::
iqlist
!
SELECT
CASE
(
grid_type
)
CASE
(
'K'
,
'k'
)
...
...
@@ -99,22 +101,29 @@ MODULE class_bz_grid
!
CASE
(
'Q'
,
'q'
)
!
this
%
ngrid
(
1
:
3
)
=
nq
(
1
:
3
)
this
%
np
=
this
%
ngrid
(
1
)
*
this
%
ngrid
(
2
)
*
this
%
ngrid
(
3
)
!this%ngrid(1:3) = nq(1:3)
IF
(
.NOT.
gamma_only
)
this
%
ngrid
(
1
:
3
)
=
(/
nk1
,
nk2
,
nk3
/)
!this%ngrid(1:3) = nq(1:3)
!this%np = this%ngrid(1) * this%ngrid(2) * this%ngrid(3)
this
%
np
=
SIZE
(
qlist
)
this
%
ns
=
1
this
%
nps
=
this
%
np
!
! generate p-vectors in cryst
!
ALLOCATE
(
this
%
p_cryst
(
3
,
this
%
np
)
)
iqlist
=
0
ip
=
0
DO
iq1
=
1
,
nq
(
1
)
DO
iq2
=
1
,
nq
(
2
)
DO
iq3
=
1
,
nq
(
3
)
DO
iq1
=
1
,
this
%
ngrid
(
1
)
DO
iq2
=
1
,
this
%
ngrid
(
2
)
DO
iq3
=
1
,
this
%
ngrid
(
3
)
ip
=
ip
+
1
this
%
p_cryst
(
1
,
ip
)
=
DBLE
(
iq1
-
1
)
/
DBLE
(
this
%
ngrid
(
1
)
)
this
%
p_cryst
(
2
,
ip
)
=
DBLE
(
iq2
-
1
)
/
DBLE
(
this
%
ngrid
(
2
)
)
this
%
p_cryst
(
3
,
ip
)
=
DBLE
(
iq3
-
1
)
/
DBLE
(
this
%
ngrid
(
3
)
)
IF
(
ANY
(
qlist
(:))
==
ip
)
THEN
iqlist
=
iqlist
+
1
this
%
p_cryst
(
1
,
iqlist
)
=
DBLE
(
iq1
-
1
)
/
DBLE
(
this
%
ngrid
(
1
)
)
this
%
p_cryst
(
2
,
iqlist
)
=
DBLE
(
iq2
-
1
)
/
DBLE
(
this
%
ngrid
(
2
)
)
this
%
p_cryst
(
3
,
iqlist
)
=
DBLE
(
iq3
-
1
)
/
DBLE
(
this
%
ngrid
(
3
)
)
ENDIF
ENDDO
ENDDO
ENDDO
...
...
@@ -123,11 +132,11 @@ MODULE class_bz_grid
!
ALLOCATE
(
this
%
p_cart
(
3
,
this
%
np
)
)
this
%
p_cart
(:,:)
=
this
%
p_cryst
(:,:)
CALL
cryst_to_cart
(
this
%
np
s
,
this
%
p_cart
,
bg
,
+1
)
CALL
cryst_to_cart
(
this
%
np
,
this
%
p_cart
,
bg
,
+1
)
!
! set weights
!
ALLOCATE
(
this
%
weight
(
this
%
np
s
)
)
ALLOCATE
(
this
%
weight
(
this
%
np
)
)
!
this
%
weight
=
1._DP
/
DBLE
(
this
%
np
)
!
...
...
Tools/fetch_input.f90
View file @
d55d9e8f
...
...
@@ -23,6 +23,8 @@ SUBROUTINE fetch_input( driver, verbose )
USE
mp_global
,
ONLY
:
nimage
USE
io_push
,
ONLY
:
io_push_title
,
io_push_value
,
io_push_bar
,
io_push_es0
,
io_push_c512
USE
gvect
,
ONLY
:
ecutrho
USE
start_k
,
ONLY
:
nk1
,
nk2
,
nk3
USE
control_flags
,
ONLY
:
gamma_only
!
IMPLICIT
NONE
!
...
...
@@ -81,7 +83,13 @@ SUBROUTINE fetch_input( driver, verbose )
l_kinetic_only
=
.FALSE.
l_minimize_exx_if_active
=
.FALSE.
l_use_ecutrho
=
.FALSE.
nq
=
(/
1
,
1
,
1
/)
IF
(
ALLOCATED
(
qlist
)
)
DEALLOCATE
(
qlist
)
ALLOCATE
(
qlist
(
1
)
)
qlist
(
1
)
=
1
IF
(
.NOT.
gamma_only
)
THEN
ALLOCATE
(
qlist
(
nk1
*
nk2
*
nk3
))
qlist
=
(/
(
i
,
i
=
1
,
nk1
*
nk2
*
nk3
,
1
)
/)
ENDIF
ENDIF
!
! ** wfreq_control **
...
...
@@ -166,8 +174,14 @@ SUBROUTINE fetch_input( driver, verbose )
IF
(
found
)
l_minimize_exx_if_active
=
lval
CALL
json
%
get
(
'wstat_control.l_use_ecutrho'
,
lval
,
found
)
IF
(
found
)
l_use_ecutrho
=
lval
CALL
json
%
get
(
'wstat_control.nq'
,
ivec
,
found
)
IF
(
found
)
nq
(
1
:
3
)
=
ivec
(:)
!CALL json%get('wstat_control.nq', ivec, found)
!IF( found ) nq(1:3) = ivec(:)
CALL
json
%
get
(
'wstat_control.qlist'
,
ivec
,
found
)
IF
(
found
)
THEN
IF
(
ALLOCATED
(
qlist
)
)
DEALLOCATE
(
qlist
)
ALLOCATE
(
qlist
(
SIZE
(
ivec
)))
qlist
=
ivec
ENDIF
ENDIF
!
IF
(
ANY
(
driver
(:)
==
3
)
)
THEN
...
...
@@ -268,7 +282,8 @@ SUBROUTINE fetch_input( driver, verbose )
CALL
mp_bcast
(
l_kinetic_only
,
root
,
world_comm
)
CALL
mp_bcast
(
l_minimize_exx_if_active
,
root
,
world_comm
)
CALL
mp_bcast
(
l_use_ecutrho
,
root
,
world_comm
)
CALL
mp_bcast
(
nq
,
root
,
world_comm
)
!CALL mp_bcast(nq,root,world_comm)
CALL
mp_bcast
(
qlist
,
root
,
world_comm
)
!
! CHECKS
!
...
...
@@ -398,9 +413,12 @@ SUBROUTINE fetch_input( driver, verbose )
CALL
io_push_value
(
'l_kinetic_only'
,
l_kinetic_only
,
numsp
)
CALL
io_push_value
(
'l_minimize_exx_if_active'
,
l_minimize_exx_if_active
,
numsp
)
CALL
io_push_value
(
'l_use_ecutrho'
,
l_use_ecutrho
,
numsp
)
CALL
io_push_value
(
'nq(1)'
,
nq
(
1
),
numsp
)
CALL
io_push_value
(
'nq(2)'
,
nq
(
2
),
numsp
)
CALL
io_push_value
(
'nq(3)'
,
nq
(
3
),
numsp
)
!CALL io_push_value('nq(1)',nq(1),numsp)
!CALL io_push_value('nq(2)',nq(2),numsp)
!CALL io_push_value('nq(3)',nq(3),numsp)
DO
i
=
1
,
SIZE
(
qlist
)
CALL
io_push_value
(
'qlist'
,
qlist
(
i
),
numsp
)
ENDDO
!
CALL
io_push_bar
()
!
...
...
@@ -527,7 +545,8 @@ SUBROUTINE add_intput_parameters_to_json_file( driver, json )
CALL
json
%
add
(
'input.wstat_control.l_kinetic_only'
,
l_kinetic_only
)
CALL
json
%
add
(
'input.wstat_control.l_minimize_exx_if_active'
,
l_minimize_exx_if_active
)
CALL
json
%
add
(
'input.wstat_control.l_use_ecutrho'
,
l_use_ecutrho
)
CALL
json
%
add
(
'input.wstat_control.nq'
,
nq
)
!CALL json%add('input.wstat_control.nq', nq)
CALL
json
%
add
(
'input.wstat_control.qlist'
,
qlist
)
!
ENDIF
!
...
...
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