49 type(c_ptr),
intent(inout) :: out_coords
50 type(mpi_grp_t),
intent(in) :: mpi_grp
51 integer,
intent(in) :: natoms
52 class(space_t),
intent(in) :: space
53 real(real64),
contiguous,
intent(in) :: pos(:,:)
54 real(real64),
contiguous,
intent(in) :: vel(:,:)
55 real(real64),
contiguous,
intent(in) :: tot_forces(:,:)
56 integer,
intent(in) :: iter
58 integer :: iatom, idir
59 character(len=50) :: aux
60 real(real64) :: tmp(space%dim)
62 if (.not. mpi_grp%is_root())
return
73 do idir = 1, space%dim
74 write(aux,
'(a2,i0,a1,i1,a1)')
'x(', iatom,
',', idir,
')'
79 do idir = 1, space%dim
80 write(aux,
'(a2,i0,a1,i1,a1)')
'v(', iatom,
',', idir,
')'
85 do idir = 1, space%dim
86 write(aux,
'(a2,i0,a1,i1,a1)')
'f(', iatom,
',', idir,
')'
125 type(c_ptr),
intent(inout) :: out_coords
126 type(mpi_grp_t),
intent(in) :: mpi_grp
127 integer,
intent(in) :: natoms
128 class(space_t),
intent(in) :: space
129 real(real64),
contiguous,
intent(in) :: pos(:,:)
130 real(real64),
contiguous,
intent(in) :: vel(:,:)
131 real(real64),
contiguous,
intent(in) :: tot_forces(:,:)
132 integer,
intent(in) :: iter
133 integer,
intent(in) :: which
135 integer,
parameter :: COORDINATES=1
136 integer,
parameter :: VELOCITIES=2
137 integer,
parameter :: FORCES=3
138 integer :: iatom, idir
139 character(len=50) :: aux
140 real(real64) :: tmp(space%dim)
142 if (.not. mpi_grp%is_root())
return
153 do idir = 1, space%dim
156 write(aux,
'(a2,i0,a1,i1,a1)')
'x(', iatom,
',', idir,
')'
158 write(aux,
'(a2,i0,a1,i1,a1)')
'v(', iatom,
',', idir,
')'
160 write(aux,
'(a2,i0,a1,i1,a1)')
'f(', iatom,
',', idir,
')'
Writes to the corresponding file and adds one to the iteration. Must be called after write_iter_init(...
this module contains the low-level part of the output system
subroutine, public td_write_sep_coordinates(out_coords, mpi_grp, natoms, space, pos, vel, tot_forces, iter, which)
subroutine, public td_write_coordinates(out_coords, mpi_grp, natoms, space, pos, vel, tot_forces, iter)
subroutine, public td_write_print_header_init(out)
subroutine, public td_write_print_header_end(out)
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
character(len=20) pure function, public units_abbrev(this)
This module defines the unit system, used for input and output.
type(unit_system_t), public units_out
Explicit interfaces to C functions, defined in write_iter_low.cc.
subroutine, public write_iter_header(out, string)
subroutine, public write_iter_string(out, string)