[vtkusers] adding values at edge midpoints
Nico Schlömer
nico.schloemer at gmail.com
Wed Apr 13 12:36:14 EDT 2011
Hm. I think subdivision
<http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Subdivision> is not
quite what I was looking for as this increases the number of
triangles.
The use case I have is that there is data that defined only on the
edge midpoints. I thought that was a fairly common thing in fluid
dynamics, for example, where pressure or velocity are given alongside
the edges.
I thought I'd seen something like this in the VTK file format
description, but I may be wrong. It's in the ExodusII description
anyways.
Any more thoughts on this?
--Nico
On Tue, Apr 12, 2011 at 10:26 PM, David Doria <daviddoria at gmail.com> wrote:
> On Tue, Apr 12, 2011 at 9:13 PM, Nico Schlömer <nico.schloemer at gmail.com>
> wrote:
>>
>> Hi all,
>>
>> so I have this vtkUnstructuredGrid here and would like to add values
>> at the midpoints of the edges. -- Is that possible at all?
>>
>> Cheers,
>> Nico
>
> Is the unstructured grid a polygonal mesh? You can find the midpoints by
> finding vertices which share an edge:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/VertexConnectivity
> and then computing the midpoint. If you're looking to change the topology of
> the mesh to include these new midpoints you can look at the subdivision
> filters:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Subdivision
> David
More information about the vtkusers
mailing list