Skip to content

Added Cell and Marker Functionality - #4

Merged
afshawnlotfi merged 4 commits into
mainfrom
feature/cell-markers
Nov 17, 2025
Merged

Added Cell and Marker Functionality#4
afshawnlotfi merged 4 commits into
mainfrom
feature/cell-markers

Conversation

@afshawnlotfi

Copy link
Copy Markdown
Member
  • Added support for cell markers
  • Added support for multiple cell types outside triangles
  • Cleaned up a little

- Updated `Mesh` interface to include `cellTypes` for VTK compatibility.
- Implemented `inferCellTypes` and `getCellTypes` methods in `MeshUtils` for automatic cell type inference.
- Added triangulation support for mixed polygons in `MeshUtils`, ensuring compatibility with THREE.js.
- Enhanced tests for cell types and triangulation, covering various polygon configurations.
- Updated TypeScript documentation to reflect new features and usage examples.
- Introduced marker support in the Mesh class to define boundary conditions, material regions, and geometric features.
- Added methods for automatic conversion between list-of-lists and flattened marker storage.
- Implemented marker reconstruction from flattened structures.
- Enhanced marker type detection based on element sizes.
- Added serialization support for markers during mesh encoding/decoding.
- Updated README.md to include examples and documentation for marker usage.
- Created new example notebook for working with mesh markers.
- Added unit tests for marker functionality, including creation, reconstruction, and serialization.
- Updated TypeScript interfaces and utility functions to support marker handling.
…ulations

- Updated `TestDictArrays` to include new array fields: `index_sizes` and `cell_types`.
- Modified `TestIndexSizes` to validate polygon count and inferred sizes for triangles.
- Enhanced `TestPydanticMesh` to support polygon structures and validate mesh properties.
- Added tests for custom mesh handling, ensuring proper serialization and optimization.
- Implemented automatic calculation of `markerSizes` and `markerOffsets` in `MeshUtils`.
- Introduced utility functions `inferSizesFromCellTypes` and `sizesToOffsets` for VTK cell type handling.
- Updated TypeScript README and tests to reflect new marker auto-calculation features.
@afshawnlotfi
afshawnlotfi merged commit 1e05b80 into main Nov 17, 2025
4 of 6 checks passed
afshawnlotfi added a commit that referenced this pull request Nov 17, 2025
* feat: Enhance mesh functionality with polygon support and cell types

- Updated `Mesh` interface to include `cellTypes` for VTK compatibility.
- Implemented `inferCellTypes` and `getCellTypes` methods in `MeshUtils` for automatic cell type inference.
- Added triangulation support for mixed polygons in `MeshUtils`, ensuring compatibility with THREE.js.
- Enhanced tests for cell types and triangulation, covering various polygon configurations.
- Updated TypeScript documentation to reflect new features and usage examples.

* feat: Add support for mesh markers and boundary conditions

- Introduced marker support in the Mesh class to define boundary conditions, material regions, and geometric features.
- Added methods for automatic conversion between list-of-lists and flattened marker storage.
- Implemented marker reconstruction from flattened structures.
- Enhanced marker type detection based on element sizes.
- Added serialization support for markers during mesh encoding/decoding.
- Updated README.md to include examples and documentation for marker usage.
- Created new example notebook for working with mesh markers.
- Added unit tests for marker functionality, including creation, reconstruction, and serialization.
- Updated TypeScript interfaces and utility functions to support marker handling.

* feat: Introduce cell type utilities and integrate with Mesh class for improved element size handling

* Enhance mesh functionality with automatic marker size and offset calculations

- Updated `TestDictArrays` to include new array fields: `index_sizes` and `cell_types`.
- Modified `TestIndexSizes` to validate polygon count and inferred sizes for triangles.
- Enhanced `TestPydanticMesh` to support polygon structures and validate mesh properties.
- Added tests for custom mesh handling, ensuring proper serialization and optimization.
- Implemented automatic calculation of `markerSizes` and `markerOffsets` in `MeshUtils`.
- Introduced utility functions `inferSizesFromCellTypes` and `sizesToOffsets` for VTK cell type handling.
- Updated TypeScript README and tests to reflect new marker auto-calculation features.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant