The Elk Code
 
Loading...
Searching...
No Matches
genefieldt.f90
Go to the documentation of this file.
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 genefieldt
7use modmain
8use modtddft
9implicit none
10! local variables
11integer, parameter :: npm=8
12integer np,it,i
13real(8) t0
14! automatic arrays
15real(8) ya(npm)
16! external functions
17real(8), external :: polynm
18! determine the electric field at the current time step
19t0=-1.d0/solsc
20np=min(npm,itimes)
21it=itimes-np+1
22do i=1,3
23 ya(1:np)=afieldt(i,it:itimes)
24 efieldt(i)=t0*polynm(1,np,times(it),ya,times(itimes))
25end do
26end subroutine
27
subroutine genefieldt
Definition genefieldt.f90:7
real(8) solsc
Definition modmain.f90:1252
real(8), dimension(:), allocatable times
Definition modtddft.f90:48
real(8), dimension(:,:), allocatable afieldt
Definition modtddft.f90:58
integer itimes
Definition modtddft.f90:46
real(8), dimension(3) efieldt
Definition modtddft.f90:74
pure real(8) function polynm(m, np, xa, ya, x)
Definition polynm.f90:10