I noticed that print_mesh_summary is not correct when running with MPI. There are two problems in this function
We are taking sum of information gathered from all the processors, but taking sum for computing minimum and maximum values of coordinate is simply wrong. We need switch to MPI.reduce or take minimum/maximum after gathering information.
Number of faces, faces, facets, and vertices are wrong due to ghost boundary. We are counting the shared boundary twice. Fixing this issue is not immediately clear to me although I’m also not sure if the number of facets and vertices are that important...
Finally, VaSP also has this functionality ( which also has the same problem as I described). So perhaps, we can have this function in one place?
https://github.com/KVSlab/VaMPy/blob/6c6468a4d8fcda89c330c9b01cea253e1bd3c8c3/src/vampy/simulation/simulation_common.py#L31
I noticed that
print_mesh_summary
is not correct when running with MPI. There are two problems in this functionWe are taking
sum
of information gathered from all the processors, but taking sum for computing minimum and maximum values of coordinate is simply wrong. We need switch toMPI.reduce
or take minimum/maximum after gathering information.Number of faces, faces, facets, and vertices are wrong due to ghost boundary. We are counting the shared boundary twice. Fixing this issue is not immediately clear to me although I’m also not sure if the number of facets and vertices are that important...
Finally,
VaSP
also has this functionality ( which also has the same problem as I described). So perhaps, we can have this function in one place?What’s your opinion on this @johannesring ?