An open source method of characteristics neutron transport code.
|
A class used to count the number of segments on each Track and the maximum number of segments per Track. More...
#include <TrackTraversingAlgorithms.h>
Public Member Functions | |
SegmentCounter (TrackGenerator *track_generator) | |
Constructor for SegmentCounter calls the TraverseSegments constructor and sets the max number of segments per Track to zero. More... | |
void | execute () |
Determines the maximum number of segments per Track. More... | |
void | onTrack (Track *track, segment *segments) |
Updates the maximum number of segments per Track if a Track with a larger number of segments is observed. More... | |
void | countTotalNumSegments () |
Turn on counting segments. | |
long | getTotalNumSegments () |
Get the total number of segments. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from TraverseSegments | |
TraverseSegments (TrackGenerator *track_generator) | |
Constructor for the TraverseSegments class assigns the TrackGenerator and pulls relevant information from it. | |
virtual | ~TraverseSegments () |
Destructor for TraverseSegments. | |
void | loopOverTracks (MOCKernel *kernel) |
Loops over Tracks, applying the provided kernel to all segments and the functionality described in onTrack(...) to all Tracks. More... | |
void | loopOverTracksByStackTwoWay (TransportKernel *kernel) |
Loops over all 3D Tracks using axial on-the-fly ray tracking by z-stack, going forward then backward on each 3D Track. More... | |
template<class KernelType > | |
MOCKernel * | getKernel () |
Protected Attributes inherited from TraverseSegments | |
TrackGenerator * | _track_generator |
TrackGenerator3D * | _track_generator_3D |
double * | _global_z_mesh |
int | _mesh_size |
segmentationType | _segment_formation |
A class used to count the number of segments on each Track and the maximum number of segments per Track.
"src/TrackTraversingAlgorithms.h"
A SegmentCounter allocates CounterKernels to count segments along each Track given a maximum optical path length imported from the provided TrackGenerator and the maximum number of segments per Track in the TrackGenerator is updated.
SegmentCounter::SegmentCounter | ( | TrackGenerator * | track_generator | ) |
Constructor for SegmentCounter calls the TraverseSegments constructor and sets the max number of segments per Track to zero.
track_generator | The TrackGenerator to pull tracking information from |
|
virtual |
Determines the maximum number of segments per Track.
CounterKernels are initialized to count segments along each Track. Then Tracks are traversed, saving the maximum number of segments and setting the corresponding parameter on the TrackGenerator.
Implements TraverseSegments.
long SegmentCounter::getTotalNumSegments | ( | ) |
Get the total number of segments.
Updates the maximum number of segments per Track if a Track with a larger number of segments is observed.
Implements TraverseSegments.