[MOAB-dev] Bug in kdtree?

Iulian Grindeanu iulian at mcs.anl.gov
Wed Jul 24 10:50:19 CDT 2013


I see no error 
Your fifth slab is at about 49.5; 
(first at 9.5, ..., fifth at 49.5) 

Iulian 

----- Original Message -----

| I think I may have found a bug in kdtree.

| My test problem consists of a tet mesh that is composed of some 4000
| tets. The mesh looks like that in mesh.png, a ray starts at position
| (1,0,0) and fires along (1,0,0) and we get the following results back
| from my test program swp.cpp

| Compile the minimum working example as

| g++ swp.cpp -I/<moab include dir> -L<moab lib dir> -lMOAB

| This is as expected,

| # of intersections : 20
| intersection distances are on 8.5 8.74072 9.25928 9.5 18.5 18.7407
| 19.2593 19.5 28.5 28.7407 29.2593 29.5 38.5 38.7407 39.2593 39.5 48.5
| 48.7407 49.2593 49.5 of ray length 900

| 8.5 9.5 18.5 19.5 etc are the boundaries of the faces of the mesh.

| However, if we recompile and change the starting position to (1,4,0)
| we get

| # of intersections : 17
| intersection distances are on 8.5 8.63513 9.06064 9.5 18.5 18.6351
| 19.0606 19.5 28.5 28.6351 29.0606 29.5 38.5 38.6351 39.0606 39.5 48.5
| of
| ray length 900

| As far this ray is concerned there is no mesh in the 5th slab.

| What have I done wrong?

| Thanks

| Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20130724/18a85c2a/attachment.html>


More information about the moab-dev mailing list