MCPcopy Create free account
hub / github.com/Kitware/VTK / MakeTimeStepTable

Method MakeTimeStepTable

IO/Geometry/vtkMFIXReader.cxx:2042–2064  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

2040
2041//------------------------------------------------------------------------------
2042void 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//------------------------------------------------------------------------------
2067void vtkMFIXReader::GetVariableAtTimestep(int vari, int tstep, vtkFloatArray* v)

Callers 1

RequestInformationMethod · 0.95

Calls 4

minFunction · 0.50
SetNumberOfComponentsMethod · 0.45
GetValueMethod · 0.45
InsertComponentMethod · 0.45

Tested by

no test coverage detected