Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Species Plugins: Multi & --<name>.filter #1288

Closed
ax3l opened this issue Dec 3, 2015 · 5 comments
Closed

Species Plugins: Multi & --<name>.filter #1288

ax3l opened this issue Dec 3, 2015 · 5 comments
Assignees
Labels
component: plugin in PIConGPU plugin
Milestone

Comments

@ax3l
Copy link
Member

ax3l commented Dec 3, 2015

One thing I realised during the last years of large scale runs is the following:

Objective

Make every plugin that run over species should be multi plugins (that can be called multiple times) and should define an optional argument <name>.filter=<filterName> (default=all).

Advantage

The same plugin can be run multiple times over a species but only selects a sub-selection of that species by user defined filters. These filters can be something like position, direction of propagation, energy, ... or what ever might be interesting for a user.

Implementation

We should provide a speciesFilter.param where the user can define very simple functors of the form bool isRelevant( T_Particle& particle ). Additionally, we need a getName method so we can use it on the cmd line.

Of course we pre-define and include an all filter that is the default fallback in case no filter was used.

As with other "multi" plugins, the plugin is simply run multiple times (even if the calculation could be done in one swipe over the particle list) since this is the easiest and most generic implementation.

Functors should be designed to easily allow filters based on the simple access to the particle's attributes (and its frame's attributes) but should be also not too strict so we can also forward field attributes later on.

Examples

select only particles:

@ax3l ax3l added the component: plugin in PIConGPU plugin label Dec 3, 2015
@ax3l ax3l added this to the Open Beta milestone Dec 3, 2015
@n01r
Copy link
Member

n01r commented Apr 21, 2016

👍 Need that one, too.
To be able to compare PIConGPU to PICLS we would need to have cut-off on the electron energy to be able to compute the "temperature" of the thermalized electrons for the Thomas-Fermi pressure ionization model.

@n01r
Copy link
Member

n01r commented Apr 21, 2016

I would say that we need filters for more than just plugins namely also to be able to implement certain models in the main code.

@ax3l
Copy link
Member Author

ax3l commented Apr 22, 2016

yes, the "filter" kernels should of course be general PMacc methods (we have some already but need to generalize them so they fit the above mentioned requirements). Also, it is not planned to re-write them for each particle plugin ;)

@PrometheusPi
Copy link
Member

Sounds like a great idea 👍.

@steindev
Copy link
Member

steindev commented Feb 3, 2023

Will close this issue. There is a particleFilter.param allowing to define filters. These can be applied to most of our plugins via a <species>_<plugin>.filter <filterName> argument. Except for openPMD, where the option is called --openPMD.source <dataSource>.
Plugins that use the filter are for example <species>_energy, <species>_emittance, <species>_energyHistogram, <species>_calorimeter, and <species>_phaseSpace. All of these are multiplugins and can be called several times on the same species w/ different filters.

@steindev steindev closed this as completed Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: plugin in PIConGPU plugin
Projects
None yet
Development

No branches or pull requests

5 participants