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

A 3D Track represents a characteristic line across the geometry. More...

#include "src/Track3D.h"

Public Member Functions

 Track3D ()
 Constructor initializes Track3D with negative values and indexes.
 
virtual ~Track3D ()
 Destructor.
 
void setValues (const double start_x, const double start_y, const double start_z, const double end_x, const double end_y, const double end_z, const double phi, const double theta)
 Set the values for the Track's start and end point and angle. More...
 
void setTheta (const double theta)
 Set the Track's polar angle. More...
 
void setCoords (double x0, double y0, double z0, double x1, double y1, double z1)
 Set the values for the Track's start and end point. More...
 
void setPolarIndex (int index)
 Set the index for the Track's polar angle index. More...
 
void setZIndex (int index)
 Set the Track's z index into the Track3D stacks array. More...
 
void setLZIndex (int index)
 Set the Track's lz index into the Track3D cycles array. More...
 
void setCycleIndex (int index)
 Set the Track's cycle index into the Track3D cycles array. More...
 
void setCycleTrackIndex (int index)
 Set the index into the reflective Track cycle that this Track lies above. More...
 
void setTrainIndex (int index)
 Set the Track's last index into the Track3D cycles array. More...
 
void setCycleFwd (bool fwd)
 Set a boolean indicating whether the track cycle is going forward along the Track's forward direction. More...
 
double getTheta () const
 Return the Track's polar angle (with respect to the positive z-axis). More...
 
int getPolarIndex ()
 Get the index for the Track's polar angle index. More...
 
int getZIndex ()
 Get the Track's z index into the Track3D stacks array. More...
 
int getLZIndex ()
 Get the Track's lz index into the Track3D cycles array. More...
 
int getCycleIndex ()
 Get the Track's cycle index into the Track3D cycles array. More...
 
int getCycleTrackIndex ()
 Get the index into the reflective Track cycle that this Track lies above. More...
 
int getTrainIndex ()
 Get the Track's last index into the Track3D cycles array. More...
 
bool getCycleFwd ()
 Get a boolean indicating whether the track cycle is going forward along the Track's forward direction. More...
 
std::string toString ()
 Convert this Track's attributes to a character array. More...
 
- Public Member Functions inherited from Track
 Track ()
 Constructor initializes an empty Track.
 
virtual ~Track ()
 Destructor clears the Track segments container.
 
virtual void setValues (const double start_x, const double start_y, const double end_x, const double end_y, const double phi)
 Set the values for the Track's start and end point and angle. More...
 
virtual void setCoords (double x0, double y0, double x1, double y1)
 Set the values for the Track's start and end point. More...
 
void setUid (int uid)
 Initializes a Track's unique ID. More...
 
void setPhi (const double phi)
 Set the Track's azimuthal angle. More...
 
void setBCFwd (const boundaryType bc_fwd)
 Sets the boundary condition for the incoming flux along the Track's "forward" direction. More...
 
void setBCBwd (const boundaryType bc_bwd)
 Sets the boundary condition for the incoming flux along the Track's "reverse" direction. More...
 
void setTrackNextFwd (long track_id)
 Set a pointer to the reflective Track in the forward direction. More...
 
void setTrackNextBwd (long track_id)
 Set a pointer to the reflective Track in the backward direction. More...
 
void setTrackPrdcFwd (long track_id)
 Set a pointer to the periodic Track in the forward direction. More...
 
void setTrackPrdcBwd (long track_id)
 Set a pointer to the periodic Track in the backward direction. More...
 
void setTrackReflFwd (long track_id)
 Set a pointer to the reflective Track in the forward direction. More...
 
void setTrackReflBwd (long track_id)
 Set a pointer to the reflective Track in the backward direction. More...
 
void setNextFwdFwd (bool fwd)
 Set whether the reflective track in the forward direction is pointing in forward direction. More...
 
void setNextBwdFwd (bool fwd)
 Set whether the reflective track in the backward direction is pointing in forward direction. More...
 
void setXYIndex (int index)
 Set the xy index of this Track. More...
 
void setAzimIndex (int index)
 Set a Track's azimuthal angle index. More...
 
void setSurfaceIn (int surface_in)
 Set the surface at which the Track starts. More...
 
void setSurfaceOut (int surface_out)
 Set the surface at which the Track ends. More...
 
void setDomainFwd (int neighbor)
 Set the domain at the end of the Track in the forward direction. More...
 
void setDomainBwd (int neighbor)
 Set the domain at the end of the Track in the backward direction. More...
 
void setLinkIndex (int index)
 Set a Track's link index. More...
 
int getUid ()
 Return the Track's unique ID. More...
 
PointgetEnd ()
 Returns a pointer to the Track's end Point. More...
 
PointgetStart ()
 Returns a pointer to the Track's start Point. More...
 
double getPhi () const
 Return the Track's azimuthal angle (with respect to the x-axis). More...
 
double getLength ()
 Return the Track's length. More...
 
long getTrackNextFwd ()
 Get a pointer to the reflective Track in the forward direction. More...
 
long getTrackNextBwd ()
 Get a pointer to the reflective Track in the backward direction. More...
 
long getTrackPrdcFwd ()
 Get a pointer to the periodic Track in the forward direction. More...
 
long getTrackPrdcBwd ()
 Get a pointer to the periodic Track in the backward direction. More...
 
long getTrackReflFwd ()
 Get a pointer to the reflective Track in the forward direction. More...
 
long getTrackReflBwd ()
 Get a pointer to the reflective Track in the backward direction. More...
 
bool getNextFwdFwd ()
 Get whether the reflective track in the forward direction is pointing in forward direction. More...
 
bool getNextBwdFwd ()
 Get whether the reflective track in the backward direction is pointing in forward direction. More...
 
int getXYIndex ()
 Get the xy index of this Track. More...
 
int getAzimIndex ()
 Get a Track's azimuthal angle index. More...
 
int getLinkIndex ()
 Get a Track's link index. More...
 
boundaryType getBCFwd () const
 Returns the boundary condition for the flux along the Track's "forward" direction. More...
 
boundaryType getBCBwd () const
 Returns the boundary condition for the flux along the Track's "reverse" direction. More...
 
segmentgetSegment (int s)
 Returns a pointer to a segment with a given index. More...
 
segmentgetSegments ()
 Returns a vector of pointers to the Track's segments. More...
 
int getNumSegments ()
 Return the number of segments along this Track. More...
 
int getDomainFwd ()
 Get the domain connected at the front end of the Track. More...
 
int getDomainBwd ()
 Get the domain connected at the back end of the Track. More...
 
int getSurfaceIn ()
 Get the surface from which the track originates in the domain. More...
 
int getSurfaceOut ()
 Get the surface at which the Track ends in the domain. More...
 
void addSegment (segment *segment)
 Adds a segment to this Track's list of segments. More...
 
void removeSegment (int index)
 Removes a segment from this Track's list of segments. More...
 
void insertSegment (int index, segment *segment)
 Inserts a segment struct into this Track's list of segments. More...
 
void clearSegments ()
 Deletes each of this Track's segments.
 
void setNumSegments (int num_segments)
 Sets the number of segments in a track. More...
 

Protected Attributes

double _theta
 
int _polar_index
 
int _z_index
 
int _lz_index
 
int _cycle_index
 
int _cycle_track_index
 
int _train_index
 
bool _cycle_fwd
 
- Protected Attributes inherited from Track
int _uid
 
Point _start
 
Point _end
 
double _phi
 
std::vector< segment_segments
 
int _num_segments
 
boundaryType _bc_fwd
 
boundaryType _bc_bwd
 
int _azim_index
 
int _xy_index
 
int _link_index
 
long _track_next_fwd
 
long _track_next_bwd
 
long _track_prdc_fwd
 
long _track_prdc_bwd
 
long _track_refl_fwd
 
long _track_refl_bwd
 
bool _next_fwd_fwd
 
bool _next_bwd_fwd
 
bool _direction_in_cycle
 
int _surface_in
 
int _surface_out
 
int _domain_fwd
 
int _domain_bwd
 

Detailed Description

A 3D Track represents a characteristic line across the geometry.

A 3D Track has particular starting and ending points on the boundaries of the geometry and an azimuthal and polar angle.

Member Function Documentation

◆ getCycleFwd()

bool Track3D::getCycleFwd ( )

Get a boolean indicating whether the track cycle is going forward along the Track's forward direction.

Returns
A boolean indicating whether the track cycle is going forward along the Track's forward direction.

◆ getCycleIndex()

int Track3D::getCycleIndex ( )

Get the Track's cycle index into the Track3D cycles array.

Returns
The Track's cycle index.

◆ getCycleTrackIndex()

int Track3D::getCycleTrackIndex ( )

Get the index into the reflective Track cycle that this Track lies above.

Returns
The Track's index into the reflective Track cycle that this Track lies above.

◆ getLZIndex()

int Track3D::getLZIndex ( )

Get the Track's lz index into the Track3D cycles array.

Returns
The Track's ;z index.

◆ getPolarIndex()

int Track3D::getPolarIndex ( )

Get the index for the Track's polar angle index.

The polar angle index corresponds to an array of all polar angles for $ \theta \in [0, \pi] $ owned by the TrackGenerator class.

Returns
The polar angle index

◆ getTheta()

double Track3D::getTheta ( ) const

Return the Track's polar angle (with respect to the positive z-axis).

Returns
the polar angle $ \theta \in [0, \frac{\pi}{2}] $

◆ getTrainIndex()

int Track3D::getTrainIndex ( )

Get the Track's last index into the Track3D cycles array.

Returns
The Track's last index into the Track3D cycles array.

◆ getZIndex()

int Track3D::getZIndex ( )

Get the Track's z index into the Track3D stacks array.

Returns
The Track's z index.

◆ setCoords()

void Track3D::setCoords ( double  x0,
double  y0,
double  z0,
double  x1,
double  y1,
double  z1 
)

Set the values for the Track's start and end point.

Parameters
x0the x-coordinate at the starting point
y0the y-coordinate at the starting point
z0the z-coordinate at the starting point
x1the x-coordinate at the ending point
y1the y-coordinate at the ending point
z1the z-coordinate at the ending point

◆ setCycleFwd()

void Track3D::setCycleFwd ( bool  fwd)

Set a boolean indicating whether the track cycle is going forward along the Track's forward direction.

Parameters
fwdA boolean indicating whether the track cycle is going forward along the Track's forward direction.

◆ setCycleIndex()

void Track3D::setCycleIndex ( int  index)

Set the Track's cycle index into the Track3D cycles array.

Parameters
indexThe Track's cycle index.

◆ setCycleTrackIndex()

void Track3D::setCycleTrackIndex ( int  index)

Set the index into the reflective Track cycle that this Track lies above.

Parameters
indexThe Track's index into the reflective Track cycle that this Track lies above.

◆ setLZIndex()

void Track3D::setLZIndex ( int  index)

Set the Track's lz index into the Track3D cycles array.

Parameters
indexThe Track's lz index.

◆ setPolarIndex()

void Track3D::setPolarIndex ( int  index)

Set the index for the Track's polar angle index.

The polar angle index corresponds to an array of all polar angles for $ \theta \in [0, \pi] $ owned by the TrackGenerator class.

Parameters
indexThe polar angle index

◆ setTheta()

void Track3D::setTheta ( const double  theta)

Set the Track's polar angle.

Parameters
thetaThe polar angle

◆ setTrainIndex()

void Track3D::setTrainIndex ( int  index)

Set the Track's last index into the Track3D cycles array.

Parameters
indexThe Track's last index into the Track3D cycles array.

◆ setValues()

void Track3D::setValues ( const double  start_x,
const double  start_y,
const double  start_z,
const double  end_x,
const double  end_y,
const double  end_z,
const double  phi,
const double  theta 
)

Set the values for the Track's start and end point and angle.

Parameters
start_xthe x-coordinate at the starting point
start_ythe y-coordinate at the starting point
start_zthe z-coordinate at the starting point
end_xthe x-coordinate at the ending point
end_ythe y-coordinate at the ending point
end_zthe z-coordinate at the ending point
phithe track's azimuthal angle ( $ \phi \in [0, 2 \pi] $)
thetathe track's polar angle ( $ \theta \in [0, \pi] $)

◆ setZIndex()

void Track3D::setZIndex ( int  index)

Set the Track's z index into the Track3D stacks array.

Parameters
indexThe Track's z index.

◆ toString()

std::string Track3D::toString ( )
virtual

Convert this Track's attributes to a character array.

The character array returned includes the Track's starting and ending coordinates, the azimuthal angle and azimuthal weight.

Returns
a character array of this Track's attributes

Reimplemented from Track.

Member Data Documentation

◆ _cycle_fwd

bool Track3D::_cycle_fwd
protected

Boolean to indicate whether track is in the same direction as the reflective track cycle.

◆ _theta

double Track3D::_theta
protected

The polar angle for the Track


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