make PXML polydata and unstructured grid writers only write out needed files
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
When using the PXML polydata and unstructured grid writers in parallel they all write a file even if there's no information stored in the file (e.g. the grid has no points). Additionally process 0 includes all of these files instead of just the files with data in them. This is a waste of IO. It would be useful to have an option such that the processes let process 0 know if they will be writing out data (i.e. check if they have any points) and notify process 0 if this is going to be done. Then when process 0 writes the meta-data file (.pvtp or .pvtu) it needs to exclude the data files that won't be written from being included in the meta-data file. This probably needs to be an option since I think the P in PXML really stands for piece and not necessarily parallel and I'm not sure if it's being used for pieces that it can properly be done (e.g. 8 pieces over 3 MPI processes). If it can be done for all use cases though it should just be done and ignore the option to do that.