Skip to content

Enable flat (marker) evaluation

Stefan Possanner requested to merge enable-flat-profile-evaluation into master

Added the flag flat_eval=False to all evaluation routines (backward compatible). If set to True, a flat evaluation means

f(s, a1, a2) = [f(s[0], a1[0], a2[0]), f(s[1], a1[1], a2[1]), ....]

where the arguments are all 1D arrays of same size, and the return has the same shape as the arguments. If the flag is False, a meshgrid evaluation is performed for 1d array inputs (as before).

Unit test for the new flat_eval have been added.

The flat evaluation is used in Struphy for marker evaluations in PIC routines, where the arguments are three 1D arrays (size=number of markers) holding the marker positions in the three spatial directions.

Other changes:

  • Removed GVEC_domain.matmul_5d; use numpy.swapaxes with @ instead.
  • Removed GVEC_domain.matvec_5d and all related kernels; added new methods prepare_batch_vector and finalize_batch_vector to use numpy routines instead. The file geometry.kernels.py has been deleted.
  • Updated version number to 1.2.1
Edited by Stefan Possanner

Merge request reports