geodynamics / aspect

A parallel, extensible finite element code to simulate convection in both 2D and 3D models.
https://aspect.geodynamics.org/
Other
217 stars 232 forks source link

Add ParticleInterfaceBase to set the particle world index for the particle plugins. #5921

Closed MFraters closed 1 week ago

MFraters commented 2 weeks ago

This pull request adds a ParticleInterfaceBase to set the particle world index in the particle plugins as suggested by @gassmoeller. Let me know if this was what you had in mind.

This pull request is parallel to #5920 and should be able to be review and merged independently.

tjhei commented 2 weeks ago

What is your motivation for storing the index instead of pointer?

MFraters commented 2 weeks ago

Thanks for the review! I have addressed your comments.

What is your motivation for storing the index instead of pointer?

We need the index for the parse parameters, so since indices here used anyway, it made most sense to me to store it that way. I could change it to a pointer, but that would turn the interface into a template, and we would lose the information on what index the plugin is if we ever need the index during the calculation. Is there an advantage to having it as a pointer?

MFraters commented 2 weeks ago

@gassmoeller Thanks for your initial comments, I have addressed them.

MFraters commented 1 week ago

@gassmoeller Thanks for the review and good catch for the order of the parse parameters. I have addressed your comments.