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

Method GetNumberOfVariablesInSPXFiles

IO/Geometry/vtkMFIXReader.cxx:2183–2211  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2181
2182//------------------------------------------------------------------------------
2183void vtkMFIXReader::GetNumberOfVariablesInSPXFiles()
2184{
2185 int NumberOfVariablesInSPX = 0;
2186 int skip = 0;
2187
2188 // first initialize to zero as some entries may be
2189 // skipped in the code further down
2190 for (int i = 0; i <= this->VariableNames->GetMaxId(); i++)
2191 {
2192 this->VariableToSkipTable->InsertValue(i, 0);
2193 }
2194
2195 for (int j = 1; j < this->NumberOfSPXFilesUsed; j++)
2196 {
2197 for (int i = 0; i <= this->VariableNames->GetMaxId(); i++)
2198 {
2199 if ((this->VariableIndexToSPX->GetValue(i) == j) &&
2200 (this->VariableComponents->GetValue(i) == 1))
2201 {
2202 NumberOfVariablesInSPX++;
2203 this->VariableToSkipTable->InsertValue(i, skip);
2204 skip++;
2205 }
2206 }
2207 this->SPXToNVarTable->InsertValue(j, NumberOfVariablesInSPX);
2208 NumberOfVariablesInSPX = 0;
2209 skip = 0;
2210 }
2211}
2212
2213//------------------------------------------------------------------------------
2214void vtkMFIXReader::FillVectorVariable(int xindex, int yindex, int zindex, vtkFloatArray* v)

Callers 1

RequestInformationMethod · 0.95

Calls 2

InsertValueMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected