Radial Interval-sampled Build And Extents
Pseudocode
Start from one
RadialBasisSpec. The front-door radial recipe chooses:- family
- one public extent:
rmaxorcount - mapping
- reference spacing
- seed-window parameters
- optional
xgaussiansupplement
Code:
src/bases.jlSeparate the public extent from the internal extents. The current contract is:
rmax: public last-center extentbuild_umax: internal setup/build extent in mappeduquadrature_umax: internal active quadrature extent in mappedu
Code:
src/bases.jl,src/quadrature.jlDetermine the internal build target in reference/mapped space. The construction logic derives:
- odd-count seed window
- internal build/setup extent
- setup grid extent large enough for localization and cleanup
Code:
src/bases.jlBuild the setup-grid sampled layer with interval support, not dense full columns. For each shifted seed gausslet and each injected
xgaussian, construct a setup-grid object only on the interval where it is numerically active. Code:src/bases.jlUse the runtime machine-significant family support for that setup layer. The runtime family tables are trimmed after the last coefficient with
abs(c) >= 1e-17, while the full high-precision family tables remain in the repo as internal reference data. Code:src/families.jl,src/internal/families_high_prec.jlAssemble the seed overlap and position data by overlap-range weighted dot products. The interval-sampled layer supplies:
- seed Gram matrices
- seed position matrices
- seed-to-
xgaussiancross terms
without storing long dense zero-tail columns. Code:
src/bases.jlKeep the later dense seed-space linear algebra unchanged. The present radial build still does:
- odd/even cleanup
- delta-direction removal
- COMX localization
- final QR/sign-fix flow
- primitive contraction into the public
RadialBasis
Code:
src/bases.jlBuild the final public basis in the same form as before. The interval-sampled objects are construction-time helpers only. Once the final localized basis is formed, they are discarded and the public result is the ordinary
RadialBasis. Code:src/bases.jlDerive the default quadrature extent from retained support, not setup padding. The current automatic rule takes:
- retained radial centers
- runtime family support width
- retained
xgaussiansupport
and builds
quadrature_umaxfrom those active retained objects. Code:src/bases.jl,src/quadrature.jlBuild the physical quadrature grid from that retained-support extent. The automatic default path maps
quadrature_umaxto physical space and refines until the public-quality quadrature checks are satisfied.quadrature_rmaxremains only as an expert override. Code:src/quadrature.jl,src/diagnostics.jl
References
- Supporting notes:
docs/radial_extent_policy_note.mddocs/radial_trust_milestone_note.mddocs/radial_default_path_cache_study.md
What This Builds
This page records the current trusted radial construction route:
- fast interval-sampled basis construction
- public
rmaxsemantics separated from internal numerical extents - automatic quadrature extent derived from retained support
It is the current source-of-truth algorithm page for the radial front door.
Current Repo Status
The repo now has the radial line in the state described on this page:
- runtime family tables use machine-significant tails
- full high-precision family tables are preserved internally for reference
- basis construction uses interval-sampled setup-grid objects
- the standard radial path is no longer dominated by
build_basis rmax,build_umax, andquadrature_umaxare now distinct concepts in both code and docs
The normal public story is therefore:
- users choose
rmax - the library owns
build_umax - the library owns
quadrature_umax
Why This Matters
This algorithm page replaces two older confusions:
- treating
rmaxas if it directly set every internal extent - treating the old dense setup-grid build as if it were the defining radial algorithm rather than an implementation bottleneck
The present route is both faster and conceptually cleaner.
Code Map
The current trusted radial path is split across three files:
src/bases.jl_select_construction_data(...)build-grid selection and refinement framing for steps3and7_seed_scalar_integrals(...)setup-grid seed sampling used by the interval-sampled layer in steps4and6_xgaussian_sample_matrix(...)setup-gridxgaussiansampling in steps4and6_build_radial_coefficients(...)main radial construction path for steps3-8_radial_overlap_deviation(...)construction-quality gate used during grid refinementbuild_basis(spec::RadialBasisSpec; ...)public front door for the whole build route
src/quadrature.jlradial_quadrature(basis::RadialBasis; ...)automatic retained-support quadrature construction for steps9and10
src/diagnostics.jlbasis_diagnostics(basis::RadialBasis; ...)public diagnostics path sharing the same automatic quadrature policy
The code-comment linkage on this line is still lighter than on the QW route. This page is the main source-of-truth for tightening it further.
Implementation Notes
Recommended code-comment style:
# Alg Radial-Build step 4: Sample shifted seeds and xgaussians only on their
# active setup-grid intervals.
# See docs/src/algorithms/radial_interval_sampled_build_and_extents.md.Guidelines:
- keep step numbers aligned with this page
- use this page for the trusted radial build/extents contract
- keep cache-policy or milestone numerics in supporting notes rather than growing this page into a status log