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

Calculates the volume in FSRs by adding weighted segment lengths. More...

#include "src/MOCKernel.h"

Public Member Functions

 VolumeKernel (TrackGenerator *track_generator)
 Constructor for the VolumeKernel assigns default values, calls the MOCKernel constructor, and pulls references to FSR locks and FSR volumes from the provided TrackGenerator. More...
 
void newTrack (Track *track)
 Prepares a VolumeKernel for a new Track. 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)
 Adds segment contribution to the FSR volume. 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...
 

Additional Inherited Members

- Protected Attributes inherited from MOCKernel
int _count
 
FP_PRECISION _max_tau
 
int _num_groups
 

Detailed Description

Calculates the volume in FSRs by adding weighted segment lengths.

A VolumeKernel inherets from MOCKernel and is a kernel which is initialized with a pointer to floating point data and adds the product of the length and the weight to the floating point data at an input index. The weight corresponds to the weight of the track associated with the segments.

Constructor & Destructor Documentation

◆ VolumeKernel()

VolumeKernel::VolumeKernel ( TrackGenerator track_generator)

Constructor for the VolumeKernel assigns default values, calls the MOCKernel constructor, and pulls references to FSR locks and FSR volumes from the provided TrackGenerator.

Parameters
track_generatorthe TrackGenerator used to pull relevant tracking data from

Member Function Documentation

◆ execute()

void VolumeKernel::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

Adds segment contribution to the FSR volume.

The VolumeKernel execute function adds the product of the track length and track weight to the buffer array at index id, referring to the array of FSR volumes.

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

Implements MOCKernel.

◆ newTrack()

void VolumeKernel::newTrack ( Track track)
virtual

Prepares a VolumeKernel for a new Track.

Resets the segment count and updates the weight for the new Track

Parameters
trackThe new Track the MOCKernel prepares to handle

Reimplemented from MOCKernel.


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