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

Method CheckMultiGrid

IO/Parallel/vtkMultiBlockPLOT3DReaderInternals.cxx:114–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114int vtkMultiBlockPLOT3DReaderInternals::CheckMultiGrid(FILE* fp)
115{
116 if (this->Settings.HasByteCount)
117 {
118 clearerr(fp); // clear error and EOF flags
119 fseek(fp, 0, SEEK_SET); // move to beginning
120 // We read the byte count, if it is 4 (1 int),
121 // then this is multi-grid because the first
122 // value is the number of grids rather than
123 // an array of 2 or 3 values.
124 int recMarkBeg;
125 if (!this->ReadInts(fp, 1, &recMarkBeg))
126 {
127 return 0;
128 }
129 if (recMarkBeg == sizeof(int))
130 {
131 this->Settings.MultiGrid = 1;
132 }
133 else
134 {
135 this->Settings.MultiGrid = 0;
136 }
137 return 1;
138 }
139 return 0;
140}
141
142int vtkMultiBlockPLOT3DReaderInternals::Check2DGeom(FILE* fp)
143{

Callers 1

AutoDetectionCheckMethod · 0.80

Calls 1

ReadIntsMethod · 0.95

Tested by

no test coverage detected