24 params.addParam<std::vector<std::string>>(
"depends_on",
25 "Other RayKernels that this RayKernel depends on");
27 params.registerBase(
"RayKernel");
28 params.registerSystemAttributeName(
"RayKernel");
33 params.addPrivateParam<
bool>(
"_need_segment_reinit",
false);
45 _current_segment_start(_trace_ray.currentIncomingPoint()),
46 _current_segment_end(_trace_ray.currentIntersectionPoint()),
47 _current_segment_length(_trace_ray.currentIntersectionDistance()),
48 _current_incoming_side(_trace_ray.currentIncomingSide()),
49 _need_segment_reinit(getParam<bool>(
"_need_segment_reinit"))
53 for (
const auto &
name :
getParam<std::vector<std::string>>(
"depends_on"))
69 if (!ray->shouldContinue())
71 if (ray->endSet() && ray->atEnd())
72 mooseError(
"Cannot changeRayStartDirection() for a Ray that should not continue.\n\n",
73 "It has also hit its user-set end point.\n\n",
76 mooseError(
"Cannot changeRayStartDirection() for a Ray that should not continue.\n\n",
80 if (ray->trajectoryChanged())
81 mooseError(
"Cannot change a Ray's trajectory when its trajectory has already been changed\n\n",
85 mooseError(
"Cannot change the direction of a Ray whose end point is set upon generation " 86 "(via setStartingEndPoint()).\n\n",
90 mooseError(
"A Ray's start point was changed within a RayKernel, and said start point\n",
91 "is not within the element that the RayKernel was executed on.\n\n",
103 std::shared_ptr<Ray> ray =
106 ray->setStartingDirection(direction);
115 "Should not move Rays into buffer while not propagating");
static const unsigned short invalid_side
Identifier for an invalid side index.
void moveRayToBufferDuringTrace(std::shared_ptr< Ray > &ray, const THREAD_ID tid, const AcquireMoveDuringTraceKey &)
INTERNAL method for moving a Ray into the buffer during tracing.
Base class for a MooseObject used in ray tracing.
void moveRayToBuffer(std::shared_ptr< Ray > &ray)
Moves a Ray into the working buffer to be traced during tracing with a meaningful error on verificati...
virtual void preTrace()
Called at the beginning of the trace on this processor/thread for a Ray.
const std::shared_ptr< Ray > & currentRay() const
Gets the current Ray that this is working on.
static InputParameters validParams()
Key that is used for restricting access to moveRayToBufferDuringTrace() and acquireRayDuringTrace().
std::shared_ptr< Ray > acquireRayDuringTrace(const THREAD_ID tid, const AcquireMoveDuringTraceKey &)
INTERNAL methods for acquiring a Ray during a trace in RayKernels and RayBCs.
virtual const std::string & name() const
static InputParameters validParams()
bool isParamValid(const std::string &name) const
bool verifyRays() const
Whether or not to verify if Rays have valid information before being traced.
std::shared_ptr< Ray > acquireRay(const Point &start, const Point &direction)
Acquires a Ray to be used for generating a new Ray while tracing on the boundary. ...
static InputParameters validParams()
const Elem *const & _current_elem
The current Elem that _current_ray is tracing through.
static InputParameters validParams()
static InputParameters validParams()
const T & getParam(const std::string &name) const
const THREAD_ID _tid
The thread id.
RayKernelBase(const InputParameters ¶ms)
void statefulPropertiesAllowed(bool)
void dependsOn(const std::string name)
Add an object of this classes base type that this class depends on.
bool currentlyPropagating() const
Whether or not the study is propagating (tracing Rays)
const std::set< BoundaryID > EMPTY_BOUNDARY_IDS
Class that is used as a parameter to changeStartDirection() that allows only RayKernelBase methods to...
void changeRayStartDirection(const Point &start, const Point &direction)
Changes the current Ray's start point and direction.
void mooseError(Args &&... args) const
RayTracingStudy & _study
The RayTracingStudy associated with this object.
virtual void postTrace()
This method is called once a ray has reached the end of its trace.