Skip to content

Conversation

@BrianMarre
Copy link
Member

@BrianMarre BrianMarre commented Nov 13, 2025

Adds the ability to configure wether the applyIPD-Ionization sub-stage skips finished super cells. This fixes a bug where IPD-ionization was never applied at the end of the FLYonPIC stage.

Also removes the limitation of applying IPD only to states not ionized without any IPD.

only the last 2 commits are part of this PR

@BrianMarre BrianMarre changed the title fix skipped apply ipd ionization at end of fl yon pic loop fix skipped apply ipd ionization at end of FLYonPIC loop Nov 13, 2025
Comment on lines 214 to +215
*/
if(!stateIsGenerallyUnbound && stateIsUnbound)
if(stateIsUnbound)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing the limitiation of IPD to not naturally unbound states

@BrianMarre BrianMarre force-pushed the topic-fixSkippedApplyIPDIonizationAtEndOfFLYonPICLoop branch from b87251a to dc9e235 Compare November 18, 2025 09:21
PrometheusPi
PrometheusPi previously approved these changes Nov 20, 2025
Copy link
Member

@PrometheusPi PrometheusPi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks formally okay - just a few questions

pmacc::DataSpace<picongpu::simDim> const superCellFieldIndex,
T_AdditionalStuff const...)
{
return false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question: What is the purpose of this skipSuperCell function?

Copy link
Member Author

@BrianMarre BrianMarre Nov 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is called at a predefined hook point in the ApplyIPDIonization-kernel and if it returns true, causes an early exit of the kernel, skipping the entire super cell in the kernel call, see here.
The ApplyIPDIonization-kernel is defined here and is an instance of the SpawnFromSourceSpecies-kernel framework, see here.

In general the SkipSuperCell-functor is a resource saving measure in the SpawnFromSourceSpecies-kernel framework, see here, which is a future replacement for the particle creation kernel, which among other things is more flexible and allows better code reuse.

The NeverSkipSuperCell implementation disables the skipping of super cells feature completely. This ensures that the IPD-ionization is applied to every super cell at the end of FLYonPIC step here, where every super cell is finished.

@BrianMarre BrianMarre force-pushed the topic-fixSkippedApplyIPDIonizationAtEndOfFLYonPICLoop branch from dc9e235 to 8ecb609 Compare November 20, 2025 10:50
@BrianMarre BrianMarre force-pushed the topic-fixSkippedApplyIPDIonizationAtEndOfFLYonPICLoop branch from 8ecb609 to 398afa2 Compare November 20, 2025 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants