An open source method of characteristics neutron transport code.
|
Counts the number of segments of a track. More...
#include "src/MOCKernel.h"
Public Member Functions | |
CounterKernel (TrackGenerator *track_generator) | |
Constructor for the CounterKernel assigns default values and calls the MOCKernel constructor. More... | |
void | execute (FP_PRECISION length, Material *mat, long fsr_id, int track_idx, int cmfd_surface_fwd, int cmfd_surface_bwd, FP_PRECISION x_start, FP_PRECISION y_start, FP_PRECISION z_start, FP_PRECISION phi, FP_PRECISION theta) |
Increments the counter for the number of segments on the track. More... | |
Public Member Functions inherited from MOCKernel | |
MOCKernel (TrackGenerator *track_generator) | |
Constructor for the MOCKernel assigns default values. More... | |
virtual | ~MOCKernel () |
Destructor for MOCKernel. | |
int | getCount () |
Reads and returns the current count. More... | |
void | setMaxOpticalLength (FP_PRECISION max_tau) |
Resets the maximum optcal path length for a segment. More... | |
virtual void | newTrack (Track *track) |
Prepares an MOCKernel for a new Track. More... | |
Additional Inherited Members | |
Protected Attributes inherited from MOCKernel | |
int | _count |
FP_PRECISION | _max_tau |
int | _num_groups |
Counts the number of segments of a track.
A CounterKernel inherets from MOCKernel and is a kernel which counts the number of segments in a track by incrementing the _count variable by the number of legitimate segment lengths (less than the max optical path length) in the input length.
CounterKernel::CounterKernel | ( | TrackGenerator * | track_generator | ) |
Constructor for the CounterKernel assigns default values and calls the MOCKernel constructor.
track_generator | the TrackGenerator used to pull relevant tracking data from |
|
virtual |
Increments the counter for the number of segments on the track.
The CounterKernel execute function counts the number of segments in a track by incrementing the counter variable upon execution. Due to restrictions on maximum optical path length, the counter may be incremented by more than one to account for splitting of the segment into segments of allowed optical path length.
length | segment length |
mat | Material associated with the segment |
fsr_id | the FSR ID of the FSR associated with the segment |
Implements MOCKernel.