View Issue Details

IDProjectCategoryView StatusLast Update
0004016OpenFOAMPatchpublic2023-10-04 09:38
Reporterandreubernadserra Assigned Towill  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionsuspended 
PlatformGNU/LinuxOSUbuntuOS Version20.04.2 LTS
Product Versiondev 
Summary0004016: Find sphere and indexed octree
DescriptionThere seems to be a problem when calling the "findSphere" method of an "indexedOctree<treeDataCell>". The "treeDataCell" class is missing an additional overloaded "overlaps" method.

Perhaps this is not intended to be used, but in case it is I have attached a modified version of the "treeDataCell" and a minimal test application/case.

Please let me know if there is something else that I can do.
Additional Informationhttps://github.com/andreubernadserra/OpenFOAM-dev/tree/findSphere
TagsNo tags attached.

Activities

andreubernadserra

2023-09-23 23:01

reporter  

issue-findSphere.tar.gz (51,200 bytes)

will

2023-09-27 15:01

manager   ~0013122

Last edited: 2023-09-27 15:01

You are calculating the overlap between a cell and a sphere by using the bounding box of the cell. The bounding box is larger than the cell. So, sometimes this will return true when there is no an intersection; when the bounding box intersects the sphere but the cell does not. Yes? Can you improve the algorithm so that it doesn't produce false positives like this?

The treeDataFace class also does not have this method implemented. Could you complete this implementation too?

andreubernadserra

2023-09-27 15:18

reporter   ~0013123

Indeed the algorithm might result in false positives for skewed and/or big cells (compared to the sphere being searched).
I'll take a look how this can be implemented in an efficient manner.

I can implement the same functionality for the "treeDataFace" class.

I own the copyright associated with this potential contribution, but I have not signed any agreements.

andreubernadserra

2023-10-03 22:25

reporter   ~0013133

Will, this has now been implemented for both the treeDataCell and treeDataFace classes.

I've attached a screenshot of a test case with this note. The red colored cells are those overlapped by the gray sphere. Similarly, the green small spheres represent the internal faces overlapped by that same sphere.
testCase.png (132,209 bytes)   
testCase.png (132,209 bytes)   

will

2023-10-04 09:38

manager   ~0013134

Your algorithms still don't work in a variety of edge cases. See images. Both cell and face intersections are being missed.

I don't think this is possible as a contribution. If you need this functionality implemented then please contact CFD Direct for support and/or development services.
cells.png (27,251 bytes)   
cells.png (27,251 bytes)   
faces.png (115,432 bytes)   
faces.png (115,432 bytes)   

Issue History

Date Modified Username Field Change
2023-09-23 23:01 andreubernadserra New Issue
2023-09-23 23:01 andreubernadserra File Added: issue-findSphere.tar.gz
2023-09-27 15:01 will Note Added: 0013122
2023-09-27 15:01 will Note Edited: 0013122
2023-09-27 15:18 andreubernadserra Note Added: 0013123
2023-10-03 22:25 andreubernadserra Note Added: 0013133
2023-10-03 22:25 andreubernadserra File Added: testCase.png
2023-10-04 09:38 will Note Added: 0013134
2023-10-04 09:38 will File Added: cells.png
2023-10-04 09:38 will File Added: faces.png
2023-10-04 09:38 will Assigned To => will
2023-10-04 09:38 will Status new => closed
2023-10-04 09:38 will Resolution open => suspended