https://mooseframework.inl.gov
Public Member Functions | Public Attributes | List of all members
TraceData Struct Reference

Data structure that stores information for output of a partial trace of a Ray on a processor. More...

#include <TraceData.h>

Public Member Functions

 TraceData (const std::shared_ptr< Ray > &ray)
 
void addPoint (const libMesh::Point &point)
 
TracePointDatalastPoint ()
 
bool stationary () const
 
unsigned int numSegments () const
 

Public Attributes

const RayID _ray_id
 The Ray ID. More...
 
const unsigned long int _intersections
 The number of intersections thus far. More...
 
const unsigned int _processor_crossings
 Number of processor crossings thus far. More...
 
const unsigned int _trajectory_changes
 Number of trajectory changes thus far. More...
 
bool _last
 Whether or not this was the last set of segments for this Ray. More...
 
std::vector< TracePointData_point_data
 The data for each point along the track. More...
 

Detailed Description

Data structure that stores information for output of a partial trace of a Ray on a processor.

Definition at line 42 of file TraceData.h.

Constructor & Destructor Documentation

◆ TraceData()

TraceData::TraceData ( const std::shared_ptr< Ray > &  ray)
inline

Definition at line 44 of file TraceData.h.

45  : _ray_id(ray->id()),
46  _intersections(ray->intersections()),
47  _processor_crossings(ray->processorCrossings()),
48  _trajectory_changes(ray->trajectoryChanges()),
49  _last(false)
50  {
51  mooseAssert(_ray_id != Ray::INVALID_RAY_ID, "Invalid Ray ID");
52  addPoint(ray->currentPoint());
53  }
const unsigned long int _intersections
The number of intersections thus far.
Definition: TraceData.h:70
const unsigned int _processor_crossings
Number of processor crossings thus far.
Definition: TraceData.h:72
void addPoint(const libMesh::Point &point)
Definition: TraceData.h:55
const unsigned int _trajectory_changes
Number of trajectory changes thus far.
Definition: TraceData.h:74
const RayID _ray_id
The Ray ID.
Definition: TraceData.h:68
bool _last
Whether or not this was the last set of segments for this Ray.
Definition: TraceData.h:76
static const RayID INVALID_RAY_ID
Invalid Ray ID.
Definition: Ray.h:202

Member Function Documentation

◆ addPoint()

void TraceData::addPoint ( const libMesh::Point point)
inline

Definition at line 55 of file TraceData.h.

Referenced by TraceRay::continueTraceOffProcessor(), TraceRay::onCompleteTrace(), TraceRay::onContinueTrace(), TraceRay::onTrajectoryChanged(), and TraceData().

55 { _point_data.emplace_back(point); }
std::vector< TracePointData > _point_data
The data for each point along the track.
Definition: TraceData.h:78

◆ lastPoint()

TracePointData& TraceData::lastPoint ( )
inline

Definition at line 57 of file TraceData.h.

Referenced by TraceRay::continueTraceOffProcessor(), TraceRay::onCompleteTrace(), TraceRay::onContinueTrace(), TraceRay::onTrajectoryChanged(), and TraceRay::trace().

57 { return _point_data.back(); }
std::vector< TracePointData > _point_data
The data for each point along the track.
Definition: TraceData.h:78

◆ numSegments()

unsigned int TraceData::numSegments ( ) const
inline

Definition at line 61 of file TraceData.h.

62  {
63  mooseAssert(!_point_data.empty(), "Should not be empty");
64  return _point_data.size() - 1;
65  }
std::vector< TracePointData > _point_data
The data for each point along the track.
Definition: TraceData.h:78

◆ stationary()

bool TraceData::stationary ( ) const
inline

Definition at line 59 of file TraceData.h.

Referenced by TraceRay::onCompleteTrace(), and RayTracingMeshOutput::startingIDs().

59 { return _last && _intersections == 0 && _point_data.size() == 1; }
const unsigned long int _intersections
The number of intersections thus far.
Definition: TraceData.h:70
bool _last
Whether or not this was the last set of segments for this Ray.
Definition: TraceData.h:76
std::vector< TracePointData > _point_data
The data for each point along the track.
Definition: TraceData.h:78

Member Data Documentation

◆ _intersections

const unsigned long int TraceData::_intersections

The number of intersections thus far.

Definition at line 70 of file TraceData.h.

Referenced by RayTracingMeshOutput::neededNodes(), RayTracingMeshOutput::startingIDs(), and stationary().

◆ _last

bool TraceData::_last

Whether or not this was the last set of segments for this Ray.

Definition at line 76 of file TraceData.h.

Referenced by TraceRay::onCompleteTrace(), and stationary().

◆ _point_data

std::vector<TracePointData> TraceData::_point_data

The data for each point along the track.

Definition at line 78 of file TraceData.h.

Referenced by addPoint(), lastPoint(), RayTracingMeshOutput::neededNodes(), numSegments(), and stationary().

◆ _processor_crossings

const unsigned int TraceData::_processor_crossings

Number of processor crossings thus far.

Definition at line 72 of file TraceData.h.

Referenced by RayTracingMeshOutput::neededNodes(), and RayTracingMeshOutput::startingIDs().

◆ _ray_id

const RayID TraceData::_ray_id

The Ray ID.

Definition at line 68 of file TraceData.h.

Referenced by RayTracingMeshOutput::startingIDs(), and TraceData().

◆ _trajectory_changes

const unsigned int TraceData::_trajectory_changes

Number of trajectory changes thus far.

Definition at line 74 of file TraceData.h.

Referenced by RayTracingMeshOutput::neededNodes(), and RayTracingMeshOutput::startingIDs().


The documentation for this struct was generated from the following file: