ASCOT5
Loading...
Searching...
No Matches
Todo List
File endcond.c
Error checking would be a good idea
Global math_normal_rand ()

Currently only one of the generated numbers is returned; a second independent variate is Y = v2 * sqrt(-2*log(s) / s)

Try other random number generators such as those in Intel MKL

Global mpi_gather_particlestate (particle_state *ps, particle_state **psgathered, int *ngathered, int ntotal, int mpi_rank, int mpi_size, int mpi_root)
Could be done more cleanly with custom datatypes
Global particle_input_to_state (input_particle *p, particle_state *ps, B_field_data *Bdata)

Parameter p can be a particle_state itself but this option is not dealt with

This sets p->type = input_particle_type_s which is not in accordance with the documentation.

Global particle_state_to_ml (particle_state *p, int i, particle_simd_ml *p_ml, int j, B_field_data *Bdata)
A minor thing but it would be better if guiding center position were used instead. This would require evaluation of the magnetic field.
Global simulate (int id, int n_particles, particle_state *p, sim_offload_data *sim_offload, offload_package *offload_data, real *offload_array, int *int_offload_array, real *diag_offload_array)
Reorganize this function so that it conforms to documentation.