[Paraview] Face Data on vtkUnstructuredGrids

Parker, Andrew (UK Filton) Andrew.Parker2 at baesystems.com
Mon Oct 31 08:58:44 EDT 2011


Hi,

Ok so basically I need to build and store the connectivity for the face-cell for the graph, fine I can do that no problems (a mapping of faces to left and right adjacent cells).  But what about actually adding a scalar for each cell (a face of M) to the new mesh F(M)?  Can I do that, can that scalar then be visualized?   

Reason for scalar: Basically I have a very large unstructured mesh, and in the solver a flag is used, this scalar that I want to view, has a value on each face.  I wish to see that in the mesh and how it change to understand the behavior of the solver, hence I want to see each face value, no interpolation, just the value in the solver, on the face of the mesh.

Assuming the answer is yes to the above, another question I have is, what structure to I hand back to paraview?  The input will be M, in the form of a vtkUnstructuredGrid, I still want to see that data on M, but I need to return F(M), a new mesh, looking identical, but having data on its cells (the faces of M) so that I can look at this single lowly scalar.  How do I do this?  Is this not a massive waste of memory?   I need to build additional connectivity information for M, which is probably already there inside paraview I assume, I can't believe it can't map faces to adjacent cells, plus store a new mesh F(M), just so I can see the data on the faces....?  Why did face normals get a special treatment, and for all other face data this has been totally missed?

Confused, 

Thanks in advance,
Andy

-----Original Message-----
From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org] On Behalf Of George Zagaris
Sent: 31 October 2011 12:35
To: Parker, Andrew (UK Filton)
Cc: paraview at paraview.org
Subject: Re: [Paraview] Face Data on vtkUnstructuredGrids


                    *** WARNING ***

  This message has originated outside your organisation,
  either from an external partner or the Global Internet. 
      Keep this in mind if you answer this message.
 

Hi Andy,

Given your unstructured volume mesh, M, one way to achieve what you describe is the following:

(1) Construct a vtkUnstructureGrid instance, F(M), consisting of the faces of M, i.e., each cell in F(M) is a facet in M.
(2) Build auxiliary arrays for each cell in F(M) to store which cells in M the face is adjacent to.

I think you can do this in one loop and it should be sufficient for the operations you want to perform, e.g., interpolate to the face etc.

Let me know if you need more help to get started on this.

Best,
George


> Message: 2
> Date: Mon, 31 Oct 2011 11:32:09 -0000
> From: "Parker, Andrew (UK Filton)" <Andrew.Parker2 at baesystems.com>
> Subject: Re: [Paraview] Face Data on vtkUnstructuredGrids
> To: <paraview at paraview.org>
> Message-ID:
>        <FC17C27D1141BF4C945453BACB1CB1D10F7DC5 at GLKMS2100.GREENLNK.NET>
> Content-Type: text/plain; charset="utf-8"
>
> Hi,
>
>
>
> I have to be honest so far there has been no solution/suggestions to the problem I posed.  I am particularly interested in the access pattern I described, but also the ability to be able to add a scale to faces of a 3d unstructured mesh, which I can then cut.
>
>
>
> Any help would be great, I should imagine this is of interest to a lot of people.
>
>
>
> Andy
>
>
>
> From: p.p pyloth [mailto:lalujesus at yahoo.co.in]
> Sent: 29 October 2011 12:16
> To: Parker, Andrew (UK Filton)
> Subject: Re: [Paraview] Face Data on vtkUnstructuredGrids
>
>
>
>                    *** WARNING ***
>
>  This message has originated outside your organisation,
>  either from an external partner or the Global Internet.
>      Keep this in mind if you answer this message.
>
> I have the same problem
> I dont know how to export data on surfaces like wall faces through vtk 
> , as vtk is a bulk reader
>
> Suppose I want to show data on wall zones,inlet zones,outlet ,  no idea how to show that.
> IF you solved ur problem please post the solution
>
>
>
> --- On Fri, 28/10/11, Parker, Andrew (UK Filton) <Andrew.Parker2 at baesystems.com> wrote:
>
>
> From: Parker, Andrew (UK Filton) <Andrew.Parker2 at baesystems.com>
> Subject: [Paraview] Face Data on vtkUnstructuredGrids
> To: paraview at paraview.org
> Date: Friday, 28 October, 2011, 6:31 PM
>
> Hi,
>
>
>
> I already have an established reader that reads in our bespoke format and converts it to a vtkUnstructuredGrids so that I can view it in Paraview. Furthermore a filter then reads in a solution file in a bespoke format and shows the cell data from the CFD solution. This works great, happy days.  However, I now need to show data on the faces on the vtkUnstructuredGrid, a metric.  I have two problems, no idea how to set this given the above setup, and two, to compute the metric I could do with the following type of access:
>
>
>
> Loop over all faces of vtkUnstructuredGrid
>
>
>
>                Get the face centre
>
>                Get the Left cell centre
>
>                Get the Right cell centre
>
>
>
>                Do some stuff?..
>
>
>
>                Set a scale on the face to be a number based on the 
> stuff
>
>
>
> Finish
>
>
>
> I have no idea how to access the vtkUnstructuredGrid in the above to pattern???
>
>
> Can anybody help, it would be very useful? examples more than welcome.
>
>
> Cheers,
>
> Andy
>
>
> ********************************************************************
> This email and any attachments are confidential to the intended 
> recipient and may also be privileged. If you are not the intended 
> recipient please delete it from your system and notify the sender.
> You should not copy it or use it for any purpose nor disclose or 
> distribute its contents to any other person.
> ********************************************************************
>
>
> -----Inline Attachment Follows-----
>
> _______________________________________________
> 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
>
>
>
> -------------- next part -------------- An HTML attachment was 
> scrubbed...
> URL: 
> <http://www.paraview.org/pipermail/paraview/attachments/20111031/13f5e
> 4ef/attachment.htm>
>
> ------------------------------
>
> _______________________________________________
> 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
>
>
> End of ParaView Digest, Vol 90, Issue 80
> ****************************************
>
_______________________________________________
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



More information about the ParaView mailing list