- 
                Notifications
    
You must be signed in to change notification settings  - Fork 97
 
feat: Add functions to connect well perforation to surface elements #3359
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
Conversation
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…DEV/GEOS into pt/connect-well-to-2d-elem
| 
           Hello @rrsettgast and @castelletto1, could you please take a final review of this PR, which is expected for InSalah case @herve-gross  | 
    
          
 @jhuang2601  | 
    
| 
               | 
          ||
| // remove duplicates | ||
| std::unordered_set< Point3d, PointHash< Point3d >, PointsEqual< Point3d > > | ||
| unique_points( 0, PointHash< Point3d >(), PointsEqual< Point3d >( geomTol )); | 
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.
In practice, I'm not sure the unordered_set will handle this sort of tolerance-based equality.
Two close coordinates might be seen equal within the tolerance, but still, I would expect both to generate two different hashes, meaning both will be seen as distinct, and kept in the list.
| (point[1] <= std::max( p1[1], p2[1] )) && | ||
| (point[0] <= std::max( p1[0], p2[0] ))) | ||
| { | ||
| real64 const xIntersect = (point[1] - p1[1]) * (p2[0] - p1[0]) / (p2[1] - p1[1]) + p1[0]; | 
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.
Could you confirm the expected behavior/convention for a point on the boundary?
I have the impression that a point on a vertical left edge will be considered "outside", while a point on a right edge will be "inside". Same with a horizontal top edge (inside) vs. bottom (outside)
| { | ||
| LvArray::tensorOps::add< 3 >( elementCenters[k], X[e2n( k, a )] ); | ||
| localIndex const nA = e2n( k, a ); | ||
| auto const [it, inserted] = uniqueNodes.insert( {X[nA][0], X[nA][1], X[nA][2]} ); | 
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.
Should we add a small tolerance to better detect duplicated nodes?
should go after #3227calculateElementCentersfor subregions earlier intoProblemManager::generateMeshLevel, so cell centers for surface elements are available when well perforation is processedregisterWrapperforelementCenterandelementVolumeinEmbeddedSurfaceSubRegion, they already registered in the base classgetReservoirElementDimensions/getBoundingBoxto supportSurfaceElementSubRegionSurfaceElementSubRegionversion ofisPointInsideElementand helper functionsisPointInPolygon2d/3d(not super refined implementation but something to start working with)