An open source method of characteristics neutron transport code.
|
An MOCKernel object specifies a functionality to apply to MOC segments. More...
#include "src/MOCKernel.h"
Public Member Functions | |
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... | |
virtual 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)=0 |
Protected Attributes | |
int | _count |
FP_PRECISION | _max_tau |
int | _num_groups |
An MOCKernel object specifies a functionality to apply to MOC segments.
An MOCKernel is an object that owns some specified data and contains an "execute" function which applies some functionality to the data. This is useful in MOC where it is very common to apply some function to segment data in either a nested loop structure or from on-the-fly calculations. Kernels specify the actions applied to the segments, reducing the need for repeated code. This class is the parent class of CounterKernel, VolumeKernel, and SegmentationKernel. A generic MOCKernel should not be explicity instantiated. Instead, an inhereting class should be instantiated which describes the "execute" function.
MOCKernel::MOCKernel | ( | TrackGenerator * | track_generator | ) |
Constructor for the MOCKernel assigns default values.
track_generator | the TrackGenerator used to pull relevant tracking data from |
int MOCKernel::getCount | ( | ) |
Reads and returns the current count.
MOC kernels count how many times they are accessed. This value returns the value of the counter (number of execute accesses) since kernel creation or last call to newTrack.
|
virtual |
Prepares an MOCKernel for a new Track.
Resets the segment count
Reimplemented in TransportKernel, and VolumeKernel.
void MOCKernel::setMaxOpticalLength | ( | FP_PRECISION | max_tau | ) |
Resets the maximum optcal path length for a segment.
MOC kernels ensure that there are no segments with an optical path length greater than the maximum optical path length by splitting them when they get too large.
max_tau | the maximum optical path length for a segment |
|
protected |
Count referring to the segment number
|
protected |
Maximum optical path length when forming segments
|
protected |
Number of energy groups in the current problem