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

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CounterKernel()

CounterKernel::CounterKernel ( TrackGenerator track_generator)

Constructor for the CounterKernel assigns default values and calls the MOCKernel constructor.

Parameters
track_generatorthe TrackGenerator used to pull relevant tracking data from

Member Function Documentation

◆ execute()

void CounterKernel::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 
)
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.

Parameters
lengthsegment length
matMaterial associated with the segment
fsr_idthe FSR ID of the FSR associated with the segment

Implements MOCKernel.


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