sub-cell smoothing 1st implementation WIP#86
Open
Clara2223 wants to merge 19 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces an initial (WIP) implementation of sub-cell/subpixel smoothing for STL voxel masks and refactors SIBC (surface impedance boundary condition) handling for conductive solids in the FIT3D solver.
Changes:
- Added optional subpixel smoothing to STL voxelization in
GridFIT3Dand adjusted solver material-mask handling to accept non-binary (float) masks. - Refactored SIBC application into a dedicated
_apply_SIBC()method and changed the defaultuse_sibcbehavior inSolverFIT3D. - Updated an MPI lossy cavity test fixture to include an explicit
sigma=0.0entry for vacuum materials.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
wakis/solverFIT3D.py |
Changes default SIBC behavior, updates STL material masking to float masks, and adds/refactors SIBC application logic. |
wakis/gridFIT3D.py |
Adds subpixel smoothing options and implementation for voxelized STL masks; adjusts surface-mask handling for SIBC. |
tests/test_007_mpi_lossy_cavity.py |
Updates STL material input format to include explicit conductivity for vacuum. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
make_bool=False now that the SolverFit3D tries to work with a float mask Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…count the factor**3 sub_cells and not only the diagonals
… properties, it should substract bool (i.e. set mat props to 0) and add float (add materials with fractions)
elenafuengar
approved these changes
Jun 3, 2026
… and at the end of the voxelize + smoothing
…hold, improve stl mask plotting
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.
📝 Pull Request Summary
SCS implementation
and then we generate an accumulated mask by combining the$factor$ masks (e.g.) if $factor=4$ we sum 4 sub masks.
Finally, we clip the values to the maximum of int8 = 255. Each value that has 255 is fully inside the solid. Every cell that has value<255 is a partially filled cell with a volume fraction value/255.
🔧 Changes Made
✅ Checklist
docs/or included inexamples/andnotebooks/)📌 Related Issues / PRs
Closes #issue-number