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

Method ReceiveParticles

Filters/ParallelFlowPaths/vtkPLagrangianParticleTracker.cxx:953–985  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

951
952//------------------------------------------------------------------------------
953void vtkPLagrangianParticleTracker::ReceiveParticles(
954 std::queue<vtkLagrangianParticle*>& particleQueue)
955{
956 vtkLagrangianParticle* receivedParticle;
957 int source = -1;
958
959 while (this->StreamManager->ReceiveParticleIfAny(receivedParticle, source))
960 {
961 receivedParticle->SetThreadedData(this->SerialThreadedData);
962
963 // Check for manual shift
964 if (this->ForcePManualShift || receivedParticle->GetPManualShift())
965 {
966 this->IntegrationModel->ParallelManualShift(receivedParticle);
967 receivedParticle->SetPManualShift(false);
968 }
969 // Receive all particles
970 bool valid =
971 this->IntegrationModel->FindInLocators(receivedParticle->GetPosition(), receivedParticle);
972
973 // Inform source rank that it was received
974 this->TransferredParticleIdManager->SendParticleId(receivedParticle->GetId(), valid, source);
975
976 if (valid)
977 {
978 particleQueue.push(receivedParticle);
979 }
980 else
981 {
982 delete receivedParticle;
983 }
984 }
985}
986
987//------------------------------------------------------------------------------
988bool vtkPLagrangianParticleTracker::FinalizeOutputs(

Callers 2

GenerateParticlesMethod · 0.95
GetParticleFeedMethod · 0.95

Calls 8

ReceiveParticleIfAnyMethod · 0.80
GetPManualShiftMethod · 0.80
SetPManualShiftMethod · 0.80
FindInLocatorsMethod · 0.80
SendParticleIdMethod · 0.80
GetPositionMethod · 0.45
GetIdMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected