Conversation
… I and J fault faces Computing additional NNCs spent most of its time running quad overlap tests on candidate cells outside the neighbor pillar column. Most of these touch the fault face along an edge only. Restrict candidates for I and J faces to the neighbor column. This intentionally skips a small number of non-zero area overlaps outside the column.
…in flat arrays Building the cell search tree was dominated by one small std::vector<int> allocation per leaf, and a tree with one cell per leaf becomes very deep for large grids. - BoundingBoxTree: Store leaf ids in flat arrays, and move the input data instead of copying it. The tree shape is unchanged. Queries no longer copy the ids of each leaf. - RigMainGrid: Always group at least 8 cells along K in each leaf. findIntersectingCells() removes cells not intersecting the query bounding box, so the result is the same set of cells as for a tree with one cell per leaf. This also applies to very large grids, which previously got the cells of the whole leaf. - Include cells of nested LGRs and LGR cells in invalid main grid cells in the grouped tree, as the previous tree with one cell per leaf did.
RigConnection had user-defined copy operations and no move operations, so sorting in remove_duplicates() and merging connections copied the polygon of every connection. - Remove the member-wise copy operations, so the implicit noexcept move operations are used. - Take the polygon by value and move it into the connection. - Add move overloads of RigConnectionContainer::push_back(), and use them when collecting the computed connections. - Avoid copying each native connection when building the set of cell pairs.
…om positive faces - A negative I or J face is the positive face of the neighbor cell with a lower index, and is already handled when that neighbor is processed. Only visit the positive faces. - Each cell only writes the fault index of its own positive faces and the opposite faces of its neighbors, so process the cells in parallel. The thread results are appended in thread order, so the fault faces keep the same order as before.
…tion The NNC geometry computation now only tests candidates in the neighbor pillar column for I/J fault faces, intentionally producing fewer NNCs (edge contacts and small non-zero-area overlaps outside the column are no longer generated). Update the test assertion from 3416 to 3345 to match.
…rectly RigConnectionContainer was a thin wrapper around std::vector<RigConnection> with no added value beyond push_back/reserve/remove_duplicates. Replace it everywhere with std::vector<RigConnection> and inline the remaining container-merge and deduplication logic at their single call sites.
magnesj
force-pushed
the
grid-open-geometry-performance
branch
from
October 1, 2026 09:51
ea5dfc4 to
5cef0e4
Compare
magnesj
marked this pull request as draft
October 2, 2026 08:08
This branch has not been deployed
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.
Closes #14806
Speeds up the geometry computations done when opening a grid. One commit per change:
std::vector<int>per leaf.findIntersectingCells()filters the result per cell, so it returns the same cells as a tree with one cell per leaf. This also fixes grids above 4M cells, which previously got all cells of a leaf. Nested LGR cells and LGR cells in invalid main grid cells are included in the grouped tree.RigConnection. No behavior change.Timings (seconds, 12 threads, four large models)
computeCachedData(search tree)calculateFaultsTesting
devon all four models. The last three commits give identical results.RigMainGridSearchTree-Test.cppcomparesfindIntersectingCells()against checking every cell, including LGR cells, onTEST10K_FLT_LGR_NNC.dev(RimWellTargetMapping*,RimCellFilterToolsTest.EnsembleDataFilterInViewUsesViewCase,RimCellFilterToolsTest.PropertyFilterVisibilityPerCase).