Transfer of scattering parameters.

The parameters that are transferred from the main CPO program to the scattering dll at the end of each trajectory step are held in scatter_params_in1 and scatter_params_in2 and are:

scatter_params_in1[0 to 12] = x, y, z, vx, vy, vz, energy, potential, time, current,charge number, atomic mass number, and local charge density at the beginning of the latest trajectory integration step, -a total of 13 values, and

scatter_params_in2[0 to 8] = x, y, z, vx, vy, vz, energy, potential, time at the end of the step -a total of 9 values.

The parameters in scatter_params_in1[13 to 124] are used only for the 3D stochastic scattering option (see the description in sct3coul.cpp).

In Jan 2008 the size of scatter_params_in1 was increased from 125 to 150 and [125] to [137] were given the values of:

[125] = the current trajectory step,

[126] = the number of the current trajectory,

[127] = the total number of trajectories,

[128] = the number of the space-charge iteration,

[129] = the total number of space-charge iterations,

[130] = the number of the focus iteration,

[131] = the total number of focus iterations,

[132] = do_next_step (=1(0) if there will(will not) be a following step),

[133] = segment_crossed (=1(0) if a segment has(has not) been crossed in present step),

[134] = secondary_started (=1(0) if a secondary has(has not) been started in present step),

[135 to 137] = x,y,z direction of normal to segment, if segment_crossed = 1 or secondary_started = 1 (for a segment of a curved(flat) electrode the normal points away from the centre of curvature(origin) ).

The output parameters are held in scatter_params_out[10]:

x,y,z,vx,vy,vz,time,current,charge number,atomic mass number, -all held in array scatter_params_out[0 to 9], a total of 10 values.

Two further output parameters are 2 logicals:

stop_ray and scatter_action.

The program will stop the ray if stop_ray = .true.

If scatter_action = .true. the program will look at the following output parameters:

x,y,z,vx,vy,vz,time and also:

current, if space-charge version is in use, and charge number and atomic mass number, if variable mass option has been triggered.

The main CPO3DS program also looks at scatter_params_in1[132] (= do_next_step) after the call to the dll. If it starts at .false. (because the main program says that this is the last step of the present trajectory) but the dll resets it to .true., then the main program will continue with the trajectory integration, provided that stop_ray is .false.

The program will evaluate the new potential if the coordinates have changed, and will evaluate the kinetic energy (relativistically, if necessary).

Return to general information on scattering.