|
core 1.5.0
Shared MPI block decomposition, asynchronous ghost-layer exchange, SDF geometry, load balancing (header-only C++20)
|
Solid superquadric with semi-axes (rx, ry, rz) and exponent e: the implicit |x/rx|^e + |y/ry|^e + |z/rz|^e = 1.
More...
#include <primitives.hpp>
Public Types | |
| using | value_type = Real |
Public Member Functions | |
| PECLET_HD Real | eval (Vec3< Real > p) const |
| PECLET_HD Vec3< Real > | grad (Vec3< Real > p) const |
| Finite differences over this leaf's own eval (the Taubin estimate has no gradient worth hand-deriving at this rung). | |
Public Attributes | |
| Real | rx = Real(1) |
| Real | ry = Real(1) |
| Real | rz = Real(1) |
| Real | e = Real(2) |
Static Public Attributes | |
| static constexpr bool | exact_distance = false |
| static constexpr bool | analytic_gradient = false |
Solid superquadric with semi-axes (rx, ry, rz) and exponent e: the implicit |x/rx|^e + |y/ry|^e + |z/rz|^e = 1.
e = 2 is an ellipsoid, large e approaches a box, e < 2 gives the pinched/octahedral family. The DEM literature's workhorse non-spherical grain.
NOT an exact distance: the implicit is normalised by its own gradient (the Taubin estimate), which is first-order correct near the surface and degrades away from it. Bound direction is MEASURED by the rung-2 gate, not assumed.
Definition at line 370 of file primitives.hpp.
Definition at line 371 of file primitives.hpp.
Definition at line 376 of file primitives.hpp.
References peclet::core::geom::prim::Superquadric< Real >::e, peclet::core::detail::hdAbs(), peclet::core::detail::hdMax(), peclet::core::detail::hdMin(), peclet::core::detail::hdPow(), peclet::core::detail::hdSqrt(), peclet::core::geom::prim::Superquadric< Real >::rx, peclet::core::geom::prim::Superquadric< Real >::ry, peclet::core::geom::prim::Superquadric< Real >::rz, peclet::core::Vec3< Real >::x, peclet::core::Vec3< Real >::y, and peclet::core::Vec3< Real >::z.
|
inline |
Finite differences over this leaf's own eval (the Taubin estimate has no gradient worth hand-deriving at this rung).
h is dem's 1e-4 probe convention.
Definition at line 398 of file primitives.hpp.
References peclet::core::geom::prim::Superquadric< Real >::e, and peclet::core::geom::prim::gradient().
Definition at line 372 of file primitives.hpp.
Referenced by peclet::core::geom::prim::Superquadric< Real >::eval().
Definition at line 372 of file primitives.hpp.
Referenced by peclet::core::geom::prim::Superquadric< Real >::eval().
Definition at line 372 of file primitives.hpp.
Referenced by peclet::core::geom::prim::Superquadric< Real >::eval().
Definition at line 372 of file primitives.hpp.
Referenced by peclet::core::geom::prim::Superquadric< Real >::eval(), and peclet::core::geom::prim::Superquadric< Real >::grad().
|
staticconstexpr |
Definition at line 373 of file primitives.hpp.
|
staticconstexpr |
Definition at line 374 of file primitives.hpp.