1
2! Copyright (C) 2020 Peter Elliott, J. K. Dewhurst and S. Sharma.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine afindtstep
7use modmain
8use modtddft
9use modmpi
10implicit none
11! local variables
12real(8) dt,t1
13! time step length
14dt=times(itimes+1)-times(itimes)
15! add to the time derivative of the induced A-field
16t1=fourpi*solsc*afindscf*dt/omega
17afindt(:,1)=afindt(:,1)+t1*jtot(:)
18! add to the induced A-field
19afindt(:,0)=afindt(:,0)+afindt(:,1)*dt
20! add to the total A-field
21afieldt(:,itimes+1)=afieldt(:,itimes+1)+afindt(:,0)
22! write the induced A-field and its time derivative to file
23if (mp_mpi) then
24  open(50,file='AFINDT.OUT',form='FORMATTED')
25  write(50,'(6G18.10)') afindt(:,:)
26  close(50)
27end if
28end subroutine
29
30