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 '",
const RayID *const _ray_id
The provided Ray ID (if any)
static const RayDataIndex INVALID_RAY_DATA_INDEX
Invalid index into a Ray's data.
unsigned long int RayID
Type for a Ray's ID.
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.
virtual Real getValue() const override
virtual const std::string & name() const
RayDataIndex getRayAuxDataIndex(const std::string &name, const bool graceful=false) const
Gets the index associated with a registered value in the Ray aux data.
RayDataValue(const InputParameters ¶meters)
static InputParameters validParams()
const std::string & type() const
const std::string *const _ray_name
The provided Ray name (if any)
std::string typeAndName() const
void paramError(const std::string ¶m, Args... args) const
Obtains a Ray data or aux data value from a banked ray.
const RayTracingStudy & _study
The RayTracingStudy.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const bool _aux
Whether or not to get auxiliary data (if false, get standard data)
static InputParameters validParams()
virtual void initialize() override
bool bankRaysOnCompletion() const
Whether or not to bank Rays on completion.
RayData getBankedRayAuxData(const RayID ray_id, const RayDataIndex index) const
Gets the data value for a banked ray with a given ID.
void mooseError(Args &&... args) const
RayID registeredRayID(const std::string &name, const bool graceful=false) const
Gets the ID of a registered ray.
registerMooseObject("RayTracingApp", RayDataValue)
unsigned int _ray_data_index
The index into the Ray's data that the desired RayVariable is at.
RayDataIndex getRayDataIndex(const std::string &name, const bool graceful=false) const
Gets the index associated with a registered value in the Ray data.
static const RayID INVALID_RAY_ID
Invalid Ray ID.
Base class for Ray tracing studies that will generate Rays and then propagate all of them to terminat...