Re: [Paraview] Visualize equdistant cell-centered data

Henrik,

I believe I understand what you are trying to do. However, there is nothing
available in ParaView to do this simply.

You could use the Programmable Filter to create a new structured grid with
the C+1 number of points in each dimension and then set the point data
array in the C-sized grid to be a cell data array in the (C+1)-sized grid.
The data layout is such that that should work. However, you will need to
set up the points manually.

Hope that helps,
Cory

On Thu, Feb 8, 2018 at 5:42 AM, Buesing, Henrik <
hbues...@eonerc.rwth-aachen.de> wrote:

> Ok. Let me rephrase my question. Maybe someone speaks Matlab? Full Matlab
> Code below (see [1]).
>
>
>
> Let’s assume I have a 2x2 matrix with color values C=[1 2; 3 4]. Now I can
> visualize this matrix with on a 2x2 grid with surf in Matlab. What I get is
> one square with the color values on each node (see Case 1 in the Matlab
> code). This is what Paraview does!
>
>
>
> What I want is the following: I define a new grid, which is 3x3. So one
> value more in each direction than I have color values. On this grid the
> color values live cell-centered. If I now visualize this in Matlab, I get a
> 2x2 block matrix with color values from 1-4. This is what I want!
>
>
>
> To sum up: I want to keep my color values, but I want to define a new
> cell-centered grid (with size(C,1)+1) where these color values live on. Is
> this somehow possible in Paraview?
>
> Thank you!
> Henrik
>
>
>
>
>
>
>
> [1]
>
>
>
> % Full Matlab Code to visualize the two cases.
>
>
>
> C = [1 2; 3 4];
>
>
>
> % Case 1
>
> x=linspace(0,1,size(C,1));
>
> y=x;
>
> [X,Y]=meshgrid(x,y);
>
> Z=zeros(size(C));
>
>
> colorbar
>
>
>
> % Case 2
>
> x=linspace(0,1,size(C,1)+1);
>
> y=x;
>
> [X,Y]=meshgrid(x,y);
>
> Z=zeros(size(C)+1);
>
>
> colorbar
>
>
>
> --
>
> Dipl.-Math. Henrik Büsing
>
> Institute for Applied Geophysics and Geothermal Energy
>
> E.ON Energy Research Center
>
> RWTH Aachen University
>
>
>
> Mathieustr. 10        | Tel +49 (0)241 80 49907 <+49%20241%208049907>
>
> 52074 Aachen, Germany | Fax +49 (0)241 80 49889 <+49%20241%208049889>
>
>
>
> http://www.eonerc.rwth-aachen.de/GGE
>
> hbues...@eonerc.rwth-aachen.de
>
>
>
> *Von:* ParaView [mailto:paraview-boun...@paraview.org] *Im Auftrag von
> *Buesing,
> Henrik
> *Gesendet:* Freitag, 19. Januar 2018 21:13
> *An:* paraview@paraview.org
> *Betreff:* [Paraview] Visualize equdistant cell-centered data
>
>
>
> Dear all,
>
>
>
> I have a “Structured (Curvilinear) Grid” (*.vts), which gets read in as
> 314531 cells and 330000 points. I would like to tell Paraview that this is
> equidistant cell-centered data (330000 cells). I want every cell to get one
> color, such that color interpolation becomes correct.
>
>
>
> Can I somehow convert the data I have?
>
>
>
> Thank you!
> Henrik Büsing
>
>
>
> _______________________________________________
>
> 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
>
> https://paraview.org/mailman/listinfo/paraview
>
>

--
Cory Quammen
Staff R&D Engineer
Kitware, Inc.
_______________________________________________