[Paraview] vtu: how to represent variation in cell end values?

Berk Geveci berk.geveci at kitware.com
Fri Mar 26 12:58:46 EDT 2010


The only way to define discontinuities like that is to split cells. So
you would have:

Cell1: point1 -> point2
Cell2: point3 -> point4

where point2 == point3. I know it is a waste of memory but it is the only way.

-berk

On Fri, Mar 26, 2010 at 12:56 PM, Emily Leigh <ecl4b at hotmail.com> wrote:
> Berk,
>
> I tried that, but the problem is that each cell/element has its own end
> data, and those data are not the same at each point.  I'm not sure how I
> could "double define" the cell end data at each point and get Paraview to
> understand that and show it correctly.
>
> If I reference the example in my original post, here are the data I have:
>
>> > Locally this variation in y-force is:
>> > Cell 1: 100=>-500
>> > Cell 2: +500=>-200
>> >
>> > Summing the effect of the y-force at each point:
>> > Point 1: 100
>> > Point 2: -500+500 = 0
>> > Point 3: -200
>
> If I assign the end values as point data, then I think I only have two
> options, both of which don't do what I need:
> 1. Sum the effect of the y-force at each point and include this as scalar
> point data: {100, 0, -200} for points 1-3
> 2. Have two sets of scalar point data, "cell end 1" {100, 500} for points
> 1-2 and "cell end 2" {-500, -200} for points 2-3
>
> These are the two things I tried -- perhaps I'm missing something.  Do you
> have any other ideas on how I could set up the cell data variation as point
> data?
>
> Thanks!
>
> -Emily
>
>
>> Date: Fri, 26 Mar 2010 11:40:20 -0400
>> Subject: Re: [Paraview] vtu: how to represent variation in cell end
>> values?
>> From: berk.geveci at kitware.com
>> To: ecl4b at hotmail.com
>> CC: paraview at paraview.org
>>
>> Emily,
>>
>> It sounds like you need point data not cell data. Point data arrays
>> contain a value per point (those values are interpolated to obtain
>> values that are in the interior of the cell), cell data array contain
>> a value per cell (which is assumed to be constant across the cell).
>> VTK will interpolate point arrays linearly over a cell of type Line.
>>
>> -berk
>>
>> On Thu, Mar 25, 2010 at 3:43 PM, Emily Leigh <ecl4b at hotmail.com> wrote:
>> > Hello,
>> >
>> > I am writing a vtu file to represent data for a simple dataset in
>> > Paraview
>> > and I have run into a problem.  What I would like to do is to be able to
>> > represent a variation in a field value over the length of a cell and
>> > look at
>> > this variation as a single layer in Paraview (not separately as the sets
>> > of
>> > end values for end 1 and end 2, respectively).  More simply, each cell
>> > is
>> > assigned a field value at each end point and I want to be able to
>> > visualize
>> > this variation in end values for each cell for all of the cells in my
>> > (small) model.
>> >
>> > As the simplest example of my problem, let's say I have 3 points and 2
>> > cells
>> > between the points.  Cell 1 has point 1 at its left end and point 2 at
>> > its
>> > right end and cell 2 has point 2 at its left end and point 3 at its left
>> > end
>> > (in my field this might represent a beam finite element). 1---2---3
>> > Cell 1: 1=>2 (finite element 1)
>> > Cell 2: 2=>3 (finite element 2)
>> >
>> > I've figured out how to represent the field data at the points
>> > (physically
>> > these would be displacements, rotations, etc.).  However, I need to
>> > figure
>> > out what syntax to use to represent the variation in a physical quantity
>> > over the length of the cell.  Let's say the y-force for element 1 has
>> > values
>> > of 100 at point 1 and -500 at point 2, and that y-force for element 2
>> > has
>> > values of +500 at point 2 and -200 at point 3.
>> >
>> > Locally this variation in y-force is:
>> > Cell 1: 100=>-500
>> > Cell 2: +500=>-200
>> >
>> > Summing the effect of the y-force at each point:
>> > Point 1: 100
>> > Point 2: -500+500 = 0
>> > Point 3: -200
>> >
>> > I have tried the following syntax:
>> > <CellData Scalars="scalars">
>> > <DataArray type="Float32" Name="y-force-el" NumberOfComponents="2">
>> > 100 -500
>> > 500 -200
>> > </DataArray>
>> > However, when I used the above syntax I found that in Paraview I can
>> > only
>> > view the x-points (100 and 500), the y-points (-500 and -200) or the
>> > vector
>> > magnitudes for each cell (509.9 and  538.5) at one time.
>> >
>> > Does anyone know what syntax I need?
>> >
>> > (Once I figure out the syntax, I'll be all set to modify the code I
>> > wrote to
>> > read in my data and output it to vtu format).
>> >
>> > Thanks!
>> >
>> > -Emily
>> > ________________________________
>> > Hotmail: Trusted email with powerful SPAM protection. Sign up now.
>> > _______________________________________________
>> > 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
>> >
>> >
>
> ________________________________
> Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up
> now.


More information about the ParaView mailing list