How to merge points with multiple processes.

I have a kind of discontinuous Galerkin Finite Element Mesh, and I would like to convert it into a continuous mesh using a cleaning/merging filter. By discontinuous mesh, I mean that the points between two adjacent cells are duplicated, resulting in the cells initially not being linked together by their connectivity.

What I’m attempting to do is to reconnect the cells together, and the main reason is to not render the internal element faces (see picture below). I have it working in serial, but in parallel with MPI, if cells are on different processes, the clean filter only filter the cells of the current process. Consequently, the points at the interface between the two processes are not merged. To address this issue, I would like to use ghost cells. The question is, what is the workflow in VTK to automatically create those ghost cells? I’ve drafted what the workflow could look like, but I’m not 100% certain this would work and which VTK classes to use. Is vtkPartitionedDataSetCollection appropriate? I know the D3 filter can be used to partition some data, but can it also be employed to create ghost cells on an already partitioned mesh?

Any advice is welcome.

Hello,

You can try using vtkStaticCleanUnstructuredGrid to merge those coincident vertexes: VTK: vtkStaticCleanUnstructuredGrid Class Reference . Unfortunately, I couldn’t find any usage examples.

best,

PC

Thank you for your response.
I am already using vtkStaticCleanUnstructuredGrid, which allows me to remove the internal surfaces of cells distributed on the same process (refer to the left part of my image above). So, do you mean that I can use vtkStaticCleanUnstructuredGrid across multiple processes?

I also found a filter named vtkGhostCellsGenerator. This might do what I am looking for, except that when detecting coincident points, there is no option to set the geometry tolerance, and there is also no option to set the PointDataWeighingStrategy.

What do you mean by “multiple processes”? Code running in parallel?

yes

In that case, just wait for all processes to finish and use vtkStaticCleanUnstructuredGrid to merge the coincident vertexes as a post-processing step.