Skip to content

Five of seven primitives do not declare bound_inclusive, so they cannot be used with RadialTransformQuadrature #116

Closed

Description

@susilehtola

RadialTransformQuadrature reads base_quad_traits::bound_inclusive:

// quadratures/radial/radial_transform.hpp
const auto npts_base   = base_quad_traits::bound_inclusive ? npts+2 : npts;
const auto ipts_offset = !!base_quad_traits::bound_inclusive;

but only two of the seven primitives declare it:

primitive declares bound_inclusive
gausschebyshev1 no
gausschebyshev2 yes
gausschebyshev2modified no
gausschebyshev3 no
gausslegendre no
gausslobatto no
uniform yes

So a radial transform can currently be composed only with GaussChebyshev2
or Uniform. Anything else fails to compile:

error: 'bound_inclusive' is not a member of 'base_quad_traits'

This matters because the README presents radial quadratures as "convolutions
of primitive quadrature rules with a radial transformation scheme", which
reads as a composition matrix; in practice five of the seven primitives
cannot be composed at all.

The correct value is whether the rule places nodes on the interval endpoints:
false for the open rules (gausschebyshev1, gausschebyshev2modified,
gausschebyshev3, gausslegendre) and true for gausslobatto, which
includes both endpoints by construction. gausslobatto is the one that
matters beyond bookkeeping — it is the only primitive here whose value is
true, and it is the natural base for a Gauss-Lobatto x uniform-phi product
sphere rule.

A structural note worth considering separately: a defaulted member in a
traits base, rather than one required in every specialization, would stop this
class of omission recurring. As it stands the requirement is duck-typed and a
new primitive silently fails only when someone tries to compose it.

Reported by a downstream consumer adding Köster's parameter-free radial
mapping (r(x) = ln(2/(1-x))/ln 2) on top of GaussChebyshev2Modified, which
had to assemble the quadrature directly from the primitive rather than through
RadialTransformQuadrature.

Activity

  1. added a commit that references this issue on Oct 12, 2026
    f4af7ca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions