ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkReductionFilter Class Reference

A generic filter that can reduce any type of dataset using any reduction algorithm. More...

#include <vtkReductionFilter.h>

Inherits vtkDataObjectAlgorithm.

Public Types

enum  Tags { TRANSMIT_DATA_OBJECT = 23484 }
 
typedef vtkDataObjectAlgorithm Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void SetController (vtkMultiProcessController *)
 Get/Set the MPI controller used for gathering. More...
 
void SetPreGatherHelper (vtkAlgorithm *)
 Get/Set the pre-reduction helper. More...
 
void SetPreGatherHelperName (const char *)
 Get/Set the pre-reduction helper. More...
 
virtual vtkAlgorithm * GetPreGatherHelper ()
 Get/Set the pre-reduction helper. More...
 
void SetPostGatherHelper (vtkAlgorithm *)
 Get/Set the reduction helper. More...
 
void SetPostGatherHelperName (const char *)
 Get/Set the reduction helper. More...
 
virtual vtkAlgorithm * GetPostGatherHelper ()
 Get/Set the reduction helper. More...
 
virtual void SetPassThrough (int)
 Get/Set the PassThrough flag which (when set to a nonnegative number N) tells the filter to produce results that come from node N only. More...
 
virtual int GetPassThrough ()
 Get/Set the PassThrough flag which (when set to a nonnegative number N) tells the filter to produce results that come from node N only. More...
 
virtual void SetGenerateProcessIds (int)
 When set, a new array vtkOriginalProcessIds will be added to the output of the the pre-gather helper (or input, if no pre-gather helper is set). More...
 
virtual int GetGenerateProcessIds ()
 When set, a new array vtkOriginalProcessIds will be added to the output of the the pre-gather helper (or input, if no pre-gather helper is set). More...
 

Static Public Member Functions

static vtkReductionFilterNew ()
 
static int IsTypeOf (const char *type)
 
static vtkReductionFilterSafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkReductionFilter ()
 
 ~vtkReductionFilter ()
 
virtual int FillInputPortInformation (int port, vtkInformation *info)
 
virtual int RequestDataObject (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
 
virtual int RequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
 
void Reduce (vtkDataObject *input, vtkDataObject *output)
 
vtkDataObject * PreProcess (vtkDataObject *input)
 
void PostProcess (vtkDataObject *output, vtkSmartPointer< vtkDataObject > inputs[], unsigned int num_inputs)
 
int GatherSelection (vtkSelection *sendData, std::vector< vtkSmartPointer< vtkDataObject > > &receiveData, int destProcessId)
 Gather for vtkSelection sendData is a vtkSelection while receiveData is a vector of NumberOfProcesses vtkSelections. More...
 

Protected Attributes

vtkAlgorithm * PreGatherHelper
 
vtkAlgorithm * PostGatherHelper
 
vtkMultiProcessController * Controller
 
int PassThrough
 
int GenerateProcessIds
 

Detailed Description

A generic filter that can reduce any type of dataset using any reduction algorithm.

A generic filter that can reduce any type of dataset using any reduction algorithm. Actual reduction is performed by running the PreGatherHelper and PostGatherHelper algorithms. The PreGatherHelper runs on each node in parallel. Next the intermediate results are gathered to the root node. Then the root node then runs the PostGatherHelper algorithm to produce a single result. The PostGatherHelper must be an algorithm that takes multiple input connections and produces a single reduced output.

In addition to doing reduction the PassThrough variable lets you choose to pass through the results of any one node instead of aggregating all of them together.

Definition at line 43 of file vtkReductionFilter.h.

Member Typedef Documentation

◆ Superclass

typedef vtkDataObjectAlgorithm vtkReductionFilter::Superclass

Definition at line 47 of file vtkReductionFilter.h.

Member Enumeration Documentation

◆ Tags

Enumerator
TRANSMIT_DATA_OBJECT 

Definition at line 99 of file vtkReductionFilter.h.

Constructor & Destructor Documentation

◆ vtkReductionFilter()

vtkReductionFilter::vtkReductionFilter ( )
protected

◆ ~vtkReductionFilter()

vtkReductionFilter::~vtkReductionFilter ( )
protected

Member Function Documentation

◆ New()

static vtkReductionFilter* vtkReductionFilter::New ( )
static

◆ GetClassName()

virtual const char* vtkReductionFilter::GetClassName ( )
virtual

◆ IsTypeOf()

static int vtkReductionFilter::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkReductionFilter::IsA ( const char *  type)
virtual

◆ SafeDownCast()

static vtkReductionFilter* vtkReductionFilter::SafeDownCast ( vtkObject *  o)
static

◆ PrintSelf()

void vtkReductionFilter::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

◆ SetPreGatherHelper()

void vtkReductionFilter::SetPreGatherHelper ( vtkAlgorithm *  )

Get/Set the pre-reduction helper.

Pre-Reduction helper is an algorithm that runs on each node's data before it is sent to the root.

◆ SetPreGatherHelperName()

void vtkReductionFilter::SetPreGatherHelperName ( const char *  )

Get/Set the pre-reduction helper.

Pre-Reduction helper is an algorithm that runs on each node's data before it is sent to the root.

◆ GetPreGatherHelper()

virtual vtkAlgorithm* vtkReductionFilter::GetPreGatherHelper ( )
virtual

Get/Set the pre-reduction helper.

Pre-Reduction helper is an algorithm that runs on each node's data before it is sent to the root.

◆ SetPostGatherHelper()

void vtkReductionFilter::SetPostGatherHelper ( vtkAlgorithm *  )

Get/Set the reduction helper.

Reduction helper is an algorithm with multiple input connections, that produces a single output as the reduced output. This is run on the root node to produce a result from the gathered results of each node.

◆ SetPostGatherHelperName()

void vtkReductionFilter::SetPostGatherHelperName ( const char *  )

Get/Set the reduction helper.

Reduction helper is an algorithm with multiple input connections, that produces a single output as the reduced output. This is run on the root node to produce a result from the gathered results of each node.

◆ GetPostGatherHelper()

virtual vtkAlgorithm* vtkReductionFilter::GetPostGatherHelper ( )
virtual

Get/Set the reduction helper.

Reduction helper is an algorithm with multiple input connections, that produces a single output as the reduced output. This is run on the root node to produce a result from the gathered results of each node.

◆ SetController()

void vtkReductionFilter::SetController ( vtkMultiProcessController *  )

Get/Set the MPI controller used for gathering.

◆ SetPassThrough()

virtual void vtkReductionFilter::SetPassThrough ( int  )
virtual

Get/Set the PassThrough flag which (when set to a nonnegative number N) tells the filter to produce results that come from node N only.

The data from that node still runs through the PreReduction and PostGatherHelper algorithms.

◆ GetPassThrough()

virtual int vtkReductionFilter::GetPassThrough ( )
virtual

Get/Set the PassThrough flag which (when set to a nonnegative number N) tells the filter to produce results that come from node N only.

The data from that node still runs through the PreReduction and PostGatherHelper algorithms.

◆ SetGenerateProcessIds()

virtual void vtkReductionFilter::SetGenerateProcessIds ( int  )
virtual

When set, a new array vtkOriginalProcessIds will be added to the output of the the pre-gather helper (or input, if no pre-gather helper is set).

The values in the array indicate the process id. Note that the array is added only if the number of processes is > 1.

◆ GetGenerateProcessIds()

virtual int vtkReductionFilter::GetGenerateProcessIds ( )
virtual

When set, a new array vtkOriginalProcessIds will be added to the output of the the pre-gather helper (or input, if no pre-gather helper is set).

The values in the array indicate the process id. Note that the array is added only if the number of processes is > 1.

◆ FillInputPortInformation()

virtual int vtkReductionFilter::FillInputPortInformation ( int  port,
vtkInformation *  info 
)
protectedvirtual

◆ RequestDataObject()

virtual int vtkReductionFilter::RequestDataObject ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
protectedvirtual

◆ RequestData()

virtual int vtkReductionFilter::RequestData ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
protectedvirtual

◆ Reduce()

void vtkReductionFilter::Reduce ( vtkDataObject *  input,
vtkDataObject *  output 
)
protected

◆ PreProcess()

vtkDataObject* vtkReductionFilter::PreProcess ( vtkDataObject *  input)
protected

◆ PostProcess()

void vtkReductionFilter::PostProcess ( vtkDataObject *  output,
vtkSmartPointer< vtkDataObject >  inputs[],
unsigned int  num_inputs 
)
protected

◆ GatherSelection()

int vtkReductionFilter::GatherSelection ( vtkSelection *  sendData,
std::vector< vtkSmartPointer< vtkDataObject > > &  receiveData,
int  destProcessId 
)
protected

Gather for vtkSelection sendData is a vtkSelection while receiveData is a vector of NumberOfProcesses vtkSelections.

Selections are gathered on destProcessId

Member Data Documentation

◆ PreGatherHelper

vtkAlgorithm* vtkReductionFilter::PreGatherHelper
protected

Definition at line 130 of file vtkReductionFilter.h.

◆ PostGatherHelper

vtkAlgorithm* vtkReductionFilter::PostGatherHelper
protected

Definition at line 131 of file vtkReductionFilter.h.

◆ Controller

vtkMultiProcessController* vtkReductionFilter::Controller
protected

Definition at line 132 of file vtkReductionFilter.h.

◆ PassThrough

int vtkReductionFilter::PassThrough
protected

Definition at line 133 of file vtkReductionFilter.h.

◆ GenerateProcessIds

int vtkReductionFilter::GenerateProcessIds
protected

Definition at line 134 of file vtkReductionFilter.h.


The documentation for this class was generated from the following file: