Repository navigation
fix: global boundary arrays keep the time axis first and all face positions - #146
Merged
Merged
Conversation
…itions get_global_boundary_data_arrays squeezed every axis of length one, so faces one cell wide came out as (1, n_t, n) instead of (n_t, 1, n). It also decided whether the data is cell-centred from whichever quantity came first, which made a node-based quantity fail when the obstruction also had a cell-centred one, and it dropped the first of two face positions (an obstruction spanning meshes with different cell sizes, whose bounds FDS snaps to each grid). The arrays are now built from the patches of the requested quantity only, grouped by face position, and always have the shape (n_t, a, b). Several positions give a tuple ordered by position; export_obst_raw writes such faces part by part. The new case bndf_global (FDS 6.11.1) has two meshes with 0.1 m and 0.2 m cells, an obstruction across both and one a cell wide, with a node-based and a cell-centred quantity. On bndf_data the results equal the previous ones except for the swapped axes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Orientations come in sorted order, as before. - Meshes with fewer written frames leave the missing frames NaN instead of failing on the assignment. - Face positions and patch nodes are compared with a tolerance relative to the cell size; Patch.get_coordinates uses it too, so the grid code reuses it. - Document that the global grid is uniform. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
Obstruction.get_global_boundary_data_arrays()had three problems:(1, n_t, n)instead of(n_t, 1, n), because every axis of length one was squeezed.The arrays are now built from the patches of the requested quantity only, grouped by face position, and always have the shape
(n_t, a, b). Several positions give a tuple ordered by position;export_obst_rawwrites such faces part by part. Orientations stay sorted; frames a mesh did not write are NaN.Tests
bndf_global(FDS 6.11.1, input intests/cases/fds_inputs/): two meshes with 0.1 m and 0.2 m cells, an obstruction across both, one a cell wide, with a node-based and a cell-centred quantity. 10 of the 12 tests for the function fail onmaster.bndf_datacases (FDS 6.10 and 6.11), 38 arrays are identical tomaster; the other 10 differ only by the corrected axes.🤖 Generated with Claude Code