Skip to content

Commit

Permalink
Merge pull request #625 from adtzlr/fix-mesh-flip
Browse files Browse the repository at this point in the history
Fix `Mesh.flip(mask=None)`: Take care of the mask
  • Loading branch information
adtzlr authored Feb 16, 2024
2 parents cafae00 + cac217b commit cd15db1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ All notable changes to this project will be documented in this file. The format
### Changed
- Don't disconnect the dual mesh by default for regions `RegionQuadraticTriangle` and `RegionQuadraticTetra` in `FieldsMixed`.

### Fixed
- Fix `Mesh.flip(mask=None)`: Take care of the mask (it wasn't applied to the cells-array of the mesh).

## [7.17.0] - 2024-02-15

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/felupe/mesh/_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ def flip(points, cells, cell_type, mask=None):
cells_new = cells.copy()

for face in faces_to_flip:
cells_new[:, face] = cells[:, face[::-1]]
cells_new[mask, face] = cells[mask, face[::-1]]

return points, cells_new, cell_type

Expand Down

0 comments on commit cd15db1

Please sign in to comment.