------------------------------------------------------------------------------
| 1459 | |
| 1460 | //------------------------------------------------------------------------------ |
| 1461 | void vtkWindBladeReader::InitVariableData( |
| 1462 | int var, int& numberOfComponents, float*& varData, int& planeSize, int& rowSize) |
| 1463 | { |
| 1464 | // Set the number of components for this variable |
| 1465 | numberOfComponents = 0; |
| 1466 | if (this->VariableStruct[var] == SCALAR) |
| 1467 | { |
| 1468 | numberOfComponents = 1; |
| 1469 | this->Data[var]->SetNumberOfComponents(numberOfComponents); |
| 1470 | } |
| 1471 | else if (this->VariableStruct[var] == VECTOR) |
| 1472 | { |
| 1473 | numberOfComponents = DIMENSION; |
| 1474 | this->Data[var]->SetNumberOfComponents(numberOfComponents); |
| 1475 | } |
| 1476 | |
| 1477 | // Set the number of tuples which will allocate all tuples |
| 1478 | this->Data[var]->SetNumberOfTuples(this->NumberOfTuples); |
| 1479 | |
| 1480 | // For each component of the requested variable load data |
| 1481 | varData = this->Data[var]->GetPointer(0); |
| 1482 | |
| 1483 | // Entire block of data is read so to calculate index into that data we |
| 1484 | // must use the entire Dimension and not the SubDimension |
| 1485 | // Only the requested subextents are stored on this processor |
| 1486 | planeSize = this->Dimension[0] * this->Dimension[1]; |
| 1487 | rowSize = this->Dimension[0]; |
| 1488 | } |
| 1489 | |
| 1490 | //------------------------------------------------------------------------------ |
| 1491 | bool vtkWindBladeReader::SetUpGlobalData(const std::string& fileName, std::stringstream& inStr) |
no test coverage detected