StateVariableFieldView - #334
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #334 +/- ##
==========================================
+ Coverage 70.95% 71.14% +0.18%
==========================================
Files 54 54
Lines 6294 6324 +30
==========================================
+ Hits 4466 4499 +33
+ Misses 1828 1825 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Three things the signature sweep in this branch left behind. `assemble_diagonal!`'s `use_inplace_methods` branch still passed `conns.data, conns.offsets[b]` to `_assemble_block!`, which now takes `conns_all` -- 15 arguments into a 14-argument method, so that path raises a `MethodError` on any assembler built with `use_inplace_methods = true`. `Matrix.jl` and `Vector.jl` were both updated; this one was missed. Restoring the call keeps the branch behaving exactly as it did before the sweep. Worth a separate look, though: `stiffness!` scatters a full element matrix through `scatter_with_gradients_and_gradients!`, while the out-of-place branch extracts the diagonal via `AssembledDiagonal()`. The in-place branch passes no return type at all, so it cannot know to take a diagonal. That predates this branch and is left alone here. `adapt_structure` for `StateVariableField` computed `nfields = adapt(to, field.nfields)`, used `typeof(nfields)` for the type parameter, then passed the *unadapted* `field.nfields` as the value. It only worked because the inner constructor converts implicitly; pass the adapted vector. `properties` had an `if/elseif` with no `else`, so any third value of `isblockconstant` left `start` undefined and surfaced as an `UndefVarError` naming a local instead of the actual problem. Only two layouts exist, so the second branch is now total and asserts which one it is. Tests cover `state_variables` against `block_view` for every (block, element, quadrature point), the concrete `eltype`, bounds on both `getindex` and `setindex!`, and that a write lands where the matching read looks. Signed-off-by: Alejandro Mota <amota@sandia.gov>
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.
Similar to the previous few PRs on properties.
Note this will require a small PR to Carina.jl which I have in progress.