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

The TrackGenerator is dedicated to generating and storing Tracks which cyclically wrap across the Geometry. More...

#include "src/TrackGenerator.h"

Public Member Functions

 TrackGenerator (Geometry *geometry, int num_azim, double azim_spacing)
 Constructor for the TrackGenerator assigns default values. More...
 
virtual ~TrackGenerator ()
 Destructor frees memory for all Tracks.
 
int getNumAzim ()
 Return the number of azimuthal angles in $ [0, 2\pi] $. More...
 
double getDesiredAzimSpacing ()
 Return the track azimuthal spacing (cm). More...
 
GeometrygetGeometry ()
 Return the Geometry for this TrackGenerator if one has been set. More...
 
virtual long getNumTracks ()
 Return the total number of Tracks across the Geometry. More...
 
virtual long getNumSegments ()
 Return the total number of Track segments across the Geometry. More...
 
long getNum2DTracks ()
 Return the total number of 2D Tracks across the Geometry. More...
 
long getNum2DSegments ()
 Return the total number of 2D Track segments across the Geometry. More...
 
void countSegments ()
 Counts the number of segments for each Track in the Geometry. More...
 
bool getPeriodic ()
 Returns whether periodic boundaries are present in Track generation. More...
 
Track ** get2DTracksArray ()
 Returns an array of the Track pointers by increasing UID. More...
 
Track ** getTracksArray ()
 Returns an array of the Track pointers by increasing UID. More...
 
Track ** get2DTracks ()
 Returns a 2D jagged array of the 2D Tracks. More...
 
FP_PRECISION getMaxOpticalLength ()
 Calculates and returns the maximum optical length for any segment in the Geometry. More...
 
int getMaxNumSegments ()
 Returns the maximum number of segments along a single track. More...
 
int getNumThreads ()
 Returns the number of shared memory OpenMP threads in use. More...
 
int getNumX (int azim)
 Returns the number of 2D Tracks in the x-direction for a given azimuthal angle index. More...
 
int getNumY (int azim)
 Returns the number of 2D Tracks in the y-direction for a given azimuthal angle index. More...
 
void exportFSRVolumes (double *out_volumes, int num_fsrs)
 FSR volumes are copied to an array input by the user. More...
 
void initializeVolumes ()
 Computes the volumes/areas of each Cell and Material in the Geometry. More...
 
void initializeFSRVolumesBuffer ()
 Initialize an array to contain the FSR volumes.
 
FP_PRECISION * getFSRVolumesBuffer ()
 Return the array used to store the FSR volumes. More...
 
FP_PRECISION * getFSRVolumes ()
 Computes and returns an array of volumes indexed by FSR. More...
 
FP_PRECISION getFSRVolume (long fsr_id)
 Returns the volume of an FSR. More...
 
double getZCoord ()
 Returns the z-coord of the radial plane used in 2D calculations. More...
 
QuadraturegetQuadrature ()
 Returns the Quadrature object. More...
 
FP_PRECISION retrieveMaxOpticalLength ()
 Retrieves the max optical path length of 3D segments for use in on-the-fly computation. More...
 
omp_lock_t * getFSRLocks ()
 Return the array of FSR locks for atomic FSR operations. More...
 
segmentationType getSegmentFormation ()
 Returns the type of ray tracing used for segment formation. More...
 
virtual bool containsTracks ()
 Returns whether or not the TrackGenerator contains Tracks for its current number of azimuthal angles, track spacing and geometry. More...
 
virtual bool containsSegments ()
 Returns whether or not the TrackGenerator contains segments for its current number of azimuthal angles, track spacing and geometry for its current segmentation type. More...
 
int get2DTrackID (int a, int x)
 Get the id of a 2D Track based on its azimuthal angle and index in the azimuthal stack. More...
 
long * getTracksPerAzim ()
 Return the number of tracks for each azimuthal angle. More...
 
void setNumThreads (int num_threads)
 Sets the number of shared memory OpenMP threads to use (>0). More...
 
void setNumAzim (int num_azim)
 Set the number of azimuthal angles in $ [0, 2\pi] $. More...
 
void setDesiredAzimSpacing (double spacing)
 Set the suggested azimuthal track spacing (cm). More...
 
void setGeometry (Geometry *geometry)
 Set a pointer to the Geometry to use for track generation. More...
 
void setZCoord (double z_coord)
 Sets the z-coord of the radial plane used in 2D calculations. More...
 
void setQuadrature (Quadrature *quadrature)
 Sets the Quadrature used for integrating the MOC equations. More...
 
void setMaxOpticalLength (FP_PRECISION tau)
 Sets the max optical path length of 3D segments for use in on-the-fly computation. More...
 
void setMaxNumSegments (int max_num_segments)
 Sets the maximum number of segments per Track. More...
 
void setDumpSegments (bool dump_segments)
 Sets a flag to record all segment information in the tracking file. More...
 
virtual void retrieveTrackCoords (double *coords, long num_tracks)
 Fills an array with the x,y,z coordinates for each Track. More...
 
void retrieve2DTrackCoords (double *coords, long num_tracks)
 Fills an array with the x,y,z coordinates for each Track. More...
 
virtual void retrieveSegmentCoords (double *coords, long num_segments)
 Fills an array with the x,y,z coordinates for each Track segment. More...
 
void retrieve2DSegmentCoords (double *coords, long num_segments)
 Fills an array with the x,y,z coordinates for each Track segment. More...
 
void generateFSRCentroids (FP_PRECISION *FSR_volumes)
 Generates the numerical centroids of the FSRs. More...
 
void generateTracks ()
 Generates tracks for some number of azimuthal angles and track spacing. More...
 
void splitSegments (FP_PRECISION max_optical_length)
 Splits Track segments into sub-segments for a user-defined maximum optical length for the problem. More...
 
double leastCommonMultiple (double a, double b)
 Calculates the least common multiple of two numbers a and b. More...
 
void dumpSegmentsToFile ()
 Writes all Track and segment data to a "*.tracks" binary file. More...
 
bool readSegmentsFromFile ()
 Reads Tracks in from a "*.tracks" binary file. More...
 
void initializeTrackFileDirectory ()
 This method creates a directory to store Track files, and reads in ray tracing data for Tracks and segments from a Track file if one exists. More...
 
void initializeTracksArray ()
 Creates a Track array by increasing uid. More...
 
virtual void checkBoundaryConditions ()
 Checks the boundary conditions for all 2D surfaces for inconsistent periodic boundary conditions.
 
void printTimerReport (bool mpi_reduce)
 Print the track generation timer report. More...
 
void printMemoryReport ()
 Print the track generation memory report.
 

Protected Member Functions

virtual void initializeTracks ()
 Initializes Track azimuthal angles, start and end Points. More...
 
void initializeTrackReflections ()
 Initializes 2D Track reflections. More...
 
virtual void segmentize ()
 Generate segments for each Track across the Geometry.
 
virtual void setContainsSegments (bool contains_segments)
 Updates whether the TrackGenerator contains segments. More...
 
virtual void allocateTemporarySegments ()
 Allocates memory for temporary segment storage if necessary. More...
 
virtual void resetStatus ()
 Resets the TrackGenerator to not contain tracks or segments.
 
virtual void initializeDefaultQuadrature ()
 Allocates a new Quadrature with the default Quadrature. More...
 
virtual void writeExtrudedFSRInfo (FILE *out)
 Write information of all Extruded FSRs to a file TODO Use implementation in 3D track generator. More...
 
virtual void readExtrudedFSRInfo (FILE *in)
 Read information of all Extruded FSRs from a file. More...
 
virtual std::string getTestFilename (std::string directory)
 Returns the filename for writing tracking data.
 

Protected Attributes

int _num_threads
 
int _num_azim
 
double _azim_spacing
 
int _num_2D_tracks
 
int * _num_x
 
int * _num_y
 
long * _tracks_per_azim
 
Track ** _tracks_2D
 
Track ** _tracks_2D_array
 
Geometry_geometry
 
bool _use_input_file
 
std::string _tracks_filename
 
omp_lock_t * _FSR_locks
 
bool _contains_2D_tracks
 
bool _contains_2D_segments
 
Quadrature_quadrature
 
double _z_coord
 
bool _periodic
 
segmentationType _segment_formation
 
FP_PRECISION _max_optical_length
 
int _max_num_segments
 
bool _dump_segments
 
bool _segments_centered
 
FP_PRECISION * _FSR_volumes
 
Timer_timer
 
double _x_min
 
double _y_min
 
double _z_min
 
double _x_max
 
double _y_max
 
double _z_max
 

Detailed Description

The TrackGenerator is dedicated to generating and storing Tracks which cyclically wrap across the Geometry.

The TrackGenerator creates Track and initializes boundary conditions (vacuum, reflective, or periodic) for each Track.

Constructor & Destructor Documentation

◆ TrackGenerator()

TrackGenerator::TrackGenerator ( Geometry geometry,
int  num_azim,
double  azim_spacing 
)

Constructor for the TrackGenerator assigns default values.

Parameters
geometrya pointer to a Geometry object
num_azimnumber of azimuthal angles in $ [0, 2\pi] $
azim_spacingazimuthal track spacing (cm)

Member Function Documentation

◆ allocateTemporarySegments()

void TrackGenerator::allocateTemporarySegments ( )
protectedvirtual

Allocates memory for temporary segment storage if necessary.

Temporary segments are not allocated for 2D calculations

◆ containsSegments()

bool TrackGenerator::containsSegments ( )
virtual

Returns whether or not the TrackGenerator contains segments for its current number of azimuthal angles, track spacing and geometry for its current segmentation type.

Returns
true if the TrackGenerator contains segments; false otherwise

Reimplemented in TrackGenerator3D.

◆ containsTracks()

bool TrackGenerator::containsTracks ( )
virtual

Returns whether or not the TrackGenerator contains Tracks for its current number of azimuthal angles, track spacing and geometry.

Returns
true if the TrackGenerator conatains Tracks; false otherwise

Reimplemented in TrackGenerator3D.

◆ countSegments()

void TrackGenerator::countSegments ( )

Counts the number of segments for each Track in the Geometry.

All segments are subject to the max optical path length to determine the number of segments for each track as well as the maximum number of segments per Track in the Geometry. For on-the-fly calculations, the temporary segment buffer is expanded to fit the calculated maximum number of segments per Track.

◆ dumpSegmentsToFile()

void TrackGenerator::dumpSegmentsToFile ( )

Writes all Track and segment data to a "*.tracks" binary file.

Storing Tracks in a binary file saves time by eliminating ray tracing for Track segmentation in commonly simulated geometries.

◆ exportFSRVolumes()

void TrackGenerator::exportFSRVolumes ( double *  out_volumes,
int  num_fsrs 
)

FSR volumes are copied to an array input by the user.

Parameters
out_volumesThe array to which FSR volumes are copied
num_fsrsThe number of FSR volumes to copy. The first num_fsrs volumes stored in the FSR volumes array are copied.

◆ generateFSRCentroids()

void TrackGenerator::generateFSRCentroids ( FP_PRECISION *  FSR_volumes)

Generates the numerical centroids of the FSRs.

This routine generates the numerical centroids of the FSRs by weighting the average x and y values of each segment in the FSR by the segment's length and azimuthal weight. The numerical centroid fomula can be found in R. Ferrer et. al. "Linear Source Approximation in CASMO 5", PHYSOR 2012.

Parameters
FSR_volumesAn array of FSR volumes.

◆ generateTracks()

void TrackGenerator::generateTracks ( )

Generates tracks for some number of azimuthal angles and track spacing.

Computes the effective angles and track spacing. Computes the number of Tracks for each azimuthal angle, allocates memory for all Tracks at each angle and sets each Track's starting and ending Points, azimuthal angle, and azimuthal angle quadrature weight.

◆ get2DTrackID()

int TrackGenerator::get2DTrackID ( int  a,
int  x 
)

Get the id of a 2D Track based on its azimuthal angle and index in the azimuthal stack.

Parameters
aazimuthal angle of the Track
xindex in azimuthal stack
Returns
Track unique id

◆ get2DTracks()

Track ** TrackGenerator::get2DTracks ( )

Returns a 2D jagged array of the 2D Tracks.

The first index into the array is the azimuthal angle and the second index is the Track number.

Returns
the 2D jagged array of 2D Tracks

◆ get2DTracksArray()

Track ** TrackGenerator::get2DTracksArray ( )

Returns an array of the Track pointers by increasing UID.

An array of pointers to all 2D Track objects in the Geometry is returned, arranged by increasing unique identifier (UID).

Returns
the array of Track pointers

◆ getDesiredAzimSpacing()

double TrackGenerator::getDesiredAzimSpacing ( )

Return the track azimuthal spacing (cm).

This will return the user-specified track spacing and NOT the effective track spacing which is computed and used to generate cyclic tracks.

Returns
the track azimuthal spacing (cm)

◆ getFSRLocks()

omp_lock_t * TrackGenerator::getFSRLocks ( )

Return the array of FSR locks for atomic FSR operations.

Returns
an array of FSR locks

◆ getFSRVolume()

FP_PRECISION TrackGenerator::getFSRVolume ( long  fsr_id)

Returns the volume of an FSR.

Parameters
fsr_idthe ID for the FSR of interest
Returns
the FSR volume

◆ getFSRVolumes()

FP_PRECISION * TrackGenerator::getFSRVolumes ( )

Computes and returns an array of volumes indexed by FSR.

Note: The memory is stored in the FSR volumes buffer of the TrackGenerator and is freed during deconstruction.

Returns
a pointer to the array of FSR volumes

◆ getFSRVolumesBuffer()

FP_PRECISION * TrackGenerator::getFSRVolumesBuffer ( )

Return the array used to store the FSR volumes.

Returns
_FSR_volumes the FSR volumes array indexed by FSR ID

◆ getGeometry()

Geometry * TrackGenerator::getGeometry ( )

Return the Geometry for this TrackGenerator if one has been set.

Returns
a pointer to the Geometry

◆ getMaxNumSegments()

int TrackGenerator::getMaxNumSegments ( )

Returns the maximum number of segments along a single track.

The TrackGenerator::countSegments routine must be called before this function will return a correct value

Returns
the maximum number of segments on a single track

◆ getMaxOpticalLength()

FP_PRECISION TrackGenerator::getMaxOpticalLength ( )

Calculates and returns the maximum optical length for any segment in the Geometry.

The _max_optical_length value is recomputed, updated, and returned. This value determines when segments must be split during ray tracing.

Returns
the maximum optical length of any segment in the Geometry

◆ getNum2DSegments()

long TrackGenerator::getNum2DSegments ( )

Return the total number of 2D Track segments across the Geometry.

Returns
the total number of 2D Track segments

◆ getNum2DTracks()

long TrackGenerator::getNum2DTracks ( )

Return the total number of 2D Tracks across the Geometry.

Returns
the total number of 2D Tracks

◆ getNumAzim()

int TrackGenerator::getNumAzim ( )

Return the number of azimuthal angles in $ [0, 2\pi] $.

Returns
the number of azimuthal angles in $ 2\pi $

◆ getNumSegments()

long TrackGenerator::getNumSegments ( )
virtual

Return the total number of Track segments across the Geometry.

Returns
the total number of Track segments

Reimplemented in TrackGenerator3D.

◆ getNumThreads()

int TrackGenerator::getNumThreads ( )

Returns the number of shared memory OpenMP threads in use.

Returns
the number of threads

◆ getNumTracks()

long TrackGenerator::getNumTracks ( )
virtual

Return the total number of Tracks across the Geometry.

Returns
the total number of Tracks

Reimplemented in TrackGenerator3D.

◆ getNumX()

int TrackGenerator::getNumX ( int  azim)

Returns the number of 2D Tracks in the x-direction for a given azimuthal angle index.

Parameters
azimthe azimuthal angle index
Returns
the number of 2D Tracks in the x-direction of the Geometry

◆ getNumY()

int TrackGenerator::getNumY ( int  azim)

Returns the number of 2D Tracks in the y-direction for a given azimuthal angle index.

Parameters
azimthe azimuthal angle index
Returns
the number of 2D Tracks in the y-direction of the Geometry

◆ getPeriodic()

bool TrackGenerator::getPeriodic ( )

Returns whether periodic boundaries are present in Track generation.

Returns
a boolean value - true if periodic; false otherwise

◆ getQuadrature()

Quadrature * TrackGenerator::getQuadrature ( )

Returns the Quadrature object.

Returns
the Quadrature object

◆ getSegmentFormation()

segmentationType TrackGenerator::getSegmentFormation ( )

Returns the type of ray tracing used for segment formation.

Returns
the segmentation type

◆ getTracksArray()

Track ** TrackGenerator::getTracksArray ( )

Returns an array of the Track pointers by increasing UID.

Calls TrackGenerator::get2DTracksArray to return all 2D Tracks

Returns
the array of Track pointers

◆ getTracksPerAzim()

long * TrackGenerator::getTracksPerAzim ( )

Return the number of tracks for each azimuthal angle.

Returns
the number of tracks for each azimuthal angle

◆ getZCoord()

double TrackGenerator::getZCoord ( )

Returns the z-coord of the radial plane used in 2D calculations.

Returns
the z-coord of the 2D calculation

◆ initializeDefaultQuadrature()

void TrackGenerator::initializeDefaultQuadrature ( )
protectedvirtual

Allocates a new Quadrature with the default Quadrature.

The default quadrature for 2D calculations is the TY quadrature

◆ initializeTrackFileDirectory()

void TrackGenerator::initializeTrackFileDirectory ( )

This method creates a directory to store Track files, and reads in ray tracing data for Tracks and segments from a Track file if one exists.

This method is called by the TrackGenerator::generateTracks() class method. If a Track file exists for this Geometry, number of azimuthal angles, and track spacing, then this method will import the ray tracing Track and segment data to fill the appropriate data structures.

Create directory to store Track files with pre-generated ray tracing data if the directory does not yet exist

◆ initializeTrackReflections()

void TrackGenerator::initializeTrackReflections ( )
protected

Initializes 2D Track reflections.

This method computes the connecting Tracks for all 2D Tracks in the TrackGenerator analytically, handling both reflective and periodic boundaries.

◆ initializeTracks()

void TrackGenerator::initializeTracks ( )
protectedvirtual

Initializes Track azimuthal angles, start and end Points.

Private class methods

This method computes the azimuthal angles and effective track spacing to use to guarantee cyclic Track wrapping. Based on the angles and spacing, the number of Tracks per angle and the start and end Points for each Track are computed.

◆ initializeTracksArray()

void TrackGenerator::initializeTracksArray ( )

Creates a Track array by increasing uid.

An array is created which indexes Tracks by increasing uid. Parallel groups are also initialized – groups of Tracks that can be computed in parallel without the potential of overwriting angular fluxes of connecting tracks prematurely.

◆ initializeVolumes()

void TrackGenerator::initializeVolumes ( )

Computes the volumes/areas of each Cell and Material in the Geometry.

This computes the volumes/areas of each Cell and Material in the Geometry from the length of track segments crossing each Cell. This routine assigns the volume and number of instances to each Cell and Material. This is a helper routine that is called after track segmentation is complete in TrackGenerator::generateTracks().

◆ leastCommonMultiple()

double TrackGenerator::leastCommonMultiple ( double  a,
double  b 
)

Calculates the least common multiple of two numbers a and b.

Parameters
afirst number
bsecond number (order does not matter)
Returns
the least common multiple of a and b

◆ printTimerReport()

void TrackGenerator::printTimerReport ( bool  mpi_reduce)

Print the track generation timer report.

Parameters
mpi_reducewhether to reduce timer across MPI processes (only once!)

◆ readExtrudedFSRInfo()

void TrackGenerator::readExtrudedFSRInfo ( FILE *  in)
protectedvirtual

Read information of all Extruded FSRs from a file.

Parameters
infile to read from

◆ readSegmentsFromFile()

bool TrackGenerator::readSegmentsFromFile ( )

Reads Tracks in from a "*.tracks" binary file.

Storing Tracks in a binary file saves time by eliminating ray tracing for Track segmentation in commonly simulated geometries.

Returns
true if able to read Tracks in from a file; false otherwise

◆ retrieve2DSegmentCoords()

void TrackGenerator::retrieve2DSegmentCoords ( double *  coords,
long  num_segments 
)

Fills an array with the x,y,z coordinates for each Track segment.

This class method is intended to be called by the OpenMOC Python "plotter" module as a utility to assist in plotting segments. Although this method appears to require two arguments, in reality it only requires one due to SWIG and would be called from within Python as follows:

num_segments = track_generator.getNum2DSegments()
coords = track_generator.retrieve2DSegmentCoords(num_segments*5)
Parameters
coordsan array of coords of length 7 times the number of segments
num_segmentsthe total number of Track segments

◆ retrieve2DTrackCoords()

void TrackGenerator::retrieve2DTrackCoords ( double *  coords,
long  num_tracks 
)

Fills an array with the x,y,z coordinates for each Track.

This class method is intended to be called by the OpenMOC Python "plotter" module as a utility to assist in plotting tracks. Although this method appears to require two arguments, in reality it only requires one due to SWIG and would be called from within Python as follows:

num_tracks = track_generator.getNum2DTracks()
coords = track_generator.retrieve2DTrackCoords(num_tracks*4)
Parameters
coordsan array of coords of length 6 times the number of Tracks
num_tracksthe total number of Tracks

◆ retrieveMaxOpticalLength()

FP_PRECISION TrackGenerator::retrieveMaxOpticalLength ( )

Retrieves the max optical path length of 3D segments for use in on-the-fly computation.

Returns
maximum optical path length

◆ retrieveSegmentCoords()

void TrackGenerator::retrieveSegmentCoords ( double *  coords,
long  num_segments 
)
virtual

Fills an array with the x,y,z coordinates for each Track segment.

This class method is intended to be called by the OpenMOC Python "plotter" module as a utility to assist in plotting segments. Although this method appears to require two arguments, in reality it only requires one due to SWIG and would be called from within Python as follows:

num_segments = track_generator.getNumSegments()
coords = track_generator.retrieveSegmentCoords(num_segments*5)
Parameters
coordsan array of coords of length 7 times the number of segments
num_segmentsthe total number of Track segments

Reimplemented in TrackGenerator3D.

◆ retrieveTrackCoords()

void TrackGenerator::retrieveTrackCoords ( double *  coords,
long  num_tracks 
)
virtual

Fills an array with the x,y,z coordinates for each Track.

This class method is intended to be called by the OpenMOC Python "plotter" module as a utility to assist in plotting tracks. Although this method appears to require two arguments, in reality it only requires one due to SWIG and would be called from within Python as follows:

num_tracks = track_generator.getNumTracks()
coords = track_generator.retrieveTrackCoords(num_tracks*4)
Parameters
coordsan array of coords of length 6 times the number of Tracks
num_tracksthe total number of Tracks

Reimplemented in TrackGenerator3D.

◆ setContainsSegments()

void TrackGenerator::setContainsSegments ( bool  contains_segments)
protectedvirtual

Updates whether the TrackGenerator contains segments.

Parameters
contains_segmentswhether the TrackGenerator contains segments

◆ setDesiredAzimSpacing()

void TrackGenerator::setDesiredAzimSpacing ( double  spacing)

Set the suggested azimuthal track spacing (cm).

Parameters
spacingthe suggested track azimuthal spacing

◆ setDumpSegments()

void TrackGenerator::setDumpSegments ( bool  dump_segments)

Sets a flag to record all segment information in the tracking file.

Parameters
dump_segmentswhether or not to record segment information in the tracking file: true to record, false not to record

◆ setGeometry()

void TrackGenerator::setGeometry ( Geometry geometry)

Set a pointer to the Geometry to use for track generation.

Parameters
geometrya pointer to the Geometry

◆ setMaxNumSegments()

void TrackGenerator::setMaxNumSegments ( int  max_num_segments)

Sets the maximum number of segments per Track.

Parameters
max_num_segmentsthe maximum number of segments per Track

◆ setMaxOpticalLength()

void TrackGenerator::setMaxOpticalLength ( FP_PRECISION  tau)

Sets the max optical path length of 3D segments for use in on-the-fly computation.

Parameters
taumaximum optical path length

◆ setNumAzim()

void TrackGenerator::setNumAzim ( int  num_azim)

Set the number of azimuthal angles in $ [0, 2\pi] $.

Parameters
num_azimthe number of azimuthal angles in $ 2\pi $

◆ setNumThreads()

void TrackGenerator::setNumThreads ( int  num_threads)

Sets the number of shared memory OpenMP threads to use (>0).

Parameters
num_threadsthe number of threads

◆ setQuadrature()

void TrackGenerator::setQuadrature ( Quadrature quadrature)

Sets the Quadrature used for integrating the MOC equations.

Parameters
quadraturea pointer to the Quadrature object used in calculation

◆ setZCoord()

void TrackGenerator::setZCoord ( double  z_coord)

Sets the z-coord of the radial plane used in 2D calculations.

Parameters
z_coordthe z-coord of the radial plane

◆ splitSegments()

void TrackGenerator::splitSegments ( FP_PRECISION  max_optical_length)

Splits Track segments into sub-segments for a user-defined maximum optical length for the problem.

This routine is needed so that all segment lengths fit within the exponential interpolation table used in the MOC transport sweep.

Parameters
max_optical_lengththe maximum optical length

◆ writeExtrudedFSRInfo()

void TrackGenerator::writeExtrudedFSRInfo ( FILE *  out)
protectedvirtual

Write information of all Extruded FSRs to a file TODO Use implementation in 3D track generator.

Parameters
outfile to write to

Member Data Documentation

◆ _azim_spacing

double TrackGenerator::_azim_spacing
protected

The requested track azimuthal spacing (cm)

◆ _contains_2D_segments

bool TrackGenerator::_contains_2D_segments
protected

Boolean indicating whether 2D segments have been generated (true) or not (false)

◆ _contains_2D_tracks

bool TrackGenerator::_contains_2D_tracks
protected

Boolean indicating whether the Tracks have been generated (true) or not (false)

◆ _dump_segments

bool TrackGenerator::_dump_segments
protected

Boolean to indicate whether the segments should be dumped to file

◆ _FSR_locks

omp_lock_t* TrackGenerator::_FSR_locks
protected

OpenMP mutual exclusion locks for atomic FSR operations

◆ _FSR_volumes

FP_PRECISION* TrackGenerator::_FSR_volumes
protected

A buffer holding the computed FSR volumes

◆ _geometry

Geometry* TrackGenerator::_geometry
protected

Pointer to the Geometry

◆ _max_num_segments

int TrackGenerator::_max_num_segments
protected

Maximum number of track segmenets in a single Track

◆ _max_optical_length

FP_PRECISION TrackGenerator::_max_optical_length
protected

Max optical segment length for Tracks before splitting

◆ _num_2D_tracks

int TrackGenerator::_num_2D_tracks
protected

The total number of Tracks for all azimuthal angles

◆ _num_azim

int TrackGenerator::_num_azim
protected

Number of azimuthal angles in $ [0, 2 \pi] $

◆ _num_threads

int TrackGenerator::_num_threads
protected

The number of shared memory OpenMP threads

◆ _num_x

int* TrackGenerator::_num_x
protected

An integer array of the number of Tracks starting on the x-axis for each azimuthal angle

◆ _num_y

int* TrackGenerator::_num_y
protected

An integer array of the number of Tracks starting on the y-axis for each azimuthal angle

◆ _periodic

bool TrackGenerator::_periodic
protected

Boolen to indicate whether a periodic BC exists

◆ _quadrature

Quadrature* TrackGenerator::_quadrature
protected

The quadrature set

◆ _segment_formation

segmentationType TrackGenerator::_segment_formation
protected

Determines the type of track segmentation to use

◆ _segments_centered

bool TrackGenerator::_segments_centered
protected

Boolean to indicate whether the segments have been centered around their centroid or not

◆ _timer

Timer* TrackGenerator::_timer
protected

A timer to record timing data for track generation

◆ _tracks_2D

Track** TrackGenerator::_tracks_2D
protected

A 2D ragged array of 2D tracks (azim, track index)

◆ _tracks_2D_array

Track** TrackGenerator::_tracks_2D_array
protected

A 1D array of Track pointers arranged by UID

◆ _tracks_filename

std::string TrackGenerator::_tracks_filename
protected

Filename for the *.tracks input / output file

◆ _tracks_per_azim

long* TrackGenerator::_tracks_per_azim
protected

A long integer array of the number of Tracks for each azimuthal angle

◆ _use_input_file

bool TrackGenerator::_use_input_file
protected

Boolean for whether to use Track input file (true) or not (false)

◆ _x_min

double TrackGenerator::_x_min
protected

Geometry boundaries for this domain

◆ _z_coord

double TrackGenerator::_z_coord
protected

The z-coord where the 2D Tracks should be created


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