diff --git a/include/lsWriteVisualizationMesh.hpp b/include/lsWriteVisualizationMesh.hpp index 95828f0e..0378300a 100644 --- a/include/lsWriteVisualizationMesh.hpp +++ b/include/lsWriteVisualizationMesh.hpp @@ -603,7 +603,7 @@ template class lsWriteVisualizationMesh { materialMeshes[materialMeshes.size() - 1 - i]->GetNumberOfCells(); ++j) { materialNumberArray->InsertNextValue( - materialIds[materialMeshes.size() - 1 - i]); + materialIds[i]); } materialMeshes[materialMeshes.size() - 1 - i]->GetCellData()->SetScalars( materialNumberArray);