5.3 Code Details



next up previous
Next: 5.4 Program Execution Up: 5 Monte Carlo Code-Exercise Previous: 5.2 Locating the Code

5.3 Code Details

 

The code traces particles in a perfectly absorptive square prismatic geometry. Although simplified, this problem well illustrates the concepts of vectorizing Monte Carlo surface to surface transport. We proceed with a top-down description of the code.

In subroutine intsec, we employ the concept of a sieve, where we wish to pass through the sieve the particles which pass the various tests. Those particles which pass the test, we ``compress'' into new vectors, and denote the new vector as the name of the prior vector with a ``c'' appended to denote a compressed quantity. We undergo two levels of compression in this simple example.



verena@csep1.phy.ornl.gov