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

Method GetGrid

IO/Parallel/vtkPChacoReader.cxx:410–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408 return retVal;
409}
410vtkUnstructuredGrid* vtkPChacoReader::GetGrid(vtkMultiProcessController* contr, int from)
411{
412 vtkUnstructuredGrid* grid = nullptr;
413
414 vtkIdType bufsize = 0;
415 int ack = 1;
416
417 contr->Receive(&bufsize, 1, from, 0x11);
418
419 if (bufsize == 0)
420 {
421 // Node zero is reporting an error
422 return nullptr;
423 }
424
425 char* buf = new char[bufsize];
426
427 if (buf)
428 {
429 contr->Send(&ack, 1, from, 0x12);
430 contr->Receive(buf, bufsize, from, 0x13);
431 grid = this->UnMarshallDataSet(buf, bufsize);
432 delete[] buf;
433 }
434 else
435 {
436 ack = 0;
437 contr->Send(&ack, 1, 0, 0x12);
438 }
439 return grid;
440}
441
442vtkUnstructuredGrid* vtkPChacoReader::SubGrid(vtkUnstructuredGrid* ug, vtkIdType from, vtkIdType to)
443{

Callers 1

DivideCellsMethod · 0.95

Calls 3

UnMarshallDataSetMethod · 0.95
ReceiveMethod · 0.45
SendMethod · 0.45

Tested by

no test coverage detected