<div dir="ltr">I CC'ed Jean, who seems to be the true original author of this code. Maybe he'll have something to add.<div><br></div><div>-berk</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 9, 2015 at 9:07 AM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There was a change made a while back to force the sum of the weights<br>
to be 1 and drives to be 0. I believe that change is flawed.<br>
<br>
But, the original code also fails to compute a valid center point. If<br>
I normalize the weights, the center is computed properly, but the<br>
EvaluatePosition code that uses the derivatives fails.<br>
<br>
On Tue, Jun 9, 2015 at 8:38 AM, Mathieu Malaterre<br>
<<a href="mailto:mathieu.malaterre@gmail.com">mathieu.malaterre@gmail.com</a>> wrote:<br>
> Hi Bill,<br>
><br>
> I wrote that a long time ago. I used the same approach in the 5-case and the<br>
> 6-case. So formulation should be very similar in the other prism (hexa one).<br>
> Since the points are chosen on a circle, I do not understand why it would<br>
> fail your test.<br>
><br>
> Are the formulations the same, or were they changed by someone else ?<br>
><br>
> -2cts<br>
><br>
> On Tue, Jun 9, 2015 at 2:26 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
<div class="HOEnZb"><div class="h5">> wrote:<br>
>><br>
>> Andrew,<br>
>><br>
>> It is definitely as issue with the shape functions. I have played with<br>
>> them a bit and also looked for info on the web. I believe the sf's<br>
>> should sum to 1. But currently they only sum to one at the vertices of<br>
>> the cell.<br>
>><br>
>> I made a change to normalize them each time they are computed. That<br>
>> fixes the computed center issue, but causes other problems.<br>
>><br>
>> I'm hoping one of the original authors will respond.<br>
>><br>
>> Thanks for looking at  it,<br>
>><br>
>> Bill<br>
>><br>
>> On Tue, Jun 9, 2015 at 3:14 AM, Andrew Maclean<br>
>> <<a href="mailto:andrew.amaclean@gmail.com">andrew.amaclean@gmail.com</a>> wrote:<br>
>> > Hi Bill,<br>
>> >    I played around with it today and I am pretty sure that the problem<br>
>> > lies<br>
>> > with the EXPRA ... EXPRN defines in vtkPentagonalPrism.cxx. These are<br>
>> > used<br>
>> > in InterpolationFunctions(), InterpolationDerivs().<br>
>> ><br>
>> > EvaluateLocation() uses InterpolationFunctions()  to determine the<br>
>> > weights.<br>
>> ><br>
>> > I don't understand the mathematical basis for the calculation of these<br>
>> > and a<br>
>> > web search has not revealed anything.<br>
>> ><br>
>> > Regards<br>
>> >     Andrew<br>
>> ><br>
>> >><br>
>> >> ---------- Forwarded message ----------<br>
>> >> From: Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
>> >> To: VTK Developers <<a href="mailto:vtk-developers@vtk.org">vtk-developers@vtk.org</a>><br>
>> >> Cc: Mathieu Malaterre <<a href="mailto:mathieu.malaterre@gmail.com">mathieu.malaterre@gmail.com</a>><br>
>> >> Date: Sun, 7 Jun 2015 14:40:27 -0400<br>
>> >> Subject: Re: [vtk-developers] vtkPentagonalPrism Bug<br>
>> >> Sorry, the posted code was incorrect, but the results are still<br>
>> >> wrong...<br>
>> >><br>
>> >><br>
>> >> On Sat, Jun 6, 2015 at 12:48 PM, Bill Lorensen<br>
>> >> <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
>> >> wrote:<br>
>> >> > Folks,<br>
>> >> ><br>
>> >> > I've been working on a Unit test for linear cells. So far I have<br>
>> >> > found<br>
>> >> > a few bugs that I could easily fix.<br>
>> >> ><br>
>> >> > My testing has uncovered a problem with vtkPentagonalPrism that I<br>
>> >> > cannot fix on my own.<br>
>> >> ><br>
>> >> > If I compute the real center from the parametric center, the real<br>
>> >> > center is not within the bounds of the cell. This is the only cell<br>
>> >> > that fails this test.<br>
>> >> ><br>
>> >> > I have attached a small program and cmake file that illustrates the<br>
>> >> > problem.<br>
>> >> ><br>
>> >> > Bill<br>
>> >><br>
>> >><br>
>> >><br>
>> >> --<br>
>> >> Unpaid intern in BillsBasement at noware dot com<br>
>> >><br>
>> >><br>
>> > --<br>
>> > ___________________________________________<br>
>> > Andrew J. P. Maclean<br>
>> ><br>
>> > ___________________________________________<br>
>><br>
>><br>
>><br>
>> --<br>
>> Unpaid intern in BillsBasement at noware dot com<br>
><br>
><br>
><br>
><br>
</div></div><span class="HOEnZb"><font color="#888888">> --<br>
> Mathieu<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
--<br>
Unpaid intern in BillsBasement at noware dot com<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br></div>