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::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 46 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 51 of file Ray.h.

◆ RayID

typedef unsigned long int RayID

Type for a Ray's ID.

Definition at line 43 of file Ray.h.

Function Documentation

◆ dataLoad()

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

Definition at line 724 of file Ray.C.

725 {
726  mooseAssert(context, "Missing RayTracingStudy context");
727  RayTracingStudy * study = static_cast<RayTracingStudy *>(context);
728 
729  RayID id;
730  loadHelper(stream, id, context);
731  ray = study->acquireRayInternal(id,
732  /* data_size = */ 0,
733  /* aux_data_size = */ 0,
734  /* reset = */ true,
736 
737  loadHelper(stream, ray->_current_point, context);
738  loadHelper(stream, ray->_direction, context);
739  dof_id_type current_elem_id;
740  loadHelper(stream, current_elem_id, context);
741  ray->_current_elem = study->meshBase().query_elem_ptr(current_elem_id);
742  loadHelper(stream, ray->_current_incoming_side, context);
743  loadHelper(stream, ray->_end_set, context);
744  loadHelper(stream, ray->_processor_crossings, context);
745  loadHelper(stream, ray->_intersections, context);
746  loadHelper(stream, ray->_trajectory_changes, context);
747  loadHelper(stream, ray->_trajectory_changed, context);
748  loadHelper(stream, ray->_distance, context);
749  loadHelper(stream, ray->_max_distance, context);
750  loadHelper(stream, ray->_should_continue, context);
751  loadHelper(stream, ray->_data, context);
752  loadHelper(stream, ray->_aux_data, context);
753 
754  if (ray->hasTraced())
755  mooseAssert(!study->currentlyGenerating() && !study->currentlyPropagating(),
756  "Cannot not load a Ray that has already traced during generation or propagation; "
757  "reset the Ray first");
758 }
bool currentlyGenerating() const
Whether or not the study is generating.
unsigned long int RayID
Type for a Ray&#39;s ID.
Definition: Ray.h:43
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 699 of file Ray.C.

700 {
701  mooseAssert(ray, "Null ray");
702  mooseAssert(context, "Missing RayTracingStudy context");
703  mooseAssert(static_cast<RayTracingStudy *>(context) == &ray->study(), "Different study");
704 
705  storeHelper(stream, ray->_id, context);
706  storeHelper(stream, ray->_current_point, context);
707  storeHelper(stream, ray->_direction, context);
708  auto current_elem_id = ray->currentElem() ? ray->currentElem()->id() : DofObject::invalid_id;
709  storeHelper(stream, current_elem_id, context);
710  storeHelper(stream, ray->_current_incoming_side, context);
711  storeHelper(stream, ray->_end_set, context);
712  storeHelper(stream, ray->_processor_crossings, context);
713  storeHelper(stream, ray->_intersections, context);
714  storeHelper(stream, ray->_trajectory_changes, context);
715  storeHelper(stream, ray->_trajectory_changed, context);
716  storeHelper(stream, ray->_distance, context);
717  storeHelper(stream, ray->_max_distance, context);
718  storeHelper(stream, ray->_should_continue, context);
719  storeHelper(stream, ray->_data, context);
720  storeHelper(stream, ray->_aux_data, context);
721 }
void storeHelper(std::ostream &stream, P &data, void *context)