Skip to content

Commit a9f227c

Browse files
yohannbearzikwrobot
authored andcommittedJul 26, 2021
Merge topic 'ghost-test-cleaning'
214d034 Ghost cells generator: cleaning legacy tests Acked-by: Kitware Robot <[email protected]> Acked-by: Utkarsh Ayachit <[email protected]> Merge-request: !8203
2 parents 39cb72f + 214d034 commit a9f227c

12 files changed

+17
-18
lines changed
 

‎Filters/Geometry/Testing/Cxx/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,13 @@ vtk_add_test_cxx(vtkFiltersGeometryCxxTests tests
1010
TestProjectSphereFilter.cxx,NO_VALID
1111
TestRegularGridDataSetSurfaceFilter.cxx
1212
TestStructuredAMRNeighbor.cxx,NO_VALID
13-
TestUniformGridGhostDataGenerator.cxx,NO_VALID
1413
TestUnstructuredGridGeometryFilter.cxx
15-
TestUnstructuredGridGeometryFilterGhostCells.cxx,NO_VALID
1614
)
1715
vtk_add_test_cxx(vtkFiltersGeometryCxxTests no_data_tests
1816
NO_DATA NO_VALID NO_OUTPUT
1917
TestGeometryFilterCellData.cxx
2018
TestStructuredAMRGridConnectivity.cxx
2119
TestStructuredGridConnectivity.cxx
22-
TestStructuredGridGhostDataGenerator.cxx
2320
UnitTestDataSetSurfaceFilter.cxx
2421
UnitTestProjectSphereFilter.cxx
2522
)

‎Filters/Geometry/vtk.module

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ TEST_DEPENDS
1919
VTK::CommonSystem
2020
VTK::FiltersGeneral
2121
VTK::FiltersGeometry
22-
VTK::FiltersParallelDIY2
2322
VTK::FiltersSources
2423
VTK::IOImage
2524
VTK::IOXML

‎Filters/ParallelDIY2/Testing/Cxx/CMakeLists.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@ if (TARGET VTK::mpi)
88
TestPResampleToImage.cxx
99
TestPResampleWithDataSet2.cxx
1010
TestPResampleWithDataSet.cxx
11+
TestPUniformGridGhostDataGenerator.cxx,NO_VALID
12+
TestPUnstructuredGridGhostCellsGenerator.cxx,NO_VALID
1113
TestProbeLineFilter.cxx
1214
TestRedistributeDataSetFilter.cxx
13-
TestRedistributeDataSetFilterOnIoss.cxx,NO_VALID)
15+
TestRedistributeDataSetFilterOnIoss.cxx,NO_VALID
16+
TestStructuredGridGhostDataGenerator.cxx,NO_VALID
17+
TestUniformGridGhostDataGenerator.cxx,NO_VALID
18+
TestUnstructuredGridGeometryFilterGhostCells.cxx,NO_VALID)
1419

1520
# We want 4 processes to test the vtkAggregateDataSetFilter
1621
# properly.

‎Filters/ParallelGeometry/Testing/Cxx/TestPUniformGridGhostDataGenerator.cxx ‎Filters/ParallelDIY2/Testing/Cxx/TestPUniformGridGhostDataGenerator.cxx

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*=========================================================================
22
33
Program: Visualization Toolkit
4-
Module: TestPUniformGridGhostDataGenerator.cxx
4+
Module: TestGhostCellsGenerator.cxx
55
66
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
77
All rights reserved.
@@ -12,7 +12,7 @@
1212
PURPOSE. See the above copyright notice for more information.
1313
1414
=========================================================================*/
15-
// .NAME TestPUniformGridGhostDataGenerator.cxx -- Tests ghost data generation
15+
// .NAME TestGhostCellsGenerator.cxx -- Tests ghost data generation
1616
//
1717
// .SECTION Description
1818
// Parallel test that exercises the parallel uniform grid ghost data generator
@@ -27,12 +27,12 @@
2727
#include "vtkCell.h"
2828
#include "vtkCellData.h"
2929
#include "vtkDoubleArray.h"
30+
#include "vtkGhostCellsGenerator.h"
3031
#include "vtkInformation.h"
3132
#include "vtkMPIController.h"
3233
#include "vtkMathUtilities.h"
3334
#include "vtkMultiBlockDataSet.h"
3435
#include "vtkMultiProcessController.h"
35-
#include "vtkPUniformGridGhostDataGenerator.h"
3636
#include "vtkPointData.h"
3737
#include "vtkStreamingDemandDrivenPipeline.h"
3838
#include "vtkUniformGrid.h"
@@ -410,15 +410,15 @@ int Test2D(const bool hasNodeData, const bool hasCellData, const int factor, con
410410
}
411411
WriteDistributedDataSet("P2DInitial", mbds);
412412

413-
vtkPUniformGridGhostDataGenerator* ghostGenerator = vtkPUniformGridGhostDataGenerator::New();
413+
vtkGhostCellsGenerator* ghostGenerator = vtkGhostCellsGenerator::New();
414414

415415
ghostGenerator->SetInputData(mbds);
416416
ghostGenerator->SetNumberOfGhostLayers(NG);
417417
ghostGenerator->SetController(Controller);
418-
ghostGenerator->Initialize();
419418
ghostGenerator->Update();
420419

421-
vtkMultiBlockDataSet* ghostedDataSet = ghostGenerator->GetOutput();
420+
vtkMultiBlockDataSet* ghostedDataSet =
421+
vtkMultiBlockDataSet::SafeDownCast(ghostGenerator->GetOutputDataObject(0));
422422
WriteDistributedDataSet("GHOSTED2D", ghostedDataSet);
423423

424424
rc = CheckFields(ghostedDataSet, hasNodeData, hasCellData);
@@ -475,15 +475,16 @@ int Test3D(const bool hasNodeData, const bool hasCellData, const int factor, con
475475
}
476476
WriteDistributedDataSet("P3DInitial", mbds);
477477

478-
vtkPUniformGridGhostDataGenerator* ghostGenerator = vtkPUniformGridGhostDataGenerator::New();
478+
vtkGhostCellsGenerator* ghostGenerator = vtkGhostCellsGenerator::New();
479479

480480
ghostGenerator->SetInputData(mbds);
481481
ghostGenerator->SetNumberOfGhostLayers(NG);
482482
ghostGenerator->SetController(Controller);
483483
ghostGenerator->Initialize();
484484
ghostGenerator->Update();
485485

486-
vtkMultiBlockDataSet* ghostedDataSet = ghostGenerator->GetOutput();
486+
vtkMultiBlockDataSet* ghostedDataSet =
487+
vtkMultiBlockDataSet::SafeDownCast(ghostGenerator->GetOutputDataObject(0));
487488
WriteDistributedDataSet("GHOSTED3D", ghostedDataSet);
488489

489490
rc = CheckFields(ghostedDataSet, hasNodeData, hasCellData);

‎Filters/ParallelDIY2/vtk.module

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ TEST_DEPENDS
3030
VTK::ParallelCore
3131
VTK::IOExodus
3232
VTK::IOIoss
33+
VTK::IOParallelXML
3334
VTK::RenderingOpenGL2
3435
VTK::RenderingParallel
3536
VTK::TestingCore

‎Filters/ParallelGeometry/Testing/Cxx/CMakeLists.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
set(vtkFiltersParallelGeometryCxxTests-MPI_NUMPROCS 4)
22
set(Tests_SRCS
3-
TestPStructuredGridConnectivity.cxx
4-
TestPStructuredGridGhostDataGenerator.cxx
5-
TestPUnstructuredGridGhostCellsGenerator.cxx
6-
TestPUniformGridGhostDataGenerator.cxx)
3+
TestPStructuredGridConnectivity.cxx)
74

85
vtk_add_test_mpi(vtkFiltersParallelGeometryCxxTests-MPI tests ${Tests_SRCS})
96

‎Filters/ParallelGeometry/vtk.module

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ PRIVATE_DEPENDS
2626
TEST_DEPENDS
2727
VTK::CommonDataModel
2828
VTK::FiltersGeneral
29-
VTK::FiltersParallelDIY2
3029
VTK::FiltersParallelMPI
3130
VTK::IOParallel
3231
VTK::IOParallelXML

0 commit comments

Comments
 (0)
Please sign in to comment.