25 params.addParam<std::vector<std::string>>(
"depends_on",
26 "Other RayBCs that this RayBC depends on");
28 params.registerBase(
"RayBoundaryCondition");
29 params.registerSystemAttributeName(
"RayBoundaryCondition");
32 params.suppressParameter<
bool>(
"implicit");
41 _current_intersection_point(_trace_ray.currentIntersectionPoint()),
42 _current_bnd_id(_trace_ray.currentBoundaryID())
46 for (
const auto &
name : getParam<std::vector<std::string>>(
"depends_on"))
57 if (!ray->shouldContinue())
58 mooseError(
"Cannot changeRayDirection() for a Ray that should not continue\n\n",
61 if (!skip_changed_check && ray->trajectoryChanged())
62 mooseError(
"Cannot change direction for a ray whose direction has already been changed\n\n",
66 mooseError(
"Cannot change the direction of a Ray whose end point is set upon generation "
67 "(via setStartingEndPoint()).\n\n",
79 std::shared_ptr<Ray> ray =
82 ray->setStartingDirection(direction);
91 "Should not move Rays into buffer while not propagating");
static InputParameters validParams()
const std::string & name() const
void mooseError(Args &&... args) const
std::shared_ptr< Ray > acquireRay(const Point &direction)
Acquires a Ray to be used for generating a new Ray while tracing on the boundary.
void changeRayDirection(const Point &direction, const bool skip_changed_check=false)
Changes the current Ray's direction.
static InputParameters validParams()
RayBoundaryConditionBase(const InputParameters ¶ms)
virtual ~RayBoundaryConditionBase()
const Point & _current_intersection_point
The current intersection point on the boundary.
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...
Base class for a MooseObject used in ray tracing.
const THREAD_ID _tid
The thread id.
static InputParameters validParams()
void dependsOn(const std::string name)
Add an object of this classes base type that this class depends on.
RayTracingStudy & _study
The RayTracingStudy associated with this object.
const unsigned short & _current_intersected_side
The side that _current_ray intersects (if any)
const std::shared_ptr< Ray > & currentRay() const
Gets the current Ray that this is working on.
const Elem *const & _current_elem
The current Elem that _current_ray is tracing through.
Key that is used for restricting access to moveRayToBufferDuringTrace() and acquireRayDuringTrace().
void moveRayToBufferDuringTrace(std::shared_ptr< Ray > &ray, const THREAD_ID tid, const AcquireMoveDuringTraceKey &)
INTERNAL method for moving a Ray into the buffer during tracing.
std::shared_ptr< Ray > acquireRayDuringTrace(const THREAD_ID tid, const AcquireMoveDuringTraceKey &)
INTERNAL methods for acquiring a Ray during a trace in RayKernels and RayBCs.
bool currentlyPropagating() const
Whether or not the study is propagating (tracing Rays)
Class that is used as a parameter to changeDirection() that allows only RayBC methods to call changeD...