Repository navigation
Fix BUG-012, BUG-014: quadrature-rule load inputs and whole-cell QuadPointEvaluator state - #102
Merged
Merged
Conversation
…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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BodyLoad/NeumanndocumentedQuadratureRule/FacetQuadratureRuleinputs had no implementation -autogenerate_cellvalues/autogenerate_facetvaluesonly handled an integer order or an existing values object. Added the missing methods, and fixedNeumann's docstring which incorrectly named its boundary quadrature-rule inputQuadratureRuleinstead ofFacetQuadratureRule.QuadPointEvaluatorrejected whole-cell (non-vector) states, unlikeSimpleIntegrator. Reused the existing_get_qp_statehelper 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.jlfull build (executes every tutorial/how-to) — clean, no doctest failures🤖 Generated with Claude Code
https://claude.ai/code/session_01KySgpVgJ5fWR9AvPK1JQoU