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

Method updateVariableStatus

IO/Parallel/vtkNek5000Reader.cxx:388–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386//----------------------------------------------------------------------------
387
388void vtkNek5000Reader::updateVariableStatus()
389{
390#ifndef NDEBUG
391 int my_rank;
392 vtkMultiProcessController* ctrl = vtkMultiProcessController::GetGlobalController();
393 if (ctrl != nullptr)
394 {
395 my_rank = ctrl->GetLocalProcessId();
396 }
397 else
398 {
399 my_rank = 0;
400 }
401#endif
402 // vtkDebugMacro(<<"vtkNek5000Reader::updateVariableStatus: Rank: "<<my_rank<< " ENTER ");
403 this->num_used_vectors = 0;
404 this->num_used_scalars = 0;
405
406 // if a variable is used, set it to true
407 for (auto i = 0; i < this->num_vars; i++)
408 {
409 if (this->GetPointArrayStatus(i))
410 {
411 // increment the number of vectors or scalars used, accordingly
412 if (this->var_length[i] > 1)
413 {
414 this->num_used_vectors++;
415 }
416 else
417 {
418 this->num_used_scalars++;
419 }
420 }
421 }
422
423 vtkDebugMacro(<< "vtkNek5000Reader::updateVariableStatus: Rank: " << my_rank
424 << ": this->num_used_scalars= " << this->num_used_scalars
425 << " : this->num_used_vectors= " << this->num_used_vectors);
426}
427
428//----------------------------------------------------------------------------
429size_t vtkNek5000Reader::GetVariableNamesFromData(char* varTags)

Callers 1

RequestDataMethod · 0.95

Calls 2

GetPointArrayStatusMethod · 0.95
GetLocalProcessIdMethod · 0.45

Tested by

no test coverage detected