#include <vtkPartitionedDataSet.h>
#include <vtkSmartPointer.h>
#include <vtkUnstructuredGrid.h>
#include <mpi.h>
Go to the source code of this file.
|
vtkSmartPointer< vtkUnstructuredGrid > | geos::vtk::redistribute (vtkPartitionedDataSet &localParts, MPI_Comm mpiComm) |
| Redistribute a dataset partitioned on each rank according to destination. More...
|
|
std::vector< vtkBoundingBox > | geos::vtk::exchangeBoundingBoxes (vtkDataSet &dataSet, MPI_Comm mpiComm) |
| All-to-all exchange of mesh partition bounding boxes between all ranks. More...
|
|
◆ exchangeBoundingBoxes()
std::vector< vtkBoundingBox > geos::vtk::exchangeBoundingBoxes |
( |
vtkDataSet & |
dataSet, |
|
|
MPI_Comm |
mpiComm |
|
) |
| |
All-to-all exchange of mesh partition bounding boxes between all ranks.
- Parameters
-
dataSet | the local part of the mesh |
mpiComm | the MPI communicator |
- Returns
- a vector of bounding boxes, one per rank in
mpiComm
◆ redistribute()
vtkSmartPointer< vtkUnstructuredGrid > geos::vtk::redistribute |
( |
vtkPartitionedDataSet & |
localParts, |
|
|
MPI_Comm |
mpiComm |
|
) |
| |
Redistribute a dataset partitioned on each rank according to destination.
- Parameters
-
localParts | the partitioned dataset (each part must be a vtkUnstructuredGrid) |
mpiComm | the MPI communicator to distribute over |
- Returns
- the new, redistributed grid
There must be exactly P partitions in localParts
, where P is the size of comm
. Partition with index i represents a piece of mesh that must be shipped off to rank i. Some partitions (usually most of them) can be empty, indicating nothing to send. The return value on each rank is a combination of mesh pieces sent to current rank.