[vtk-developers] vtkPentagonalPrism Bug

Bill Lorensen bill.lorensen at gmail.com
Tue Jun 9 09:07:26 EDT 2015


There was a change made a while back to force the sum of the weights
to be 1 and drives to be 0. I believe that change is flawed.

But, the original code also fails to compute a valid center point. If
I normalize the weights, the center is computed properly, but the
EvaluatePosition code that uses the derivatives fails.

On Tue, Jun 9, 2015 at 8:38 AM, Mathieu Malaterre
<mathieu.malaterre at gmail.com> wrote:
> Hi Bill,
>
> I wrote that a long time ago. I used the same approach in the 5-case and the
> 6-case. So formulation should be very similar in the other prism (hexa one).
> Since the points are chosen on a circle, I do not understand why it would
> fail your test.
>
> Are the formulations the same, or were they changed by someone else ?
>
> -2cts
>
> On Tue, Jun 9, 2015 at 2:26 PM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
>>
>> Andrew,
>>
>> It is definitely as issue with the shape functions. I have played with
>> them a bit and also looked for info on the web. I believe the sf's
>> should sum to 1. But currently they only sum to one at the vertices of
>> the cell.
>>
>> I made a change to normalize them each time they are computed. That
>> fixes the computed center issue, but causes other problems.
>>
>> I'm hoping one of the original authors will respond.
>>
>> Thanks for looking at  it,
>>
>> Bill
>>
>> On Tue, Jun 9, 2015 at 3:14 AM, Andrew Maclean
>> <andrew.amaclean at gmail.com> wrote:
>> > Hi Bill,
>> >    I played around with it today and I am pretty sure that the problem
>> > lies
>> > with the EXPRA ... EXPRN defines in vtkPentagonalPrism.cxx. These are
>> > used
>> > in InterpolationFunctions(), InterpolationDerivs().
>> >
>> > EvaluateLocation() uses InterpolationFunctions()  to determine the
>> > weights.
>> >
>> > I don't understand the mathematical basis for the calculation of these
>> > and a
>> > web search has not revealed anything.
>> >
>> > Regards
>> >     Andrew
>> >
>> >>
>> >> ---------- Forwarded message ----------
>> >> From: Bill Lorensen <bill.lorensen at gmail.com>
>> >> To: VTK Developers <vtk-developers at vtk.org>
>> >> Cc: Mathieu Malaterre <mathieu.malaterre at gmail.com>
>> >> Date: Sun, 7 Jun 2015 14:40:27 -0400
>> >> Subject: Re: [vtk-developers] vtkPentagonalPrism Bug
>> >> Sorry, the posted code was incorrect, but the results are still
>> >> wrong...
>> >>
>> >>
>> >> On Sat, Jun 6, 2015 at 12:48 PM, Bill Lorensen
>> >> <bill.lorensen at gmail.com>
>> >> wrote:
>> >> > Folks,
>> >> >
>> >> > I've been working on a Unit test for linear cells. So far I have
>> >> > found
>> >> > a few bugs that I could easily fix.
>> >> >
>> >> > My testing has uncovered a problem with vtkPentagonalPrism that I
>> >> > cannot fix on my own.
>> >> >
>> >> > If I compute the real center from the parametric center, the real
>> >> > center is not within the bounds of the cell. This is the only cell
>> >> > that fails this test.
>> >> >
>> >> > I have attached a small program and cmake file that illustrates the
>> >> > problem.
>> >> >
>> >> > Bill
>> >>
>> >>
>> >>
>> >> --
>> >> Unpaid intern in BillsBasement at noware dot com
>> >>
>> >>
>> > --
>> > ___________________________________________
>> > Andrew J. P. Maclean
>> >
>> > ___________________________________________
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>
>
>
>
> --
> Mathieu



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the vtk-developers mailing list