Re: [Paraview] Error reading timeseries with spatial grid collection with XDMF

2017-11-20 Thread Nikolaos Beratlis
I tried reading them with XDMF 3 reader and it works fine.

Thank you for the suggestions.

Nikos

On Mon, Nov 20, 2017 at 2:14 PM, David E DeMarle 
wrote:

> It might be that the reader doesn't like or want that both of your times
> are 0.0.
> ...
> 
> ...
> 
> ...
> but your third case doesn't fit that hypothesis.
>
> Otherwise your file looks ok at first glance. I'ld have to debug the
> reader on your data to figure out what is going wrong.
>
> David E DeMarle
> Kitware, Inc.
> Principal Engineer
> 21 Corporate Drive
> <https://maps.google.com/?q=21+Corporate+Drive+Clifton+Park,+NY+12065&entry=gmail&source=g>
> Clifton Park, NY 12065
> <https://maps.google.com/?q=21+Corporate+Drive+Clifton+Park,+NY+12065&entry=gmail&source=g>
> -8662
> Phone: 518-881-4909 <(518)%20881-4909>
>
> On Sun, Nov 12, 2017 at 11:15 PM, Joachim Pouderoux <
> joachim.pouder...@kitware.com> wrote:
>
>> Nikos,
>>
>> It looks like you are using the Xdmf2 based reader.
>> Did you give a chance to the one based on Xdmf3?
>> What version of ParaView are you using?
>> Can you provide a full dataset we could use to reproduce the issue?
>>
>> Best,
>>
>>
>> *Joachim Pouderoux*, PhD
>>
>> *Technical Expert - Scientific Computing Team*
>> *Kitware SAS <http://www.kitware.fr>*
>>
>>
>> 2017-11-11 19:31 GMT+01:00 Nikolaos Beratlis :
>>
>>> Hi,
>>>
>>> I have a cartesian structured grid made of two sub-domains and a two
>>> snap shots in a time that I would like to read in Paraview. The data and
>>> grid files are stored in HDF5 file and I use a XDMF file to read them in a
>>> Paraview. The XDMF files looks like this:
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>>
>>> 
>>> 
>>> 
>>> >> Format="HDF">
>>> ../grid_VPreg_vxvyvz.h5sp:/XC-zone0001
>>> 
>>> >> Format="HDF">
>>> ../grid_VPreg_vxvyvz.h5sp:/YC
>>> 
>>> >> Format="HDF">
>>> ../grid_VPreg_vxvyvz.h5sp:/ZC-zone0001
>>> 
>>> 
>>> 
>>> >> Format="HDF">
>>> ../Q_VPreg.h5sp.0001:/zone0001
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>> 
>>> >> Format="HDF">
>>> ../grid_VPreg_vxvyvz.h5sp:/XC-zone0002
>>> 
>>> >> Format="HDF">
>>> ../grid_VPreg_vxvyvz.h5sp:/YC
>>> 
>>> >> Format="HDF">
>>> ../grid_VPreg_vxvyvz.h5sp:/ZC-zone0002
>>> 
>>> 
>>> 
>>> >> Format="HDF">
>>> ../Q_VPreg.h5sp.0001:/zone0002
>>> 
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>>
>>> 
>>> 
>>> 
>>> >> Format="HDF">
>>> ../grid_VPreg_vxvyvz.h5sp:/XC-zone0001
>>> 
>>> >> Format="HDF">
>>> ../grid_VPreg_vxvyvz.h5sp:/YC
>>> 
>>> >> Format="HDF">
>>> ../grid_VPreg_vxvyvz.h5sp:/ZC-zone0001
>>> 
>>> 
>>> 
>>> >> Format="HDF">
>>> ../Q_VPreg.h5sp.0001:/zone0001
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>> 
>>> >> Format="HDF">
>>> ../grid_VPreg_vxvyvz.h5sp:/XC-zone0002
>>> 
>>> >> Format="HDF">
>>> ../grid_VPreg_vxvyvz.h5sp:/YC
>>> 
>>> >> Format="HDF">
>>> ../grid_VPreg_vxvyvz.h5sp:/ZC-zone0002
>>> 
>>> 
>>> 
>>> >> Format="HDF">
>>> ../Q_VPreg.h5sp.0002:/zone0002
>>> 
>>> 
>>> 
>>>
>>> 
>>>
>>> 
>>> 
>>> 
>>>
>>> The file is read in Paraview. When I advance in to the second instant in
>>> time I get the following error:
>>>
>>> Failed to read attribute data.
>>>
>>> Paraview shows data from the first subset (zone0001), it can't read the
>>> data from the second subset (zone0002).
>>>
>>>
>>> When I read only on instant in time like this:
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>>
>>> 
>>> 
&

[Paraview] Error reading timeseries with spatial grid collection with XDMF

2017-11-11 Thread Nikolaos Beratlis
Hi,

I have a cartesian structured grid made of two sub-domains and a two snap
shots in a time that I would like to read in Paraview. The data and grid
files are stored in HDF5 file and I use a XDMF file to read them in a
Paraview. The XDMF files looks like this:














../grid_VPreg_vxvyvz.h5sp:/XC-zone0001


../grid_VPreg_vxvyvz.h5sp:/YC


../grid_VPreg_vxvyvz.h5sp:/ZC-zone0001




../Q_VPreg.h5sp.0001:/zone0001








../grid_VPreg_vxvyvz.h5sp:/XC-zone0002


../grid_VPreg_vxvyvz.h5sp:/YC


../grid_VPreg_vxvyvz.h5sp:/ZC-zone0002




../Q_VPreg.h5sp.0001:/zone0002












../grid_VPreg_vxvyvz.h5sp:/XC-zone0001


../grid_VPreg_vxvyvz.h5sp:/YC


../grid_VPreg_vxvyvz.h5sp:/ZC-zone0001




../Q_VPreg.h5sp.0001:/zone0001








../grid_VPreg_vxvyvz.h5sp:/XC-zone0002


../grid_VPreg_vxvyvz.h5sp:/YC


../grid_VPreg_vxvyvz.h5sp:/ZC-zone0002




../Q_VPreg.h5sp.0002:/zone0002










The file is read in Paraview. When I advance in to the second instant in
time I get the following error:

Failed to read attribute data.

Paraview shows data from the first subset (zone0001), it can't read the
data from the second subset (zone0002).


When I read only on instant in time like this:














../grid_VPreg_vxvyvz.h5sp:/XC-zone0001


../grid_VPreg_vxvyvz.h5sp:/YC


../grid_VPreg_vxvyvz.h5sp:/ZC-zone0001




../Q_VPreg.h5sp.0001:/zone0001








../grid_VPreg_vxvyvz.h5sp:/XC-zone0002


../grid_VPreg_vxvyvz.h5sp:/YC


../grid_VPreg_vxvyvz.h5sp:/ZC-zone0002




../Q_VPreg.h5sp.0001:/zone0002









the file is read successfully and no errors show up.

Also when I read two time instants but with only one subset (zone0001)
Paraview doesn't throw any errors.














../grid_VPreg_vxvyvz.h5sp:/XC-zone0001


../grid_VPreg_vxvyvz.h5sp:/YC


../grid_VPreg_vxvyvz.h5sp:/ZC-zone0001




../Q_VPreg.h5sp.0001:/zone0001











../grid_VPreg_vxvyvz.h5sp:/XC-zone0001


../grid_VPreg_vxvyvz.h5sp:/YC


../grid_VPreg_vxvyvz.h5sp:/ZC-zone0001




../Q_VPreg.h5sp.0001:/zone0001











Does anyone see the problem in the code?

Kind regards,

Nikos
___
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] Error reading XDMF file

2017-08-29 Thread Nikolaos Beratlis
Hi,

I have the following XDMF file:



http://www.w3.org/2003/XInclude"; Version="2.0">
  
  

  
  

 ../grid3dc_vxvyvz_VP.h5sp:/X


 ../grid3dc_vxvyvz_VP.h5sp:/Y


 ../grid3dc_vxvyvz_VP.h5sp:/Z

  
  

 ../Qcrit.0001.h5sp:/var3d

  
   
  


I can read the file into Paraview 5.0 without any problems. When I try to
read it with Paraview 4.1 I get the following error message:

ERROR: In
/Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Xdmf2/vtkXdmfHeavyData.cxx,
line 1126

vtkXdmfReader (0x1177e62f0): Failed to read attribute data

It seems that Paraview 4.1 reads the grid fine but it can't read the
attribute. Any idea what is wrong?


Regards,


Nikos
___
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] Reading a vector with XDMF and structured grid

2017-05-01 Thread Nikolaos Beratlis
Hi,

I am trying to read a vector on a cartesian structured grid from 3 separate
scalar variables as follows:



http://www.w3.org/2003/XInclude"; Version="2.2">
  
  

  
  

 ../grid3dc_vxvyvz_phavg.h5sp:/X


 ../grid3dc_vxvyvz_phavg.h5sp:/Y


 ../grid3dc_vxvyvz_phavg.h5sp:/Z

  
  

 ../uc_phavg.0001.h5sp:/var3d


 ../vc_phavg.0001.h5sp:/var3d


 ../wc_phavg.0001.h5sp:/var3d

  
   
  



Paraview crashes. Is this the right way to read a vector from 3 separate
files?

Regards,

Nikos
___
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] Help with adjusting contour levels in python script

2016-05-02 Thread Nikolaos Beratlis
Hi,

I am running a small python code with pvbatch that read a XDMF file and
plots contours:

cf_VP_anim_xmf = XDMFReader( FileName=wdir+'VPfield_files/XDMF/cf_VP'
+index[i]+'.xmf' )


cf_VP_anim_xmf.CellArrays = []

cf_VP_anim_xmf.Sets = []

cf_VP_anim_xmf.PointArrays = ['Cf']


RenderView1 = GetRenderView()

a1_Cf_PVLookupTable = GetLookupTableForArray( "Cf", 1 )


Cfcontours = Show()

Cfcontours.EdgeColor = [0.0, 0.0, 0.5762951094835]

Cfcontours.SelectionPointFieldDataArrayName = 'Cf'

Cfcontours.ScalarOpacityFunction = []

Cfcontours.ColorArrayName = 'Cf'

Cfcontours.ScalarOpacityUnitDistance = 2.4071425938556859

Cfcontours.LookupTable = a1_Cf_PVLookupTable

Cfcontours.ScaleFactor = 15.0


cf_VP_anim_xmf.Grids = ['STL Grid']


RenderView1.CacheKey = 2.0

RenderView1.CameraClippingRange = [288.47079837284241,
299.16435388730815]

RenderView1.UseCache = 0


a1_Cf_PVLookupTable = GetLookupTableForArray( "Cf", 1, RGBPoints=[-
0.0001, 0.0, 0.0, 1.0, 0.0001, 1.0, 0.0, 0.0], LockScalarRange=1,
ColorSpace='HSV' )


separationline = Contour( PointMergeMethod="Uniform Binning" )


separationline.ContourBy = ['POINTS', 'Cf']

separationline.Isosurfaces = [0.0]


DataSeparationLine = Show()

DataSeparationLine.ScaleFactor = 12.321390008926393

DataSeparationLine.SelectionPointFieldDataArrayName = 'Cf'

DataSeparationLine.EdgeColor = [0.0, 0.0, 0.5762951094835]

DataSeparationLine.LineWidth = 2.0

DataSeparationLine.DiffuseColor = [0.0, 0.0, 0.0]


DataSeparationLine.ColorArrayName = ''


Cfcontours.Visibility = 1


#--- Setup view

RenderView1 = GetRenderView()

RenderView1.Background = [1.0, 1.0, 1.0]

RenderView1.CenterAxesVisibility = 0

RenderView1.OrientationAxesVisibility = 0

RenderView1.ViewSize = [1450, 300]


RenderView1.InteractionMode = '3D'

RenderView1.CameraClippingRange = [120.40716073726786,
126.85668499830999]

RenderView1.CameraPosition = [25.95, 41.63, 1.43]

RenderView1.CameraFocalPoint = [4.31, 5.36, 4.77]

RenderView1.CameraViewUp = [0.93, -0.36, -0.053]


#--- Uncomment for 2D Interaction Mode

#RenderView1.CameraParallelScale = 5.5


a1_Cf_PVLookupTable = GetLookupTableForArray( "Cf", 1, RGBPoints=[-
0.0001, 0.0, 0.0, 1.0, 0.0001, 1.0, 0.0, 0.0], LockScalarRange=1 )


#--- Export image

Render()

WriteImage(wdir+'POSTPRO/IMAGES/cf_view1_'+index[i]+'.jpg')

I set the range of the contours from -0.0001 to 0.0001 but the contours
levels revert back to automatic scaling instead of the range that I
specify. I am using version 3.98 of Paraview but I also tried with version
4.1.0. Why is this happening? Do I miss something in my script?

Nikos
___
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] How to change background color on scatter plot?

2015-03-06 Thread Nikolaos Beratlis
I have a scatter plot like this one


​

and I want to change the background color from white to green or some other
color. How can I do that?

Regards,

Nikos
___
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] XY plot of time series

2015-03-05 Thread Nikolaos Beratlis
Hi,

I am trying to create a plot of a time series. I read one file (0001) as
follows:



http://www.w3.org/2003/XInclude"; Version="2.2">
  
  

  
  

 ../VPfield_files/grid3dc_vxvyvz_VP.h5sp:/X


 ../VPfield_files/grid3dc_vxvyvz_VP.h5sp:/Y


 ../VPfield_files/grid3dc_vxvyvz_VP.h5sp:/Z

  
  

 ../VPfield_files/ufluct.0001.h5sp:/var3d

  
  

 ../VPfield_files/wfluct.0001.h5sp:/var3d

  
   
  


and I create a XY plot of the data as shown below:



I want to superimpose on the same plot the data from the other files
(0002-0025). Because the grid files are large and there are many files in
the series I would like to do it without loading all the data
simultaneously because I would ran out of memory. Is there a way to do this
efficiently?

Regards,

Nikos
​
___
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] Attribute recalculation at center

2015-03-05 Thread Nikolaos Beratlis
HI,

I have a cartesian grid which I read into paraview along with its attribute
as follows:



http://www.w3.org/2003/XInclude"; Version="2.2">
  
  

  
  

 ../grid3dc_vxvyvz_VP.h5sp:/X


 ../grid3dc_vxvyvz_VP.h5sp:/Y


 ../grid3dc_vxvyvz_VP.h5sp:/Z

  
  

 ../u_tmavg_cyl2car.h5sp:/var3d

  
  

 ../w_tmavg_cyl2car.h5sp:/var3d

  
   
  



The variables are 3D arrays of size 202 x 100 x 100 (NZ x NY x NX). I want
to create new variables as:

do k=2,NZ
do j=1,NY
do i=1,NX
  Wnew(i,j,k) = 0.5*( W(i,j,k-1) + W(i,j,k) )
enddo
enddo
enddo

and

do k=1,NZ
do j=1,NY
do i=2,NX
  Unew(i,j,k) = 0.5*( U(i-1,j,k) + U(i,j,k) )
enddo
enddo
enddo

I try to use the calculator filter but there is no option to specify the
indices. How can I do that within 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] Help with producing a X Y plot of a scalar

2015-03-04 Thread Nikolaos Beratlis
Hi,

I have a cartesian grid and two scalars U, W that I read into paraview as
follows:



http://www.w3.org/2003/XInclude"; Version="2.2">
  
  

  
  

 ../grid3dc_vxvyvz_VP.h5sp:/X


 ../grid3dc_vxvyvz_VP.h5sp:/Y


 ../grid3dc_vxvyvz_VP.h5sp:/Z

  
  

 ../oy_tmavg_cyl2car.h5sp:/var3d

  
  

 ../oy_tmavg_cyl2car.h5sp:/var3d

  
   
  



I then multiply U*W using the calculator to get a new variable UW. What I
want to do is create a scatter plot of the variable UW at a particular a
slice in the domain where in the X-axis I have U variable and in the Y-axis
I have W variable. The end result would like this


​
Paraview has a function called scatter plot but it only allows to specify
one axis, the X-axis data. How can I specify the Y-axis to be a different
variable?

Regards,

Nikos
___
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] Help with memory crash?

2015-01-08 Thread Nikolaos Beratlis
After reading about memory leaks I modified the script at the end by adding
"del" after "Delete":

  Delete(DataRepresentation4)
  del DataRepresentation4
  Delete(Contour2)
  del Contour2
  Delete(DataRepresentation3)
  del DataRepresentation3
  Delete(Q_VP_xmf)
  del Q_VP_xmf
  Delete(DataRepresentation2)
  del DataRepresentation2
  Delete(Contour1)
  del Contour1
  Delete(DataRepresentation1)
  del DataRepresentation1
  Delete(cf_VP_xmf)
  del cf_VP_xmf

That should fully delete the objects from the memory and it helped a little
but I still have memory leaks. Before the script memory usage in the Memory
Inspector is 1.4Gb and after one iteration it increases to 4Gb, compared to
10Gb without the del statements. After 4 iterations the memory usage
increases to 8Gb. Any ideas on how to track and eliminate completely the
memory leaks? I am forgetting to delete an object from the script?



On Wed, Jan 7, 2015 at 9:17 PM, Nikolaos Beratlis 
wrote:

> So I did some more tests by running the script interactively. I used a
> smaller grid first, 2002 x 20 x 1000 points and ran it only for 1
> iteration. When Paraview loaded the memory usage on the server was 1.04GB.
> After doing one iteration the memory usage spiked to 10.42GB and remained
> like that when the script finished. What I found out is the Delete
> statements make no difference at all, with or without them the memory usage
> remained 10.42GB. Performing more iterations in the script actually worsens
> this problem, after 4 iterations the memory used increased to 14.32GB. With
> a larger grid of 2002 x 100 x 1000 points the memory after one iteration
> increased from 10.42GB before the script to 45.25GB after the script. How
> can I properly delete all datasets and clear the memory in Paraview?
>
>
>
> On Wed, Jan 7, 2015 at 2:55 PM, Nikolaos Beratlis <
> nikos.berat...@gmail.com> wrote:
>
>> I am trying to run a script on a cluster with Paraview in parallel. The
>> cluster architecture is 16cores and 64GB per node. The script reads in two
>> XMF files, one contains a grid of 2002x100x1000 points along with one
>> variable. There is a loop to perform two iterations:
>>
>> try: paraview.simple
>> except: from paraview.simple import *
>> paraview.simple._DisableFirstRenderCameraReset()
>>
>> RenderView1 = GetRenderView()
>> RenderView1.Background = [1.0, 1.0, 1.0]
>> view = GetActiveView()
>> view.ViewSize = [ 800, 500 ]
>>
>> RenderView1.CenterAxesVisibility = 0
>> #RenderView1.OrientationAxesVisibility = 0
>>
>> #Define variables
>> wdir =
>> '/lustre/groups/balarasgrp/nikosb/Research/Simulations/golfball/stationary/S120/Re20/gridC1/run_wm'
>> #wdir =
>> '/Users/nikosb/colone/Research/Simulations/golfball/stationary/S120/Re20/gridC1/run_wm'
>> #wdir = '/Users/nikosb/Research/Simulations/SPHERE/Re100/gridC1/run'
>> Qval = 0.1
>> cfmin = -0.001
>> cfmax = 0.005
>>
>> index = [None]*
>>
>> m = 0
>> for i in range(0, 9):
>>   for j in range(0, 9):
>> for k in range(0, 9):
>>   for l in range(0, 9):
>> index[m] = chr(i+48)+chr(j+48)+chr(k+48)+chr(l+48)
>> m = m+1
>>
>>
>> for i in range(1,3):
>>
>>   cf_VP_xmf = XDMFReader(
>> FileName=wdir+'/VPfield/XDMF/cf_VP'+index[i]+'.xmf' )
>>
>>   cf_VP_xmf.Sets = []
>>   cf_VP_xmf.Grids = ['STL Grid']
>>   cf_VP_xmf.PointArrays = ['Cf']
>>
>>   RenderView1 = GetRenderView()
>>   RenderView1.CenterOfRotation = [6.2286853790283203e-06,
>> 2.5033950805664062e-06, 7.1227550506591797e-06]
>>
>>   DataRepresentation1 = Show()
>>   DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5762951094835]
>>   DataRepresentation1.SelectionPointFieldDataArrayName = 'Cf'
>>   DataRepresentation1.ColorArrayName = ('POINT_DATA', 'Cf')
>>   DataRepresentation1.ScalarOpacityUnitDistance = 0.03392870483226
>>   DataRepresentation1.ScaleFactor = 0.08557567596444
>>
>>   a1_Cf_PVLookupTable = GetLookupTableForArray( "Cf", 1,
>> RGBPoints=[-0.0099065126851201057, 0.23001,
>> 0.29899, 0.754, 0.0097341262735426426, 0.86499,
>> 0.86499, 0.86499, 0.029374765232205391,
>> 0.70596, 0.016, 0.14999], VectorMode='Magnitude',
>> NanColor=[0.25, 0.0, 0.0], ColorSpace='Diverging',
>> ScalarRangeInitialized=1.0 )
>>   a1_Cf_PiecewiseFunction = CreatePiecewiseFunction(
>> Points=[-0.0099065126851201057, 0.0, 0.5, 0.0, 0.029374765232

Re: [Paraview] Help with memory crash?

2015-01-07 Thread Nikolaos Beratlis
So I did some more tests by running the script interactively. I used a
smaller grid first, 2002 x 20 x 1000 points and ran it only for 1
iteration. When Paraview loaded the memory usage on the server was 1.04GB.
After doing one iteration the memory usage spiked to 10.42GB and remained
like that when the script finished. What I found out is the Delete
statements make no difference at all, with or without them the memory usage
remained 10.42GB. Performing more iterations in the script actually worsens
this problem, after 4 iterations the memory used increased to 14.32GB. With
a larger grid of 2002 x 100 x 1000 points the memory after one iteration
increased from 10.42GB before the script to 45.25GB after the script. How
can I properly delete all datasets and clear the memory in Paraview?



On Wed, Jan 7, 2015 at 2:55 PM, Nikolaos Beratlis 
wrote:

> I am trying to run a script on a cluster with Paraview in parallel. The
> cluster architecture is 16cores and 64GB per node. The script reads in two
> XMF files, one contains a grid of 2002x100x1000 points along with one
> variable. There is a loop to perform two iterations:
>
> try: paraview.simple
> except: from paraview.simple import *
> paraview.simple._DisableFirstRenderCameraReset()
>
> RenderView1 = GetRenderView()
> RenderView1.Background = [1.0, 1.0, 1.0]
> view = GetActiveView()
> view.ViewSize = [ 800, 500 ]
>
> RenderView1.CenterAxesVisibility = 0
> #RenderView1.OrientationAxesVisibility = 0
>
> #Define variables
> wdir =
> '/lustre/groups/balarasgrp/nikosb/Research/Simulations/golfball/stationary/S120/Re20/gridC1/run_wm'
> #wdir =
> '/Users/nikosb/colone/Research/Simulations/golfball/stationary/S120/Re20/gridC1/run_wm'
> #wdir = '/Users/nikosb/Research/Simulations/SPHERE/Re100/gridC1/run'
> Qval = 0.1
> cfmin = -0.001
> cfmax = 0.005
>
> index = [None]*
>
> m = 0
> for i in range(0, 9):
>   for j in range(0, 9):
> for k in range(0, 9):
>   for l in range(0, 9):
> index[m] = chr(i+48)+chr(j+48)+chr(k+48)+chr(l+48)
> m = m+1
>
>
> for i in range(1,3):
>
>   cf_VP_xmf = XDMFReader(
> FileName=wdir+'/VPfield/XDMF/cf_VP'+index[i]+'.xmf' )
>
>   cf_VP_xmf.Sets = []
>   cf_VP_xmf.Grids = ['STL Grid']
>   cf_VP_xmf.PointArrays = ['Cf']
>
>   RenderView1 = GetRenderView()
>   RenderView1.CenterOfRotation = [6.2286853790283203e-06,
> 2.5033950805664062e-06, 7.1227550506591797e-06]
>
>   DataRepresentation1 = Show()
>   DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5762951094835]
>   DataRepresentation1.SelectionPointFieldDataArrayName = 'Cf'
>   DataRepresentation1.ColorArrayName = ('POINT_DATA', 'Cf')
>   DataRepresentation1.ScalarOpacityUnitDistance = 0.03392870483226
>   DataRepresentation1.ScaleFactor = 0.08557567596444
>
>   a1_Cf_PVLookupTable = GetLookupTableForArray( "Cf", 1,
> RGBPoints=[-0.0099065126851201057, 0.23001,
> 0.29899, 0.754, 0.0097341262735426426, 0.86499,
> 0.86499, 0.86499, 0.029374765232205391,
> 0.70596, 0.016, 0.14999], VectorMode='Magnitude',
> NanColor=[0.25, 0.0, 0.0], ColorSpace='Diverging',
> ScalarRangeInitialized=1.0 )
>   a1_Cf_PiecewiseFunction = CreatePiecewiseFunction(
> Points=[-0.0099065126851201057, 0.0, 0.5, 0.0, 0.029374765232205391, 1.0,
> 0.5, 0.0] )
>
>   DataRepresentation1.ScalarOpacityFunction = a1_Cf_PiecewiseFunction
>   DataRepresentation1.LookupTable = a1_Cf_PVLookupTable
>
>   a1_Cf_PVLookupTable.ScalarOpacityFunction = a1_Cf_PiecewiseFunction
>
>   a1_Cf_PVLookupTable.RGBPoints = [cfmin, 0.23001,
> 0.29899, 0.754, -0.002, 0.86499,
> 0.86499, 0.86499, cfmax, 0.70596,
> 0.016, 0.14999]
>   a1_Cf_PVLookupTable.ScalarOpacityFunction = a1_Cf_PiecewiseFunction
>   a1_Cf_PVLookupTable.LockScalarRange = 1
>
>   RenderView1.CameraPosition = [6.2286853790283203e-06,
> 2.5033950805664062e-06, 3.3460035306026636]
>   RenderView1.CameraFocalPoint = [6.2286853790283203e-06,
> 2.5033950805664062e-06, 7.1227550506591797e-06]
>   RenderView1.CameraClippingRange = [2.3175641399614015,
> 4.6486514901655163]
>   RenderView1.CameraParallelScale = 0.86600759519558368
>
>   Contour1 = Contour( PointMergeMethod="Uniform Binning" )
>
>   Contour1.PointMergeMethod = "Uniform Binning"
>   Contour1.ContourBy = ['POINTS', 'Cf']
>   Contour1.Isosurfaces = [0.0097341262735426426]
>
>   DataRepresentation2 = Show()
>   DataRepresentation2.ColorArrayName = ('P

[Paraview] Help with memory crash?

2015-01-07 Thread Nikolaos Beratlis
I am trying to run a script on a cluster with Paraview in parallel. The
cluster architecture is 16cores and 64GB per node. The script reads in two
XMF files, one contains a grid of 2002x100x1000 points along with one
variable. There is a loop to perform two iterations:

try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

RenderView1 = GetRenderView()
RenderView1.Background = [1.0, 1.0, 1.0]
view = GetActiveView()
view.ViewSize = [ 800, 500 ]

RenderView1.CenterAxesVisibility = 0
#RenderView1.OrientationAxesVisibility = 0

#Define variables
wdir =
'/lustre/groups/balarasgrp/nikosb/Research/Simulations/golfball/stationary/S120/Re20/gridC1/run_wm'
#wdir =
'/Users/nikosb/colone/Research/Simulations/golfball/stationary/S120/Re20/gridC1/run_wm'
#wdir = '/Users/nikosb/Research/Simulations/SPHERE/Re100/gridC1/run'
Qval = 0.1
cfmin = -0.001
cfmax = 0.005

index = [None]*

m = 0
for i in range(0, 9):
  for j in range(0, 9):
for k in range(0, 9):
  for l in range(0, 9):
index[m] = chr(i+48)+chr(j+48)+chr(k+48)+chr(l+48)
m = m+1


for i in range(1,3):

  cf_VP_xmf = XDMFReader(
FileName=wdir+'/VPfield/XDMF/cf_VP'+index[i]+'.xmf' )

  cf_VP_xmf.Sets = []
  cf_VP_xmf.Grids = ['STL Grid']
  cf_VP_xmf.PointArrays = ['Cf']

  RenderView1 = GetRenderView()
  RenderView1.CenterOfRotation = [6.2286853790283203e-06,
2.5033950805664062e-06, 7.1227550506591797e-06]

  DataRepresentation1 = Show()
  DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5762951094835]
  DataRepresentation1.SelectionPointFieldDataArrayName = 'Cf'
  DataRepresentation1.ColorArrayName = ('POINT_DATA', 'Cf')
  DataRepresentation1.ScalarOpacityUnitDistance = 0.03392870483226
  DataRepresentation1.ScaleFactor = 0.08557567596444

  a1_Cf_PVLookupTable = GetLookupTableForArray( "Cf", 1,
RGBPoints=[-0.0099065126851201057, 0.23001,
0.29899, 0.754, 0.0097341262735426426, 0.86499,
0.86499, 0.86499, 0.029374765232205391,
0.70596, 0.016, 0.14999], VectorMode='Magnitude',
NanColor=[0.25, 0.0, 0.0], ColorSpace='Diverging',
ScalarRangeInitialized=1.0 )
  a1_Cf_PiecewiseFunction = CreatePiecewiseFunction(
Points=[-0.0099065126851201057, 0.0, 0.5, 0.0, 0.029374765232205391, 1.0,
0.5, 0.0] )

  DataRepresentation1.ScalarOpacityFunction = a1_Cf_PiecewiseFunction
  DataRepresentation1.LookupTable = a1_Cf_PVLookupTable

  a1_Cf_PVLookupTable.ScalarOpacityFunction = a1_Cf_PiecewiseFunction

  a1_Cf_PVLookupTable.RGBPoints = [cfmin, 0.23001,
0.29899, 0.754, -0.002, 0.86499,
0.86499, 0.86499, cfmax, 0.70596,
0.016, 0.14999]
  a1_Cf_PVLookupTable.ScalarOpacityFunction = a1_Cf_PiecewiseFunction
  a1_Cf_PVLookupTable.LockScalarRange = 1

  RenderView1.CameraPosition = [6.2286853790283203e-06,
2.5033950805664062e-06, 3.3460035306026636]
  RenderView1.CameraFocalPoint = [6.2286853790283203e-06,
2.5033950805664062e-06, 7.1227550506591797e-06]
  RenderView1.CameraClippingRange = [2.3175641399614015, 4.6486514901655163]
  RenderView1.CameraParallelScale = 0.86600759519558368

  Contour1 = Contour( PointMergeMethod="Uniform Binning" )

  Contour1.PointMergeMethod = "Uniform Binning"
  Contour1.ContourBy = ['POINTS', 'Cf']
  Contour1.Isosurfaces = [0.0097341262735426426]

  DataRepresentation2 = Show()
  DataRepresentation2.ColorArrayName = ('POINT_DATA', '')
  DataRepresentation2.ScaleFactor = 0.099971860647201538
  DataRepresentation2.SelectionPointFieldDataArrayName = 'Cf'
  DataRepresentation2.EdgeColor = [0.0, 0.0, 0.5762951094835]

  DataRepresentation2.Representation = 'Wireframe'
  DataRepresentation2.AmbientColor = [0.0, 0.0, 0.0]

  DataRepresentation1.Visibility = 0

  RenderView1.CameraClippingRange = [2.7470738944403328, 4.2397684828477349]

  DataRepresentation1.Visibility = 1

  RenderView1.CameraClippingRange = [2.3175641399614015, 4.6486514901655163]

  Q_VP_xmf = XDMFReader( FileName=wdir+'/VPfield/XDMF/Q_VP'+index[i]+'.xmf'
)

  Contour1.Isosurfaces = [0.0]

  Q_VP_xmf.Sets = []
  Q_VP_xmf.Grids = ['Eulerian Grid']
  Q_VP_xmf.PointArrays = ['Q']

  DataRepresentation3 = Show()
  DataRepresentation3.EdgeColor = [0.0, 0.0, 0.5762951094835]
  DataRepresentation3.SelectionPointFieldDataArrayName = 'Q'
  DataRepresentation3.ScalarOpacityUnitDistance = 0.0045778956118952439
  DataRepresentation3.Representation = 'Outline'
  DataRepresentation3.ScaleFactor = 0.25585924386978148

  RenderView1.CameraClippingRange = [0.30866115510384229,
6.131182592065]

  Contour2 = Contour( PointMergeMethod="Uniform Binning" )

  Contour2.PointMergeMethod = "Uniform Binning"
  Contour2.ContourBy = ['POINTS', 'Q']
  Contour2.Isosurfaces = [-348374.28125]

  DataRepresentation4 = Show()
  DataRepresentation4.ScaleFactor = 0.1348903000354767
  DataRepresentation4.SelectionPointFieldDataArrayName = 'Normals'
  DataRepres

[Paraview] Help with reading vectors from XDMF

2013-08-20 Thread Nikolaos Beratlis
I want to read a XDMF file with an orthogonal structured grid and a vector
attribute. I have the following example file:



http://www.w3.org/2003/XInclude"; Version="2.2">
  
  

  
  

 0.0 1.0


 0.0 1.0


 0.0

  
  

 
 1.0 -1.0 1.0 -1.0

 
 1.0 -1.0 1.0 -1.0

 
 0.0 0.0 0.0 0.0

   
  
   
  


However Paraview reads it wrong, the values of the velocity in the
information window range from -1e+299 to 1e299. Where is the mistake that
causes Paraview to read the wrong values?

Thank you,

Nikos
___
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] Help with reading vectors from XDMF

2013-08-20 Thread Nikolaos Beratlis
When I read the following file:



http://www.w3.org/2003/XInclude"; Version="2.2">
  
  

  
  

 0.0 1.0


 0.0 1.0


 0.0

  
  

 
 1.0 -1.0 1.0 -1.0

 
 1.0 -1.0 1.0 -1.0

 
 0.0 0.0 0.0 0.0

   
  
   
  


Paraview reads it wrong, the values of the velocity in the information
window range from -1e+299 to 1e299. Where is the mistake that causes
Paraview to read the wrong values?

Thank you,

Nikos
___
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] Help with reading vectors from XDMF

2013-08-20 Thread Nikolaos Beratlis
I have following XDMF file:



http://www.w3.org/2003/XInclude"; Version="2.2">
  
  

  
  

 0.0 1.0


 0.0 1.0


 0.0

  
  

 
 1.0 -1.0 1.0 -1.0

 
 1.0 -1.0 1.0 -1.0

 
 0.0 0.0 0.0

   
  
   
  


I can read it into Paraview but when I try to plot vectors using the Glyph
Filter the vectors are not correct (see attached picture). What am I doing
wrong?

Kind regards,

Nikos
<>___
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] Paraview in batch and in parallel

2013-07-26 Thread Nikolaos Beratlis
I read in Paraview Wiki that as of Paraview 3.10 the MPI library is
packaged in the binary release. Do I still need to have an MPI version
installed on my computer to run Paraview in parallel in batch mode
(pvbatch)? If MPI is not required, then how do I run pvbatch in parallel.
Is there an argument to specify to use multi core on shared memory
clusters? Otherwise I assume that a MPI version is required and I'd run it
using "mpiexec -n Nprocs pvbatch python.py"

Thank you,

Nikos
___
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] Memory leak with Python script (XDMF and HDF5)

2013-06-20 Thread Nikolaos Beratlis
I am using the following python script to extract images from a series of
files for an animation:

try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

index = [None]*

m = 0
for i in range(0, 9):
  for j in range(0, 9):
for k in range(0, 9):
  for l in range(0, 9):
index[m] = chr(i+48)+chr(j+48)+chr(k+48)+chr(l+48)
m = m+1


for i in range(1,2):

cf_VP_anim_xmf = XDMFReader( FileName='XDMF/cf_VP'+index[i]+'.xmf' )

cf_VP_anim_xmf.CellArrays = []
cf_VP_anim_xmf.Sets = []
cf_VP_anim_xmf.PointArrays = ['Cf']

RenderView1 = GetRenderView()
a1_Cf_PVLookupTable = GetLookupTableForArray( "Cf", 1 )

Cfcontours = Show()
Cfcontours.EdgeColor = [0.0, 0.0, 0.5762951094835]
Cfcontours.SelectionPointFieldDataArrayName = 'Cf'
Cfcontours.ScalarOpacityFunction = []
Cfcontours.ColorArrayName = 'Cf'
Cfcontours.ScalarOpacityUnitDistance = 2.4071425938556859
Cfcontours.LookupTable = a1_Cf_PVLookupTable
Cfcontours.ScaleFactor = 15.0

cf_VP_anim_xmf.Grids = ['STL Grid']

RenderView1.CacheKey = 2.0
RenderView1.CameraClippingRange = [288.47079837284241,
299.16435388730815]
RenderView1.UseCache = 0

a1_Cf_PVLookupTable.RGBPoints = [-0.0080002, 0.0, 0.0, 1.0,
0.0080002, 1.0, 0.0, 0.0]
a1_Cf_PVLookupTable.LockScalarRange = 1

separationline = Contour( PointMergeMethod="Uniform Binning" )

separationline.ContourBy = ['POINTS', 'Cf']
separationline.Isosurfaces = [0.0]
DataSeparationLine = Show()
DataSeparationLine.ScaleFactor = 12.321390008926393
DataSeparationLine.SelectionPointFieldDataArrayName = 'Cf'
DataSeparationLine.EdgeColor = [0.0, 0.0, 0.5762951094835]
DataSeparationLine.LineWidth = 2.0
DataSeparationLine.DiffuseColor = [0.0, 0.0, 0.0]

DataSeparationLine.ColorArrayName = ''

Cfcontours.Visibility = 1

Q_VP_xmf = XDMFReader( FileName='XDMF/Q_VP'+index[i]+'.xmf' )

Q_VP_xmf.CellArrays = []
Q_VP_xmf.Sets = []
Q_VP_xmf.PointArrays = ['Q']

DataQ = Show()
DataQ.Representation = 'Outline'
DataQ.ScaleFactor = 12.341455459594727
DataQ.SelectionPointFieldDataArrayName = 'Q'
DataQ.EdgeColor = [0.0, 0.0, 0.5762951094835]

Q_VP_xmf.Grids = ['Eulerian Grid']

ContourQ = Contour( PointMergeMethod="Uniform Binning" )
ContourQ.PointMergeMethod = "Uniform Binning"
ContourQ.ContourBy = ['POINTS', 'Q']
ContourQ.Isosurfaces = [1.0]
ContourQ.ComputeNormals = 0

DataQiso = Show()
DataQiso.ScaleFactor = 7.497686161037
DataQiso.SelectionPointFieldDataArrayName = 'Normals'
DataQiso.EdgeColor = [0.0, 0.0, 0.5762951094835]

DataQ.Visibility = 0


#--- Setup view
RenderView1 = GetRenderView()
RenderView1.Background = [1.0, 1.0, 1.0]
RenderView1.CenterAxesVisibility = 0
RenderView1.OrientationAxesVisibility = 0
RenderView1.ViewSize = [2000, 350]

RenderView1.CameraViewUp = [0.0,-1.0, -2.2204460492503131e-16]
RenderView1.CameraPosition = [41.5, 0.0, 56.5]
RenderView1.CameraClippingRange = [120.40716073726786,
126.85668499830999]
RenderView1.InteractionMode = '3D'
RenderView1.CameraFocalPoint = [0, 0, 56.5]
RenderView1.CenterOfRotation = [0, 0, 56.5]

#--- Export image
Render()
WriteImage('Q_cf_topview_'+index[i]+'.jpg')


#--- Delete objects (order is important)
Delete(DataSeparationLine)
Delete(separationline)
Delete(Cfcontours)
Delete(cf_VP_anim_xmf)
Delete(DataQiso)
Delete(ContourQ)
Delete(DataQ)
Delete(Q_VP_xmf)


At the end of the for loop, I delete all the objects and readers. I run
this python script in batch mode (Paraview 3.98) and in parallel with 4
processors. However I am having a memory leak, by the 6th time in the for
loop it complains about insufficient memory. Can anyone understand what is
causing the memory to increase? Do I forget to delete sth?

Thank you,

Nikos
___
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] XY plot in Paraview

2013-06-10 Thread Nikolaos Beratlis
I am reading a structured orthogonal grid and a variable with the following
XDMF file:




 
   
 
 
   
../VPfield_files/grid3dc_VP.h5sp:/X
   
   
../VPfield_files/grid3dc_VP.h5sp:/Y
   
   
../VPfield_files/grid3dc_VP.h5sp:/Z
   
 
 
   
../Tuu_tmavg.h5sp:/var3d
   
 
   
 



How can I make a XY plot of the scalar variable passing through a line or
by limiting the indices of the variables (i.e. i=1-NX, j=3, k=4) ? Is there
a command similar to slice but for a line?

Thank you,

Nikos
___
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] Help with batch processing and loops

2013-05-31 Thread Nikolaos Beratlis
Hi,

I am switching to using Paraview from Tecplot and I need to do the
following thing: I have a series of XDMF files that I need to read into
Paraview one by one, apply some filters and export an image. In Tecplot I
would write a macro, inside the macro there was a loop that changed the
name of the file, then read the filename and in a style that applied all
the filters and finally exported an image. I would run the macro in batch
mode.

How can I do sth similar in Paraview? I have no experience with python.

Kind regards,

Nikos
___
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] Attribute for grid collection

2013-04-04 Thread Nikolaos Beratlis
When I try to transform the "Collection" grid from cartesian coordinates to
cylindrical coordinates using the following script:

pdi = self.GetInput()
pdo = self.GetOutput()
newPoints = vtk.vtkPoints()
numPoints = pdi.GetNumberOfPoints()
for i in range(0, numPoints):
  coord = pdi.GetPoint(i)
  x, y, z = coord[:3]
  r = x * cos(y)
  t = x * sin(y)
  newPoints.InsertPoint(i, r, t, z)
pdo.SetPoints(newPoints)
pdo.GetPointData().AddArray(pdi.GetPointData().GetArray(0))
pdo.GetPointData().AddArray(pdi.GetPointData().GetArray(1))
pdo.GetPointData().AddArray(pdi.GetPointData().GetArray(2))

I get the following error:

Traceback (most recent call last):
File "", line 26, in 
File "", line 7, in RequestData
AttributeError: GetPoint

The script works well if the grid is not of GridType Collection.

Thank you,

Nikos


On Thu, Apr 4, 2013 at 3:57 AM, Felipe Bordeu wrote:

>  you must put the attributes inside each grid:
>
> Felipe
>
>
> 
> 
> 
> 
> 
> 
> 
> 
>  Format="XML">
>0.   1.   2.
> 
>  Format="XML">
>0.   2.0944   4.1888   6.2832
> 
>  Format="XML">
>1.   2.
> 
> 
> 
> Format="XML">
>
>0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
>
>
>
> 
> 
> 
> 
> 
>1.   2.   3.
> 
> 
>    0.   2.0944   4.1888   6.2832
> 
> 
>2.   3.
> 
> 
> 
>  Format="XML">
>
> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
> 
> 
> 
> 
> 
> 
>
>
> Le 04/04/2013 04:36, Nikolaos Beratlis a écrit :
>
> I have a domain that consists of patches of orthogonal cartesian grids in
> the following XDMF file:
>
>  
> 
> 
> 
> 
> 
> 
> 
> 
>0.   1.   2.
> 
> 
>0.   2.0944   4.1888   6.2832
> 
> 
>1.   2.
> 
> 
>  
> 
> 
> 
> 
>1.   2.   3.
> 
> 
>0.   2.0944   4.1888   6.2832
> 
> 
>2.   3.
> 
> 
> 
> 
> 
> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
> 
> 
> 
> 
> 
>
>  The grid is declared as GridType Collection. When I read it in Paraview
> the grid is read correctly as shown in the attached picture, however I
> don't get the values for the attribute. I think the attribute is not read
> at all. Is there sth wrong with this file? How should the attribute be
> specified for GridType Collection?
>
>  Thank you,
>
>  Nikos
>
>
> ___
> 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
>
>
>
> --
> Felipe Bordeu Weldt
> Ingénieur de Recherche
> -
> Tél. : 33 (0)2 40 37 16 57
> Fax. : 33 (0)2 40 74 74 06felipe.bor...@ec-nantes.fr
> Institut GeM - UMR CNRS 6183
> École Centrale Nantes
> 1 Rue de La Noë, 44321 Nantes, FRANCE
> -
>
>
> ___
> 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] Python scripting/Grid geometry transformation

2013-04-02 Thread Nikolaos Beratlis
Hi,

I am reading the following xmf file (attached as var3d.xmf) into Paraview:









   0.   1.   2.


   0.   2.0944   4.1888   6.2832


   1.   2.




0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23






The grid is a 3D orthogonal grid read in cartesian coordinates (see
attached image showing grid and contours of variable). I then want to
transform the grid from cartesian to cylindrical coordinates. I tried using
the following Python script:

pdi = self.GetPolyDataInput()

pdo = self.GetPolyDataOutput()

newPoints = vtk.vtkPoints()

numPoints = pdi.GetNumberOfPoints()

for i in range(0, numPoints):

coord = pdi.GetPoint(i)

x, y, z = coord[:3]

r = x * sin(y)

t = x * cos(y)

newPoints.InsertPoint(i, r, t, z)

pdo.SetPoints(newPoints)


with Output Data Set Type chosen to be the Same as Input, but I get this
error:


Traceback (most recent call last):
File "", line 26, in 
File "", line 12, in RequestData
AttributeError: 'NoneType' object has no attribute 'SetPoints'

I have no experience with Python scripting. What am I doing wrong?

Thank you,

Nikos
<>

var3d.xmf
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] XDMF and structured grid in cylindrical coordinates (curvilinear)

2013-04-02 Thread Nikolaos Beratlis
I am currently trying the Function itemtype approach. In all of the
examples for the function itemtype it is assumed that arrays are all of the
same size. In my case I have three 1D arrays of different sizes: x(nx),
y(ny), and z(nz). The operation I need to do to convert to cylindrical
coordinates is:

do k=1,nz
do j=1,ny
do i=1,nx
  x(i)*sin(y(j)), x(i)*cos(y(j)), z(k)
enddo
enddo
enddo

I know that function has the operations SIN and COS but can the nested
looping be achieved with a function operation?

Thank you,

Nikos


On Wed, Mar 20, 2013 at 10:57 AM, David E DeMarle
wrote:

> See if XDMF's Function itemtype will do the trick. (If so please consider
> posting an example to the xdmf.org wiki).
>
> Otherwise you'll have to apply a filter to do the geometry transformation
> after you load the RectMesh into ParaView.
>
>
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
>
>
> On Wed, Mar 20, 2013 at 10:52 AM, Nikolaos Beratlis <
> nikos.berat...@gmail.com> wrote:
>
>> Hi David,
>>
>> I looked at your examples and I noticed that you changed the GeometryType
>> to XYZ in order to plot a curvilinear grid. So it can't be done by
>> specifying three separate 1D arrays instead (GeometryType=VXVYVZ)? My only
>> concern is storage as I use grids with sizes of 2000x2000x2000. Writing
>> that to a file will be huge compared to writing only three 1D arrays as I
>> do for the cartesian case. Or is there a way to convert a grid read in
>> cartesian coordinates to cylindrical the way it's done in Tecplot?
>>
>> Thank you.
>>
>> Nikos
>>
>>
>> On Wed, Mar 20, 2013 at 10:18 AM, David E DeMarle <
>> dave.dema...@kitware.com> wrote:
>>
>>> XDMF's 3DRectMesh == VTK's vtkRectilinearGrid, in which you case you
>>> specify an X array, Y array and a Z array.
>>>
>>> 3DSMesh == vtkStructuredGrid, in which case you specify X,Y,Z for every
>>> node. Once you do that you're example will work.
>>>
>>> Examples of both (produced in ParaView via Data Object Generator (RG1 |
>>> SG1)->Write as XDMF) are attached.
>>>
>>>
>>>
>>> David E DeMarle
>>> Kitware, Inc.
>>> R&D Engineer
>>> 21 Corporate Drive
>>> Clifton Park, NY 12065-8662
>>> Phone: 518-881-4909
>>>
>>>
>>> On Tue, Mar 19, 2013 at 11:04 PM, Nikolaos Beratlis <
>>> nikos.berat...@gmail.com> wrote:
>>>
>>>> I am using a 3D structured orthogonal grid in cylindrical coordinates.
>>>> I can read the grid as a cartesian grid using the following XDMF file by
>>>> specifying TopologyType "3DRectMesh" and GeometryType="VXVYVZ" (see
>>>> attached image):
>>>>
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 0.0 1.0 2.0 3.0 4.0 5.0
>>>> 
>>>> 
>>>> 0.0 1.5708 3.1415 4.7124
>>>> 
>>>> 
>>>> 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>
>>>> When I try to read the grid as 3DSMesh which I think corresponds to
>>>> curvilinear Paraview crashes.
>>>>
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 0.0 1.0 2.0 3.0 4.0 5.0
>>>> 
>>>> 
>>>> 0.0 1.5708 3.1415 4.7124
>>>> 
>>>> 
>>>> 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>
>>>>  Is there any way to read a 3D cylindrical grid using three 1D arrays
>>>> for the coordinates in each direction?
>>>>
>>>> Thank you,
>>>>
>>>> Nikos
>>>>
>>>>
>>>>
>>>> ___
>>>> 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] XDMF and structured grid in cylindrical coordinates (curvilinear)

2013-04-02 Thread Nikolaos Beratlis
I am currently trying the Function itemtype approach. In all of the
examples for the function itemtype it assumes that arrays are all of the
same size. In my case I have three 1D arrays of different sizes: x(nx),
y(ny), and z(nz). The operation I need to do to convert to cylindrical
coordinates is:

do k=1,nz



On Wed, Mar 20, 2013 at 10:57 AM, David E DeMarle
wrote:

> See if XDMF's Function itemtype will do the trick. (If so please consider
> posting an example to the xdmf.org wiki).
>
> Otherwise you'll have to apply a filter to do the geometry transformation
> after you load the RectMesh into ParaView.
>
>
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
>
>
> On Wed, Mar 20, 2013 at 10:52 AM, Nikolaos Beratlis <
> nikos.berat...@gmail.com> wrote:
>
>> Hi David,
>>
>> I looked at your examples and I noticed that you changed the GeometryType
>> to XYZ in order to plot a curvilinear grid. So it can't be done by
>> specifying three separate 1D arrays instead (GeometryType=VXVYVZ)? My only
>> concern is storage as I use grids with sizes of 2000x2000x2000. Writing
>> that to a file will be huge compared to writing only three 1D arrays as I
>> do for the cartesian case. Or is there a way to convert a grid read in
>> cartesian coordinates to cylindrical the way it's done in Tecplot?
>>
>> Thank you.
>>
>> Nikos
>>
>>
>> On Wed, Mar 20, 2013 at 10:18 AM, David E DeMarle <
>> dave.dema...@kitware.com> wrote:
>>
>>> XDMF's 3DRectMesh == VTK's vtkRectilinearGrid, in which you case you
>>> specify an X array, Y array and a Z array.
>>>
>>> 3DSMesh == vtkStructuredGrid, in which case you specify X,Y,Z for every
>>> node. Once you do that you're example will work.
>>>
>>> Examples of both (produced in ParaView via Data Object Generator (RG1 |
>>> SG1)->Write as XDMF) are attached.
>>>
>>>
>>>
>>> David E DeMarle
>>> Kitware, Inc.
>>> R&D Engineer
>>> 21 Corporate Drive
>>> Clifton Park, NY 12065-8662
>>> Phone: 518-881-4909
>>>
>>>
>>> On Tue, Mar 19, 2013 at 11:04 PM, Nikolaos Beratlis <
>>> nikos.berat...@gmail.com> wrote:
>>>
>>>> I am using a 3D structured orthogonal grid in cylindrical coordinates.
>>>> I can read the grid as a cartesian grid using the following XDMF file by
>>>> specifying TopologyType "3DRectMesh" and GeometryType="VXVYVZ" (see
>>>> attached image):
>>>>
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 0.0 1.0 2.0 3.0 4.0 5.0
>>>> 
>>>> 
>>>> 0.0 1.5708 3.1415 4.7124
>>>> 
>>>> 
>>>> 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>
>>>> When I try to read the grid as 3DSMesh which I think corresponds to
>>>> curvilinear Paraview crashes.
>>>>
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 0.0 1.0 2.0 3.0 4.0 5.0
>>>> 
>>>> 
>>>> 0.0 1.5708 3.1415 4.7124
>>>> 
>>>> 
>>>> 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>
>>>>  Is there any way to read a 3D cylindrical grid using three 1D arrays
>>>> for the coordinates in each direction?
>>>>
>>>> Thank you,
>>>>
>>>> Nikos
>>>>
>>>>
>>>>
>>>> ___
>>>> 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] XDMF and structured grid in cylindrical coordinates (curvilinear)

2013-03-20 Thread Nikolaos Beratlis
Hi David,

I looked at your examples and I noticed that you changed the GeometryType
to XYZ in order to plot a curvilinear grid. So it can't be done by
specifying three separate 1D arrays instead (GeometryType=VXVYVZ)? My only
concern is storage as I use grids with sizes of 2000x2000x2000. Writing
that to a file will be huge compared to writing only three 1D arrays as I
do for the cartesian case. Or is there a way to convert a grid read in
cartesian coordinates to cylindrical the way it's done in Tecplot?

Thank you.

Nikos


On Wed, Mar 20, 2013 at 10:18 AM, David E DeMarle
wrote:

> XDMF's 3DRectMesh == VTK's vtkRectilinearGrid, in which you case you
> specify an X array, Y array and a Z array.
>
> 3DSMesh == vtkStructuredGrid, in which case you specify X,Y,Z for every
> node. Once you do that you're example will work.
>
> Examples of both (produced in ParaView via Data Object Generator (RG1 |
> SG1)->Write as XDMF) are attached.
>
>
>
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
>
>
> On Tue, Mar 19, 2013 at 11:04 PM, Nikolaos Beratlis <
> nikos.berat...@gmail.com> wrote:
>
>> I am using a 3D structured orthogonal grid in cylindrical coordinates. I
>> can read the grid as a cartesian grid using the following XDMF file by
>> specifying TopologyType "3DRectMesh" and GeometryType="VXVYVZ" (see
>> attached image):
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 0.0 1.0 2.0 3.0 4.0 5.0
>> 
>> 
>> 0.0 1.5708 3.1415 4.7124
>> 
>> 
>> 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
>> 
>> 
>> 
>> 
>> 
>>
>> When I try to read the grid as 3DSMesh which I think corresponds to
>> curvilinear Paraview crashes.
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 0.0 1.0 2.0 3.0 4.0 5.0
>> 
>> 
>> 0.0 1.5708 3.1415 4.7124
>> 
>> 
>> 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
>> 
>> 
>> 
>> 
>> 
>>
>>  Is there any way to read a 3D cylindrical grid using three 1D arrays for
>> the coordinates in each direction?
>>
>> Thank you,
>>
>> Nikos
>>
>>
>>
>> ___
>> 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] XDMF and structured grid in cylindrical coordinates (curvilinear)

2013-03-19 Thread Nikolaos Beratlis
I am using a 3D structured orthogonal grid in cylindrical coordinates. I
can read the grid as a cartesian grid using the following XDMF file by
specifying TopologyType "3DRectMesh" and GeometryType="VXVYVZ" (see
attached image):









0.0 1.0 2.0 3.0 4.0 5.0


0.0 1.5708 3.1415 4.7124


0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0






When I try to read the grid as 3DSMesh which I think corresponds to
curvilinear Paraview crashes.









0.0 1.0 2.0 3.0 4.0 5.0


0.0 1.5708 3.1415 4.7124


0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0






 Is there any way to read a 3D cylindrical grid using three 1D arrays for
the coordinates in each direction?

Thank you,

Nikos
<>___
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] Reading PLOT3D into Paraview

2013-03-13 Thread Nikolaos Beratlis
Hi,

I have problems reading PLOT3D files into paraview. Here is a small test
file containing the grid:

1
3 2 2
0.0 1.0 2.0 0.0 1.0 2.0 0.0 1.0 2.0 0.0 1.0 2.0
0.0 0.0 0.0 1.0 1.0 1.0 0.0 0.0 0.0 1.0 1.0 1.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

The grid is a 3D one, it has one block with size 3x2x2 and the format is
ASCII. I can read this file into Tecplot without any problem but when I try
to read it into Paraview 3.98 I get the following error:

ERROR: In
/Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-NoMPI/paraview/src/paraview/ParaViewCore/VTKExtensions/Default/vtkFileSeriesReader.cxx,
line 690

vtkFileSeriesReader (0x11713e850): Inputs are not set.

What is wrong, the file itself or the PLOT3D reader of Paraview?

Thank you,

Nikos
<>___
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