picongpu
picongpu copied to clipboard
Relative Global Domain Position for Density Profiles
I think it would be really helpful if we had an easy option of accessing the relative global domain position in density profiles.
It exists already partly for particle filters where RelativeGlobalDomainPosition
allows to give an upperBound
and a lowerBound
(a free number of boundaries and logical connections between them is not yet possible).
This would make it much easier to place slices and boxes of e.g. probes and tracers somewhere.
@n01r perhaps that is possible already? Imagine you have such a custom density functor that accepts relative position in its operator()
. You then write another density functor inheriting yours. In the constructor of that new functor (it is done on the host anyways) you can access Environment
and get domain data there, save it in members. Then in the operator()
you use this data to convert totalCellOffset
to relative position, and call the operator()
of the base class (your original functor). It is true we can, and probably should, provide smth like that. But in principle this should be doable fully externally