[Paraview] Attribute recalculation at center

Nikolaos Beratlis nikos.beratlis at gmail.com
Thu Mar 5 12:35:44 EST 2015


HI,

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

<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
<Xdmf xmlns:xi="http://www.w3.org/2003/XInclude" Version="2.2">
  <Information Name="MetaData" Value="ID-23454"/>
  <Domain>
    <Grid Name="Eulerian Grid" GridType="Uniform">
      <Topology TopologyType="3DRectMesh" NumberOfElements="   202   100
100"/>
      <Geometry GeometryType="VXVYVZ">
        <DataItem Dimensions=" 100" NumberType="Float" Precision="4"
Format="HDF">
         ../grid3dc_vxvyvz_VP.h5sp:/X
        </DataItem>
        <DataItem Dimensions=" 100" NumberType="Float" Precision="4"
Format="HDF">
         ../grid3dc_vxvyvz_VP.h5sp:/Y
        </DataItem>
        <DataItem Dimensions=" 202" NumberType="Float" Precision="4"
Format="HDF">
         ../grid3dc_vxvyvz_VP.h5sp:/Z
        </DataItem>
      </Geometry>
      <Attribute Name="U" AttributeType="Scalar" Center="Node">
        <DataItem Dimensions="  202  100  100" NumberType="Float"
Precision="4" Format="HDF">
         ../u_tmavg_cyl2car.h5sp:/var3d
        </DataItem>
      </Attribute>
      <Attribute Name="W" AttributeType="Scalar" Center="Node">
        <DataItem Dimensions="  202  100  100" NumberType="Float"
Precision="4" Format="HDF">
         ../w_tmavg_cyl2car.h5sp:/var3d
        </DataItem>
      </Attribute>
   </Grid>
  </Domain>
</Xdmf>


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150305/2a084c86/attachment.html>


More information about the ParaView mailing list