Celeritas  0.5.0-56+6b053cd
Public Member Functions | List of all members
celeritas::test::MockGeoTrackView Class Reference

Mock track view for testing. More...

#include <MockGeoTrackView.hh>

Public Types

Type aliases
using Initializer_t = GeoTrackInitializer
 

Public Member Functions

 MockGeoTrackView ()=default
 Default has uninitialized state.
 
CELER_FUNCTION MockGeoTrackViewoperator= (Initializer_t const &init)
 Construct the state.
 
CELER_FORCEINLINE_FUNCTION VolumeId volume_id () const
 Get the volume ID in the current cell.
 
CELER_FORCEINLINE_FUNCTION bool is_outside () const
 Whether the track is outside the valid geometry region.
 
CELER_FORCEINLINE_FUNCTION bool is_on_boundary () const
 Whether the track is on the boundary of a volume.
 
CELER_FUNCTION Propagation find_next_step (real_type max_step)
 Find the distance to the next geometric boundary.
 
CELER_FUNCTION void move_to_boundary ()
 Move to the next boundary but don't cross yet.
 
CELER_FUNCTION void move_internal (real_type step)
 Move within the current volume. More...
 
CELER_FUNCTION void cross_boundary ()
 Cross from one side of the current surface to the other. More...
 
int init_count () const
 Number of times initialized with a GeoTrackInitializer.
 
CELER_FORCEINLINE_FUNCTION Real3 const & pos () const
 
CELER_FORCEINLINE_FUNCTION Real3 const & dir () const
 

Detailed Description

Mock track view for testing.

The mock track view has boundaries at every integer z, with a volume ID that's equal to the floor of the current position. The geometry is outside for z < 0.

Note
This class is only used by the raytracer test at present, so it doesn't have full functionality. Consider using ORANGE geometry for more complex test cases.

Member Function Documentation

◆ cross_boundary()

CELER_FUNCTION void celeritas::test::MockGeoTrackView::cross_boundary ( )
inline

Cross from one side of the current surface to the other.

The position must be on the boundary following a move-to-boundary.

◆ dir()

CELER_FORCEINLINE_FUNCTION Real3 const& celeritas::test::MockGeoTrackView::dir ( ) const
inline

State accessors

◆ move_internal()

CELER_FUNCTION void celeritas::test::MockGeoTrackView::move_internal ( real_type  dist)
inline

Move within the current volume.

The straight-line distance must be less than the distance to the boundary.

◆ pos()

CELER_FORCEINLINE_FUNCTION Real3 const& celeritas::test::MockGeoTrackView::pos ( ) const
inline

State accessors


The documentation for this class was generated from the following file: