Celeritas 0.6.0-rc.2.10+develop.de0a3a05
|
A finite z-aligned cone with an elliptical cross section. More...
#include <IntersectRegion.hh>
Public Member Functions | |
EllipticalCone (Real2 const &lower_radii, Real2 const &upper_radii, real_type halfheight) | |
Construct with lower/upper x- and y-radii and half-height in z. | |
void | build (IntersectSurfaceBuilder &) const final |
Build surfaces. | |
void | output (JsonPimpl *) const final |
Write output to the given JSON object. | |
bool | encloses (EllipticalCone const &other) const |
Whether this encloses another elliptical cone. | |
Real2 const & | lower_radii () const |
Radii along the x- and y-axes at z=-hh. | |
Real2 const & | upper_radii () const |
Radii along the x- and y-axes at z=-hh. | |
real_type | halfheight () const |
Half-height along Z. | |
Additional Inherited Members | |
![]() | |
CELER_DEFAULT_COPY_MOVE (IntersectRegionInterface) | |
A finite z-aligned cone with an elliptical cross section.
The elliptical cone is defined in an analogous fashion to the regular (i.e., circular) cone. A half-height (hh) defines the z-extents, such that the centroid of the outer bounding box is the origin. The lower radii are the x- and y-radii at the plane z = -hh. The upper radii are the x- and y-radii at the plane z = hh. There are several restrictions on these radii:
1) Either the lower or upper radii may be (0, 0); this is the only permitted way for the elliptical cone to include the vertex. 2) The aspect ratio of the elliptical cross sections is constant. Thus, the aspect ratio at z = -hh must equal the aspect ratio at z = hh. 3) Degenerate elliptical cones with lower_radii == upper_radii (i.e., elliptical cylinders) are not permitted. 4) Degenerate elliptical cones where lower or upper radii are equal to (0, x) or (x, 0), where x is non-zero, are not permitted.
The elliptical surface can be expressed as:
\[ (x/r_x)^2 + (y/r_y)^2 = (v-z)^2, \]
which can be converted to SimpleQuadric form:
(1/r_x)^2 x^2 + (1/r_y)^2 y^2 + (-1) z^2 + (2v) z + (-v^2) = 0. | | | | | a b c d e *
where v is the location of the vertex. The r_x, r_y, and v can be calculated from the lower and upper radii as given by G4EllipticalCone:
r_x = (lower_radii[X] - upper_radii[X])/(2 hh), r_y = (lower_radii[Y] - upper_radii[Y])/(2 hh), v = hh (lower_radii[X] + upper_radii[X])/(lower_radii[X] - upper_radii[X]). *
|
finalvirtual |
Build surfaces.
Implements celeritas::orangeinp::IntersectRegionInterface.
Write output to the given JSON object.
Implements celeritas::orangeinp::IntersectRegionInterface.