12 #include "libmesh/remote_elem.h" 20 params.addParam<std::string>(
"data_name",
"Name of the data to change");
21 params.addParam<
Real>(
"add_value", 0,
"Value to add to the data");
22 params.addParam<
Real>(
"scale_value", 1,
"Value to scale the data with");
24 params.addParam<
bool>(
"change_start_direction",
26 "Whether or not to change the Ray's start point and direction");
27 params.addParam<
bool>(
"change_direction_zero",
29 "Whether or not to change the Ray's direction to the zero vector");
30 params.addParam<
bool>(
31 "change_start_out_of_elem",
33 "Whether or not to change the Ray's start point to a start out of the current element");
40 _ray_data_index(isParamValid(
"data_name")
41 ? _study.getRayDataIndex(getParam<
std::string>(
"data_name"))
42 :
Ray::INVALID_RAY_DATA_INDEX),
43 _add_value(getParam<
Real>(
"add_value")),
44 _scale_value(getParam<
Real>(
"scale_value"))
59 if (getParam<bool>(
"change_start_direction"))
61 if (getParam<bool>(
"change_direction_zero"))
64 if (getParam<bool>(
"change_start_out_of_elem"))
65 for (
const auto neighbor :
_current_elem->neighbor_ptr_range())
static const RayDataIndex INVALID_RAY_DATA_INDEX
Invalid index into a Ray's data.
ChangeRayRayKernelTest(const InputParameters ¶ms)
static InputParameters validParams()
const std::shared_ptr< Ray > & currentRay() const
Gets the current Ray that this is working on.
const RayDataIndex _ray_data_index
static InputParameters validParams()
registerMooseObject("RayTracingTestApp", ChangeRayRayKernelTest)
const Elem *const & _current_elem
The current Elem that _current_ray is tracing through.
Basic datastructure for a ray that will traverse the mesh.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void onSegment() override
Called on each segment of a Ray.
void changeRayStartDirection(const Point &start, const Point &direction)
Changes the current Ray's start point and direction.
void mooseError(Args &&... args) const
const RemoteElem * remote_elem