------------------------------------------------------------------------------
| 2040 | |
| 2041 | //------------------------------------------------------------------------------ |
| 2042 | void vtkMFIXReader::MakeTimeStepTable(int numberOfVariables) |
| 2043 | { |
| 2044 | this->VariableTimestepTable->SetNumberOfComponents(numberOfVariables); |
| 2045 | |
| 2046 | for (int i = 0; i < numberOfVariables; i++) |
| 2047 | { |
| 2048 | int timestepIncrement = |
| 2049 | (int)((float)this->MaximumTimestep / (float)this->VariableTimesteps->GetValue(i) + 0.5); |
| 2050 | int timestep = 1; |
| 2051 | for (int j = 0; j < this->MaximumTimestep; j++) |
| 2052 | { |
| 2053 | this->VariableTimestepTable->InsertComponent(j, i, timestep); |
| 2054 | timestepIncrement--; |
| 2055 | if (timestepIncrement <= 0) |
| 2056 | { |
| 2057 | timestepIncrement = |
| 2058 | (int)((float)this->MaximumTimestep / (float)this->VariableTimesteps->GetValue(i) + 0.5); |
| 2059 | timestep++; |
| 2060 | } |
| 2061 | timestep = std::min(timestep, this->VariableTimesteps->GetValue(i)); |
| 2062 | } |
| 2063 | } |
| 2064 | } |
| 2065 | |
| 2066 | //------------------------------------------------------------------------------ |
| 2067 | void vtkMFIXReader::GetVariableAtTimestep(int vari, int tstep, vtkFloatArray* v) |
no test coverage detected