View Issue Details

IDProjectCategoryView StatusLast Update
0003004OpenFOAM[All Projects] Bugpublic2018-07-10 13:19
ReporterakubilayAssigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
PlatformGNU/LinuxOSUbuntuOS Version18.04
Product Version4.x 
Fixed in Version 
Summary0003004: findLine function unexpected behavior in parallel run with preservePatches
DescriptionI have come across a problem with findLine function. I am using findLine to see if a ray between two points intersects a distributedTriSurfaceMesh.

I had no problem so far, until the day I needed to use cyclic boundaries in a parallel run with the case decomposed with preservePatches option (so that the coupled cyclic boundaries are preserved on one processor). With this configuration, findLine function seems to see only the local surface mesh in each processor and not the global one.

-If I use a serial case, there is no problem and the surface intersects the ray.
-If I use a parallel case, but without preservePatches option, there is again no problem and the surface intersects the ray.
-This only happens when the case is decomposed with preservePatches flag. It behaves as if the parts of the surface mesh on other processors do not exist.

I uploaded a simple case with a slightly modified version of viewFactorsGen to demonstrate this behavior, as this utility uses findLine to detect intersections.

I simply try to send a ray from point (5.01 5 5) to (15.01 5 5), which should hit wall2 at point (15 5 5). If I decompose with preservePatches option, the ray does not hit wall2. But, without preservePatches, the ray hits wall2 (which is the expected behavior).

The modified utility in the attachment (viewFactorsGen) outputs several start points, end points, and hitInfo.

Please have a look at the two different outputs I copied below.
Steps To Reproducerun the following commands to reproduce:
1) decomposePar -region air
2) mpirun -np 4 faceAgglomerate -region air -parallel
2) mpirun -np 4 viewFactorsGenTest -region air -parallel
Additional Information* output with preservePatches
[0] start:
[0] 12
[0] (
[0] (2.5125 19.985 5)
[0] (2.511 19.98 5)
[0] (2.514 19.99 5)
[0] (19.494 19.98 5)
[0] (19.497 19.99 5)
[0] (5.0115 5.015 5)
[0] (5.01 5 5) --> start point of interest
[0] (5.0085 4.995 5)
[0] (2.514 10.01 5)
[0] (5.511 0.02 5)
[0] (5.5095 0.005 5)
[0] (19.497 10.01 5)
[0] )
[0]
[0] end:
[0] 12
[0] (
[0] (15.0125 4.985 5)
[0] (13.511 -0.02 5)
[0] (16.514 9.99 5)
[0] (13.494 -0.02 5)
[0] (16.497 9.99 5)
[0] (16.5115 20.015 5)
[0] (15.01 5 5) --> end point of interest
[0] (13.5085 -0.005 5)
[0] (16.514 20.01 5)
[0] (16.511 20.02 5)
[0] (15.0095 5.005 5)
[0] (16.497 20.01 5)
[0] )
[0]
[0] hitInfo:
[0] 12
[0] (
[0] 0 (15.0125 4.985 5) -1
[0] 1 (13.5 0 5) 73
[0] 0 (16.514 9.99 5) -1
[0] 1 (16.5 10 5) 79
[0] 0 (16.497 9.99 5) -1
[0] 1 (16.5 20 5) 65
[0] 0 (15.01 5 5) -1 --> hitInfo of interest (ray does not hit)
[0] 0 (13.5027 -0.00161714 5) -1
[0] 1 (16.5 20 5) 65
[0] 1 (16.5 20 5) 65
[0] 0 (15.0095 5.005 5) -1
[0] 1 (16.5 20 5) 65
[0] )

* output without preservePatches
[0] start:
9
(
(3.5115 19.985 5)
(3.511 19.98 5)
(3.514 19.99 5)
(5.0115 5.015 5)
(5.01 5 5) --> start point of interest
(5.0095 4.995 5)
(2.514 10.01 5)
(5.511 0.02 5)
(5.5095 0.005 5)
)
[0] end:
9
(
(15.0115 4.985 5)
(14.511 -0.02 5)
(17.514 9.99 5)
(16.5115 20.015 5)
(15.01 5 5) --> end point of interest
(14.5095 -0.005 5)
(16.514 20.01 5)
(16.511 20.02 5)
(15.0095 5.005 5)
)
[0] hitInfo:
9
(
1 (15 5 5) 71
1 (14.5 0 5) 73
1 (17.5 10 5) 79
1 (16.5 20 5) 63
1 (15 5 5) 71 --> hitInfo of interest (ray hits)
1 (14.5 0 5) 73
1 (16.5 20 5) 63
1 (16.5 20 5) 63
1 (15 5 5) 71)
TagsdistributedTriSurfaceMesh, findLine, preservePatches, viewFactorsGen

Activities

akubilay

2018-07-08 11:34

reporter  

testCase.zip (27,539 bytes)

henry

2018-07-08 11:48

manager   ~0009846

Try with OpenFOAM-dev

akubilay

2018-07-08 12:02

reporter   ~0009847

Yes, I tried with the latest commit of OpenFOAM-dev. The result is the same. Here I also attach the case updated for dev version.

testCase-dev.zip (41,400 bytes)

akubilay

2018-07-09 10:34

reporter   ~0009849

An update on this issue:

If I push the end point further, the ray hits the surface. Like this in shootRay.H:
>> end.append(fc + 1.501*d);

Could it be due to the bounding box for each processor being different in case of preservePatches?

Issue History

Date Modified Username Field Change
2018-07-08 11:34 akubilay New Issue
2018-07-08 11:34 akubilay File Added: testCase.zip
2018-07-08 11:34 akubilay Tag Attached: viewFactorsGen
2018-07-08 11:34 akubilay Tag Attached: distributedTriSurfaceMesh
2018-07-08 11:34 akubilay Tag Attached: findLine
2018-07-08 11:34 akubilay Tag Attached: preservePatches
2018-07-08 11:48 henry Note Added: 0009846
2018-07-08 12:02 akubilay File Added: testCase-dev.zip
2018-07-08 12:02 akubilay Note Added: 0009847
2018-07-09 10:34 akubilay Note Added: 0009849