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

Method ConvertVectorFromCylindricalToCartesian

IO/Geometry/vtkMFIXReader.cxx:2226–2259  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2224
2225//------------------------------------------------------------------------------
2226void vtkMFIXReader::ConvertVectorFromCylindricalToCartesian(int xindex, int zindex)
2227{
2228 int count = 0;
2229 double radius = 0.0;
2230 double y = 0.0;
2231 double theta = 0.0;
2232 int cnt = 0;
2233
2234 for (int k = 0; k < this->KMaximum2; k++)
2235 {
2236 for (int j = 0; j < this->JMaximum2; j++)
2237 {
2238 for (int i = 0; i < this->IMaximum2; i++)
2239 {
2240 if (this->Flag->GetValue(cnt) < 10)
2241 {
2242 double ucart = (this->CellDataArray[xindex]->GetValue(count) * cos(theta)) -
2243 (this->CellDataArray[zindex]->GetValue(count) * sin(theta));
2244 double wcart = (this->CellDataArray[xindex]->GetValue(count) * sin(theta)) +
2245 (this->CellDataArray[zindex]->GetValue(count) * cos(theta));
2246 this->CellDataArray[xindex]->InsertValue(count, (float)ucart);
2247 this->CellDataArray[zindex]->InsertValue(count, (float)wcart);
2248 count++;
2249 }
2250 cnt++;
2251 radius = radius + this->Dx->GetValue(i);
2252 }
2253 radius = 0.0;
2254 y = y + this->Dy->GetValue(j);
2255 }
2256 y = 0.0;
2257 theta = theta + this->Dz->GetValue(k);
2258 }
2259}
2260
2261//------------------------------------------------------------------------------
2262void vtkMFIXReader::GetAllTimes(vtkInformationVector* outputVector)

Callers 1

MakeMeshMethod · 0.95

Calls 4

cosFunction · 0.50
sinFunction · 0.50
GetValueMethod · 0.45
InsertValueMethod · 0.45

Tested by

no test coverage detected