Skip to content

Incorporate Attenuation by Z-Stack for SimpleMOC-kernel #2

@geogunow

Description

@geogunow

Right now SimpleMOC-kernel is a simplified mini-app for 3D MOC calculations assuming on-the-fly ray tracing by individual track. However, there is reason to believe that ray tracing by z-stack would be more efficient. A z-stack is a group of tracks that have the same 2D projection, same polar angle, and a constant axial spacing. With ray tracing by z-stack, we could see improved cache efficiency for attenuating segments.

Currently, SimpleMOC-kernel takes a single track with a given number of segments and applies the MOC equations for a single track with an assumed cache miss on each of the new source regions. Instead, with ray tracing by z-stack, we would ray trace the whole z-stack over a set of source regions that are contiguously laid out in memory in the axial direction.

This would mean changing the algorithm to assume a cache miss a new radial region is encountered, but not necessarily on each individual source region. In practice this would mean loading N source regions from a randomly selected index i (ie. loading source_regions[i] to source_regions[i+N]) at the beginning of each new 2D segment and then analytically calculating indexes of tracks with wich to apply the MOC equations for each of the loaded source regions.

See the image below for a visualization of the ray tracing by z-stack process:

image

The pseudo-code for this new algorithm would be:

  • Initialize S source regions
  • Load random 2D segment lengths of the z-stack
  • Calculate the number of source regions per 2D segment ``N =
  • Calculate a random index i into the source array (i < S-N)
  • for j = i, i+1, ..., i+N
    • Calculate a random number but feasible number of tracks M to cross source region j
    • Calculate a feasible starting track index t of the tracks that corss
    • for k = t, t+1, ..., t+M
      • Apply the MOC attenuation equations for a random 3D track length for track k crossing source region j

This is an important update for SimpleMOC-kernel since it could confirm/lead to new intuition about how to structure 3D MOC to maximize cache efficiency and locality.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions