CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Bugs

Change in triangle::intersection breaks stitchMesh in 1.5 and 1.6

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 11, 2009, 16:47
Default Change in triangle::intersection breaks stitchMesh in 1.5 and 1.6
  #1
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
This problem seems to have been introduced between 1.4.1 and 1.5: in earlier versions of OF even when the triangle was not hit the pointHit returned by triangle::intersection got some value. In 1.5 and 1.6 vector::zero is returned. Nevertheless this point value is then used in triangle::ray to calculate the distance to this point. I guess usually this distance is not used, but in slidingInterface:rojectPoints() (approx line 303 of the source file) this distance is used to discard points. Consequently stitchMesh fails (Usually complaining about "Duplicate point found in cut face.") for some meshes

After applying the attached patches to 1.5.x and 1.6 and recompiling stitchMesh happily stitched meshes on which previously it failed.

I don't know whether these patches affect other utilities as well

If you want a mesh to verify the bug/fix, I can provide you with one

Bernhard
Attached Files
File Type: gz triangleIntersect.patch.gz (519 Bytes, 22 views)
File Type: gz triangleIntersect_1.5.patch.gz (583 Bytes, 12 views)
gschaider is offline   Reply With Quote

Old   August 12, 2009, 06:12
Default
  #2
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
Thanks. I would like to leave the fast intersection() routine intact since it is used all over so want to recalculate the intersection with plane inside the ray() routine. Can you try attached triangleI.H and/or post the testcase?
mattijs is offline   Reply With Quote

Old   August 12, 2009, 06:19
Default
  #3
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
Missing attachment.
Attached Files
File Type: gz triangleI.H.gz (4.3 KB, 29 views)
mattijs is offline   Reply With Quote

Old   August 12, 2009, 09:26
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by mattijs View Post
Thanks. I would like to leave the fast intersection() routine intact since it is used all over so want to recalculate the intersection with plane inside the ray() routine. Can you try attached triangleI.H and/or post the testcase?
Yep. That fixes it. I'll mail you about the testcase
gschaider is offline   Reply With Quote

Old   August 12, 2009, 10:25
Default
  #5
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
I've pushed the fix to 1.6.x and 1.5.x.
mattijs is offline   Reply With Quote

Old   February 11, 2010, 10:46
Default compiled stitchMesh.C
  #6
New Member
 
X.G. Li
Join Date: Nov 2009
Location: Bremen, Germany
Posts: 19
Rep Power: 7
CYMa is on a distinguished road
Quote:
Originally Posted by gschaider View Post
This problem seems to have been introduced between 1.4.1 and 1.5: in earlier versions of OF even when the triangle was not hit the pointHit returned by triangle::intersection got some value. In 1.5 and 1.6 vector::zero is returned. Nevertheless this point value is then used in triangle::ray to calculate the distance to this point. I guess usually this distance is not used, but in slidingInterface:rojectPoints() (approx line 303 of the source file) this distance is used to discard points. Consequently stitchMesh fails (Usually complaining about "Duplicate point found in cut face.") for some meshes

After applying the attached patches to 1.5.x and 1.6 and recompiling stitchMesh happily stitched meshes on which previously it failed.

I don't know whether these patches affect other utilities as well

If you want a mesh to verify the bug/fix, I can provide you with one

Bernhard
Hallo,
Bernhard,,may you send me your recompiled stitchMesh.C,because i really donīt know where this patch should be put in the cold file..
Thank you very much! My e-mail is xgli@iwt.uni-bremen.de
CYMa is offline   Reply With Quote

Old   February 12, 2010, 08:27
Default
  #7
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by CYMa View Post
Hallo,
Bernhard,,may you send me your recompiled stitchMesh.C,because i really donīt know where this patch should be put in the cold file..
Thank you very much! My e-mail is xgli@iwt.uni-bremen.de
The patch discussed above goes somewhere (don't know exactly where, but the find-command is your friend) in $FOAM_SRC. You will have to recompile your OF-installation. As far as I remember no changes to stitchMesh itself were necessary.
The relevant patches should be in 1.5.x and 1.6.x so if you got one of those, everything's OK

Bernhard
gschaider is offline   Reply With Quote

Old   February 12, 2010, 10:21
Default Thank you very much,,,I will have a try....
  #8
New Member
 
X.G. Li
Join Date: Nov 2009
Location: Bremen, Germany
Posts: 19
Rep Power: 7
CYMa is on a distinguished road
Thank you very much,,,I will have a try....
Quote:
Originally Posted by gschaider View Post
The patch discussed above goes somewhere (don't know exactly where, but the find-command is your friend) in $FOAM_SRC. You will have to recompile your OF-installation. As far as I remember no changes to stitchMesh itself were necessary.
The relevant patches should be in 1.5.x and 1.6.x so if you got one of those, everything's OK

Bernhard
CYMa is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


All times are GMT -4. The time now is 01:11.