| 546 | |
| 547 | |
| 548 | void 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 | { |
no test coverage detected