picongpu icon indicating copy to clipboard operation
picongpu copied to clipboard

Relative Global Domain Position for Density Profiles

Open n01r opened this issue 3 years ago • 1 comments

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 avatar Apr 20 '21 14:04 n01r

@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

sbastrakov avatar Sep 10 '21 15:09 sbastrakov