-
Notifications
You must be signed in to change notification settings - Fork 217
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
Comments
👍 Need that one, too. |
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. |
yes, the "filter" kernels should of course be general |
Sounds like a great idea 👍. |
Will close this issue. There is a |
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 formbool isRelevant( T_Particle& particle )
. Additionally, we need agetName
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:
The text was updated successfully, but these errors were encountered: