diff --git a/Common/DataModel/vtkHigherOrderTetra.cxx b/Common/DataModel/vtkHigherOrderTetra.cxx index 12abcbbf27cc5e8f30943644a83c17cf40317141..6a2d28eee0b3aca3a0fede452fd9f960d55f53a7 100644 --- a/Common/DataModel/vtkHigherOrderTetra.cxx +++ b/Common/DataModel/vtkHigherOrderTetra.cxx @@ -780,6 +780,14 @@ void vtkHigherOrderTetra::SetParametricCoords() double order_d = static_cast<vtkIdType>(this->GetOrder()); this->PointParametricCoordinates->SetNumberOfPoints(nPoints); +#ifdef ENABLE_CACHING + if (static_cast<vtkIdType>(this->BarycentricIndexMap.size()) != + 4 * this->GetPointIds()->GetNumberOfIds()) + { + vtkWarningMacro(<< this->GetClassName() << " has not been initialized"); + return; + } +#endif vtkIdType bindex[4]; for (vtkIdType p = 0; p < nPoints; p++) {