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 <[email protected]> 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 > > _______________________________________________ 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
