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

Method RequestData

IO/AMR/vtkAMRBaseParticlesReader.cxx:210–248  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

208
209//------------------------------------------------------------------------------
210int vtkAMRBaseParticlesReader::RequestData(vtkInformation* vtkNotUsed(request),
211 vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* outputVector)
212{
213 // STEP 0: Get the output object
214 vtkInformation* outInf = outputVector->GetInformationObject(0);
215 vtkMultiBlockDataSet* mbds =
216 vtkMultiBlockDataSet::SafeDownCast(outInf->Get(vtkDataObject::DATA_OBJECT()));
217 assert("pre: output multi-block dataset object is nullptr" && (mbds != nullptr));
218
219 // STEP 1: Read Meta-Data
220 this->ReadMetaData();
221
222 // STEP 2: Read blocks
223 mbds->SetNumberOfBlocks(this->NumberOfBlocks);
224 unsigned int blkidx = 0;
225 for (; blkidx < static_cast<unsigned int>(this->NumberOfBlocks); ++blkidx)
226 {
227 if (this->IsBlockMine(blkidx))
228 {
229 vtkPolyData* particles = this->ReadParticles(blkidx);
230 assert("particles dataset should not be nullptr!" && (particles != nullptr));
231
232 mbds->SetBlock(blkidx, particles);
233 particles->Delete();
234 }
235 else
236 {
237 mbds->SetBlock(blkidx, nullptr);
238 }
239 } // END for all blocks
240
241 // STEP 3: Synchronize
242 if (this->IsParallel())
243 {
244 this->Controller->Barrier();
245 }
246
247 return 1;
248}
249VTK_ABI_NAMESPACE_END

Callers

nothing calls this directly

Calls 11

IsBlockMineMethod · 0.95
IsParallelMethod · 0.95
GetInformationObjectMethod · 0.80
SetNumberOfBlocksMethod · 0.80
SetBlockMethod · 0.80
DeleteMethod · 0.65
assertFunction · 0.50
GetMethod · 0.45
ReadMetaDataMethod · 0.45
ReadParticlesMethod · 0.45
BarrierMethod · 0.45

Tested by

no test coverage detected