Skip to content

Custom Particle Update (ver 2)#198

Draft
haykh wants to merge 1 commit into1.4.0rcfrom
dev/custom_prtl_update
Draft

Custom Particle Update (ver 2)#198
haykh wants to merge 1 commit 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.

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