Skip to content

Fix BUG-012, BUG-014: quadrature-rule load inputs and whole-cell QuadPointEvaluator state - #102

Merged
KnutAM merged 1 commit into
KnutAM:mainfrom
knutambot:cb/BUG012-014
Sep 30, 2026
Merged

KnutAM merged 1 commit into
KnutAM:mainfrom
knutambot:cb/BUG012-014

Conversation

@knutambot

Copy link
Copy Markdown
Contributor

Summary

  • BUG-012: BodyLoad/Neumann documented QuadratureRule/FacetQuadratureRule inputs had no implementation - autogenerate_cellvalues/autogenerate_facetvalues only handled an integer order or an existing values object. Added the missing methods, and fixed Neumann's docstring which incorrectly named its boundary quadrature-rule input QuadratureRule instead of FacetQuadratureRule.
  • BUG-014: function-based QuadPointEvaluator rejected whole-cell (non-vector) states, unlike SimpleIntegrator. Reused the existing _get_qp_state helper so both accept the same state shapes.

Test plan

  • Pkg.test() — all green (LoadHandler 44/44, up from 42; QuadPointEvaluator 115/115, up from 112)
  • docs/make.jl full build (executes every tutorial/how-to) — clean, no doctest failures
  • Reviewed via dual-review workflow: Codex plan review and resumed final-diff review both returned NO_FINDINGS

🤖 Generated with Claude Code

https://claude.ai/code/session_01KySgpVgJ5fWR9AvPK1JQoU

…PointEvaluator state

BUG-012: `autogenerate_cellvalues`/`autogenerate_facetvalues` only accepted
an integer quadrature order or an existing CellValues/FacetValues object,
even though BodyLoad's and Neumann's documented constructors advertise
QuadratureRule/FacetQuadratureRule inputs too. Added the missing methods
in src/LoadHandler/defaultvalues.jl that build CellValues/FacetValues
directly from a supplied quadrature rule (the field interpolation already
determines scalar vs. vector, so no extra dispatch on `f`'s output is
needed). Also corrected Neumann's docstring, which called the boundary
quadrature-rule input `QuadratureRule` instead of `FacetQuadratureRule`.

BUG-014: `QuadPointEvaluator`'s function-based `eval_quadpoints_cell!`
overloads required `cell_state::AbstractVector`, so a material using a
whole-cell (non-vector) state - already supported by `SimpleIntegrator`
via `_get_qp_state` - failed with a MethodError. Relaxed both overloads
in src/Workers/QuadPointEvaluator.jl to accept any `cell_state` and
reused `_get_qp_state` to index into it, matching SimpleIntegrator's
existing behavior.

Added regression tests: test/load_handler.jl compares BodyLoad/Neumann
load vectors built from an explicit QuadratureRule/FacetQuadratureRule
against the equivalent integer-order path; test/quadpoint_evaluation.jl
adds a whole-cell-state material exercised through a function-based
QuadPointEvaluator.

Reviewed via the dual-review workflow: Codex plan review (thread
01a0f2c6-3ed7-7440-b018-105a3e9c1c3d) returned NO_FINDINGS, and the
resumed final-diff review on the same thread also returned NO_FINDINGS.

Tests: `Pkg.test()` all green (LoadHandler 44/44, up from 42;
QuadPointEvaluator 115/115, up from 112). Full `docs/make.jl` build,
which executes every tutorial and how-to, completed cleanly with no
doctest failures.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KySgpVgJ5fWR9AvPK1JQoU
@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.22%. Comparing base (abb76ce) to head (900de7b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #102      +/-   ##
==========================================
+ Coverage   97.14%   97.22%   +0.08%     
==========================================
  Files          32       32              
  Lines        1364     1368       +4     
==========================================
+ Hits         1325     1330       +5     
+ Misses         39       38       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KnutAM
KnutAM merged commit 8d5af51 into KnutAM:main Sep 30, 2026
10 checks passed
@knutambot
knutambot deleted the cb/BUG012-014 branch September 30, 2026 15:08
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