core 1.8.1
Shared MPI block decomposition, asynchronous ghost-layer exchange, SDF geometry, load balancing (header-only C++20)
Loading...
Searching...
No Matches
peclet::core::geom::prim::Superquadric< Real > Struct Template Reference

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

Detailed Description

template<class Real>
struct peclet::core::geom::prim::Superquadric< Real >

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.

Member Typedef Documentation

◆ value_type

template<class Real>
using peclet::core::geom::prim::Superquadric< Real >::value_type = Real

Definition at line 371 of file primitives.hpp.

Member Function Documentation

◆ eval()

◆ grad()

template<class Real>
PECLET_HD Vec3< Real > peclet::core::geom::prim::Superquadric< Real >::grad ( Vec3< Real > p) const
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 e, peclet::core::geom::prim::gradient(), and PECLET_HD.

Referenced by peclet::core::geom::leafGrad().

Member Data Documentation

◆ rx

Definition at line 372 of file primitives.hpp.

Referenced by eval().

◆ ry

Definition at line 372 of file primitives.hpp.

Referenced by eval().

◆ rz

Definition at line 372 of file primitives.hpp.

Referenced by eval().

◆ e

Definition at line 372 of file primitives.hpp.

Referenced by eval(), and grad().

◆ exact_distance

template<class Real>
bool peclet::core::geom::prim::Superquadric< Real >::exact_distance = false
staticconstexpr

Definition at line 373 of file primitives.hpp.

◆ analytic_gradient

template<class Real>
bool peclet::core::geom::prim::Superquadric< Real >::analytic_gradient = false
staticconstexpr

Definition at line 374 of file primitives.hpp.


The documentation for this struct was generated from the following file: