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

Method CheckParticleType

IO/AMR/vtkAMREnzoParticlesReader.cxx:197–211  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

195
196//------------------------------------------------------------------------------
197bool vtkAMREnzoParticlesReader::CheckParticleType(int idx, vtkIntArray* ptypes)
198{
199 assert("pre: particles type array should not be nullptr" && (ptypes != nullptr));
200
201 if (ptypes->GetNumberOfTuples() > 0 &&
202 this->ParticleDataArraySelection->ArrayExists("particle_type"))
203 {
204 int ptype = ptypes->GetValue(idx);
205 return this->ParticleType == 0 || ptype == this->ParticleType;
206 }
207 else
208 {
209 return true;
210 }
211}
212
213//------------------------------------------------------------------------------
214vtkPolyData* vtkAMREnzoParticlesReader::GetParticles(const char* file, int blockIdx)

Callers 1

GetParticlesMethod · 0.95

Calls 4

assertFunction · 0.50
GetNumberOfTuplesMethod · 0.45
ArrayExistsMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected