------------------------------------------------------------------------------
| 209 | |
| 210 | //------------------------------------------------------------------------------ |
| 211 | void vtkMFIXReader::MakeMesh(vtkUnstructuredGrid* output) |
| 212 | { |
| 213 | output->Allocate(); |
| 214 | |
| 215 | if (this->MakeMeshFlag == 0) |
| 216 | { |
| 217 | // Points->SetNumberOfPoints((this->IMaximum2+1) |
| 218 | // *(this->JMaximum2+1)*(this->KMaximum2+1)); |
| 219 | |
| 220 | // |
| 221 | // Cartesian type mesh |
| 222 | // |
| 223 | if (!strcmp(this->CoordinateSystem, "CARTESIAN") && (this->KMaximum2 != 1)) |
| 224 | { |
| 225 | double pointX = -this->Dx->GetValue(0); |
| 226 | double pointY = -this->Dy->GetValue(0); |
| 227 | double pointZ = -this->Dz->GetValue(0); |
| 228 | for (int k = 0; k <= this->KMaximum2; k++) |
| 229 | { |
| 230 | for (int j = 0; j <= this->JMaximum2; j++) |
| 231 | { |
| 232 | for (int i = 0; i <= this->IMaximum2; i++) |
| 233 | { |
| 234 | this->Points->InsertNextPoint(pointX, pointY, pointZ); |
| 235 | if (i == this->IMaximum2) |
| 236 | { |
| 237 | pointX = pointX + this->Dx->GetValue(i - 1); |
| 238 | } |
| 239 | else |
| 240 | { |
| 241 | pointX = pointX + this->Dx->GetValue(i); |
| 242 | } |
| 243 | } |
| 244 | pointX = -this->Dx->GetValue(0); |
| 245 | if (j == this->JMaximum2) |
| 246 | { |
| 247 | pointY = pointY + this->Dy->GetValue(j - 1); |
| 248 | } |
| 249 | else |
| 250 | { |
| 251 | pointY = pointY + this->Dy->GetValue(j); |
| 252 | } |
| 253 | } |
| 254 | pointY = -this->Dy->GetValue(0); |
| 255 | if (k == this->KMaximum2) |
| 256 | { |
| 257 | pointZ = pointZ + this->Dz->GetValue(k - 1); |
| 258 | } |
| 259 | else |
| 260 | { |
| 261 | pointZ = pointZ + this->Dz->GetValue(k); |
| 262 | } |
| 263 | } |
| 264 | } |
| 265 | else if (!strcmp(this->CoordinateSystem, "CARTESIAN") && (this->KMaximum2 == 1)) |
| 266 | { |
| 267 | double pointX = -this->Dx->GetValue(0); |
| 268 | double pointY = -this->Dy->GetValue(0); |
no test coverage detected