MCPcopy Create free account
hub / github.com/Kitware/VTK / SendGrid

Method SendGrid

IO/Parallel/vtkPChacoReader.cxx:377–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375 return retVal;
376}
377int vtkPChacoReader::SendGrid(vtkMultiProcessController* contr, int to, vtkUnstructuredGrid* grid)
378{
379 int retVal = 1;
380
381 vtkIdType bufsize = 0;
382 int ack = 0;
383
384 if (!grid)
385 {
386 // sending notice of a failure
387
388 contr->Send(&bufsize, 1, to, 0x11);
389 return retVal;
390 }
391
392 char* buf = this->MarshallDataSet(grid, bufsize);
393
394 contr->Send(&bufsize, 1, to, 0x11);
395
396 contr->Receive(&ack, 1, to, 0x12);
397
398 if (!ack)
399 {
400 retVal = 0;
401 }
402 else
403 {
404 contr->Send(buf, bufsize, to, 0x13);
405 }
406
407 delete[] buf;
408 return retVal;
409}
410vtkUnstructuredGrid* vtkPChacoReader::GetGrid(vtkMultiProcessController* contr, int from)
411{
412 vtkUnstructuredGrid* grid = nullptr;

Callers 1

DivideCellsMethod · 0.95

Calls 3

MarshallDataSetMethod · 0.95
SendMethod · 0.45
ReceiveMethod · 0.45

Tested by

no test coverage detected