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

Solid capped cone (frustum) about the y axis: radius rBottom at y = -halfHeight, radius rTop at y = +halfHeight. 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 piecewise capped-cone form has no gradient worth hand-deriving at this rung).
 

Public Attributes

Real rBottom = Real(1)
 
Real rTop = Real(0.5)
 
Real halfHeight = Real(1)
 

Static Public Attributes

static constexpr bool exact_distance = true
 
static constexpr bool analytic_gradient = false
 

Detailed Description

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

Solid capped cone (frustum) about the y axis: radius rBottom at y = -halfHeight, radius rTop at y = +halfHeight.

Exact Euclidean distance — the two candidate feet are the nearest point on a cap annulus and the nearest point on the lateral segment, and the true distance is the smaller. Set rTop = 0 for a plain cone, rTop = rBottom for a solid cylinder.

Derived from the standard exact capped-cone construction; its exactness is not asserted on authority — the rung-2 gate measures |grad| = 1 and compares against a brute-force nearest point on a dense parametric sampling of the surface.

Definition at line 299 of file primitives.hpp.

Member Typedef Documentation

◆ value_type

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

Definition at line 300 of file primitives.hpp.

Member Function Documentation

◆ eval()

◆ grad()

template<class Real >
PECLET_HD Vec3< Real > peclet::core::geom::prim::Cone< Real >::grad ( Vec3< Real >  p) const
inline

Finite differences over this leaf's own eval (the piecewise capped-cone form has no gradient worth hand-deriving at this rung).

h is dem's 1e-4 probe convention.

Definition at line 330 of file primitives.hpp.

References peclet::core::geom::prim::gradient().

Member Data Documentation

◆ rBottom

template<class Real >
Real peclet::core::geom::prim::Cone< Real >::rBottom = Real(1)

Definition at line 301 of file primitives.hpp.

Referenced by peclet::core::geom::prim::Cone< Real >::eval().

◆ rTop

template<class Real >
Real peclet::core::geom::prim::Cone< Real >::rTop = Real(0.5)

Definition at line 301 of file primitives.hpp.

Referenced by peclet::core::geom::prim::Cone< Real >::eval().

◆ halfHeight

template<class Real >
Real peclet::core::geom::prim::Cone< Real >::halfHeight = Real(1)

Definition at line 301 of file primitives.hpp.

Referenced by peclet::core::geom::prim::Cone< Real >::eval().

◆ exact_distance

template<class Real >
constexpr bool peclet::core::geom::prim::Cone< Real >::exact_distance = true
staticconstexpr

Definition at line 302 of file primitives.hpp.

◆ analytic_gradient

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

Definition at line 303 of file primitives.hpp.


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