25 #include "sll_assert.h"
26 #include "sll_errors.h"
27 #include "sll_memory.h"
28 #include "sll_working_precision.h"
53 character(len=256) :: field_name
54 sll_int32 :: plot_count
55 sll_int32 :: plot_np_x
56 sll_int32 :: plot_np_vx
58 sll_real64 :: slice_vy
73 character(len=*),
intent( in ) :: field_name
74 sll_int32,
intent( in ) :: plot_np_x
75 sll_int32,
intent( in ) :: plot_np_vx
76 sll_real64,
intent( in ) :: slice_y
77 sll_real64,
intent( in ) :: slice_vy
79 self%field_name = trim(field_name)
80 self%plot_np_x = plot_np_x
81 self%plot_np_vx = plot_np_vx
82 self%slice_y = slice_y
83 self%slice_vy = slice_vy
96 sll_int32,
intent( in ) :: iplot
98 sll_real64,
dimension(:,:,:,:),
pointer :: grid_values_4d
100 sll_real64 :: dummy_total_charge
101 logical :: enforce_total_charge
102 logical :: reconstruct_f_on_last_node(4)
106 select type ( particle_group )
110 sll_allocate( grid_values_4d(plotting_params_2d%plot_np_x, 1, plotting_params_2d%plot_np_vx, 1), ierr)
112 sll_assert( plotting_params_2d%plot_np_x > 1 )
113 sll_assert( plotting_params_2d%plot_np_vx > 1 )
114 sll_assert( plotting_params_2d%slice_y >= particle_group%lbf_grid%eta2_min )
115 sll_assert( plotting_params_2d%slice_y < particle_group%lbf_grid%eta2_max )
116 sll_assert( plotting_params_2d%slice_vy >= particle_group%lbf_grid%eta4_min )
117 sll_assert( plotting_params_2d%slice_vy < particle_group%lbf_grid%eta4_max )
120 plotting_params_2d%plot_np_x - 1, &
122 plotting_params_2d%plot_np_vx - 1, &
124 particle_group%lbf_grid%eta1_min, &
125 particle_group%lbf_grid%eta1_max, &
126 plotting_params_2d%slice_y, &
127 particle_group%lbf_grid%eta2_max, &
128 particle_group%lbf_grid%eta3_min, &
129 particle_group%lbf_grid%eta3_max, &
130 plotting_params_2d%slice_vy, &
131 particle_group%lbf_grid%eta4_max &
133 reconstruct_f_on_last_node(1) = .true.
134 reconstruct_f_on_last_node(2) = .false.
135 reconstruct_f_on_last_node(3) = .true.
136 reconstruct_f_on_last_node(4) = .false.
138 dummy_total_charge = 0.0_f64
139 enforce_total_charge = .false.
141 call particle_group%reconstruct_f_lbf_on_given_grid( &
144 reconstruct_f_on_last_node,&
145 dummy_total_charge, &
146 enforce_total_charge &
149 if( plotting_params_2d%plot_count == 0 )
then
152 open( file= trim(plotting_params_2d%field_name)//
'.gnu', &
153 status =
'replace', &
154 form =
'formatted', &
155 position=
'append', &
160 write(file_id,*)
'# run this script with $ gnuplot ' // trim(plotting_params_2d%field_name) //
'.gnu' //
' -persist'
161 write(file_id,*)
'set view 0,0'
162 write(file_id,*)
'set pm3d'
163 write(file_id,*)
'set hid'
170 particle_group%lbf_grid%eta1_min, &
171 particle_group%lbf_grid%eta1_max, &
172 plotting_params_2d%plot_np_x, &
173 particle_group%lbf_grid%eta3_min, &
174 particle_group%lbf_grid%eta3_max, &
175 plotting_params_2d%plot_np_vx, &
176 grid_values_4d(:,1,:,1), &
177 trim(plotting_params_2d%field_name), &
183 plotting_params_2d%plot_count = plotting_params_2d%plot_count + 1
186 sll_error(
"sll_s_visualize_particle_group",
"procedure not implemented for this type of particle group")
Write file for gnuplot to display 2d field.
Cartesian mesh basic types.
type(sll_t_cartesian_mesh_4d) function, pointer, public sll_f_new_cartesian_mesh_4d(num_cells1, num_cells2, num_cells3, num_cells4, eta1_min, eta1_max, eta2_min, eta2_max, eta3_min, eta3_max, eta4_min, eta4_max)
allocates the memory space for a new 4D cartesian mesh on the heap,
Implements the functions to write data file plotable by GNUplot.
Module for a particle group with linearized-backward-flow (lbf) resamplings.
Interface routines for visualizing particle groups.
subroutine reset_params(self, field_name, plot_np_x, plot_np_vx, slice_y, slice_vy)
subroutine, public sll_s_visualize_particle_group(particle_group, plotting_params_2d, iplot)
visualization interface
Group of sll_t_particle_group_2d2v_lbf.