29 #ifndef vtkMaterialInterfacePieceTransactionMatrix_h 30 #define vtkMaterialInterfacePieceTransactionMatrix_h 57 void Initialize(
int nProcs,
int nFragments);
68 vtkIdType GetNumberOfTransactions(
int procId);
73 std::vector<vtkMaterialInterfacePieceTransaction>& GetTransactions(
int fragmentId,
int procId);
94 return this->FlatMatrixSize +
110 vtkIdType PackPartial(
int*& buffer,
int* rows,
int nRows);
116 int UnPack(
int* buffer);
117 int UnPackPartial(
int* buffer);
121 std::vector<vtkMaterialInterfacePieceTransaction>* Matrix;
126 inline std::vector<vtkMaterialInterfacePieceTransaction>&
129 int idx = fragmentId + procId * this->NFragments;
130 return this->Matrix[idx];
135 size_t nTransactions = 0;
138 for (
int fragmentId = 0; fragmentId < this->NFragments; ++fragmentId)
140 nTransactions += this->GetTransactions(fragmentId, procId).size();
143 return static_cast<vtkIdType>(nTransactions);
Container to hold a sets of transactions (sends/recvs) indexed by fragment and proc, intended to facilitate moving fragment pieces around.
std::vector< vtkMaterialInterfacePieceTransaction > & GetTransactions(int fragmentId, int procId)
Given a proc and a fragment, return a ref to the associated list of transactions. ...
#define VTKPVVTKEXTENSIONSFILTERSMATERIALINTERFACE_EXPORT
vtkIdType GetNumberOfTransactions(int procId)
Get the number of transaction a given process will execute.
vtkIdType Capacity()
Tells how much memory the matrix has allocated.
Helper to the transaction matrix.