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

Function ArrayErrorHandler

Testing/Core/vtkTestUtilities.cxx:620–645  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

618
619//----------------------------------------------------------------------------
620bool ArrayErrorHandler(vtkAbstractArray* array1, vtkAbstractArray* array2)
621{
622 if (!array1 || !array2)
623 {
624 vtkLog(ERROR, "Unexpected nullptr array pointer.");
625 return false;
626 }
627
628 if (array1->GetNumberOfComponents() != array2->GetNumberOfComponents())
629 {
630 vtkLog(ERROR,
631 "Arrays \"" << GetArrayName(array1) << "\" do not have the same number of components:"
632 << array1->GetNumberOfComponents() << " != " << array2->GetNumberOfComponents());
633 return false;
634 }
635
636 if (array1->GetNumberOfTuples() != array2->GetNumberOfTuples())
637 {
638 vtkLog(ERROR,
639 "Arrays \"" << GetArrayName(array1) << "\" do not have the same number of tuples:"
640 << array1->GetNumberOfTuples() << " != " << array2->GetNumberOfTuples());
641 return false;
642 }
643
644 return true;
645}
646
647//----------------------------------------------------------------------------
648bool ArrayErrorHandler(vtkAbstractArray* array1, vtkAbstractArray* array2, vtkIdType n)

Callers 2

PointMatchingWorkerMethod · 0.85
TestFieldDataFunction · 0.85

Calls 3

GetArrayNameFunction · 0.70
GetNumberOfComponentsMethod · 0.45
GetNumberOfTuplesMethod · 0.45

Tested by

no test coverage detected