Modified OpenFOAMReader classes
Modifications to the vtkOpenFOAMReader and vtkPOpenFOAMReader classes to handle collated file format (introduced in OpenFOAM 5.x and OpenFOAM-1712).
- In the normal decomposed case, each domain is stored as "processor0/", "processor1", etc. With files (eg,
U
,p
) for each field in each directory. - In the collated parallel case, a single "processors/" directory is used with a single file per field that includes the values for all of the processes.
The reader tested with ascii and binary dict format and worked well with ParaView-5.4.1. However, member functions with the following statements, name a few vtkOpenFOAMReaderPrivate::ReadPointsFile, vtkOpenFOAMReaderPrivate::ReadFacesFile, will not work correctly if the file is gzipped:
vtkFoamIOobject io(this->CasePath, this->Parent); if (!(io.Open(pointPath) || io.Open(pointPath + ".gz")))
I could narrow down the problem and found the problem is because fstream failed to open the specified file in the second on, io.Open(pointPath + ".gz"). I guess something happened in the io.Open(pointPath) and prevent the second io.Open getting a file open. I couldn't fix that problem so it would be perfect if you could correct that problem while merging this patch.