------------------------------------------------------------------------------
| 487 | |
| 488 | //------------------------------------------------------------------------------ |
| 489 | vtkDoubleArray* vtkCriticalTime::vtkCriticalTimeInternals::GetCriticalTimeArray( |
| 490 | vtkFieldData* fieldData, vtkDataArray* inArray, const std::string& nameSuffix) |
| 491 | { |
| 492 | if (!inArray) |
| 493 | { |
| 494 | return nullptr; |
| 495 | } |
| 496 | |
| 497 | std::string outArrayName = vtkCriticalTimeMangleName(inArray->GetName(), nameSuffix); |
| 498 | vtkDoubleArray* outArray = |
| 499 | vtkDoubleArray::SafeDownCast(fieldData->GetArray(outArrayName.c_str())); |
| 500 | if (!outArray) |
| 501 | { |
| 502 | return nullptr; |
| 503 | } |
| 504 | |
| 505 | if (inArray->GetNumberOfTuples() != outArray->GetNumberOfTuples()) |
| 506 | { |
| 507 | if (!this->GeneratedChangingTopologyWarning) |
| 508 | { |
| 509 | std::string fieldType = vtkCellData::SafeDownCast(fieldData) == nullptr ? "points" : "cells"; |
| 510 | vtkWarningWithObjectMacro(this->Self, |
| 511 | "The number of " << fieldType << " has changed between time " |
| 512 | << "steps. No arrays of this type will be output since this " |
| 513 | << "filter can not handle topology that change over time."); |
| 514 | this->GeneratedChangingTopologyWarning = true; |
| 515 | } |
| 516 | fieldData->RemoveArray(outArray->GetName()); |
| 517 | return nullptr; |
| 518 | } |
| 519 | |
| 520 | return outArray; |
| 521 | } |
| 522 | |
| 523 | //------------------------------------------------------------------------------ |
| 524 | vtkCriticalTime::vtkCriticalTime() |
no test coverage detected