FOSSIL icon indicating copy to clipboard operation
FOSSIL copied to clipboard

Bug on facet%det?

Open AliE89 opened this issue 1 year ago • 1 comments

Hello Stefano,

Hope you are doing well. I Know you moved to CGAL, but fortran lovers are still on your lib ;)

Meanwhile trying to get facet areas, I potentially hit a bug or maybe a misconseption from my side.

Your code is:

   self%E12 = self%vertex(2) - self%vertex(1)
   self%E13 = self%vertex(3) - self%vertex(1)
   self%a   = self%E12%dotproduct(rhs=self%E12)
   self%b   = self%E12%dotproduct(rhs=self%E13)
   self%c   = self%E13%dotproduct(rhs=self%E13)
   self%det = self%a * self%c - self%b * self%b

But doing a silly test with 1 triangle ([0 0 0], [1 0 0], [0.5 1 0]), I get a dogdy result for the area...

Wouldn't be better doing:

   self%E12 = self%vertex(2) - self%vertex(1)
   self%E13 = self%vertex(3) - self%vertex(1)
   self%det = 0.5*normL2_R8P(self%E12 .cross. self%E13)

Clearly if det is not the facet area, what I am saying is not very much meaningful!

Cheers

AliE89 avatar Feb 09 '24 16:02 AliE89

@AliE89

I am very sorry for my delay, thank you very much!

Indeed this project is not dead, simply I am been absorbed by other works, but my plan is still to use FOSSIL (I am trying to complete the porting to full GPU, currently testing OpenACC aside Fortran CUDA), thus I'll try to fix this bug and improve FOSSIL ASAP.

See you soon (I hope).

szaghi avatar Feb 23 '24 13:02 szaghi