MCPcopy Create free account
hub / github.com/Kitware/VTK / WriteRectilinearGridMetaData

Method WriteRectilinearGridMetaData

IO/Parallel/vtkPDataSetWriter.cxx:425–458  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

423
424//------------------------------------------------------------------------------
425int vtkPDataSetWriter::WriteRectilinearGridMetaData(
426 vtkRectilinearGrid* input, char* root, char* str, size_t strSize, ostream* fptr)
427{
428 int i;
429 int* pi;
430
431 // We should indicate the type of data that is being saved.
432 *fptr << " dataType=\"" << input->GetClassName() << "\"" << endl;
433
434 pi = vtkStreamingDemandDrivenPipeline::GetWholeExtent(this->GetInputInformation());
435 *fptr << " wholeExtent=\"" << pi[0] << " " << pi[1] << " " << pi[2] << " " << pi[3] << " "
436 << pi[4] << " " << pi[5] << "\"" << endl;
437
438 // This is making the assumption that all the files will be written out by
439 // some processes.
440 *fptr << " numberOfPieces=\"" << this->NumberOfPieces << "\" >" << endl;
441 for (i = 0; i < this->NumberOfPieces; ++i)
442 {
443 pi = this->Extents[i].data();
444 auto result = vtk::format_to_n(str, strSize, this->FilePatternStdFormat, root, i);
445 *result.out = '\0';
446 *fptr << " <Piece fileName=\"" << str << "\"" << endl
447 << " extent=\"" << pi[0] << " " << pi[1] << " " << pi[2] << " " << pi[3] << " "
448 << pi[4] << " " << pi[5] << "\" />" << endl;
449 }
450 *fptr << "</File>" << endl;
451
452 fptr->flush();
453 if (fptr->fail())
454 {
455 return 0;
456 }
457 return 1;
458}
459
460//------------------------------------------------------------------------------
461int vtkPDataSetWriter::WriteStructuredGridMetaData(

Callers 1

WriteMethod · 0.95

Calls 6

GetWholeExtentFunction · 0.85
format_to_nFunction · 0.50
GetClassNameMethod · 0.45
GetInputInformationMethod · 0.45
dataMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected