26 #include "sll_assert.h"
27 #include "sll_memory.h"
28 #include "sll_working_precision.h"
74 character(len=72) :: label
94 character(len=*) :: label
98 sll_allocate(viewer, ierr)
121 sll_real64,
intent(in) :: field(:, :)
122 sll_int32,
intent(in) :: iplot
128 character(len=4) :: cplot
135 nx = viewer%mesh%num_cells1
136 ny = viewer%mesh%num_cells2
140 call sll_o_xml_field(file_id,
'omega', trim(viewer%label)//cplot//
".h5:/fp", &
141 nx, ny,
"HDF",
"Node")
156 sll_real64,
intent(in) :: xp(:)
157 sll_real64,
intent(in) :: yp(:)
158 sll_real64,
intent(in) :: op(:)
159 sll_int32,
intent(in) :: iplot
160 sll_real64,
optional :: time
168 character(len=4) :: cplot
176 xmin = viewer%mesh%eta1_min
177 xmax = viewer%mesh%eta1_max
178 ymin = viewer%mesh%eta2_min
179 ymax = viewer%mesh%eta2_max
183 call sll_o_xml_field(file_id,
'omega', trim(viewer%label)//cplot//
".h5:/op", &
184 size(op),
"HDF",
"Node")
200 sll_real64,
intent(in) :: xp(:)
201 sll_real64,
intent(in) :: yp(:)
202 sll_real64,
intent(in) :: op(:)
203 sll_real64,
intent(in) :: fp(:, :)
204 sll_int32,
intent(in) :: iplot
205 sll_real64,
optional :: time
211 character(len=4) :: cplot
217 nx = viewer%mesh%num_cells1
218 ny = viewer%mesh%num_cells2
224 call sll_o_xml_field(file_id,
'omega', trim(viewer%label)//cplot//
".h5:/op", &
225 size(op),
"HDF",
"Node")
226 write (file_id,
"(a)")
"</Grid>"
228 call sll_o_xml_field(file_id,
'omega', trim(viewer%label)//cplot//
".h5:/fp", &
229 nx, ny,
"HDF",
"Node")
246 sll_int32,
intent(in) :: file_id
254 xmin = viewer%mesh%eta1_min
255 ymin = viewer%mesh%eta2_min
256 dx = viewer%mesh%delta_eta1
257 dy = viewer%mesh%delta_eta2
259 nx = viewer%mesh%num_cells1
260 ny = viewer%mesh%num_cells2
262 write (file_id,
"(a)")
"<Grid Name='Grid' GridType='Uniform'>"
263 write (file_id,
"(a,2i5,a)")
"<Topology TopologyType='2DCoRectMesh' NumberOfElements='", ny, nx,
"'/>"
264 write (file_id,
"(a)")
"<Geometry GeometryType='ORIGIN_DXDY'>"
265 write (file_id,
"(a)")
"<DataItem Dimensions='2' NumberType='Float' Format='XML'>"
266 write (file_id,
"(2f10.5)") xmin, ymin
267 write (file_id,
"(a)")
"</DataItem>"
268 write (file_id,
"(a)")
"<DataItem Dimensions='2' NumberType='Float' Format='XML'>"
269 write (file_id,
"(2f10.5)") dx, dy
270 write (file_id,
"(a)")
"</DataItem>"
271 write (file_id,
"(a)")
"</Geometry>"
277 sll_int32,
intent(in) :: file_id
278 character(len=*),
intent(in) :: prefix
279 sll_real64,
intent(in) :: xp(:)
280 sll_real64,
intent(in) :: yp(:)
285 sll_assert(
size(yp) == n)
287 write (file_id,
"(a)")
"<Grid Name=""Particles"" Type=""Uniform"">"
288 write (file_id,
"(a,i6,a)")
"<Topology TopologyType=""Polyvertex"" NumberOfElements=""", n,
"""/>"
289 write (file_id,
"(a)")
"<Geometry Type=""X_Y"">"
290 write (file_id,
"(a,i6,a)")
"<DataItem Format=""HDF"" Dimensions=""", n,
""">"
291 write (file_id,
"(a)") prefix//
".h5:/xp"
292 write (file_id,
"(a)")
"</DataItem>"
293 write (file_id,
"(a,i6,a)")
"<DataItem Format=""HDF"" Dimensions=""", n,
""">"
294 write (file_id,
"(a)") prefix//
".h5:/yp"
295 write (file_id,
"(a)")
"</DataItem>"
296 write (file_id,
"(a)")
"</Geometry>"
Write nD array of double precision floats or integers into HDF5 file.
plot particles centers with gnuplot
write a data attribute in the xml file
Cartesian mesh basic types.
Implements the functions to write hdf5 file to store heavy data.
subroutine, public sll_s_hdf5_ser_file_create(filename, handle, error)
Create new HDF5 file.
subroutine, public sll_s_hdf5_ser_file_close(handle, error)
Close existing HDF5 file.
This module provides some routines for plotting fields and particles during PIC simulations.
subroutine write_2d_field_and_particles(viewer, xp, yp, op, fp, iplot, time)
subroutine initialize_pic_viewer_2d(viewer, mesh)
subroutine write_grid_2d_xml(file_id, viewer)
subroutine write_particles_2d_xml(file_id, prefix, xp, yp)
type(sll_t_pic_viewer_2d) function, pointer, public sll_f_new_pic_viewer_2d(mesh, label)
subroutine write_2d_field(viewer, field, iplot)
subroutine write_2d_particles(viewer, xp, yp, op, iplot, time)
This module provides some routines for plotting during PIC simulations.
Some common numerical utilities.
subroutine, public sll_s_int2string(istep, cstep)
Convert an integer < 9999 to a 4 characters string.
subroutine, public sll_s_new_file_id(file_id, error)
Get a file unit number free before creating a file.
Implements the functions to write xdmf file plotable by VisIt.
subroutine, public sll_s_xdmf_corect2d_nodes(file_name, array, array_name, eta1_min, delta_eta1, eta2_min, delta_eta2, file_format, iplot, time)
Subroutine to write a 2D array in xdmf format The field is describe on a cartesian mesh Axis are perp...
Implements the functions to write xml file to store light data.
subroutine, public sll_s_xml_file_close(file_id, error)
Close the XML file and finish to write last lines. You give the file unit number.
subroutine, public sll_s_xml_file_create(filename, file_id, error)
Create the XML file and begin to write first lines. You get the file unit number.
Opaque object around HDF5 file id.