An open source method of characteristics neutron transport code.
CentroidGenerator Class Reference

A class used to calculate the centroids of each FSR. More...

#include <TrackTraversingAlgorithms.h>

Public Member Functions

 CentroidGenerator (TrackGenerator *track_generator)
 Constructor for CentroidGenerator calls the TraverseSegments constructor and imports references to both the FSR volumes and FSR locks arrays. More...
 
virtual ~CentroidGenerator ()
 Destructor for the CentroidGenerator.
 
void setCentroids (Point **centroids)
 Specifies an array to save calculated FSR centroids. More...
 
void execute ()
 Calculates the centroid of every FSR. More...
 
void onTrack (Track *track, segment *segments)
 Centroid contributions are calculated for every segment in the Track. 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 >
MOCKernelgetKernel ()
 
- Protected Attributes inherited from TraverseSegments
TrackGenerator_track_generator
 
TrackGenerator3D_track_generator_3D
 
double * _global_z_mesh
 
int _mesh_size
 
segmentationType _segment_formation
 

Detailed Description

A class used to calculate the centroids of each FSR.

"src/TrackTraversingAlgorithms.h"

A CentroidGenerator imports FSR Volumes and associated locks form the provided TrackGenerator, then centroids are calculated and stored in the provided buffer by first allocating SegmentationKernels to temporarily store segments and then looping over all segments and adding their contribution to each FSR centroid.

Constructor & Destructor Documentation

◆ CentroidGenerator()

CentroidGenerator::CentroidGenerator ( TrackGenerator track_generator)

Constructor for CentroidGenerator calls the TraverseSegments constructor and imports references to both the FSR volumes and FSR locks arrays.

Parameters
track_generatorThe TrackGenerator to pull tracking information from

Member Function Documentation

◆ execute()

void CentroidGenerator::execute ( )
virtual

Calculates the centroid of every FSR.

SegmentationKernels are created to temporarily save segments for on-the-fly methods. Then on each segment, onTrack(...) calculates the contribution to each FSR centroid and saves the centroids in the centroids array provided by setCentroids(...).

Implements TraverseSegments.

◆ onTrack()

void CentroidGenerator::onTrack ( Track track,
segment segments 
)
virtual

Centroid contributions are calculated for every segment in the Track.

Parameters
trackThe Track associated with the segments
segmentsThe segments whose contributions are added to the centroids

Implements TraverseSegments.

◆ setCentroids()

void CentroidGenerator::setCentroids ( Point **  centroids)

Specifies an array to save calculated FSR centroids.

Parameters
centroidsThe array of pointer to FSR centroids

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