The Elk Code
 
Loading...
Searching...
No Matches
batchdv.f90
Go to the documentation of this file.
1
2! Copyright (C) 2022 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine batchdv
7use modmain
8use moddftu
9use modvars
10use modmpi
11implicit none
12! no increment for first task
13if (itask <= 1) return
14! only increment for ground-state tasks
15if (all(task /= [0,1,2,3])) return
16! increment selected variables
17if (any(dngridk(:) /= 0)) then
18 ngridk(:)=ngridk(:)+dngridk(:)
19 if (mp_mpi) write(*,'("Info(batchdv): incremented ngridk")')
20end if
21if (dlmaxapw /= 0) then
23 if (mp_mpi) write(*,'("Info(batchdv): incremented lmaxapw")')
24end if
25if (dlmaxo /= 0) then
27 if (mp_mpi) write(*,'("Info(batchdv): incremented lmaxo")')
28end if
29if (any(davec(:,:) /= 0.d0)) then
30 avec(:,:)=avec(:,:)+davec(:,:)
31 if (mp_mpi) write(*,'("Info(batchdv): incremented avec")')
32end if
33if (any(datposl(:,:,:) /= 0.d0)) then
34 atposl(:,:,:)=atposl(:,:,:)+datposl(:,:,:)
35 if (mp_mpi) write(*,'("Info(batchdv): incremented atposl")')
36end if
37if (drgkmax /= 0.d0) then
39 if (mp_mpi) write(*,'("Info(batchdv): incremented rgkmax")')
40end if
41if (dgmaxvr /= 0.d0) then
43 if (mp_mpi) write(*,'("Info(batchdv): incremented gmaxvr")')
44end if
45if (dnempty0 /= 0.d0) then
47 if (mp_mpi) write(*,'("Info(batchdv): incremented nempty")')
48end if
49if (dchgexs /= 0.d0) then
51 if (mp_mpi) write(*,'("Info(batchdv): incremented chgexs")')
52end if
53if (dsxcscf /= 0.d0) then
55 if (mp_mpi) write(*,'("Info(batchdv): incremented sxcscf")')
56end if
57if (dnrmtscf /= 0.d0) then
59 if (mp_mpi) write(*,'("Info(batchdv): incremented nrmtscf")')
60end if
61if (any(dudufix(:) /= 0.d0)) then
62 udufix(:)=udufix(:)+dudufix(:)
63 if (mp_mpi) write(*,'("Info(batchdv): incremented udufix")')
64end if
65if (any(dmomfix(:) /= 0.d0)) then
66 momfix(:)=momfix(:)+dmomfix(:)
67 if (mp_mpi) write(*,'("Info(batchdv): incremented momfix")')
68end if
69if (any(dbfieldc0(:) /= 0.d0)) then
71 if (mp_mpi) write(*,'("Info(batchdv): incremented bfieldc0")')
72end if
73if (any(dvqlss(:) /= 0.d0)) then
74 vqlss(:)=vqlss(:)+dvqlss(:)
75 if (mp_mpi) write(*,'("Info(batchdv): incremented vqlss")')
76end if
77if (any(dafieldc(:) /= 0.d0)) then
78 afieldc(:)=afieldc(:)+dafieldc(:)
79 if (mp_mpi) write(*,'("Info(batchdv): incremented afieldc")')
80end if
81if (any(dafspc(:,:) /= 0.d0)) then
82 afspc(:,:)=afspc(:,:)+dafspc(:,:)
83 if (mp_mpi) write(*,'("Info(batchdv): incremented afspc")')
84end if
85end subroutine
86
subroutine batchdv
Definition batchdv.f90:7
real(8), dimension(maxdftu) dudufix
Definition moddftu.f90:60
real(8), dimension(maxdftu) udufix
Definition moddftu.f90:60
real(8) gmaxvr
Definition modmain.f90:384
real(8), dimension(3, maxatoms, maxspecies) datposl
Definition modmain.f90:52
real(8) drgkmax
Definition modmain.f90:493
integer itask
Definition modmain.f90:1294
integer dlmaxo
Definition modmain.f90:201
real(8) nrmtscf
Definition modmain.f90:148
real(8) dsxcscf
Definition modmain.f90:668
integer dlmaxapw
Definition modmain.f90:197
real(8), dimension(3, 3) dafspc
Definition modmain.f90:331
real(8) nempty0
Definition modmain.f90:880
real(8), dimension(3) afieldc
Definition modmain.f90:325
real(8), dimension(3) momfix
Definition modmain.f90:253
real(8), dimension(3, 3) avec
Definition modmain.f90:12
real(8) dnempty0
Definition modmain.f90:880
real(8), dimension(3, 3) afspc
Definition modmain.f90:331
real(8), dimension(3) dafieldc
Definition modmain.f90:325
real(8), dimension(3, 3) davec
Definition modmain.f90:12
integer lmaxapw
Definition modmain.f90:197
integer, dimension(3) ngridk
Definition modmain.f90:448
real(8), dimension(3) dvqlss
Definition modmain.f90:293
integer task
Definition modmain.f90:1298
real(8) dnrmtscf
Definition modmain.f90:148
integer lmaxo
Definition modmain.f90:201
real(8), dimension(3) bfieldc0
Definition modmain.f90:271
real(8) dchgexs
Definition modmain.f90:724
integer, dimension(3) dngridk
Definition modmain.f90:448
real(8) chgexs
Definition modmain.f90:724
real(8), dimension(3) dbfieldc0
Definition modmain.f90:271
real(8) dgmaxvr
Definition modmain.f90:384
real(8), dimension(3) vqlss
Definition modmain.f90:293
real(8) sxcscf
Definition modmain.f90:668
real(8) rgkmax
Definition modmain.f90:493
real(8), dimension(3, maxatoms, maxspecies) atposl
Definition modmain.f90:51
real(8), dimension(3) dmomfix
Definition modmain.f90:253
logical mp_mpi
Definition modmpi.f90:17