Skip to content

Export Weighted and document axisymmetric weighted integration by parts - #66

Merged
xtalax merged 1 commit into
masterfrom
feat/export-weighted
Nov 6, 2026
Merged

xtalax merged 1 commit into
masterfrom
feat/export-weighted

Conversation

@xtalax-droid

Copy link
Copy Markdown
Collaborator

ibp = Dict(eq => Weighted(r)) is the integration-by-parts policy for axisymmetric problems in (r, z), but it needed using PDEBase.StrongForm: Weighted. This re-exports Weighted from FiniteElementMethod and documents it.

  • src/FiniteElementMethod.jl: using PDEBase.StrongForm: Weighted and export Weighted. Weighted is @public in PDEBase.StrongForm and exists at the compat floor 0.1.40.
  • test/qa/qa.jl: :Weighted joins reexports_allow next to the other PDEBase names (MeshDomain, Region, boundarypiece). Without it, the "No unapproved public reexports" check fails.
  • docs/src/discretization.md: new section "Weighted and axisymmetric problems". It explains what Weighted(w) does (the equation is tested with w v before integration by parts; w = r turns (1/r) ∂ᵣ(r ∂ᵣu) into the divergence ∇⋅(r ∇u) with a symmetric stiffness and no product-rule correction; the axis term vanishes so the axis piece goes in natural; Weighted(r^2) for the spherical Laplacian; the continuity equation of axisymmetric flow is weighted by r the same way) and gives a complete axisymmetric heat-equation example with a manufactured solution. PDEBase's docstring is not pulled into api.md, because its @ref links to IBPPolicy cannot resolve in these docs and would fail the build.
  • test/shared/frontend_tests/weighted.jl (run by the Frontend group): checks the export, then solves u_t = (1/r)(r u_r)_r + u_zz + f in (r, z) with P2 on triangles at n = 4, 8 and 16, with the manufactured solution exp(-t - r² - z²) and ibp = Dict(eq => Weighted(r)), using only the exported name. Relative max nodal errors 4.64e-3, 6.68e-4 and 8.64e-5, rates 2.80 and 2.95 (asserted above 2.7).

Verified (Julia 1.12): docs build exits 0 with no missing docs, Runic 1.13 clean, Core, QA and Frontend pass; the new test also passes on Julia 1.10.12 with PDEBase pinned to 0.1.40 (Weighted === PDEBase.StrongForm.Weighted, 8 of 8, same errors and rates; only PDEBase was pinned to its floor, not every dependency). Codex found nothing. CI is the verification for the full downgrade.

Risks: the continuity-equation sentence in the docs is not covered by a test here (it restates the pattern of the draft axisymmetric docs example, which this page does not link to); the doc example uses FiniteElementMethod.rectangle_grid, which is not exported, matching the style of the page. The draft docs example #63 imports Weighted from PDEBase.StrongForm; that import becomes redundant but harmless once this merges.


🤖 Posted by an AI agent · harness: Claude Code 2.1.318 · model: claude-sonnet-5-5
Review: unreviewed
Session: 43e03fde-3384-4386-bae9-03e81f19ba7c

ibp = Dict(eq => Weighted(r)) needed using PDEBase.StrongForm: Weighted. Re-export it, allow it in the QA re-export check, document it in the Discretization page and test it on an axisymmetric heat equation with P2 elements.

Agent-Harness: Claude Code 2.1.318
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
master c3e274f... master / c3e274f...
construction/heat P1 10x10 5.37 ± 0.51 ms 5.57 ± 0.79 ms 0.964 ± 0.16
construction/heat P1 20x20 7.93 ± 0.58 ms 8.67 ± 0.99 ms 0.915 ± 0.12
time_to_load 4.09 ± 0.1 s 4.27 ± 0.21 s 0.959 ± 0.052
Memory benchmarks
master c3e274f... master / c3e274f...
construction/heat P1 10x10 0.0393 M allocs: 2.11 MB 0.0393 M allocs: 2.11 MB 1
construction/heat P1 20x20 0.0702 M allocs: 4.73 MB 0.0702 M allocs: 4.73 MB 1
time_to_load 0.2 k allocs: 11.8 kB 0.2 k allocs: 11.8 kB 1

@xtalax
xtalax merged commit 30c7793 into master Nov 6, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants