[Paraview] Compute gradients

Aurélien Marsan aurelien.marsan at ecl2009.ec-lyon.fr
Fri Jul 2 05:28:07 EDT 2010


Here an example to compute the gradient of var, and store the result as
new_var.

g = vtk.vtkGradientFilter()
>         g.SetInput(Bloc)
>         g.SetInputScalars(0, var)
>         g.SetResultArrayName(new_var)
>         g.Update()
>
> Bloc.GetPointData().AddArray(g.GetOutput().GetPointData().GetArray(new_var))
>

Maybe you forgot the "Update" ?

2010/7/2 Adriano Gagliardi <agagliardi at ara.co.uk>

>
> Does anyone have an example of using vtkGradientFilter to compute the
> gradients of a single vector in your data-set? I've tried using
> SetInputScalars, but it tells me that there is no input array,. although
> the
> array I pass it does exist.
>
> ===================================
>
> Adriano Gagliardi MEng PhD
> Business Sector Leader
> Computational Aerodynamics
> Aircraft Research Association Ltd.
> Manton Lane
> Bedford
>
> Tel: 01234 32 4644
> E-mail: agagliardi at ara.co.uk
> Url: www.ara.co.uk
>
>
> **********************************************************************
> 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
>



-- 
Aurélien MARSAN
Doctorant Cifre Turbomeca/LMFA
aurelien.marsan at ecl2009.ec-lyon.fr
06.31.98.26.73
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100702/9f839920/attachment.htm>


More information about the ParaView mailing list