Skip to content

Custom Particle Update (ver 2)#198

Merged
haykh merged 56 commits into1.4.0rcfrom
dev/custom_prtl_update
Apr 26, 2026
Merged

Custom Particle Update (ver 2)#198
haykh merged 56 commits into1.4.0rcfrom
dev/custom_prtl_update

Conversation

@haykh
Copy link
Copy Markdown
Collaborator

@haykh haykh commented Apr 9, 2026

No description provided.

@haykh
Copy link
Copy Markdown
Collaborator Author

haykh commented Apr 9, 2026

@LudwigBoess a few things that i think should be fixed:

  • There is really no reason not to just have:

    struct NoCustomPrtlUpdate_t {};

    I really don't see why we need a template with an empty operator(). especially given that in the example pgen, the template is directly on the operator() instead.

  • this is not very safe (in pgens/examples/custom_particle_update):

       template <class Coord, class PusherKernel>
       Inline void operator()(index_t p, Coord& xp, PusherKernel& pusher) const {

    should use coord_t<D>. also, again, there is no reason the template is not on the class itself.

  • in the same pgens/examples/custom_particle_update, the coordinate conversions are incorrect (i think). i + di is not the same as the x coordinate, as they are in different coordinate systems. and likewise, (i + di) / beta will not be equal to time.

  • why do we give access to xp at all? isn't it redundant? xp_Ph would make more sense.

@haykh haykh marked this pull request as ready for review April 26, 2026 23:19
@haykh haykh merged commit 0c7c517 into 1.4.0rc Apr 26, 2026
16 checks passed
@haykh haykh deleted the dev/custom_prtl_update branch April 26, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants