Mesh.get_obstruction_mask_slice cuts the time axis for 3D slices
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 90/100
Direzione di ricerca
Leggi fdsreader/fds_classes/mesh.py in get_obstruction_mask_slice() (intorno alla riga 80), dove viene costruito mask_indices[orientation], e confrontalo con Slice.to_global(masked=True), dove la maschera viene broadcast contro i dati della slice. Implementa il ritorno anticipato per orientation == 0 usando self.get_obstruction_mask(subslice.times, cell_centered=cell_centered). Finito significa che una slice 3D restituisce una maschera dalla forma (n_t, nx, ny, nz) corrispondente ai dati — riproduci con il caso sintetico dell'issue #124 (maschera (1,5,5,5) vs. dati (2,5,5,5)) e conferma che le slice 2D restano invariate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Mesh.get_obstruction_mask_slice() (fdsreader/fds_classes/mesh.py, around line 80) selects the slice plane with
mask_indices = [slice(None)] * 4
mask_indices[orientation] = slice(slc_index, slc_index + 1, 1)
The mask is indexed (t, x, y, z), so for a 2D slice orientation (1, 2 or 3) hits the right spatial axis. For a 3D slice orientation == 0, so the same line cuts the time axis down to a single frame instead of leaving the mask untouched. Which frame survives is accidental: with orientation == 0, subslice.extent[0] and dimension=(0,) both wrap to z, so slc_index is the z index of the slice's lower z bound (0 when the slice starts at the mesh bottom). If that index is >= n_t, the selection is empty.
The returned mask then has shape (1, nx, ny, nz) while the data has (n_t, nx, ny, nz). In Slice.to_global(masked=True), np.where(mask, slc_data, fill) broadcasts that one frame over all time steps, so every time step is masked with the obstructions visible at that one frame (the first time step in the common case). For example, an obstruction removed after t = 0 still masks the corresponding cells, and one that appears later does not mask anything. A synthetic check during review of #124 showed mask (1, 5, 5, 5) against data (2, 5, 5, 5), with an obstructed cell at the second time step left unmasked.
Expected: for orientation == 0, return the full time-dependent mask from get_obstruction_mask(subslice.times, cell_centered=...).
Suggested fix: return early for 3D slices, e.g.
if orientation == 0:
return self.get_obstruction_mask(subslice.times, cell_centered=cell_centered)
2D slices are not affected. Found while reviewing the fix for #123.
- Lingua principale
- Python
- Stelle
- 75
- Fork
- 28
- Merge medio
- 2m
- PR unite (30g)
- 2
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di FireDynamics/fdsreader
-
Slice.to_global puts the second-to-last node row on the domain's upper facesForse già presa @chraibi l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
FireDynamics/fdsreader#123 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
FireDynamics/fdsreader#122 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
FireDynamics/fdsreader#121 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
FireDynamics/fdsreader#120 · 2 commenti ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
FireDynamics/fdsreader#115 · 1 commento ·
Tutte le issue di FireDynamics/fdsreader
Issue simili
-
HTML: <template> content is extracted as document textForse già presa @ryanmeowy l’ha presa oggi. Apertabug html
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
docling-project/docling#4714 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] Qdrant RAG client applies score_threshold to raw cosine similarity, not the 0-1 score it returnsForse già presa @roydonsequeira l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Host test failure in core/direct_io.zig on Linux kernel 6.17: O_DIRECT open succeeds on procfs, so the test's 'plain' fd is not plainForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ashhart/TensorFold#536 ·
I maintainer di solito rispondono entro 1 giorno
-
area/install-update comp/cli duplicate P2 python:uv sweeper:risk-compatibility type/bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
NousResearch/hermes-agent#135440 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Deepak3699/Ai_Mentor#244 ·
I maintainer di solito rispondono entro 1 giorno