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

Applies transport equations to segment data. More...

#include "src/MOCKernel.h"

Public Member Functions

 TransportKernel (TrackGenerator *track_generator)
 Constructor for the TransportKernel. More...
 
virtual ~TransportKernel ()
 Destructor for the TransportKernel.
 
void newTrack (Track *track)
 Create a new track3D from an existing one. More...
 
void setCPUSolver (CPUSolver *cpu_solver)
 Sets a pointer to the CPUSolver to enable use of transport functions. More...
 
void setTrackFlux (FP_PRECISION *fwd_flux, FP_PRECISION *bwd_flux, int track_id)
 
void setTrackIndexes (int azim_index, int polar_index)
 
void setDirection (bool direction)
 Sets the direction of the current track. More...
 
bool getDirection ()
 Returns the direction of the current 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)
 Apply MOC equations, tally fluxes and tally CMFD currents. More...
 
void post ()
 Obtain and transfer the boundary track angular fluxes.
 
- 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

Applies transport equations to segment data.

A TransportKernel inherets from MOCKernel and is a kernel which is initialized with a pointer to a CPU Solver. Input data of the "execute" function is used to apply the MOC equations in CPUSolver.

Constructor & Destructor Documentation

◆ TransportKernel()

TransportKernel::TransportKernel ( TrackGenerator track_generator)

Constructor for the TransportKernel.

Parameters
track_generatorthe TrackGenerator used to pull relevant tracking data from

Member Function Documentation

◆ execute()

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

Apply MOC equations, tally fluxes and tally CMFD currents.

Parameters
lengthlength of the segment
matpointer to the Material around the segment
fsr_idid of the FSR the segment lies in
track_idxid of the track
cmfd_surface_fwdCMFD surface at the end of the segment in the forward direction
cmfd_surface_bwdCMFD surface at the end of the segment in the backward direction
x_startx coordinate of the start of the segment
y_starty coordinate of the start of the segment
z_startz coordinate of the start of the sement
phiazimuthal angle of this segment
thetapolar angle of this segment

Implements MOCKernel.

◆ getDirection()

bool TransportKernel::getDirection ( )

Returns the direction of the current track.

Returns
_direction the direction of the track: true = Forward, false = Backward

◆ newTrack()

void TransportKernel::newTrack ( Track track)
virtual

Create a new track3D from an existing one.

Parameters
tracktrack to create the new track from

Reimplemented from MOCKernel.

◆ setCPUSolver()

void TransportKernel::setCPUSolver ( CPUSolver cpu_solver)

Sets a pointer to the CPUSolver to enable use of transport functions.

Parameters
cpu_solverpointer to the CPUSolver

◆ setDirection()

void TransportKernel::setDirection ( bool  direction)

Sets the direction of the current track.

Parameters
directionthe direction of the track: true = Forward, false = Backward

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