I am working with a MultiBlock mesh which gives me issues when I try to compute spatial gradients (Vorticity, Q-criterion etc…) due to the abrupt change in the [deltaX,deltaY] when the point that limits the block boundaries is exported from out solver (I cannot get rid of it from the solver since it was programmed like this).
I managed to obtain the exact location of these block boundary points with the filters that you observe in the image below:
Now I need to remove them from the original dataset. I have been trying to play with a programmable filter but I am facing two challenges:
When the CompositeDataSet is exported, it only contains 32 decimal points (float32) and since my spatial coordinates have +50 decimals, a float32 will not be sufficient. For instance, this are the kind of truncation problems that I have when I pass the variables to the python filter and bring them back to paraview:
Neglecting the first problem (which is really critical only near the wall), I managed to extract the points in the filter as you can see below. The problem now is that I have the data deconstructed in flat arrays (coordinates and point data) that I need to bring back in unstructured grid format in order to be able to compute gradients and this is not as simple as I first expected. I have been reading in several vtk forums how to generate an unstructured grid but a connectivity matrix between cells is obviously needed that I am unable to reproduce for my case. One Idea that came to my mind is to copy the input format to the output like
output = dsa.WrapDataObject(inputs)and then modify each attribute from this new
outputCompositeDataSet in order to match my needs. Then the output of the programmable filter will have the same exact format as the input but with another data. Unfortunately I am not able to modify the data from the CompositeDataSet (probably because it is not as simple as something like
input_0.PointData.ArrayNames = ['NewArray0','NewArray1'])
For all this I would like to ask for advice and to know if they way I am tackling this problem is the right one. Should I keep trying to manipulate the data via a python filter or is there any paraview filter that allows the user to substract the points of a filter by removing the points from another filter contained in the first one? I would appreciate any new ideas about how to remove these annoying points from the dataset.
Thank you in advance!