Dear All,
I am having difficulties with writing out pvtu files from a Catalyst process. Writing them out directly using for instance a threshold defined within the python script works great, but I do have another function for processing the data directly. I can access all fields and perform the computation and in the end would like to write out the results as a vtkIntArray. Using one thread and vtkXMLUnstructuredGridWriter this works great, but in parallel from within Catalyst and using vtkXMLPUnstructuredGridWriter it writes out data to disk, the *.pvtu file also looks correct, but when reading the data back with ParaView, the XML reader complains about wrong formed tokens etc. Here is the part of C++ code I use to write out the files. The input data is a unstructured grid with one vtkUnsignedIntArray.:
vtkMultiProcessController* ctrl = vtkMultiProcessController::GetGlobalController();
vtkNew completeArrays;
completeArrays->SetController(ctrl);
completeArrays->SetInputData(isccpData);
vtkNew writer;
writer->SetInputConnection(completeArrays->GetOutputPort());
writer->SetNumberOfPieces(ctrl->GetNumberOfProcesses());
writer->SetStartPiece(0);
writer->SetEndPiece(ctrl->GetNumberOfProcesses()-1);
//writer->SetController(ctrl);
writer->SetUseSubdirectory(true);
writer->SetFileName(outputFile.c_str());
writer->Update();
I also looked into the Catalyst example and the test for vtkXMLPUnstructuredGridWriter. I also tried without using vtkCompleteArrays, but as it very well may be that process 0 does not have any points, I thought this will be on the safe side.
Thanks for any hints and Cheers,
Niklas