next up previous contents
Next: Appendix II: Driver Description Up: Preliminary Design Previous: Interface Option 2

Appendix I: Example Driver File Pseudo-Code

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()


next up previous contents
Next: Appendix II: Driver Description Up: Preliminary Design Previous: Interface Option 2


Tue Apr 11 23:58:21 MST 2000