|
1 | 1 | /*=========================================================================
|
2 | 2 |
|
3 | 3 | Program: Visualization Toolkit
|
4 |
| - Module: TestPUniformGridGhostDataGenerator.cxx |
| 4 | + Module: TestGhostCellsGenerator.cxx |
5 | 5 |
|
6 | 6 | Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
|
7 | 7 | All rights reserved.
|
|
12 | 12 | PURPOSE. See the above copyright notice for more information.
|
13 | 13 |
|
14 | 14 | =========================================================================*/
|
15 |
| -// .NAME TestPUniformGridGhostDataGenerator.cxx -- Tests ghost data generation |
| 15 | +// .NAME TestGhostCellsGenerator.cxx -- Tests ghost data generation |
16 | 16 | //
|
17 | 17 | // .SECTION Description
|
18 | 18 | // Parallel test that exercises the parallel uniform grid ghost data generator
|
|
27 | 27 | #include "vtkCell.h"
|
28 | 28 | #include "vtkCellData.h"
|
29 | 29 | #include "vtkDoubleArray.h"
|
| 30 | +#include "vtkGhostCellsGenerator.h" |
30 | 31 | #include "vtkInformation.h"
|
31 | 32 | #include "vtkMPIController.h"
|
32 | 33 | #include "vtkMathUtilities.h"
|
33 | 34 | #include "vtkMultiBlockDataSet.h"
|
34 | 35 | #include "vtkMultiProcessController.h"
|
35 |
| -#include "vtkPUniformGridGhostDataGenerator.h" |
36 | 36 | #include "vtkPointData.h"
|
37 | 37 | #include "vtkStreamingDemandDrivenPipeline.h"
|
38 | 38 | #include "vtkUniformGrid.h"
|
@@ -410,15 +410,15 @@ int Test2D(const bool hasNodeData, const bool hasCellData, const int factor, con
|
410 | 410 | }
|
411 | 411 | WriteDistributedDataSet("P2DInitial", mbds);
|
412 | 412 |
|
413 |
| - vtkPUniformGridGhostDataGenerator* ghostGenerator = vtkPUniformGridGhostDataGenerator::New(); |
| 413 | + vtkGhostCellsGenerator* ghostGenerator = vtkGhostCellsGenerator::New(); |
414 | 414 |
|
415 | 415 | ghostGenerator->SetInputData(mbds);
|
416 | 416 | ghostGenerator->SetNumberOfGhostLayers(NG);
|
417 | 417 | ghostGenerator->SetController(Controller);
|
418 |
| - ghostGenerator->Initialize(); |
419 | 418 | ghostGenerator->Update();
|
420 | 419 |
|
421 |
| - vtkMultiBlockDataSet* ghostedDataSet = ghostGenerator->GetOutput(); |
| 420 | + vtkMultiBlockDataSet* ghostedDataSet = |
| 421 | + vtkMultiBlockDataSet::SafeDownCast(ghostGenerator->GetOutputDataObject(0)); |
422 | 422 | WriteDistributedDataSet("GHOSTED2D", ghostedDataSet);
|
423 | 423 |
|
424 | 424 | rc = CheckFields(ghostedDataSet, hasNodeData, hasCellData);
|
@@ -475,15 +475,16 @@ int Test3D(const bool hasNodeData, const bool hasCellData, const int factor, con
|
475 | 475 | }
|
476 | 476 | WriteDistributedDataSet("P3DInitial", mbds);
|
477 | 477 |
|
478 |
| - vtkPUniformGridGhostDataGenerator* ghostGenerator = vtkPUniformGridGhostDataGenerator::New(); |
| 478 | + vtkGhostCellsGenerator* ghostGenerator = vtkGhostCellsGenerator::New(); |
479 | 479 |
|
480 | 480 | ghostGenerator->SetInputData(mbds);
|
481 | 481 | ghostGenerator->SetNumberOfGhostLayers(NG);
|
482 | 482 | ghostGenerator->SetController(Controller);
|
483 | 483 | ghostGenerator->Initialize();
|
484 | 484 | ghostGenerator->Update();
|
485 | 485 |
|
486 |
| - vtkMultiBlockDataSet* ghostedDataSet = ghostGenerator->GetOutput(); |
| 486 | + vtkMultiBlockDataSet* ghostedDataSet = |
| 487 | + vtkMultiBlockDataSet::SafeDownCast(ghostGenerator->GetOutputDataObject(0)); |
487 | 488 | WriteDistributedDataSet("GHOSTED3D", ghostedDataSet);
|
488 | 489 |
|
489 | 490 | rc = CheckFields(ghostedDataSet, hasNodeData, hasCellData);
|
|
0 commit comments