------------------------------------------------------------------------------
| 185 | |
| 186 | //------------------------------------------------------------------------------ |
| 187 | void vtkXMLUnstructuredDataReader::SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel) |
| 188 | { |
| 189 | this->UpdatePieceId = piece; |
| 190 | this->UpdateNumberOfPieces = numberOfPieces; |
| 191 | this->UpdateGhostLevel = ghostLevel; |
| 192 | |
| 193 | // If more pieces are requested than available, just return empty |
| 194 | // pieces for the extra ones. |
| 195 | this->UpdateNumberOfPieces = std::min(this->UpdateNumberOfPieces, this->NumberOfPieces); |
| 196 | |
| 197 | // Find the range of pieces to read. |
| 198 | if (this->UpdatePieceId < this->UpdateNumberOfPieces) |
| 199 | { |
| 200 | this->StartPiece = ((this->UpdatePieceId * this->NumberOfPieces) / this->UpdateNumberOfPieces); |
| 201 | this->EndPiece = |
| 202 | (((this->UpdatePieceId + 1) * this->NumberOfPieces) / this->UpdateNumberOfPieces); |
| 203 | } |
| 204 | else |
| 205 | { |
| 206 | this->StartPiece = 0; |
| 207 | this->EndPiece = 0; |
| 208 | } |
| 209 | |
| 210 | // Find the total size of the output. |
| 211 | this->SetupOutputTotals(); |
| 212 | } |
| 213 | |
| 214 | //------------------------------------------------------------------------------ |
| 215 | void vtkXMLUnstructuredDataReader::ReadXMLData() |
no test coverage detected