24 "Obtains a value from the data or aux data of a Ray after tracing has been completed.");
26 params.
addRequiredParam<UserObjectName>(
"study",
"The RayTracingStudy that owns the Ray");
28 "The ID of the Ray to get the value from. This or 'ray_id' must be set.");
30 "ray_name",
"Name of the Ray to get the value from. This or 'ray_name' must be set.");
31 params.
addRequiredParam<std::string>(
"data_name",
"The name of the data to extract from the Ray");
32 params.
addParam<
bool>(
"aux",
false,
"Whether or not the data is an auxiliary value");
40 _aux(getParam<bool>(
"aux")),
41 _ray_name(parameters.isParamSetByUser(
"ray_name") ? &getParam<
std::string>(
"ray_name")
43 _ray_id(parameters.isParamSetByUser(
"ray_id") ? &getParam<
RayID>(
"ray_id") : nullptr)
46 paramError(
"ray_id",
"Either 'ray_id' or 'ray_name' must be set, but not both");
48 mooseError(
"Must have either the 'ray_id' or the 'ray_name' param set.");
53 " does not support Ray registration.\n\nThis is controlled by the "
54 "'_use_ray_registration' private param within the study.");
59 " does not bank Rays on completion.\n\nThis is controlled by the "
60 "'_bank_rays_on_completion' private param within the study.");
67 const auto & data_name = getParam<std::string>(
"data_name");
76 " does not have Ray ",
78 "data associated with the name '",
94 "': Could not find a registered Ray with the name '",
registerMooseObject("RayTracingApp", RayDataValue)
unsigned long int RayID
Type for a Ray's ID.
static InputParameters validParams()
const std::string & type() const
std::string typeAndName() const
const std::string & name() const
void paramError(const std::string ¶m, Args... args) const
void mooseError(Args &&... args) const
Obtains a Ray data or aux data value from a banked ray.
virtual Real getValue() const override
static InputParameters validParams()
virtual void initialize() override
const RayID *const _ray_id
The provided Ray ID (if any)
const RayTracingStudy & _study
The RayTracingStudy.
unsigned int _ray_data_index
The index into the Ray's data that the desired RayVariable is at.
const bool _aux
Whether or not to get auxiliary data (if false, get standard data)
RayDataValue(const InputParameters ¶meters)
const std::string *const _ray_name
The provided Ray name (if any)
Base class for Ray tracing studies that will generate Rays and then propagate all of them to terminat...
RayData getBankedRayData(const RayID ray_id, const RayDataIndex index) const
Gets the data value for a banked ray with a given ID.
bool useRayRegistration() const
Whether or not ray registration is being used.
RayDataIndex getRayDataIndex(const std::string &name, const bool graceful=false) const
Gets the index associated with a registered value in the Ray data.
bool bankRaysOnCompletion() const
Whether or not to bank Rays on completion.
RayID registeredRayID(const std::string &name, const bool graceful=false) const
Gets the ID of a registered ray.
RayData getBankedRayAuxData(const RayID ray_id, const RayDataIndex index) const
Gets the data value for a banked ray with a given ID.
RayDataIndex getRayAuxDataIndex(const std::string &name, const bool graceful=false) const
Gets the index associated with a registered value in the Ray aux data.
static const RayDataIndex INVALID_RAY_DATA_INDEX
Invalid index into a Ray's data.
static const RayID INVALID_RAY_ID
Invalid Ray ID.