21 params.addParam<std::vector<FunctionName>>(
22 "data_functions", {},
"Functions to use to set the data (if any)");
23 params.addParam<std::vector<FunctionName>>(
24 "aux_data_functions", {},
"Functions to use to set the aux data (if any)");
26 params.set<
bool>(
"_use_ray_registration") =
false;
34 for (
const auto &
function :
getParam<std::vector<FunctionName>>(
"data_functions"))
37 for (
const auto &
function :
getParam<std::vector<FunctionName>>(
"aux_data_functions"))
44 const auto define_ray = [
this](
const auto elem,
const auto & start)
47 ray->setStart(start, elem);
50 ray->data(i) =
function->value(
_t, start);
52 ray->auxData(i) =
function->value(
_t, start);
58 define_ray(elem, elem->vertex_average());
62 const Elem * elem = bnd_elem->_elem;
63 if (elem->processor_id() ==
_pid)
RayDataIndex registerRayData(const std::string &name)
Register a value to be filled in the data on a Ray with a given name.
libMesh::ConstElemRange * getActiveLocalElementRange()
RayDataIndex registerRayAuxData(const std::string &name)
Register a value to be filled in the aux data on a Ray with a given name.
MooseMesh & _mesh
The Mesh.
std::shared_ptr< Ray > acquireRay()
User APIs for constructing Rays within the RayTracingStudy.
virtual void generateRays() override
Subclasses should override this to determine how to generate Rays.
std::vector< std::pair< RayDataIndex, const Function * > > _data_functions
const T & getParam(const std::string &name) const
static InputParameters validParams()
static InputParameters validParams()
StationaryRayStudyTest(const InputParameters ¶meters)
registerMooseObject("RayTracingTestApp", StationaryRayStudyTest)
const Function & getFunctionByName(const FunctionName &name) const
const libMesh::Elem & elemSide(const libMesh::Elem &elem, const unsigned int s, const THREAD_ID tid=0)
Get an element's side pointer without excessive memory allocation.
std::vector< std::pair< RayDataIndex, const Function * > > _aux_data_functions
const processor_id_type _pid
The rank of this processor (this actually takes time to lookup - so just do it once) ...
void moveRayToBuffer(std::shared_ptr< Ray > &ray)
Moves a ray to the buffer to be traced during generateRays().
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement *> * getBoundaryElementRange()
Point vertex_average() const
Base class for Ray tracing studies that will generate Rays and then propagate all of them to terminat...