[Paraview] Pasting multiple .csv inputs together

2018-02-05 Thread David Ortley
All,

Say I have a .csv file containing x, y and z output from a simulation, and
a second .csv file with the same number of rows that contains just a single
column containing something such as pressure.

Is there a Paraview equivalent of the unix 'paste' command that will do a
column bind?

Some way to turn something that might look like:

geom.csv:
x,y,z
-1,-1,0
0,0,1.2
...

press.csv:
pres
1.23
3.45
...

into:
x,y,z,pres
-1,-1,0,1.23
0,0,1.2,3.45
...


Or some way to amend a set of points from TableToPoints with a loaded
.csv?  Obviously the assumption is that the information in the additional
file is in the same order as the loaded geometry.

-David Ortley
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://paraview.org/mailman/listinfo/paraview


[Paraview] Complex filters for structured meshes

2017-05-09 Thread David Ortley
Hello,

I work with a CFD code that uses a structured mesh.  We frequently want to
do math operations that require each cell to have knowledge of its
neighbors.  Things such as a calculating the max of a certain variable, or
a gradient in a given direction.

I'm not sure the best way to accomplish this.  I have a code snippet for
use in the programmable filter that I use (copied below), but its behavior
is similar to the calculator in that it works on individual cells without
knowledge of cell neighbors.

Can somebody A) critique my skeleton code below to let me know if I could
write it better and B) help me with figuring out a method (any method) that
has visibility of neighbor cells?

Thanks

-David Ortley


# Programmable filter snippet:
pdi=self.GetInput()
pdo=self.GetOutput()

numCells = pdi.GetNumberOfCells()
cells = pdi.GetCellData()

# Some array already in the calc results that I'm going to reason on
# say it's pressure or energy or something
orig_array = cells.GetArray("orig_array")

# Storing
new_array = vtk.vtkDoubleArray()
new_array.SetName("new_array")

for i in range(numCells):
# do some work
blah  = pkovpr.GetValue(i) * 1.23456789
# store as new val in array
new_array.InsertNextValue(blah)

# Add the array I just created to the output so Paraview can do stuff with
it
pdo.GetCellData().AddArray(betaMax)
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


[Paraview] Change request for Lights Dialog box

2016-07-29 Thread David Ortley
All,

When one clicks the 'Edit' button for the Lights section in the Properties
tab, the default behavior when [Enter] is pressed, is to reset all of the
settings.


As an example, if I were to change the Key light's Elevation, then hit
[Enter], the value gets reset.  This has bitten me more than once when I've
made a handful of changes, and then accidentally hit [Enter] just to have
all of my changes reset.


It would be nice to have behavior consistent with the other Paraview dialog
boxes.  This is on OS X (El Capitan).  I don't know if this is the behavior
on Windows/Linux/other...


-David Ortley
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


[Paraview] Slice filter to Image

2016-07-12 Thread David Ortley
All,

Is there a way to make an image out of a slice?

I want to take a slice of a 3D hydro (cell data) and turn it into an image
of just the slice, without the extra information such as the background,
perspective, etc...

I'm specifically going to be doing this in a python script that I run with
pvbatch --mpi.


If there isn't a quick way, but someone can point me to some examples that
can help me get where I'm trying to go, that would be great as well.

Thanks.

-David Ortley
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Parallel unfriendly filters?

2016-02-11 Thread David Ortley
Just an update.

Kenneth, I think I understand the logic of what you're saying.  I have a
large calculation that I'm working on this week that will require some
visualization.  I'll update this thread with my progress as I get the
chance.


-David Ortley

On Tue, Feb 9, 2016 at 7:04 AM, Dan Lipsa <dan.li...@kitware.com> wrote:

>
>>
>> Cell Data to Point Data is the only way I know of to activate the contour
>> filter for silo files.  The results are stored in cell arrays, which
>> apparently don't activate the contour filter.  I stumbled upon using Cell
>> Data to Point Data by accident, so if there's a better way to do this, I'm
>> open to it.
>>
>
> I see. I would go with Ken's suggestions, then.  I would also create a new
> array called  'vtkGhostType' from 'avtGhostZones'. You could do that
> instead of thresholding out the ghost zones. VTK knows about vtkGhostType
> name. I think you could leave those in as they should not be rendered.
>
> You can create the new array from avtGhostZone using the Calculator filter.
>
> Dan
>
>
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Parallel unfriendly filters?

2016-02-08 Thread David Ortley
Kenneth:

The ghost zones are the contents of the ghost zones stored from the
calculation. They overlap into the hydro from neighboring processors (the
silo library stores a block per processor the way we're using it in our
code.)  If I leave them in there, I get artifacts.  I'm actually
thresholding out a variable called 'avtGhostZones', which the silo
libraries call the stored ghost zone values.


Dan:

Cell Data to Point Data is the only way I know of to activate the contour
filter for silo files.  The results are stored in cell arrays, which
apparently don't activate the contour filter.  I stumbled upon using Cell
Data to Point Data by accident, so if there's a better way to do this, I'm
open to it.


Thanks.

-David Ortley

On Mon, Feb 8, 2016 at 1:35 PM, Moreland, Kenneth <kmo...@sandia.gov> wrote:

> Have you tried doing the threshold last (after the contour) rather than
> first? Generally, ParaView relies on ghost zones (cells) to avoid artifacts
> across process boundaries.
>
> -Ken
>
>
> From: ParaView <paraview-boun...@paraview.org> on behalf of David Ortley <
> djort...@gmail.com>
> Date: Monday, February 8, 2016 at 1:14 PM
> To: "paraview@paraview.org" <paraview@paraview.org>
> Subject: [EXTERNAL] [Paraview] Parallel unfriendly filters?
>
> I'm running Paraview in client/server mode with the server running on an
> HPC platform across multiple nodes.
>
> My input is a multi-block silo file that contains ghost zone information.
> The way I do a seamless contour when visualizing on my workstation is to do
> the following:
>
> Load the silo file
> -> Threshold out the ghost zones (threshold filter)
> -> Merge the blocks
> -> Cell data to point data
> -> Contour
>
> This works well enough when on a single machine.  But when visualizing
> client/server with the server running across multiple nodes, there appear
> seams on the contours.
>
> Is this an expected behavior given my setup?  Are any of the filters that
> I listed above (Threshold, Merge Blocks, Cell data to point data, and
> Contour) not fully implemented in parallel yet?
>
> nb - I've not spent a lot of time trying to debug the problem, so I don't
> know if the problem exists when a server is running on a single node only.
> It looks like something that is happening at node boundaries, but I could
> be wrong and it could be a per/processor thing.
>
> Thanks.
>
> -David Ortley
>
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


[Paraview] Parallel unfriendly filters?

2016-02-08 Thread David Ortley
I'm running Paraview in client/server mode with the server running on an
HPC platform across multiple nodes.

My input is a multi-block silo file that contains ghost zone information.
The way I do a seamless contour when visualizing on my workstation is to do
the following:

Load the silo file
-> Threshold out the ghost zones (threshold filter)
-> Merge the blocks
-> Cell data to point data
-> Contour

This works well enough when on a single machine.  But when visualizing
client/server with the server running across multiple nodes, there appear
seams on the contours.

Is this an expected behavior given my setup?  Are any of the filters that I
listed above (Threshold, Merge Blocks, Cell data to point data, and
Contour) not fully implemented in parallel yet?

nb - I've not spent a lot of time trying to debug the problem, so I don't
know if the problem exists when a server is running on a single node only.
It looks like something that is happening at node boundaries, but I could
be wrong and it could be a per/processor thing.

Thanks.

-David Ortley
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


[Paraview] Bug in 4.2 and above

2015-11-03 Thread David Ortley
All,

I've found a problem in Paraview that seems to be in every version from 4.2
to current (4.4) which involves the selecting and exporting of points as
.csv files.  This problem doesn't appear in version 4.1, and I don't recall
it appearing in versions prior, but I've not tested that fully.

I've also only tested the problem out with moderate sized data sets (around
10k or more points) and only on a Mac Pro (with 64 Gigs of Ram).

To test the problem, I used the following R script will create a file named
'break.csv' (though this seems to be a problem with any large set of
points) :

#!/usr/bin/env Rscript
# cols x,y,z are position
# col r is radius, col n is an index number
df=data.frame(x=rnorm(1),y=rnorm(1),z=rnorm(1),n=seq(1))
df$r=sqrt(df$x**2 + df$y**2 + df$z**2)
write.csv(df, 'break.csv', row.names=F, quote=F)



Load the file in Paraview, then add 'Table To Points', assigning X,Y and Z
appropriately.
Enable the 'Table To Points' filter in the 3D view and use the 'Select
points through (g)' button on the 3D view to select about half of the
points.

In the Spreadsheet view, make sure the 'TableToPoints*' filter is selected
and click the 'Show only selected elements'.

With the Spreadsheet view still active:
File -> Export Scene...
and save the file as a .CSV.

If you load the newly saved .CSV file and apply 'Table To Points' to
Points:0, Points:1 and Points:2, the data is a mess (you may have to reset
your view to see some of the mess.)

Is anybody else able to reproduce this?  If so, is there already an open
ticket somewhere, or does a bug report need to be written?

-David Ortley.
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Smooth seams in SILO files

2015-02-25 Thread David Ortley
Utkarsh:

Thanks.  That did the trick.  I had to add a 'Threshold' filter in the mix
to remove the ghost cells, which were confusing the 'Merge Blocks' filter.

I've actually been staring at those boundary lines for over a year and a
half and I've very glad to finally have them gone

Again, thank you very much.

-David Ortley

On Wed, Feb 25, 2015 at 7:26 AM, Utkarsh Ayachit 
utkarsh.ayac...@kitware.com wrote:

 Try applying Merge Blocks and before applying the
 CellDatatoPointData. ParaView indeed treats each block separately.
 When you do Merge Blocks, it will merge all the blocks into a single
 unstructured grid. This will make it possible to get a more reliable
 CellDataToPointData conversion across the block seams and hence avoid
 the seams on contouring.

 Utkarsh

 On Tue, Feb 24, 2015 at 6:13 PM, David Ortley djort...@gmail.com wrote:
  Hello all,
 
  We have a CFD code that generates silo files using the silo library.  For
  each dump in the simulation, there are multiple files per dump (one file
 per
  processor) and a single master file.
 
  When we use Visit to visualize a contour, the contours look good.  When
  using Paraview (any version), there exist obvious seams at the file
  boundaries.  To visualize in Paraview, we use the 'CellDatatoPointData'
  filter followed by the 'Contour' filter.
 
  I'm currently trying to track down if either Visit is magically healing
 over
  a bug in our implementation, or if the problem lies with Paraview
  somehow...or with how I'm trying to generate the contour (via the
  'CellDatatoPointData' filter.)
 
 
  It almost looks like Paraview is treating the edge of each file as if it
  were an open boundary regardless of whether it is buttressed up against
  another file.
 
  Thanks for any help in this.
 
  -David Ortley
 
  ___
  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
 
  Search the list archives at: http://markmail.org/search/?q=ParaView
 
  Follow this link to subscribe/unsubscribe:
  http://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


[Paraview] Smooth seams in SILO files

2015-02-24 Thread David Ortley
Hello all,

We have a CFD code that generates silo files using the silo library.  For
each dump in the simulation, there are multiple files per dump (one file
per processor) and a single master file.

When we use Visit to visualize a contour, the contours look good.  When
using Paraview (any version), there exist obvious seams at the file
boundaries.  To visualize in Paraview, we use the 'CellDatatoPointData'
filter followed by the 'Contour' filter.

I'm currently trying to track down if either Visit is magically healing
over a bug in our implementation, or if the problem lies with Paraview
somehow...or with how I'm trying to generate the contour (via the
'CellDatatoPointData' filter.)


It almost looks like Paraview is treating the edge of each file as if it
were an open boundary regardless of whether it is buttressed up against
another file.

Thanks for any help in this.

-David Ortley
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview