An open source method of characteristics neutron transport code.
|
A Track represents a characteristic line across the geometry. More...
#include "src/Track.h"
Public Member Functions | |
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... | |
Point * | getEnd () |
Returns a pointer to the Track's end Point. More... | |
Point * | getStart () |
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... | |
segment * | getSegment (int s) |
Returns a pointer to a segment with a given index. More... | |
segment * | getSegments () |
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... | |
virtual std::string | toString () |
Convert this Track's attributes to a character array. More... | |
Protected Attributes | |
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 |
A Track represents a characteristic line across the geometry.
A Track has particular starting and ending points on the boundaries of the geometry and an azimuthal and polar angle.
void Track::addSegment | ( | segment * | segment | ) |
int Track::getAzimIndex | ( | ) |
Get a Track's azimuthal angle index.
|
inline |
Returns the boundary condition for the flux along the Track's "reverse" direction.
|
inline |
Returns the boundary condition for the flux along the Track's "forward" direction.
int Track::getDomainBwd | ( | ) |
int Track::getDomainFwd | ( | ) |
|
inline |
int Track::getLinkIndex | ( | ) |
Get a Track's link index.
In generating 3D tracks, we need to know the tracks linking this track with both periodic and reflective boundary conditions. Therefore, we generate a periodic chain of tracks that extend periodically from the y-min to the y-max boundary. This is the index of each track in its' periodic chain.
bool Track::getNextBwdFwd | ( | ) |
Get whether the reflective track in the backward direction is pointing in forward direction.
bool Track::getNextFwdFwd | ( | ) |
Get whether the reflective track in the forward direction is pointing in forward direction.
|
inline |
Return the number of segments along this Track.
|
inline |
Return the Track's azimuthal angle (with respect to the x-axis).
|
inline |
|
inline |
Returns a vector of pointers to the Track's segments.
|
inline |
int Track::getSurfaceIn | ( | ) |
int Track::getSurfaceOut | ( | ) |
long Track::getTrackNextBwd | ( | ) |
Get a pointer to the reflective Track in the backward direction.
long Track::getTrackNextFwd | ( | ) |
Get a pointer to the reflective Track in the forward direction.
long Track::getTrackPrdcBwd | ( | ) |
Get a pointer to the periodic Track in the backward direction.
long Track::getTrackPrdcFwd | ( | ) |
Get a pointer to the periodic Track in the forward direction.
long Track::getTrackReflBwd | ( | ) |
Get a pointer to the reflective Track in the backward direction.
long Track::getTrackReflFwd | ( | ) |
Get a pointer to the reflective Track in the forward direction.
void Track::insertSegment | ( | int | index, |
segment * | segment | ||
) |
Inserts a segment struct into this Track's list of segments.
This method appends the new segment directly behind another segment in the Track. This is a helper method for the TrackGenerator::splitTracks(...) routine.
index | The index of the segment to insert behind in the list |
segment | A pointer to the segment to insert |
void Track::removeSegment | ( | int | index | ) |
Removes a segment from this Track's list of segments.
index | The index of the segment to remove |
void Track::setAzimIndex | ( | int | index | ) |
Set a Track's azimuthal angle index.
index | The azimuthal angle index |
void Track::setBCBwd | ( | const boundaryType | bc_bwd | ) |
Sets the boundary condition for the incoming flux along the Track's "reverse" direction.
The boolean represents vacuum (false) or reflective (true) boundary conditions.
bc_bwd | Boundary condition for the incoming flux in the "reverse" direction |
void Track::setBCFwd | ( | const boundaryType | bc_fwd | ) |
Sets the boundary condition for the incoming flux along the Track's "forward" direction.
The boolean represents vacuum (false) or reflective (true) boundary conditions.
bc_fwd | Boundary condition for the incoming flux in the "forward" direction |
|
virtual |
Set the values for the Track's start and end point.
x0 | the x-coordinate at the starting point |
y0 | the y-coordinate at the starting point |
x1 | the x-coordinate at the ending point |
y1 | the y-coordinate at the ending point |
void Track::setDomainBwd | ( | int | neighbor | ) |
void Track::setDomainFwd | ( | int | neighbor | ) |
void Track::setLinkIndex | ( | int | index | ) |
Set a Track's link index.
In generating 3D tracks, we need to know the tracks linking this track with both periodic and reflective boundary conditions. Therefore, we generate a periodic chain of tracks that extend periodically from the y-min to the y-max boundary. This is the index of each track in its' periodic chain.
index | The link index |
void Track::setNextBwdFwd | ( | bool | fwd | ) |
Set whether the reflective track in the backward direction is pointing in forward direction.
fwd | Boolean indicating whether reflective track in the backward direction is point in forward direction |
void Track::setNextFwdFwd | ( | bool | fwd | ) |
Set whether the reflective track in the forward direction is pointing in forward direction.
fwd | Boolean indicating whether reflective track in the forward direction is point in forward direction |
|
inline |
Sets the number of segments in a track.
This function sets the number of segments in a track. It's purpose is to be used for 3D tracks with on-the-fly ray tracing where segments are not explicitly created, but there is a need to know how many segments exist.
void Track::setPhi | ( | const double | phi | ) |
Set the Track's azimuthal angle.
phi | The azimuthal angle |
void Track::setSurfaceIn | ( | int | surface_in | ) |
void Track::setSurfaceOut | ( | int | surface_out | ) |
void Track::setTrackNextBwd | ( | long | track_id | ) |
Set a pointer to the reflective Track in the backward direction.
track_id | the id of the reflective track in the backward direction |
void Track::setTrackNextFwd | ( | long | track_id | ) |
Set a pointer to the reflective Track in the forward direction.
track_id | the id of the reflective track in the forward direction |
void Track::setTrackPrdcBwd | ( | long | track_id | ) |
Set a pointer to the periodic Track in the backward direction.
track_id | the id of the periodic track in the backward direction |
void Track::setTrackPrdcFwd | ( | long | track_id | ) |
Set a pointer to the periodic Track in the forward direction.
track_id | the id of the periodic track in the forward direction |
void Track::setTrackReflBwd | ( | long | track_id | ) |
Set a pointer to the reflective Track in the backward direction.
track_id | the id of the reflective track in the backward direction |
void Track::setTrackReflFwd | ( | long | track_id | ) |
Set a pointer to the reflective Track in the forward direction.
track_id | the id of the reflective track in the forward direction |
void Track::setUid | ( | int | uid | ) |
|
virtual |
Set the values for the Track's start and end point and angle.
start_x | the x-coordinate at the starting point |
start_y | the y-coordinate at the starting point |
end_x | the x-coordinate at the ending point |
end_y | the y-coordinate at the ending point |
phi | the track's azimuthal angle ( ) |
void Track::setXYIndex | ( | int | index | ) |
|
virtual |
|
protected |
An enum to indicate whether the outgoing angular flux along this Track's "reverse" direction should be zeroed out for vacuum boundary conditions or sent to a periodic or reflective track.
|
protected |
An enum to indicate whether the outgoing angular flux along this Track's "forward" direction should be zeroed out for vacuum boundary conditions or sent to a periodic or reflective track.
|
protected |
Boolean indicating whether the track is pointing fwd (True) or bwd (False) in the cycle of tracks
|
protected |
Domains further along and before the current domain on this Track
|
protected |
Booleans to indicate wheter the reflective Tracks in the forward and and backward direction enter into Tracks pointed in the forward direction.
|
protected |
Number of segments recorded during volume calculation
|
protected |
The azimuthal angle for the Track
|
protected |
A dynamically sized vector of segments making up this Track
|
protected |
Surfaces at the beginning and end of the Track
|
protected |
Pointers to next, reflective, and periodic Tracks in the forward and reverse directions
|
protected |
A monotonically increasing unique ID for each Track created