laserfields
Fortran95 library to describe time-dependent laser pulses
Loading...
Searching...
No Matches
plotlaserfield.f90
Go to the documentation of this file.
1! Copyright (c) 2012, Johannes Feist
2! licensed under the MIT open source license, see LICENSE file
3
6 implicit none
7 character(len=200) :: parfile, arg
8 ! Default value for timestep is -1, which indicates that it is not set.
9 real(dp) :: timestep = -1.d0
10 integer :: iarg
11
12 parfile = 'laserfields.in'
13 iarg = 1
14 do while (iarg <= command_argument_count())
15 call get_command_argument(iarg, arg)
16 if (trim(arg) == '--dt') then
17 iarg = iarg + 1
18 call get_command_argument(iarg, arg)
19 read(arg,*) timestep
20 if (timestep <= 0) then
21 write(6,*) 'Error: Time step must be positive.'
22 stop
23 end if
24 else
25 parfile = trim(arg)
26 end if
27 iarg = iarg + 1
28 end do
29 call laserfields_read_parameters(trim(parfile))
30 call laserfields_write_parameters('laserfields_parameters.dat')
31
32 if (timestep > 0) then
33 call write_laserfields(6, timestep)
34 else
35 call write_laserfields(6)
36 end if
37
38end program plotlaserfield
program plotlaserfield