MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / read

Function read

src/fileFormats/vtk/vtkUnstructuredReader.C:548–946  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546
547
548void Foam::vtkUnstructuredReader::read(ISstream& inFile)
549{
550 inFile.getLine(header_);
551 if (debug)
552 {
553 Info<< "Header : " << header_ << endl;
554 }
555 inFile.getLine(title_);
556 if (debug)
557 {
558 Info<< "Title : " << title_ << endl;
559 }
560 inFile.getLine(dataType_);
561 if (debug)
562 {
563 Info<< "dataType : " << dataType_ << endl;
564 }
565
566 if (dataType_ == "BINARY")
567 {
568 FatalIOErrorInFunction(inFile)
569 << "Binary reading not supported " << exit(FatalIOError);
570 }
571
572 parseMode readMode = NOMODE;
573 label wantedSize = -1;
574
575
576 // Temporary storage for vertices of cells.
577 labelList cellVerts;
578
579 while (inFile.good())
580 {
581 word tag(inFile);
582
583 if (!inFile.good())
584 {
585 break;
586 }
587
588 if (debug)
589 {
590 Info<< "line:" << inFile.lineNumber()
591 << " tag:" << tag << endl;
592 }
593
594 if (tag == "DATASET")
595 {
596 word geomType(inFile);
597 if (debug)
598 {
599 Info<< "geomType : " << geomType << endl;
600 }
601 readMode = parseModeNames[geomType];
602 wantedSize = -1;
603 }
604 else if (tag == "POINTS")
605 {

Callers 1

Calls 14

extractCellsFunction · 0.85
readFieldFunction · 0.85
eraseMethod · 0.80
exitFunction · 0.50
forAllFunction · 0.50
IOobjectClass · 0.50
goodMethod · 0.45
lineNumberMethod · 0.45
setSizeMethod · 0.45
sizeMethod · 0.45
xMethod · 0.45
yMethod · 0.45

Tested by

no test coverage detected