https://mooseframework.inl.gov
Classes | Namespaces | Typedefs | Functions
Ray.h File Reference

Go to the source code of this file.

Classes

class  MooseUtils::SharedPool< class >
 
class  Ray
 Basic datastructure for a ray that will traverse the mesh. More...
 
class  Ray::ChangeDirectionKey
 Class that is used as a parameter to changeDirection() that allows only RayBC methods to call changeDirection() More...
 
class  Ray::ChangeStartDirectionKey
 Class that is used as a parameter to changeStartDirection() that allows only RayKernelBase methods to call changeStartDirection() More...
 
class  Ray::ChangePointElemSideKey
 Class that is used as a parameter to changePointElem() that allows only PeriodicRayBC methods to call changeStartDirection() More...
 
class  Ray::ConstructRayKey
 Class that is used as a parameter to the public constructors/reset methods. More...
 
class  libMesh::Parallel::Packing< std::shared_ptr< Ray > >
 

Namespaces

 libMesh
 The following methods are specializations for using the Parallel::packed_range_* routines for a vector of Rays.
 
 MooseUtils
 
 libMesh::Parallel
 

Typedefs

typedef unsigned long int RayID
 Type for a Ray's ID. More...
 
typedef float RayData
 Type for a Ray's data. More...
 
typedef unsigned int RayDataIndex
 Type for the index into the data and aux data on a Ray. More...
 

Functions

void dataStore (std::ostream &stream, std::shared_ptr< Ray > &ray, void *context)
 
void dataLoad (std::istream &stream, std::shared_ptr< Ray > &ray, void *context)
 

Typedef Documentation

◆ RayData

Type for a Ray's data.

Definition at line 47 of file Ray.h.

◆ RayDataIndex

typedef unsigned int RayDataIndex

Type for the index into the data and aux data on a Ray.

Definition at line 52 of file Ray.h.

◆ RayID

typedef unsigned long int RayID

Type for a Ray's ID.

Definition at line 44 of file Ray.h.

Function Documentation

◆ dataLoad()

void dataLoad ( std::istream &  stream,
std::shared_ptr< Ray > &  ray,
void context 
)

Definition at line 738 of file Ray.C.

739 {
740  mooseAssert(context, "Missing RayTracingStudy context");
741  RayTracingStudy * study = static_cast<RayTracingStudy *>(context);
742 
743  RayID id;
744  loadHelper(stream, id, context);
745  ray = study->acquireRayInternal(id,
746  /* data_size = */ 0,
747  /* aux_data_size = */ 0,
748  /* reset = */ true,
750 
751  loadHelper(stream, ray->_current_point, context);
752  loadHelper(stream, ray->_direction, context);
753  dof_id_type current_elem_id;
754  loadHelper(stream, current_elem_id, context);
755  ray->_current_elem = study->meshBase().query_elem_ptr(current_elem_id);
756  loadHelper(stream, ray->_current_incoming_side, context);
757  loadHelper(stream, ray->_trajectory_changed, context);
758  loadHelper(stream, ray->_end_set, context);
759  loadHelper(stream, ray->_should_continue, context);
760  loadHelper(stream, ray->_processor_crossings, context);
761  loadHelper(stream, ray->_intersections, context);
762  loadHelper(stream, ray->_trajectory_changes, context);
763  loadHelper(stream, ray->_distance, context);
764  loadHelper(stream, ray->_max_distance, context);
765  loadHelper(stream, ray->_data, context);
766  loadHelper(stream, ray->_aux_data, context);
767 
768  if (ray->hasTraced())
769  mooseAssert(!study->currentlyGenerating() && !study->currentlyPropagating(),
770  "Cannot not load a Ray that has already traced during generation or propagation; "
771  "reset the Ray first");
772 }
bool currentlyGenerating() const
Whether or not the study is generating.
unsigned long int RayID
Type for a Ray&#39;s ID.
Definition: Ray.h:44
std::shared_ptr< Ray > acquireRayInternal(const RayID id, const std::size_t data_size, const std::size_t aux_data_size, const bool reset, const AcquireRayInternalKey &)
Key that is used for restricting access to acquireRayInternal().
virtual const Elem * query_elem_ptr(const dof_id_type i) const=0
bool currentlyPropagating() const
Whether or not the study is propagating (tracing Rays)
MeshBase & meshBase() const
Access to the libMesh MeshBase.
void loadHelper(std::istream &stream, P &data, void *context)
uint8_t dof_id_type
Base class for Ray tracing studies that will generate Rays and then propagate all of them to terminat...

◆ dataStore()

void dataStore ( std::ostream &  stream,
std::shared_ptr< Ray > &  ray,
void context 
)

Definition at line 713 of file Ray.C.

714 {
715  mooseAssert(ray, "Null ray");
716  mooseAssert(context, "Missing RayTracingStudy context");
717  mooseAssert(static_cast<RayTracingStudy *>(context) == &ray->study(), "Different study");
718 
719  storeHelper(stream, ray->_id, context);
720  storeHelper(stream, ray->_current_point, context);
721  storeHelper(stream, ray->_direction, context);
722  auto current_elem_id = ray->currentElem() ? ray->currentElem()->id() : DofObject::invalid_id;
723  storeHelper(stream, current_elem_id, context);
724  storeHelper(stream, ray->_current_incoming_side, context);
725  storeHelper(stream, ray->_trajectory_changed, context);
726  storeHelper(stream, ray->_end_set, context);
727  storeHelper(stream, ray->_should_continue, context);
728  storeHelper(stream, ray->_processor_crossings, context);
729  storeHelper(stream, ray->_intersections, context);
730  storeHelper(stream, ray->_trajectory_changes, context);
731  storeHelper(stream, ray->_distance, context);
732  storeHelper(stream, ray->_max_distance, context);
733  storeHelper(stream, ray->_data, context);
734  storeHelper(stream, ray->_aux_data, context);
735 }
void storeHelper(std::ostream &stream, P &data, void *context)