View Issue Details

IDProjectCategoryView StatusLast Update
0000505OpenFOAMBugpublic2012-04-17 08:59
Reporteruser401Assigned Touser4 
PrioritynormalSeveritycrashReproducibilitysometimes
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntuOS Version10.04
Summary0000505: index error in file geompack.C function dtris2
Descriptionat the code lines of function dtris2 it is written

      tri_nabe[3*(i-1)+0] = -3 * i;
      tri_nabe[3*(i-1)+1] = i;
      tri_nabe[3*(i-1)+2] = i - 1;

and it should be

      tri_nabe[3*(i-2)+0] = -3 * i;
      tri_nabe[3*(i-2)+1] = i;
      tri_nabe[3*(i-1)+2] = i - 1;

the code is taken from
http://people.sc.fsu.edu/~jburkardt/cpp_src/geompack/geompack.cpp

but it was translated from the fortran code found here
http://people.sc.fsu.edu/~jburkardt/f_src/geompack2/geompack2.f90

so one may see that at the same lines of the code there was an index mistake in translation of the Fortran code to C
TagsNo tags attached.

Activities

user4

2012-04-13 09:42

  ~0001237

Dear Vengo,

yes, there seems to be a difference. Are you sure the f90 version is the correct one? How did you find this? Did you see a problem with the current implementation?

user401

2012-04-13 18:00

  ~0001241

The fortran version is the correct one for sure. There is a third - MATLAB version found here http://people.sc.fsu.edu/~jburkardt/m_src/geompack/dtris2.m

In MATLAB you may see a code which is similar to fortran. Also if you look at three lines above the mentioned code you will see that the same position in vector is already set up so there is no reason to set another value in the same place.
In the current version of code in OpenFOAM the problem arise when first three points of vector are positioned in one line.

user4

2012-04-17 08:59

  ~0001258

Fixed in 7fc7780f1d049618c57d2f77f7df4b34ae33bc7f.

Thanks a lot!

Issue History

Date Modified Username Field Change
2012-04-12 15:54 user401 New Issue
2012-04-13 09:42 user4 Note Added: 0001237
2012-04-13 18:00 user401 Note Added: 0001241
2012-04-17 08:59 user4 Note Added: 0001258
2012-04-17 08:59 user4 Status new => resolved
2012-04-17 08:59 user4 Fixed in Version => 2.1.x
2012-04-17 08:59 user4 Resolution open => fixed
2012-04-17 08:59 user4 Assigned To => user4