I'm assuming you're dealing with a vtkUnstructuredGrid (for the
topologically regular grids you should just use the extent information).
You'll want to look at the GetCellNeighbors() method --
Here, cellId is the cell you want to get the neighbors from, ptIds is the
list of points that need to be shared by both cells and cellIds is the
return list. You'll have to iterate over all points of the cell you're
interested in (i.e. call GetCellNeighbors() 8 times for a hex).
The basic algorithm is:
loop over cells:
for each cell, loop over all of its points
for each point call GeCellNeighbors(cellid, point id list with a single
loop through cellids to compare cell sizes
Please let me know if this isn't clear enough to get you going...
On Wed, Feb 14, 2018 at 1:38 PM, Dennis Conklin <dennis_conk...@goodyear.com
> I am looking to calculate a mesh quality measure that would be the ratio
> of the max/min of the element volumes of each element and all it’s
> neighbors (other elements with common nodes). I intend to use this to
> quantify grid refinement transitions and perhaps establish some design
> standards for them. I have tried Gradient of Element Volume, but I need
> to eliminate the distance part of that to get the number that I want.
> So, if I have a hex element in a regular grid, I would expect to have 26
> “neighbor” elements plus the original element. The number I want is
> (max of 27 element volumes)/(min of 27 element volumes). This quantity
> will highlight mesh refinement transitions.
> My question (at last) is: how do I find all the neighbor elements
> (share at least 1 node) of each element in my model? I’d like to do this
> in a Programmable Filter. I’m afraid I don’t know much about how
> connectivity is implemented in vtk.
> Powered by www.kitware.com
> Visit other Kitware open-source projects at http://www.kitware.com/
> Please keep messages on-topic and check the ParaView Wiki at:
> Search the list archives at: http://markmail.org/search/?q=ParaView
> Follow this link to subscribe/unsubscribe:
Powered by www.kitware.com
Visit other Kitware open-source projects at
Please keep messages on-topic and check the ParaView Wiki at:
Search the list archives at: http://markmail.org/search/?q=ParaView
Follow this link to subscribe/unsubscribe: