18 #ifndef vtkMaterialInterfacePieceTransactionMatrix_h 19 #define vtkMaterialInterfacePieceTransactionMatrix_h 46 void Initialize(
int nFragments,
int nProcs);
57 vtkIdType GetNumberOfTransactions(
int procId);
62 std::vector<vtkMaterialInterfacePieceTransaction>& GetTransactions(
int fragmentId,
int procId);
83 return this->FlatMatrixSize +
99 vtkIdType PackPartial(
int*& buffer,
int* rows,
int nRows);
105 int UnPack(
int* buffer);
106 int UnPackPartial(
int* buffer);
110 std::vector<vtkMaterialInterfacePieceTransaction>* Matrix;
115 inline std::vector<vtkMaterialInterfacePieceTransaction>&
118 int idx = fragmentId + procId * this->NFragments;
119 return this->Matrix[idx];
124 size_t nTransactions = 0;
127 for (
int fragmentId = 0; fragmentId < this->NFragments; ++fragmentId)
129 nTransactions += this->GetTransactions(fragmentId, procId).size();
132 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.