[Paraview] Calculator and vector products

David E DeMarle dave.demarle at kitware.com
Thu Mar 5 11:21:52 EST 2009


Yes, that was fixed after 3.4.0 was released. It works in CVS head.

On Thu, Mar 5, 2009 at 11:18 AM, Dan Goldstein <dan at cora.nwra.com> wrote:
> Am I correct that the cross() operation is still broken in ParaView 3.4.0
> related to the bug posted: http://www.gccxml.org/Bug/view.php?id=2903 ?
> randall.hand once suggested the addition of the support for the vector cross
> product operator. It was added some time later. Then some new operators such
> as boolean ones were added and during this process unfortunately the vector
> cross product operator was carelessly disabled due to the incorrect check on
> the number of the input parameters.
>
> The correct format of a vector cross product operation is:
>
>     ====================================
>     vector_C = cross(vector_A, vector_B)
>     ====================================
>
>     INSTEAD OF
>
>     ====================================
>     cross(vector_A, vector_B, vector_C)
>     ====================================
>
>     In other words, there should be TWO parameters and ONE comma.
>
>     However, the bug in vtkFunctionParser:: CheckSyntax() occurred within
> the following segment (between line 1444 and line 1453):
>
>     ============================================================
>     if ((functionNumber == VTK_PARSER_MIN) ||
>         (functionNumber == VTK_PARSER_MAX))
>       {
>       expectCommaOnParenthesisCount[parenthesisCount+1] = 1;
>       }
>     if ((functionNumber == VTK_PARSER_IF) ||
>         (functionNumber == VTK_PARSER_CROSS))
>       {
>       expectTwoCommasOnParenthesisCount[parenthesisCount+1] = 1;
>       }
>     ============================================================
>
>     Now this segment has been replaced with
>
>     ============================================================
>     if ((functionNumber == VTK_PARSER_MIN) ||
>         (functionNumber == VTK_PARSER_MAX) ||
>         (functionNumber == VTK_PARSER_CROSS))
>       {
>       expectCommaOnParenthesisCount[parenthesisCount+1] = 1;
>       }
>     if (functionNumber == VTK_PARSER_IF)
>       {
>       expectTwoCommasOnParenthesisCount[parenthesisCount+1] = 1;
>       }
>     ============================================================
>
>     Now the code performs correct check on the input format in terms of
> vector cross product and the suggested functionality is supported.
>
>       Thanks for suggesting the enhancement.
>
>       new revision: 1.43; previous revision: 1.42
> It says it is fixed but it seems to exhibit the behavior  described it the
> history of this bug (in 3.4.0). Namely if you give it two arguments
> it complains
> about needing three? Is this fixed in the cvs version?
> Thanks
> Dan
> On Mar 4, 2009, at 4:23 PM, Jacques Papper wrote:
>
> Thanks for the answer. I guess I missed the cross button !
> (The whole point was that I didn't want to write out the cross product
> anymore !! :)
>
> 2009/3/4 Scott, W Alan <wascott at sandia.gov>
>>
>> Silly me, of course.  Math class was just too many years ago.
>>
>> alan
>>
>> -----Original Message-----
>> From: Pebay, Philippe P
>> Sent: Wednesday, March 04, 2009 2:59 PM
>> To: Scott, W Alan; 'Jacques Papper'; 'paraview'
>> Subject: RE: [Paraview] Calculator and vector products
>>
>> Hello
>>
>> The + sighs between cross terms should be replaced by - signs as follows:
>>    i ( a_2b_3 - a_3b_2 )
>>  + j ( a_3b_1 - a_1b_3 )
>>  + k (a_1b_2 - a_2b_1 )
>>
>> P.
>>
>> --
>> Philippe Pébay
>> Sandia National Laboratories
>>
>> ________________________________________
>> From: paraview-bounces at paraview.org [paraview-bounces at paraview.org] On
>> Behalf Of Scott, W Alan [wascott at sandia.gov]
>> Sent: Wednesday, March 04, 2009 1:30 PM
>> To: 'Jacques Papper'; 'paraview'
>> Subject: Re: [Paraview] Calculator and vector products
>>
>> I don't know if this is correct, but I took a quick attempt at making a
>> cross product.  I am using the dataset can.exo.  In the calculator, I am
>> trying to create the cross of the DISP and ACCL vectors.  Here is the
>> formula:
>>
>>
>> iHat*(DISPL_Y*VEL_Z+DISPL_Z*VEL_Y)+jHat*(DISPL_X*VEL_Z+DISPL_Z*VEL_X)+kHat*(DISPL_X*VEL_Y+DISPL_Y*VEL_X)
>>
>>
>>
>> Alan
>>
>> -----Original Message-----
>> From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org]
>> On Behalf Of Jacques Papper
>> Sent: Wednesday, March 04, 2009 12:27 PM
>> To: 'paraview'
>> Subject: [Paraview] Calculator and vector products
>>
>> I am trying to do a vector product with the Calculator, but this seems to
>> fail "Error deciding between ambiguous operators".
>> Is there a way to do vector products ? Or is this something that needs to
>> be implemented ?
>>
>> Jacques PAPPER
>> Applied CFD Team Leader
>> Tel: +44 (0) 1234 324677
>>
>>
>> ---------------------------
>> This email contains information that is private and confidential and is
>> intended only for the addressee.  If you are not the intended recipient
>> please delete it and notify us immediately by e-mailing the sender.
>> Note: All email sent to or from this address may be accessed by someone
>> other than the recipient, for system management and security reasons.
>> Aircraft Research Association Ltd.  Registered in England, Registration No
>> 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB
>> 196351245
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>



-- 
David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109


More information about the ParaView mailing list