Celeritas 0.7-develop+db9a1d4
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
celeritas::CylCentered< T > Class Template Reference

Axis-aligned cylinder centered about the origin. More...

#include <CylCentered.hh>

Public Member Functions

 CylCentered (real_type radius)
 Construct with radius.
 
template<class R >
 CylCentered (Span< R, StorageSpan::extent >)
 Construct from raw data.
 
real_type radius_sq () const
 Get the square of the radius.
 
StorageSpan data () const
 Get a view to the data for type-deleted storage.
 
SignedSense calc_sense (Real3 const &pos) const
 Determine the sense of the position relative to this surface.
 
real_type calc_value (Real3 const &pos) const
 Evaluate the cylinder expression at a point.
 
Intersections calc_intersections (Real3 const &pos, Real3 const &dir, SurfaceState on_surface) const
 Calculate all possible straight-line intersections with this surface.
 
Real3 calc_normal (Real3 const &pos) const
 Calculate outward normal at a position.
 
Gradient calc_gradient (Real3 const &pos) const
 Calculate the gradient at a point.
 
real_type calc_safety (Real3 const &pos) const
 Calculate the distance to the nearest point on the surface.
 

Static Public Member Functions

static CylCentered from_radius_sq (real_type rsq)
 Construct from the square of the radius.
 

Type aliases

using Intersections = Array< real_type, 2 >
 Surface type identifier.
 
using StorageSpan = Span< real_type const, 1 >
 Surface type identifier.
 
using Gradient = detail::ScaledReal3< detail::Quadratic >
 Surface type identifier.
 
static constexpr SurfaceType surface_type ()
 Surface type identifier.
 
static constexpr bool simple_safety ()
 Safety is intersection along surface normal.
 
static constexpr Axis t_axis ()
 
static constexpr Axis u_axis ()
 Surface type identifier.
 
static constexpr Axis v_axis ()
 Surface type identifier.
 

Detailed Description

template<Axis T>
class celeritas::CylCentered< T >

Axis-aligned cylinder centered about the origin.

The cylinder is centered along an Axis template parameter.

For a cylinder along the x axis:

\[ y^2 + z^2 - R^2 = 0 \]

This is an optimization of the Cyl. The motivations are:

Member Function Documentation

◆ calc_safety()

template<Axis T>
real_type celeritas::CylCentered< T >::calc_safety ( Real3 const &  pos) const
inline

Calculate the distance to the nearest point on the surface.

This is the magnitude of the radial displacement from the surface: \( | |\mathbf{x} - \mathbf{x}_0| - R | \) in the plane perpendicular to the axis.

◆ from_radius_sq()

template<Axis T>
CylCentered< T > celeritas::CylCentered< T >::from_radius_sq ( real_type  rsq)
inlinestatic

Construct from the square of the radius.

This is used for surface simplification.

◆ t_axis()

template<Axis T>
static constexpr Axis celeritas::CylCentered< T >::t_axis ( )
inlinestaticconstexpr

Axes


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