-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable generation of globalIDs in GEOS for fracture meshes #3200
Conversation
@@ -910,7 +912,7 @@ redistributeMeshes( integer const logLevel, | |||
} | |||
|
|||
// Generate global IDs for vertices and cells, if needed | |||
vtkSmartPointer< vtkDataSet > mesh = manageGlobalIds( loadedMesh, useGlobalIds ); | |||
vtkSmartPointer< vtkDataSet > mesh = manageGlobalIds( loadedMesh, useGlobalIds, fractures.size() ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe pass it an actual bool, no?
matteo comments Co-authored-by: Matteo Cusini <[email protected]>
@ryar9534 is vtk or GEOS generating the globalIDs? |
I believe its vtk under the hood, I think its happening here
|
Thomas suggestion Co-authored-by: TotoGaz <[email protected]>
So VTK is checking coordinates and assuming colocated nodes are the same? Can't we just offset the nodes normal to the fault/fracture? |
I suppose you could, I think thats just not the workflow @TotoGaz has been developing |
yes https://vtk.org/doc/nightly/html/classvtkGenerateGlobalIds.html
Fractures use the global node ids to refer to matrix nodes. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3200 +/- ##
========================================
Coverage 55.74% 55.74%
========================================
Files 1038 1038
Lines 88470 88471 +1
========================================
+ Hits 49320 49321 +1
Misses 39150 39150 ☔ View full report in Codecov by Sentry. |
Does a call to |
I'll try and answer this to take the load off @TotoGaz. For 'split' meshes with faults/fractures, we have been assuming the 'matrix' mesh (so the mesh of the 3D solid), has multiple nodes which are co-located on the fault. In this case assigning node global ids using vtk within geos will not work, as it will assign the same global ID to collocated nodes. Even if we assume that this was not the case, i.e. for whatever reason the call to vtk within geos properly assigned unique global IDs to collocated nodes, there could still be an issue. In particular, when we import the fracture we still make use of a 'collocated_nodes' field defined on the nodes of the fracture mesh. This field gives the global IDs of the 'matrix' nodes which are collocated with that node in the fracture. Even if the call to vtk gave valid (unique) global IDs to the matrix nodes, this ordering may not be the same as how 'collocated_nodes' was defined. I believe this is what Thomas was referring to in his comment. So it seems to me like the safest option (at least for now) is to throw an error if we attempt to create new globalIDs for a vtk mesh which includes a fault (indicated by the |
* disable generation of globalIDs in GEOS for fracture meshes --------- Co-authored-by: Matteo Cusini <[email protected]> Co-authored-by: TotoGaz <[email protected]>
We have seen that using GEOS to generate global IDs in examples where the mesh is fractured/split (and thus has collocated nodes) is unreliable as vtk will give the same global id to collocated nodes. Here I think I have simply returned an error in these cases so it is clear what is happening.
We could also just leave the code as is, as the code will likely catch the duplicated globalIDs, but if we like this we can merge it. Note also that even if GEOS uses vtk to assign global IDs, we still use the collocated nodes field from the vtk mesh for the fault to define the connectivity of the fracture to the matrix. At that point we could be using different numbering schemes which could lead to some very wacky stuff.