--------------------------------------------------------------------------------------------------
| 577 | |
| 578 | //-------------------------------------------------------------------------------------------------- |
| 579 | bool vtkNetCDFUGRIDReader::FillPoints(vtkUnstructuredGrid* output) |
| 580 | { |
| 581 | vtkNew<vtkPoints> points; |
| 582 | |
| 583 | if (this->NodeType == NC_FLOAT) |
| 584 | { |
| 585 | points->SetDataTypeToFloat(); |
| 586 | } |
| 587 | else if (this->NodeType == NC_DOUBLE) |
| 588 | { |
| 589 | points->SetDataTypeToDouble(); |
| 590 | } |
| 591 | else |
| 592 | { |
| 593 | vtkErrorMacro("Invalid mesh has nodes that are not floating point values"); |
| 594 | return false; |
| 595 | } |
| 596 | |
| 597 | points->SetNumberOfPoints(this->NodeCount); |
| 598 | |
| 599 | PointsExtractor worker{}; |
| 600 | using Dispatcher = vtkArrayDispatch::DispatchByArray<vtkArrayDispatch::AOSPointArrays>; |
| 601 | int result{ NC_NOERR }; |
| 602 | Dispatcher::Execute( |
| 603 | points->GetData(), worker, this->NcId, this->NodeXVarId, this->NodeYVarId, result); |
| 604 | |
| 605 | if (!this->CheckError(result)) |
| 606 | { |
| 607 | return false; |
| 608 | } |
| 609 | |
| 610 | output->SetPoints(points); |
| 611 | |
| 612 | return true; |
| 613 | } |
| 614 | |
| 615 | //-------------------------------------------------------------------------------------------------- |
| 616 | bool vtkNetCDFUGRIDReader::FillCells(vtkUnstructuredGrid* output) |
no test coverage detected