|
Celeritas 0.7+d3828f1
|
Wrap a track view for CPU testing and interface validation. More...
#include <WrappedGeoTrackView.hh>

Public Types | |
Type aliases | |
| using | GeoTrackViewT = GTV |
| using | Initializer_t = GeoTrackInitializer |
| using | real_type = typename GTV::real_type |
| using | Real3 = typename GeoTrackInterface< typename GTV::real_type >::Real3 |
Public Types inherited from celeritas::GeoTrackInterface< GTV::real_type > | |
| using | Initializer_t = GeoTrackInitializer |
| using | real_type = GTV::real_type |
| using | Real3 = Array< real_type, 3 > |
Public Member Functions | |
| template<class... Args> | |
| WrappedGeoTrackView (Args &&... args) | |
| Forward construction arguments to the original track view. | |
| WrappedGeoTrackView (WrappedGeoTrackView const &)=delete | |
| WrappedGeoTrackView & | operator= (WrappedGeoTrackView const &)=delete |
| WrappedGeoTrackView (WrappedGeoTrackView &&)=default | |
| WrappedGeoTrackView & | operator= (WrappedGeoTrackView &&)=default |
| GTV const & | track_view () const |
| Access the underlying track view. | |
| GTV & | track_view () |
| Access the underlying track view. | |
| WrappedGeoTrackView & | operator= (Initializer_t const &init) final |
| Initialize the state. | |
| Real3 const & | pos () const final |
| Return the physical position in the global coordinate system. | |
| Real3 const & | dir () const final |
| Return the direction in the global coordinate system. | |
| VolumeId | volume_id () const final |
| Get the canonical volume ID in the current impl volume. | |
| VolumeInstanceId | volume_instance_id () const final |
| Get the physical volume ID in the current cell. | |
| VolumeLevelId | volume_level () const final |
| Get the distance from root volume in the geometry hierarchy. | |
| void | volume_instance_id (Span< VolumeInstanceId > levels) const final |
| Get the volume instance ID for all levels. | |
| ImplVolumeId | impl_volume_id () const final |
| Get the implementation volume ID. | |
| bool | is_outside () const final |
| Whether the track is outside the valid geometry region. | |
| bool | failed () const final |
| Whether the last operation resulted in an error. | |
| bool | is_on_boundary () const final |
| Whether the track is exactly on a surface. | |
| Real3 | normal () const final |
| Calculate the normal vector on the current surface. | |
| GeoStatus | geo_status () const final |
| Derive the geometry state from the existing state flags. | |
| Propagation | find_next_step (real_type max_step) final |
| Find the distance to the next boundary, up to and including a step. | |
| void | move_internal (real_type step) final |
| Move within the volume. | |
| void | move_to_boundary () final |
| Move to the boundary in preparation for crossing it. | |
| void | cross_boundary () final |
| Cross from one side of the current surface to the other. | |
| real_type | find_safety () final |
| Find the safety distance at the current position. | |
| real_type | find_safety (real_type max_step) final |
| Find the safety at the current position, up to a maximum step distance. | |
| void | set_dir (Real3 const &newdir) final |
| Change direction. | |
| void | move_internal (Real3 const &pos) final |
| Move within the volume to a specific point. | |
Public Member Functions inherited from celeritas::GeoTrackInterface< GTV::real_type > | |
| virtual | ~GeoTrackInterface ()=0 |
| Default virtual destructor. | |
| Propagation | find_next_step () |
| Find the distance to the next boundary (infinite max). | |
Additional Inherited Members | |
Protected Member Functions inherited from celeritas::GeoTrackInterface< GTV::real_type > | |
| GeoTrackInterface & | operator= (GeoTrackInterface const &)=default |
| GeoTrackInterface & | operator= (GeoTrackInterface &&)=default |
| GeoTrackInterface (GeoTrackInterface const &)=default | |
| GeoTrackInterface (GeoTrackInterface &&)=default | |
Wrap a track view for CPU testing and interface validation.
|
inlinefinalvirtual |
Cross from one side of the current surface to the other.
Changes the logical state when on the boundary, updating to the next volume.
geo_status() is GeoStatus::boundary_inc . geo_status() is GeoStatus::boundary_out , or GeoStatus::error if the new volume could not be found. Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Return the direction in the global coordinate system.
Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Whether the last operation resulted in an error.
geo_status for GeoStatus::error instead. Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Find the distance to the next boundary, up to and including a step.
Determines the distance to the next boundary along the track's current direction, up to a given distance. Queries may be more efficient for small distances.
geo_status() is not GeoStatus::boundary_inc . (0, max_step] . Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Find the safety distance at the current position.
Determines the distance to the nearest boundary in any direction (i.e., the radius of the maximally inscribed sphere).
deprecated: use find_safety(inf)
Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Find the safety at the current position, up to a maximum step distance.
The resulting safety should be no larger than the maximum step.
is_on_boundary(geo.geo_status()) must be false Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Derive the geometry state from the existing state flags.
This is a shim for geometry implementations that do not natively track the full GeoStatus. When on a boundary, it assumes the normal vector is oriented "outward" from the current volume. The dot product of the track direction and the surface normal determines whether the track is incident to the boundary (positive: headed outward from the volume) or incident (negative: headed into the volume).
Reimplemented from celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Get the implementation volume ID.
Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Whether the track is exactly on a surface.
Returns true if a track is exactly on the boundary of a volume, capable of changing to another volume without altering the physical position.
is_on_boundary(geo.geo_status()) Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Whether the track is outside the valid geometry region.
Returns true if the track has left the world (or started outside the outermost known volume).
geo.geo_status() is not invalid and evaluate is_outside(geo.volume_id()) Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Move within the volume to a specific point.
Changes the physical position of the geometry state without altering the logical state (i.e., it must remain within the current volume).
Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Move within the volume.
Changes the physical position of the geometry state without altering the logical state (i.e., it must remain within the current volume).
step must be less than or equal to the previous find_next_step result and can only be equal if the endpoint is not on a boundary. Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Move to the boundary in preparation for crossing it.
Moves the track to the boundary of the current volume along the current direction, updating its logical state to indicate that it is on the boundary of the current volume.
geo_status() is not GeoStatus::boundary_inc . geo_status() is GeoStatus::boundary_inc . Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Calculate the normal vector on the current surface.
Returns a global-coordinate direction perpendicular to the volume at the local point when on a boundary. The sign of the surface normal is implementation-dependent; it may change based on the track state (previous volume, direction, surface sign) or geometry construction.
is_on_boundary(geo.geo_status()) must be true Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Initialize the state.
Takes a GeoTrackInitializer object to locate the point in the geometry hierarchy.
geo_status() is never GeoStatus::boundary_inc : the result is interior (placed inside a volume), boundary_out (placed on a boundary with direction heading away from it), or error (volume not found). Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Return the physical position in the global coordinate system.
Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Change direction.
Changes the direction of the track (in global coordinate system).
Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Get the canonical volume ID in the current impl volume.
Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Get the physical volume ID in the current cell.
Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Get the volume instance ID for all levels.
Implements celeritas::GeoTrackInterface< GTV::real_type >.
|
inlinefinalvirtual |
Get the distance from root volume in the geometry hierarchy.
Implements celeritas::GeoTrackInterface< GTV::real_type >.