Refactor: Make td_write more compact
Make td_write
more compact by adding an array of file names, td_file_name
, allowing me to replace the same if-block for numerous files with:
do ifile = 1, OUT_MAX
! Exceptions that are handled later
if (any([OUT_MULTIPOLES, OUT_LASER, OUT_FTCHD] == ifile)) cycle
if (writ%out(ifile)%write) then
call write_iter_init(writ%out(ifile)%handle, &
first, &
units_from_atomic(units_out%time, dt), &
trim(io_workpath("td.general/"//trim(td_file_name(ifile)), namespace)))
end if
enddo
Documentation is also added for this subroutine, plus the classes in the module.
Edited by Alex Buccheri