Transmissibility: say which connection a failed lookup wanted - #7344
Draft
hnil wants to merge 4 commits into
Draft
Transmissibility: say which connection a failed lookup wanted#7344hnil wants to merge 4 commits into
hnil wants to merge 4 commits into
Conversation
transmissibility(), diffusivity() and dispersivity() reached into their maps with at(), so a connection the calculation never produced surfaced as "unordered_map::at: key not found" and nothing else -- no cell, no direction, no clue whether refinement was involved. Report both cells: index, Cartesian index, and on a refined grid the level each one is on. A pair spanning a refinement boundary, or two cells refining a single coarse cell, is exactly where these lookups go wrong, and the level is what makes that visible. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… its level right The level came from walking the grid view to the elemIdx'th element, which is iteration order, not mapper-index order -- the two need not agree, least of all on a refined leaf, so the level reported could belong to another cell. Look it up through the mapper. Also report each cell's IJK, and classify the pair: refined siblings, Cartesian neighbours in I, J or K, several layers apart in one column, or no Cartesian relation at all. Which of those it is says whether a face the grid should have went missing or a non-neighbour connection did. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A missing connection has two very different causes: this calculation skipped a face the grid has, or the caller asked about a pair the grid never joined and the indices it used are not this grid's. Check and say which. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Member
|
jenkins build this please |
Member
|
The PR is marked as "draft" and can therefore not be merged. Is there more work coming here? If not, I suggest you mark the PR as "ready for review". |
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.
transmissibility(),diffusivity()anddispersivity()look their result up withstd::unordered_map::at, so a missing connection surfaces asunordered_map::at: key not foundwith nothing else — no cells, no indication of what went wrong. Chasing one of those down a full-field model is what prompted this.The lookup now names both cells with their Cartesian index and IJK, says whether they are Cartesian neighbours or a non-neighbour pair, and checks whether the grid actually joins them — which separates "this calculation skipped a face the grid has" from "the caller asked about a pair the grid never joined, so its indices are not this grid's". The refinement level is appended only when the grid has levels, behind an
if constexpr (requires ...), so nothing changes for grids without them.Error paths only; no behaviour change on a run that works.
Draft: no test. The failure it reports is by construction one that should not happen, so I would welcome a view on whether it is worth constructing one.
🤖 Generated with Claude Code