Celeritas 0.6.0-129+develop.846910afa
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::orangeinp::Ellipsoid Class Referencefinal

An axis-aligned ellipsoid centered at the origin. More...

#include <IntersectRegion.hh>

Inheritance diagram for celeritas::orangeinp::Ellipsoid:
Inheritance graph
[legend]

Public Member Functions

 Ellipsoid (Real3 const &radii)
 Construct with radius along each Cartesian axis.
 
void build (IntersectSurfaceBuilder &) const final
 Build surfaces.
 
void output (JsonPimpl *) const final
 Write output to the given JSON object.
 
bool encloses (Ellipsoid const &other) const
 Whether this encloses another ellipsoid.
 
Real3 constradii () const
 Radius along each axis.
 
real_type radius (Axis ax) const
 Get the radius along a single axis.
 

Additional Inherited Members

- Protected Member Functions inherited from celeritas::orangeinp::IntersectRegionInterface
 CELER_DEFAULT_COPY_MOVE (IntersectRegionInterface)
 

Detailed Description

An axis-aligned ellipsoid centered at the origin.

The ellipsoid is constructed with the three radial lengths. For a length scale L , the quadric it creates has second-order terms that are \( O(1) \) and a zeroth order term that's \( O(L^2) \). Translations on that length scale will preserve the accuracy of the quadratic solution.

There are many scalings of the quadric equation that produce unitary second-order terms if the ellipsoid's radii are identical:

\[ \frac{k}{r_x^2} x^2 + \frac{k}{r_y^2} y^2 + \frac{k}{r_z^2} z^2 = k \]

but we make the ad hoc decision to choose \( k = \min r_i \max r_i \) to avoid irrational normalization constants, which makes unit tests and output easier to read.

Member Function Documentation

◆ build()

void celeritas::orangeinp::Ellipsoid::build ( IntersectSurfaceBuilder insert_surface) const
finalvirtual

◆ output()

void celeritas::orangeinp::Ellipsoid::output ( JsonPimpl j) const
finalvirtual

Write output to the given JSON object.

Implements celeritas::orangeinp::IntersectRegionInterface.


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