Celeritas 0.7.0-dev.79+develop.b3dc2e108
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
celeritas::optical::SurfacePhysicsView Class Reference

Optical surface physics data for a track. More...

#include <SurfacePhysicsView.hh>

Classes

struct  Initializer
 

Public Types

Type aliases
using SurfaceParamsRef = NativeCRef< SurfacePhysicsParamsData >
 
using SurfaceStateRef = NativeRef< SurfacePhysicsStateData >
 

Public Member Functions

CELER_FUNCTION SurfacePhysicsView (SurfaceParamsRef const &, SurfaceStateRef const &, TrackSlotId)
 Initialize view from surface physics data and state for a given track.
 
CELER_FUNCTION SurfacePhysicsViewoperator= (Initializer const &)
 Initialize track state with given initializer data.
 
CELER_FUNCTION void reset ()
 Reset the state of a track.
 
CELER_FUNCTION SurfaceId surface () const
 Get geometric surface ID the track is currently on.
 
CELER_FUNCTION SubsurfaceDirection orientation () const
 Get traversal orientation of the current surface.
 
CELER_FUNCTION Real3 constglobal_normal () const
 Get global surface normal.
 
CELER_FUNCTION bool is_crossing_boundary () const
 Whether the track is undergoing boundary crossing.
 
CELER_FUNCTION bool is_exiting (SubsurfaceDirection) const
 Whether the direction is exiting the surface.
 
CELER_FUNCTION bool in_pre_volume () const
 Whether the track is in the pre-volume.
 
CELER_FUNCTION bool in_post_volume () const
 Whether the track is in the post-volume.
 
CELER_FUNCTION SurfaceTrackPosition subsurface_position () const
 Current position of the track in the sub-surfaces, in track-local coordinates.
 
CELER_FUNCTION void subsurface_position (SurfaceTrackPosition)
 Set current position of the track in the sub-surfaces, in track-local coordinates.
 
CELER_FUNCTION SurfaceTrackPosition::size_type num_positions () const
 Get number of valid track positions in the surface.
 
CELER_FUNCTION OptMatId subsurface_material () const
 Return the subsurface material ID of the current track position.
 
CELER_FUNCTION PhysSurfaceId subsurface_interface (SubsurfaceDirection) const
 Get the physics surface ID of the subsurface in the given direction.
 
CELER_FUNCTION SubsurfaceDirection traversal_direction (Real3 const &) const
 Calculate traversal direction from track momentum.
 
CELER_FUNCTION SurfacePhysicsMapView surface_physics_map (SurfacePhysicsOrder, PhysSurfaceId) const
 Get surface model map for the given step and physics surface.
 
CELER_FUNCTION Real3 constfacet_normal () const
 Get local facet normal after roughness sampling.
 
CELER_FUNCTION void facet_normal (Real3 const &)
 Assign local facet normal from roughness sampling.
 
CELER_FUNCTION void cross_subsurface_interface (SubsurfaceDirection)
 Cross the subsurface interface in the given direction.
 
CELER_FUNCTION SurfaceId default_surface () const
 Get the default surface.
 
CELER_FUNCTION ActionId init_boundary_action () const
 Get init-boundary action.
 
CELER_FUNCTION ActionId surface_stepping_action () const
 Get surface stepping loop action.
 
CELER_FUNCTION ActionId post_boundary_action () const
 Get post-boundary action.
 

Detailed Description

Optical surface physics data for a track.

Tracks maintain a position while traversing the interstitial materials of an optical surface. This class provides transformations from this position based on the surface orientation and traversal direction to access relevant material and interface data in storage.

Member Function Documentation

◆ global_normal()

CELER_FUNCTION Real3 const & celeritas::optical::SurfacePhysicsView::global_normal ( ) const
inline

Get global surface normal.

The global surface normal is the normal defined by the geometry and does not include any roughness effects. By convention it points from the post-volume into the pre-volume.

◆ is_crossing_boundary()

CELER_FUNCTION bool celeritas::optical::SurfacePhysicsView::is_crossing_boundary ( ) const
inline

Whether the track is undergoing boundary crossing.

Returns true if there's a valid surface ID, otherwise false.

◆ num_positions()

CELER_FUNCTION SurfaceTrackPosition::size_type celeritas::optical::SurfacePhysicsView::num_positions ( ) const
inline

Get number of valid track positions in the surface.

This is equivalent to the number of interstitial sub-surface materials, plus the pre-volume and post-volumes.

◆ orientation()

CELER_FUNCTION SubsurfaceDirection celeritas::optical::SurfacePhysicsView::orientation ( ) const
inline

Get traversal orientation of the current surface.

Subsurfaces are ordered in storage between two volumes. This orientation specifies if the track is traversing the stored list of sub-surfaces in forward or reverse order.

◆ reset()

CELER_FUNCTION void celeritas::optical::SurfacePhysicsView::reset ( )
inline

Reset the state of a track.

Invalidates the surface ID, indicating the track is no longer undergoing boundary crossing.

◆ subsurface_position()

CELER_FUNCTION SurfaceTrackPosition celeritas::optical::SurfacePhysicsView::subsurface_position ( ) const
inline

Current position of the track in the sub-surfaces, in track-local coordinates.

Tracks traverse a surface in track-local coordinates where 0 is the pre-volume and N is the post-volume. Depending on the surface orientation, this will be mapped to the appropriate sub-surface material and interface.

◆ surface()

CELER_FUNCTION SurfaceId celeritas::optical::SurfacePhysicsView::surface ( ) const
inline

Get geometric surface ID the track is currently on.

The ID is invalid if the track is not undergoing a boundary crossing.


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