| 1565 | //------------------------------------------------------------------------------ |
| 1566 | |
| 1567 | int vtkMPASReader::ReadAndOutputGrid() |
| 1568 | { |
| 1569 | switch (this->Geometry) |
| 1570 | { |
| 1571 | case vtkMPASReader::Spherical: |
| 1572 | if (!this->AllocSphericalGeometry()) |
| 1573 | { |
| 1574 | return 0; |
| 1575 | } |
| 1576 | this->FixPoints(); |
| 1577 | break; |
| 1578 | |
| 1579 | case vtkMPASReader::Projected: |
| 1580 | if (!this->AllocProjectedGeometry()) |
| 1581 | { |
| 1582 | return 0; |
| 1583 | } |
| 1584 | this->ShiftLonData(); |
| 1585 | this->FixPoints(); |
| 1586 | if (!this->EliminateXWrap()) |
| 1587 | { |
| 1588 | return 0; |
| 1589 | } |
| 1590 | break; |
| 1591 | |
| 1592 | case vtkMPASReader::Planar: |
| 1593 | if (!this->AllocPlanarGeometry()) |
| 1594 | { |
| 1595 | return 0; |
| 1596 | } |
| 1597 | this->FixPoints(); |
| 1598 | break; |
| 1599 | |
| 1600 | default: |
| 1601 | vtkErrorMacro("Invalid geometry type (" << this->Geometry << ")."); |
| 1602 | return 0; |
| 1603 | } |
| 1604 | |
| 1605 | this->OutputPoints(); |
| 1606 | this->OutputCells(); |
| 1607 | |
| 1608 | return 1; |
| 1609 | } |
| 1610 | |
| 1611 | //------------------------------------------------------------------------------ |
| 1612 | // Allocate into sphere view of dual geometry |
no test coverage detected