------------------------------------------------------------------------------
| 603 | |
| 604 | //------------------------------------------------------------------------------ |
| 605 | void vtkIntegrateAttributes::ReceivePiece(vtkUnstructuredGrid* mergeTo, int fromId, |
| 606 | double& totalSum, double totalSumCenter[3], int& integrationDimension) |
| 607 | { |
| 608 | assert(this->Controller); |
| 609 | double msg[5]; |
| 610 | this->Controller->Receive(msg, 5, fromId, vtkIntegrateAttributes::IntegrateAttrInfo); |
| 611 | vtkNew<vtkUnstructuredGrid> tmp; |
| 612 | this->Controller->Receive(tmp, fromId, vtkIntegrateAttributes::IntegrateAttrData); |
| 613 | if (vtkIntegrateAttributes::CompareIntegrationDimension( |
| 614 | mergeTo, (int)(msg[0]), totalSum, totalSumCenter, integrationDimension)) |
| 615 | { |
| 616 | totalSum += msg[1]; |
| 617 | totalSumCenter[0] += msg[2]; |
| 618 | totalSumCenter[1] += msg[3]; |
| 619 | totalSumCenter[2] += msg[4]; |
| 620 | vtkIntegrateAttributes::IntegrateSatelliteData(tmp->GetPointData(), mergeTo->GetPointData()); |
| 621 | vtkIntegrateAttributes::IntegrateSatelliteData(tmp->GetCellData(), mergeTo->GetCellData()); |
| 622 | } |
| 623 | } |
| 624 | |
| 625 | //------------------------------------------------------------------------------ |
| 626 | void vtkIntegrateAttributes::AllocateAttributes( |
no test coverage detected