VTK
|
Distribute data among processors. More...
#include <vtkDistributedDataFilter.h>
Inherits vtkDataObjectAlgorithm.
Public Types | |
enum | BoundaryModes { ASSIGN_TO_ONE_REGION =0, ASSIGN_TO_ALL_INTERSECTING_REGIONS =1, SPLIT_BOUNDARY_CELLS =2 } |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkDistributedDataFilter * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
vtkPKdTree * | GetKdtree () |
virtual void | RetainKdtreeOn () |
virtual void | RetainKdtreeOff () |
virtual int | GetRetainKdtree () |
virtual void | SetRetainKdtree (int) |
virtual void | IncludeAllIntersectingCellsOn () |
virtual void | IncludeAllIntersectingCellsOff () |
virtual int | GetIncludeAllIntersectingCells () |
virtual void | SetIncludeAllIntersectingCells (int) |
virtual void | ClipCellsOn () |
virtual void | ClipCellsOff () |
virtual int | GetClipCells () |
virtual void | SetClipCells (int) |
virtual int | RequestUpdateExtent (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
virtual void | UseMinimalMemoryOn () |
virtual void | UseMinimalMemoryOff () |
virtual int | GetUseMinimalMemory () |
virtual void | SetUseMinimalMemory (int) |
virtual void | TimingOn () |
virtual void | TimingOff () |
virtual void | SetTiming (int) |
virtual int | GetTiming () |
void | SetUserRegionAssignments (const int *map, int numRegions) |
void | SetController (vtkMultiProcessController *c) |
virtual vtkMultiProcessController * | GetController () |
void | SetBoundaryMode (int mode) |
void | SetBoundaryModeToAssignToOneRegion () |
void | SetBoundaryModeToAssignToAllIntersectingRegions () |
void | SetBoundaryModeToSplitBoundaryCells () |
int | GetBoundaryMode () |
vtkBSPCuts * | GetCuts () |
void | SetCuts (vtkBSPCuts *cuts) |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkDistributedDataFilter * | SafeDownCast (vtkObjectBase *o) |
static vtkDistributedDataFilter * | New () |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkDistributedDataFilter () | |
~vtkDistributedDataFilter () | |
void | AssignBoundaryCellsToOneRegionOn () |
void | AssignBoundaryCellsToOneRegionOff () |
void | SetAssignBoundaryCellsToOneRegion (int val) |
void | AssignBoundaryCellsToAllIntersectingRegionsOn () |
void | AssignBoundaryCellsToAllIntersectingRegionsOff () |
void | SetAssignBoundaryCellsToAllIntersectingRegions (int val) |
void | DivideBoundaryCellsOn () |
void | DivideBoundaryCellsOff () |
void | SetDivideBoundaryCells (int val) |
virtual int | RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
void | SingleProcessExecute (vtkDataSet *input, vtkUnstructuredGrid *output) |
virtual int | RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
virtual int | FillInputPortInformation (int port, vtkInformation *info) |
virtual int | RequestDataObject (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
int | RequestDataInternal (vtkDataSet *input, vtkUnstructuredGrid *output) |
Distribute data among processors.
This filter redistributes data among processors in a parallel application into spatially contiguous vtkUnstructuredGrids. The execution model anticipated is that all processes read in part of a large vtkDataSet. Each process sets the input of filter to be that DataSet. When executed, this filter builds in parallel a k-d tree, decomposing the space occupied by the distributed DataSet into spatial regions. It assigns each spatial region to a processor. The data is then redistributed and the output is a single vtkUnstructuredGrid containing the cells in the process' assigned regions.
This filter is sometimes called "D3" for "distributed data decomposition".
Enhancement: You can set the k-d tree decomposition, rather than have D3 compute it. This allows you to divide a dataset using the decomposition computed for another dataset. Obtain a description of the k-d tree cuts this way:
vtkBSPCuts *cuts = D3Object1->GetCuts()
And set it this way:
D3Object2->SetCuts(cuts)
It is desirable to have a field array of global node IDs for two reasons:
If you know the name of a global node ID array in the input dataset, set that name with this method. If you leave it unset, D3 will search the input data set for certain common names of global node ID arrays. If none is found, and ghost cells have been requested, D3 will create a temporary global node ID array before acquiring ghost cells. It is also desirable to have global element IDs. However, if they don't exist D3 can create them relatively quickly. Set the name of the global element ID array if you have it. If it is not set, D3 will search for it using common names. If still not found, D3 will create a temporary array of global element IDs.
Definition at line 108 of file vtkDistributedDataFilter.h.
Enumerator | |
---|---|
ASSIGN_TO_ONE_REGION | |
ASSIGN_TO_ALL_INTERSECTING_REGIONS | |
SPLIT_BOUNDARY_CELLS |
Definition at line 174 of file vtkDistributedDataFilter.h.
|
protected |
|
protected |
|
static |
|
virtual |
|
static |
|
protectedvirtual |
vtkDistributedDataFilter* vtkDistributedDataFilter::NewInstance | ( | ) | const |
void vtkDistributedDataFilter::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
|
static |
void vtkDistributedDataFilter::SetController | ( | vtkMultiProcessController * | c | ) |
Set/Get the communicator object
|
virtual |
Set/Get the communicator object
vtkPKdTree* vtkDistributedDataFilter::GetKdtree | ( | ) |
Get a pointer to the parallel k-d tree object. Required for changing default behavior for region assignment, changing default depth of tree, or other tree building default parameters. See vtkPKdTree and vtkKdTree for more information about these options. NOTE: Changing the tree returned by this method does NOT change the d3 filter. Make sure to call Modified() on the d3 object if you want it to re-execute.
|
virtual |
When this filter executes, it creates a vtkPKdTree (K-d tree) data structure in parallel which divides the total distributed data set into spatial regions. The K-d tree object also creates tables describing which processes have data for which regions. Only then does this filter redistribute the data according to the region assignment scheme. By default, the K-d tree structure and it's associated tables are deleted after the filter executes. If you anticipate changing only the region assignment scheme (input is unchanged) and explicitly re-executing, then RetainKdTreeOn, and the K-d tree structure and tables will be saved. Then, when you re-execute, this filter will skip the k-d tree build phase and go straight to redistributing the data according to region assignment. See vtkPKdTree for more information about region assignment.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Each cell in the data set is associated with one of the spatial regions of the k-d tree decomposition. In particular, the cell belongs to the region that it's centroid lies in. When the new vtkUnstructuredGrid is created, by default it is composed of the cells associated with the region(s) assigned to this process. If you also want it to contain cells that intersect these regions, but have their centroid elsewhere, then set this variable on. By default it is off.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Set this variable if you want the cells of the output vtkUnstructuredGrid to be clipped to the spatial region boundaries. By default this is off.
|
virtual |
|
virtual |
|
virtual |
void vtkDistributedDataFilter::SetBoundaryMode | ( | int | mode | ) |
Handling of ClipCells and IncludeAllIntersectingCells.
|
inline |
Handling of ClipCells and IncludeAllIntersectingCells.
Definition at line 184 of file vtkDistributedDataFilter.h.
|
inline |
Handling of ClipCells and IncludeAllIntersectingCells.
Definition at line 186 of file vtkDistributedDataFilter.h.
|
inline |
Handling of ClipCells and IncludeAllIntersectingCells.
Definition at line 190 of file vtkDistributedDataFilter.h.
int vtkDistributedDataFilter::GetBoundaryMode | ( | ) |
Handling of ClipCells and IncludeAllIntersectingCells.
|
virtual |
Ensure previous filters don't send up ghost cells
|
virtual |
This class does a great deal of all-to-all communication when exchanging portions of data sets and building new sub grids. By default it will do fast communication. It can instead use communication routines that use the least possible amount of memory, but these are slower. Set this option ON to choose these latter routines.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Turn on collection of timing data
|
virtual |
|
virtual |
|
virtual |
|
inline |
You can set the k-d tree decomposition, rather than have D3 compute it. This allows you to divide a dataset using the decomposition computed for another dataset. Obtain a description of the k-d tree cuts this way: vtkBSPCuts *cuts = D3Object1->GetCuts() And set it this way: D3Object2->SetCuts(cuts)
Definition at line 222 of file vtkDistributedDataFilter.h.
void vtkDistributedDataFilter::SetCuts | ( | vtkBSPCuts * | cuts | ) |
You can set the k-d tree decomposition, rather than have D3 compute it. This allows you to divide a dataset using the decomposition computed for another dataset. Obtain a description of the k-d tree cuts this way: vtkBSPCuts *cuts = D3Object1->GetCuts() And set it this way: D3Object2->SetCuts(cuts)
void vtkDistributedDataFilter::SetUserRegionAssignments | ( | const int * | map, |
int | numRegions | ||
) |
vtkBSPCuts doesn't have information about process assignments for the cuts. Typically D3 filter simply reassigns the processes for each cut. However, that may not always work, sometimes the processes have be pre-assigned and we want to preserve that partitioning. In that case, one sets the region assignments explicitly. Look at vtkPKdTree::AssignRegions for details about the arguments. Calling SetUserRegionAssignments(NULL, 0) will revert to default behavior i.e. letting the KdTree come up with the assignments.
|
protected |
Another way to set ClipCells and IncludeAllIntersectingCells. AssignBoundaryCellsToOneRegion turns off both ClipCells and IncludeAllIntersectingCells. Each cell will be included in exactly one process' output unstructured grid.
|
protected |
|
protected |
|
protected |
Another way to set ClipCells and IncludeAllIntersectingCells. AssignBoundaryCellsToAllIntersectingRegions turns off ClipCells turns on IncludeAllIntersectingCells. A cell will be included in the output unstructured grid built for every region that it intersects. If a cell intersects two process' spatial regions, both processes will have that cell in their output grid.
|
protected |
|
protected |
|
protected |
Another way to set ClipCells and IncludeAllIntersectingCells. DivideBoundaryCells turns on both ClipCells and IncludeAllIntersectingCells. A cell that straddles a processor boundary will be split along the boundary, with each process getting the portion of the cell that lies in it's spatial region.
|
protected |
|
protected |
|
protectedvirtual |
Build a vtkUnstructuredGrid for a spatial region from the data distributed across processes. Execute() must be called by all processes, or it will hang.
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Overridden to create the correct type of data output. If input is dataset, output is vtkUnstructuredGrid. If input is composite dataset, output is vtkMultiBlockDataSet.
|
protected |
Implementation for request data.