------------------------------------------------------------------------------
| 1353 | |
| 1354 | //------------------------------------------------------------------------------ |
| 1355 | int vtkSLACReader::ReadCoordinates(int meshFD, vtkMultiBlockDataSet* output) |
| 1356 | { |
| 1357 | // Read in the point coordinates. The coordinates are 3-tuples in an array |
| 1358 | // named "coords". |
| 1359 | int coordsVarId; |
| 1360 | CALL_NETCDF_INT(nc_inq_varid(meshFD, "coords", &coordsVarId)); |
| 1361 | |
| 1362 | vtkSmartPointer<vtkDataArray> coordData = this->ReadPointDataArray(meshFD, coordsVarId); |
| 1363 | if (!coordData) |
| 1364 | return 0; |
| 1365 | if (coordData->GetNumberOfComponents() != 3) |
| 1366 | { |
| 1367 | vtkErrorMacro(<< "Failed sanity check! Coords have wrong dimensions."); |
| 1368 | return 0; |
| 1369 | } |
| 1370 | coordData->SetName("coords"); |
| 1371 | |
| 1372 | vtkPoints* points = |
| 1373 | vtkPoints::SafeDownCast(output->GetInformation()->Get(vtkSLACReader::POINTS())); |
| 1374 | points->SetData(coordData); |
| 1375 | |
| 1376 | return 1; |
| 1377 | } |
| 1378 | |
| 1379 | //------------------------------------------------------------------------------ |
| 1380 | int vtkSLACReader::ReadFieldData( |
no test coverage detected