------------------------------------------------------------------------------
| 97 | |
| 98 | //------------------------------------------------------------------------------ |
| 99 | int vtkEnSight6BinaryReader::ReadGeometryFile( |
| 100 | const char* fileName, int timeStep, vtkMultiBlockDataSet* output) |
| 101 | { |
| 102 | char line[81]; |
| 103 | int partId, realId; |
| 104 | int lineRead; |
| 105 | float* coordinateArray; |
| 106 | int i; |
| 107 | int pointIdsListed; |
| 108 | int* pointIds; |
| 109 | |
| 110 | // Initialize |
| 111 | // |
| 112 | if (!fileName) |
| 113 | { |
| 114 | vtkErrorMacro("A GeometryFileName must be specified in the case file."); |
| 115 | return 0; |
| 116 | } |
| 117 | std::string sfilename; |
| 118 | if (this->FilePath) |
| 119 | { |
| 120 | sfilename = this->FilePath; |
| 121 | if (sfilename.at(sfilename.length() - 1) != '/') |
| 122 | { |
| 123 | sfilename += "/"; |
| 124 | } |
| 125 | sfilename += fileName; |
| 126 | vtkDebugMacro("full path to geometry file: " << sfilename); |
| 127 | } |
| 128 | else |
| 129 | { |
| 130 | sfilename = fileName; |
| 131 | } |
| 132 | |
| 133 | if (this->OpenFile(sfilename.c_str()) == 0) |
| 134 | { |
| 135 | vtkErrorMacro("Unable to open file: " << sfilename); |
| 136 | return 0; |
| 137 | } |
| 138 | |
| 139 | lineRead = this->ReadLine(line); |
| 140 | auto resultSubLine0 = |
| 141 | vtk::scan<std::string_view, std::string_view>(std::string_view(line), "{:s} {:s}"); |
| 142 | auto subLine = std::get<1>(resultSubLine0->values()); |
| 143 | if (subLine != "Binary" && subLine != "binary") |
| 144 | { |
| 145 | vtkErrorMacro("This is not an EnSight6 binary file. Try " |
| 146 | << "vtkEnSight6Reader."); |
| 147 | return 0; |
| 148 | } |
| 149 | |
| 150 | if (this->UseFileSets) |
| 151 | { |
| 152 | for (i = 0; i < timeStep - 1; i++) |
| 153 | { |
| 154 | if (!this->SkipTimeStep()) |
| 155 | { |
| 156 | return 0; |
nothing calls this directly
no test coverage detected