diff --git a/MeshLib/Mesh.h b/MeshLib/Mesh.h index 32282a5e74cc4ec4d041cf1a9c63c37cd38da995..91f246ab6f9d9fa49738a57b9e0d66119da2d548 100644 --- a/MeshLib/Mesh.h +++ b/MeshLib/Mesh.h @@ -268,7 +268,13 @@ PropertyVector<T>* getOrCreateMeshProperty(Mesh& mesh, auto result = mesh.getProperties().template getPropertyVector<T>(property_name); assert(result); - assert(result->size() == numberOfMeshItems() * number_of_components); + if (item_type != MeshItemType::IntegrationPoint) + { + // Test the size if number of mesh items is known, which is not the + // case for the integration point data. + assert(result->size() == + numberOfMeshItems() * number_of_components); + } return result; }