20 params.addRequiredParam<FunctionName>(
"distance_function",
21 "The function to sample for the ray distances");
22 params.addRequiredParam<BoundaryName>(
"boundary",
"The boundary to spawn rays from");
23 params.set<
bool>(
"_use_ray_registration") =
false;
29 _distance_function(getFunction(
"distance_function")),
30 _boundary_id(_mesh.
getBoundaryID(getParam<BoundaryName>(
"boundary"))),
31 _generated_rays(declareRestartableData<bool>(
"generated_rays", false)),
33 declareRestartableDataWithContext<
std::vector<
std::shared_ptr<
Ray>>>(
"banked_rays", this))
45 const auto elem = bnd_elem->_elem;
46 const auto side = elem->build_side_ptr(bnd_elem->_side);
47 const auto start_point = side->vertex_average();
50 ray->setStart(start_point, elem, bnd_elem->_side);
51 ray->setStartingDirection(elem->vertex_average() - start_point);
62 const auto start_point = ray->currentPoint();
63 const auto direction = ray->direction();
64 const auto elem = ray->currentElem();
67 ray->clearStartingInfo();
68 ray->setStart(start_point, elem);
69 ray->setStartingDirection(direction);
TestTransientRaysStudy(const InputParameters ¶meters)
const std::vector< std::shared_ptr< Ray > > & rayBank() const
Get the Ray bank.
const BoundaryID _boundary_id
virtual Real & time() const
MooseMesh & _mesh
The Mesh.
const Function & _distance_function
std::shared_ptr< Ray > acquireRay()
User APIs for constructing Rays within the RayTracingStudy.
registerMooseObject("RayTracingTestApp", TestTransientRaysStudy)
std::vector< std::shared_ptr< Ray > > & _banked_rays
BoundaryID getBoundaryID(const BoundaryName &boundary_name, const MeshBase &mesh)
static InputParameters validParams()
Basic datastructure for a ray that will traverse the mesh.
virtual void postExecuteStudy() override
Entry point after study execution.
FEProblemBase & _fe_problem
static InputParameters validParams()
void moveRayToBuffer(std::shared_ptr< Ray > &ray)
Moves a ray to the buffer to be traced during generateRays().
virtual void generateRays() override
Subclasses should override this to determine how to generate Rays.
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement *> * getBoundaryElementRange()
virtual Real value(Real t, const Point &p) const
void moveRaysToBuffer(std::vector< std::shared_ptr< Ray >> &rays)
Moves rays to the buffer to be traced during generateRays().
processor_id_type processor_id() const
Base class for Ray tracing studies that will generate Rays and then propagate all of them to terminat...