The following code snippet is an example of how the PPF may be used in a project. Particle packages as not limited to a single design however, a method's logical position within the codes execution structure must remain the same.
(1) Compute One Time Step { (2) generateSources() (3) Loop over Particles{ (4) Advance Particle { (5) Do Work if Frozen { (6) PPF_Submit(particle) (7) Erase particle from current node } (8) PPF_SendFrozenParticles() (9) PPF_RecvFrozenParticles() } } (10) PPF_DoneAdvancing() (11) if(PPF_NumRemainginPsarticles == 0){ (12) we are done with this time step } (13) PPF_Repartition() Replicate Mesh()