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

Go to the source code of this file.

Classes

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

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

Typedefs

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

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 736 of file Ray.C.

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

◆ dataStore()

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

Definition at line 711 of file Ray.C.

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