An open source method of characteristics neutron transport code.
TraverseSegments Class Referenceabstract

An TraverseSegments object defines how to loop over Tracks given various different segmentation schemes and how to apply algorithms to the Tracks and associated segments. More...

#include "src/TraverseSegments.h"

Public Member Functions

virtual void execute ()=0
 

Protected Member Functions

 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...
 
virtual void onTrack (Track *track, segment *segments)=0
 
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 >
MOCKernelgetKernel ()
 

Protected Attributes

TrackGenerator_track_generator
 
TrackGenerator3D_track_generator_3D
 
double * _global_z_mesh
 
int _mesh_size
 
segmentationType _segment_formation
 

Detailed Description

An TraverseSegments object defines how to loop over Tracks given various different segmentation schemes and how to apply algorithms to the Tracks and associated segments.

A TraverseSegments object sketches how to loop over Tracks for various different segmentation schemes such as 2D explicit, 3D explicit, and on-the-fly ray tracing. A TraverseSegments object is an abstract class meant to be extended by classes defined in TrackTraversingAlgorithms.h. This parent class's main purpose is to abstract the looping procedure and apply a function onTrack(...) to each Track and apply the supplied MOCKernel to each segment. If NULL is provided for the MOCKernel, only the functionality defined in onTrack(...) is applied to each Track.

Member Function Documentation

◆ loopOverTracks()

void TraverseSegments::loopOverTracks ( MOCKernel kernel)
protected

Loops over Tracks, applying the provided kernel to all segments and the functionality described in onTrack(...) to all Tracks.

The segment formation method imported from the TrackGenerator during construction is used to redirect to the appropriate looping scheme. If a kernel is provided (not NULL) then it is deleted at the end of the looping scheme.

Parameters
kernelMOCKernel to apply to all segments

◆ loopOverTracksByStackTwoWay()

void TraverseSegments::loopOverTracksByStackTwoWay ( TransportKernel kernel)
protected

Loops over all 3D Tracks using axial on-the-fly ray tracking by z-stack, going forward then backward on each 3D Track.

The onTrack(...) function is applied to all 3D Tracks and the specified kernel is applied to all segments. If NULL is provided for the kernel, only the onTrack(...) functionality is applied.

Parameters
kernelThe TransportKernel dictating the functionality to apply to segments

Member Data Documentation

◆ _global_z_mesh

double* TraverseSegments::_global_z_mesh
protected

A pointer to the associated global z-mesh (if applicable)

◆ _mesh_size

int TraverseSegments::_mesh_size
protected

The size of the global z-mesh

◆ _segment_formation

segmentationType TraverseSegments::_segment_formation
protected

The type of segmentation used for segment formation

◆ _track_generator

TrackGenerator* TraverseSegments::_track_generator
protected

Pointer to the associated TrackGenerator


The documentation for this class was generated from the following files: