Cutcell work branch#273
Open
moyner wants to merge 15 commits into
Open
Conversation
- Added partial_cut keyword to cut_mesh (:positive/:negative/:none) for keeping only one side of the cut plane - Added depth_grid_to_surface to convert depth grids to PolygonalSurface - Added layered_mesh to build layered reservoir models from surfaces - Added _point_below_surface helper for classifying cell layers - Updated module exports and imports Co-authored-by: moyner <454871+moyner@users.noreply.github.com>
- Reverse cut face node ordering when partial_cut=:positive to ensure correct outward boundary normal orientation - Handle edge case where plane is outside mesh with partial_cut - Add tests for partial_cut, depth_grid_to_surface, and layered_mesh Co-authored-by: moyner <454871+moyner@users.noreply.github.com>
…d comment Co-authored-by: moyner <454871+moyner@users.noreply.github.com>
…truction Two fixes for the layered_mesh hanging issue: 1. Use each polygon as a bounding_polygon when cutting by a PolygonalSurface. Previously each polygon's cutting plane extended to infinity, causing O(n_polygons) redundant cuts per cell and exponential mesh growth. Now each polygon only cuts cells within its spatial footprint. 2. Fix cut face construction for cells adjacent to already-cut neighbors. When a non-split face has nodes on the cutting plane (from a previous cut), those nodes must still be collected into the cut face polygon. Without this fix, the cut face was incomplete, causing volume loss. Also simplified layered_mesh to delegate to cut_mesh(mesh, surface) instead of manually iterating over individual polygons. Co-authored-by: moyner <454871+moyner@users.noreply.github.com>
Co-authored-by: moyner <454871+moyner@users.noreply.github.com>
- New merge_faces.jl: merge_coplanar_faces function that merges interior and boundary faces sharing ≥2 nodes, same cell pair/cell, and coplanar normals. Re-orders merged polygon nodes for correct orientation. - New merge_faces keyword (default true) on cut_mesh for both PlaneCut and PolygonalSurface methods, passed through to build_cut_mesh. - Tests for merge on/off, orientation, geometry preservation, extra_out. Co-authored-by: moyner <454871+moyner@users.noreply.github.com>
…undary merge test Co-authored-by: moyner <454871+moyner@users.noreply.github.com>
Algorithm: 1. Collect boundary face polygons/normals from mesh B 2. Cut mesh A with each B boundary face (keeping both sides) 3. Remove cells of cut-A whose centroids are inside B 4. Glue trimmed A with B using glue_mesh 5. Track cell origins (mesh_a/mesh_b) and original indices Includes _remove_cells helper and _point_inside_mesh ray-casting test. Co-authored-by: moyner <454871+moyner@users.noreply.github.com>
…o extra_out Co-authored-by: moyner <454871+moyner@users.noreply.github.com>
…caling Co-authored-by: moyner <454871+moyner@users.noreply.github.com>
- merge_split_cells: merges cells from same original cell in same layer - merge_small_cells: merges cells below volume threshold with best neighbor - merge_coplanar_faces: add same-plane check, convexity check, fix moved done-marking after convexity check - layered_mesh gains merge_cells keyword (default true) - _dedup_nodes helper removes consecutive duplicate nodes in face polygons Co-authored-by: moyner <454871+moyner@users.noreply.github.com>
Co-authored-by: moyner <454871+moyner@users.noreply.github.com>
Co-authored-by: moyner <454871+moyner@users.noreply.github.com>
Add layered mesh construction, mesh embedding, and face/cell merging to CutCellMeshes
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.
No description provided.