Refine and interpolate certain cells within an unstructured grid

Hello all,

i have a question concerning programmable filters. I have an unstructured grid and want to interpolate within high gradient regions of a certain field variable. Therefore I want to “split” the cells with the high gradients and interpolate it with different high order functions. Is there a fast way to refine these cells?



I’m not aware of a convenience function in the VTK API for this specific function. The way to do it then is to:

  1. copy the input point and point aligned arrays over,
  2. iterate over the cells in your input, and either append them across to the output or refine by appending multiple outputs.
  3. In the case of refining, be sure to append point quantities too.

See the source code for the existing filters for inspiration.