VTK  9.1.0
Public Member Functions | List of all members
vtkBlockDistribution Class Reference

A helper class that manages a block distribution of N elements of data. More...

#include <vtkBlockDistribution.h>

Public Member Functions

 vtkBlockDistribution (vtkIdType N, vtkIdType P)
 Create a block distribution with N elements on P processors. More...
 
vtkIdType GetNumElements ()
 Retrieves the number of elements for which this block distribution was built. More...
 
vtkIdType GetNumProcessors ()
 Retrieves the number of processors for which this block distribution was built. More...
 
vtkIdType GetBlockSize (vtkIdType rank)
 Get the block size for the processor with the given rank. More...
 
vtkIdType GetProcessorOfElement (vtkIdType globalIndex)
 Retrieve the process number in [0, GetNumProcessors()) where the element with the given global index will be located. More...
 
vtkIdType GetLocalIndexOfElement (vtkIdType globalIndex)
 Retrieve the local index (offset) on the processor determined by GetProcessorOfElement that refers to the given global index. More...
 
vtkIdType GetFirstGlobalIndexOnProcessor (vtkIdType rank)
 Retrieve the first global index stored on the processor with the given rank. More...
 
vtkIdType GetGlobalIndex (vtkIdType localIndex, vtkIdType rank)
 Retrieve the global index associated with the given local index on the processor with the given rank. More...
 

Detailed Description

A helper class that manages a block distribution of N elements of data.

Definition at line 31 of file vtkBlockDistribution.h.

Constructor & Destructor Documentation

◆ vtkBlockDistribution()

vtkBlockDistribution::vtkBlockDistribution ( vtkIdType  N,
vtkIdType  P 
)
inline

Create a block distribution with N elements on P processors.

Definition at line 88 of file vtkBlockDistribution.h.

Member Function Documentation

◆ GetNumElements()

vtkIdType vtkBlockDistribution::GetNumElements ( )
inline

Retrieves the number of elements for which this block distribution was built.

Definition at line 43 of file vtkBlockDistribution.h.

◆ GetNumProcessors()

vtkIdType vtkBlockDistribution::GetNumProcessors ( )
inline

Retrieves the number of processors for which this block distribution was built.

Definition at line 49 of file vtkBlockDistribution.h.

◆ GetBlockSize()

vtkIdType vtkBlockDistribution::GetBlockSize ( vtkIdType  rank)
inline

Get the block size for the processor with the given rank.

This is the number of elements that the processor will store.

Definition at line 96 of file vtkBlockDistribution.h.

◆ GetProcessorOfElement()

vtkIdType vtkBlockDistribution::GetProcessorOfElement ( vtkIdType  globalIndex)
inline

Retrieve the process number in [0, GetNumProcessors()) where the element with the given global index will be located.

Definition at line 104 of file vtkBlockDistribution.h.

◆ GetLocalIndexOfElement()

vtkIdType vtkBlockDistribution::GetLocalIndexOfElement ( vtkIdType  globalIndex)
inline

Retrieve the local index (offset) on the processor determined by GetProcessorOfElement that refers to the given global index.

Definition at line 122 of file vtkBlockDistribution.h.

◆ GetFirstGlobalIndexOnProcessor()

vtkIdType vtkBlockDistribution::GetFirstGlobalIndexOnProcessor ( vtkIdType  rank)
inline

Retrieve the first global index stored on the processor with the given rank.

Definition at line 130 of file vtkBlockDistribution.h.

◆ GetGlobalIndex()

vtkIdType vtkBlockDistribution::GetGlobalIndex ( vtkIdType  localIndex,
vtkIdType  rank 
)
inline

Retrieve the global index associated with the given local index on the processor with the given rank.

Definition at line 146 of file vtkBlockDistribution.h.


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