Re: [Paraview] Need help with programmable filter output

2012-11-30 Thread Berk Geveci
Output should be vtkTable. By the way, if you have numpy installed, this
could be done much more efficiently and in less code. See

http://paraview.org/Wiki/ParaView/Users_Guide/Python_Programmable_Filter
http://paraview.org/Wiki/ParaView/Users_Guide/Python_Calculator

You may also want to check the numpy documentation.

In general, if your data is medium to large, you want to avoid for loops
over all cells/points in Python.

Best,
-berk


On Thu, Nov 29, 2012 at 11:35 PM, Scott Ripplinger wrote:

> I am attempting to run an analysis on some data which requires summing up
> some numbers down to a single value for the whole domain for each time
> step.  I'm having trouble figuring out how to get the output and what VTK
> classes and functions to use.  Here is what I have so far:
>
> import math
>
> input = self.GetInputDataObject(0,0)
>
> output = self.GetOutputDataObject(0)
>
> numPoints = input.GetNumberOfPoints()
>
> points = input.GetPointData()
>
> SurfCvg = 0
>
> for i in xrange(numPoints):
>
>  d = points.GetArray('d').GetValue(i)
>
>  coords = input.GetPoint(i)
>
>  z = coords[2]
>
>  h = 0.00015 - abs(z - 0.00015) - 0.5*d
>
>  H0 = 2*h/d
>
>  if (H0 < 0.002):
>
>   SurfCvg = SurfCvg + 0.25*math.pi*d*d
>
> Theta = SurfCvg/(0.01*0.001)
>
> outputarray = vtk.vtkFloatArray()
>
> outputarray.SetNumberOfValues(1)
>
> outputarray.SetValue(0, Theta)
>
> output.GetRowData().AddArray(outputarray)
>
>
> I'm not even sure what to use as the output data set type.  In the end I
> need to plot (or export as a table) the value of "Theta" across all my time
> steps.  Any guidance would be appreciated.
>
>
> -Scott
>
> ___
> 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


Re: [Paraview] Compare two alike datasets

2012-11-30 Thread Berk Geveci
A pipeline copy & paste would be nice. Unfortunately it doesn't exist. The
closest things are macro and trace:

http://paraview.org/Wiki/ParaView/UsersGuide/Macros
http://paraview.org/Wiki/Python_GUI_Tools

Best,
-berk


On Tue, Nov 27, 2012 at 6:35 AM, Florian Lindner wrote:

> Hello,
>
> I user Paraview to postprocess openfoam CFD data. A frequent use case is to
> compare two datasets that have minor variations (geometry, mesh, boundary
> condition).
>
> Currently I find myself loading both datasets, splitting the 3D view and
> linking the camera. For processing the data I need to add and configure
> each
> filter twice to the pipeline, but each filter identically.
>
> Is there a way to apply filters simultaneously two both (all) datasets.
> I've
> tried a comparative view, but did not found it useful (or did not
> understand
> entirely).
>
> Thanks,
>
> Florian
> ___
> 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


Re: [Paraview] (no subject)

2012-11-30 Thread Timothy Cale
Sebastien:

Good question:

My goal is to have a script which smooths results between simulation steps
(fortran codes).

I use paraview to view results, and the smoothing filter in paraview seems
to do what I want.

I want to start with a Trace-generated python script, and edit it to write
the vertices and element
info to a file (.ply would be nice) that the next code can read.

So, fortunately for me (in some sense), I decided to upgrade my ubuntu OS
to 12.10. This has
paraview 3.14.1-6build1 on its software list (aptitude).

This version corrected a bug (with pvpython) in the version of paraview
3.14 that I was using.
(I also spent a day trying to get/install other versions. That was not very
successful.)

Now if I import the trace generated py file, it pops up (and stays). Not a
very good image, but it is
a start!

Being new to python and paraview, this is quite a step.

Any suggestions as to how to write vertex/node info would be appreciated.


Thanks,
Tim

On Thu, Nov 29, 2012 at 7:41 PM, Sebastien Jourdain <
sebastien.jourd...@kitware.com> wrote:

> I don't know ? what your script is supposed to do ? Render an image and
> quit ?
>
>
> On Thu, Nov 29, 2012 at 1:19 PM, Timothy Cale wrote:
>
>> I am using paraview 3.14 (64 bit, ubuntu 12.04 vm on a MBP).
>>
>> I am trying to run pvpython to view .py files generated using Trace:
>>
>> 'which' pvpython' yields: /usr/bin/pvpython
>>
>> 'pvpython' yields: Error converting executable file
>> "/usr/bin/../lib/paraview/pvpython" to real path: No such file or directory
>>
>> So, /usr/bin/python seems to be looking for /usr/lib/paraview/pvpython
>>
>> Which is indeed not there.
>>
>> I uninstalled (purged) and installed 3.14 again. Same thing.
>>
>> BTW: I did see the notes regarding 3.14.1-2 from ~6 months ago, but
>> cannot tell which 3.14 binary installer is on the
>> Paraview download page.
>>
>> Nevertheless, I downloaded the 3.14 tar-ball.
>>
>> When I run a .py script generated using trace, an image pops up for a
>> second, then disappears.
>>
>> BTW: The same thing happens with 3.98, at least on a companion machine.
>>
>> What am I missing?
>>
>> Thanks,
>> Tim
>>
>>
>>
>> ___
>> 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


[Paraview] Fwd: (no subject)

2012-11-30 Thread Timothy Cale
Sebastien:

The data file I attached to the previous version of this update note was
too large.

I am resending the note with that file removed.

Tim

-- Forwarded message --
From: Timothy Cale 
Date: Fri, Nov 30, 2012 at 1:03 PM
Subject: Re: [Paraview] (no subject)
To: Sebastien Jourdain 
Cc: "paraview@paraview.org" 


Update:

I am able to write a ply file using CreateWriter (see attached
first_stab.py and nanovtp files).
But the ply file is in binary.

I looked around for more than an hour to find out how to write the file in
ascii - to no avail.

Any hints?

Aside: When I put in 0 (for ascii) as a third arg. to CreateWriter,
pvpython complained about
having more than 2 arguments. I note that in the paraview users guide,
CreateWriter has
several arguments in some cases. help(CreateWriter) indicates that more
than 2 arguments
can be used:

>>> help(CreateWriter)

Help on function CreateWriter in module paraview.simple:


CreateWriter(filename, proxy=None, **extraArgs)

Creates a writer that can write the data produced by the source proxy in

the given file format (identified by the extension). If no source is

provided, then the active source is used. This doesn't actually write the

data, it simply creates the writer and returns it.

Regards,
Tim

On Fri, Nov 30, 2012 at 10:15 AM, Timothy Cale  wrote:

> Sebastien:
>
> Good question:
>
> My goal is to have a script which smooths results between simulation steps
> (fortran codes).
>
> I use paraview to view results, and the smoothing filter in paraview seems
> to do what I want.
>
> I want to start with a Trace-generated python script, and edit it to write
> the vertices and element
> info to a file (.ply would be nice) that the next code can read.
>
> So, fortunately for me (in some sense), I decided to upgrade my ubuntu OS
> to 12.10. This has
> paraview 3.14.1-6build1 on its software list (aptitude).
>
> This version corrected a bug (with pvpython) in the version of paraview
> 3.14 that I was using.
> (I also spent a day trying to get/install other versions. That was not
> very successful.)
>
> Now if I import the trace generated py file, it pops up (and stays). Not a
> very good image, but it is
> a start!
>
> Being new to python and paraview, this is quite a step.
>
> Any suggestions as to how to write vertex/node info would be appreciated.
>
>
> Thanks,
> Tim
>
> On Thu, Nov 29, 2012 at 7:41 PM, Sebastien Jourdain <
> sebastien.jourd...@kitware.com> wrote:
>
>> I don't know ? what your script is supposed to do ? Render an image and
>> quit ?
>>
>>
>> On Thu, Nov 29, 2012 at 1:19 PM, Timothy Cale wrote:
>>
>>> I am using paraview 3.14 (64 bit, ubuntu 12.04 vm on a MBP).
>>>
>>> I am trying to run pvpython to view .py files generated using Trace:
>>>
>>> 'which' pvpython' yields: /usr/bin/pvpython
>>>
>>> 'pvpython' yields: Error converting executable file
>>> "/usr/bin/../lib/paraview/pvpython" to real path: No such file or directory
>>>
>>> So, /usr/bin/python seems to be looking for /usr/lib/paraview/pvpython
>>>
>>> Which is indeed not there.
>>>
>>> I uninstalled (purged) and installed 3.14 again. Same thing.
>>>
>>> BTW: I did see the notes regarding 3.14.1-2 from ~6 months ago, but
>>> cannot tell which 3.14 binary installer is on the
>>> Paraview download page.
>>>
>>> Nevertheless, I downloaded the 3.14 tar-ball.
>>>
>>> When I run a .py script generated using trace, an image pops up for a
>>> second, then disappears.
>>>
>>> BTW: The same thing happens with 3.98, at least on a companion machine.
>>>
>>> What am I missing?
>>>
>>> Thanks,
>>> Tim
>>>
>>>
>>>
>>> ___
>>> 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
>>>
>>>
>>
>


first_stab.py
Description: Binary data
___
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


Re: [Paraview] How to install into /usr/lib64 with 3.98.0 RC3?

2012-11-30 Thread Orion Poplawski

On 11/29/2012 07:27 PM, Sebastien Jourdain wrote:

That should work but you can also try with VTK_INSTALL_LIB_DIR.


Looks like they are replaced with:
-DVTK_INSTALL_INCLUDE_DIR
-DVTK_INSTALL_ARCHIVE_DIR
-DVTK_INSTALL_LIBRARY_DIR

which seems to work.


So where those library being copied then ?

Thanks,

Seb


On Wed, Nov 28, 2012 at 5:35 PM, Orion Poplawski mailto:or...@cora.nwra.com>> wrote:

In the past I've made paraview install libraries into /usr/lib64/paraview
with -DPV_INSTALL_LIB_DIR:PATH=__lib64/paraview, but this appears to no
longer work.  How can I do this now?

--
Orion Poplawski
Technical Manager 303-415-9701 x222 
NWRA, Boulder Office  FAX: 303-415-9702 
3380 Mitchell Lane or...@nwra.com 
Boulder, CO 80301 http://www.nwra.com
_
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






--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA, Boulder Office  FAX: 303-415-9702
3380 Mitchell Lane   or...@nwra.com
Boulder, CO 80301   http://www.nwra.com
___
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


[Paraview] ANN: ParaView GateKeeper Review Summary

2012-11-30 Thread Sebastien Jourdain
Hi all,

Caution, from now on, topics that were in next before the gatekeeper
review and that haven't been merged to master will be automatically
removed from next so next will basically be equivalent to master.

In an effort to clean up stage please remove any deprecated or dead
branches that belong to you.

Thank you,

Seb

-
Topics merged into master
-

   13691_launch_CoProcessingTestPythonScript_fix
   13693_CheckFortran_missing
   fix-sq-mpi-error
   meminsp-fix
   prominent-value-fix
   update-nightly-binary-version

-
Topics remaining on stage (NOT in NEXT)
-

   topic_commandproperty_314
   vr_improvements
   12742_scalar_bar_improvements
   co-processing-fortran-utilities
   MPLFix
   fix-use-directory-name-hint
   remove-use-new-panels-flag
   13598-VRGrabWorldFix
   AddTransformsToRepresentations
   13374-slac-multiple-modes
   tmp
   amr_streaming_pass2
   array-calculator-field-data-support
   update_manta_test
   13024-debug-leaks-view
   streaming-temporal-AMR
   13047_java_wrapping_for_paraviewcore_and_eclipse_swt_rendering

-
Git cheat sheet
-

# Merge a branch from stage to next:
# ---
$ ssh g...@paraview.org stage ParaView merge YOUR_STAGE_BRANCH_NAME

# Delete your branch from stage:
# ---
$ git push stage :YOUR_STAGE_BRANCH_NAME

# To rebase your work on top of master
# ---
$ git fetch origin
$ git checkout -b YOUR_STAGE_BRANCH_NAME stage/YOUR_STAGE_BRANCH_NAME
$ git rebase origin/master
$ git push stage :YOUR_STAGE_BRANCH_NAME
$ git stage-push
$ git stage-merge
___
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


[Paraview] new memory inspector panel documentation

2012-11-30 Thread burlen

Documentation for the new memory inspector panel can be found here:

http://paraview.org/Wiki/ParaView/Memory_Inspector_Panel

The new panel reports per-process usage and provides some additional 
debugging tools. It should be available in the 3.98 release.


Burlen

___
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