|
Mundy: Multibody Nonlocal Dynamics Version of the Day
|
Quasi-uniform surface quadrature on a unit-radius spherocylinder. More...
Classes | |
| class | mundy::QuasiUniformSpherocylinder< Scalar, Ntheta, AspectRatio > |
| Quasi-uniform surface rule for a unit-radius spherocylinder of cylindrical length AspectRatio. More... | |
Namespaces | |
| namespace | mundy |
Functions | |
| template<class Scalar> | |
| void | mundy::quasi_uniform_spherocylinder_rule (unsigned ntheta, double aspect_ratio, std::vector< Scalar > &points, std::vector< Scalar > &weights) |
| The quasi-uniform spherocylinder rule with run-time resolution and aspect ratio, into std::vectors. | |
| template<class PointsView, class WeightsView> | |
| void | mundy::quasi_uniform_spherocylinder_rule (unsigned ntheta, double aspect_ratio, PointsView &points, WeightsView &weights) |
| The quasi-uniform spherocylinder rule with run-time resolution and aspect ratio, into Kokkos::View. | |
The cylindrical surface is discretized into Nz axial rings, each containing Ntheta equally spaced circumferential nodes, with successive rings azimuthally staggered. Each hemispherical endcap is discretized using a Fibonacci lattice of Ncap approximately uniformly distributed nodes, constructed by uniformly spacing points in the cosine of the polar angle and incrementing the azimuth by the golden angle.
The number of axial rings and endcap nodes is determined by matching their nominal surface spacing to the circumferential spacing, h = 2 pi / Ntheta, giving Nz = round(AspectRatio / h) and Ncap = round(2 pi / h^2). For AspectRatio = 0, Nz = 0; otherwise at least one cylindrical ring is used.
The reference spherocylinder has radius 1 and cylindrical length AspectRatio, aligned with the z-axis. Points are (x, y, z) triples ordered cylinder, north cap, and south cap. For a physical radius a and cylindrical length L = a * AspectRatio, scale the points by a and the weights by a^2.
Unlike Gaussian quadrature, this rule prioritizes approximately uniform surface spacing rather than polynomial exactness. Points and weights are computed at compile time using double-double arithmetic before rounding to Scalar. Construction requires C++20 floating-point non-type template parameters.