Salome HOME
Fix: getCellsContainingPoints() in case of polyhedron with a face containing colinear...
[tools/medcoupling.git] / src / MEDCoupling_Swig / geom2medcoupling.py
index c9259627799a27e8dbf619d7a8e3efc245a5a927..3f1c42d27ff0cb232745f703fc46f12f98a364d7 100644 (file)
@@ -1,6 +1,6 @@
 #! /usr/bin/env python3
 #  -*- coding: utf-8 -*-
-# Copyright (C) 2021  CEA/DEN, EDF R&D
+# Copyright (C) 2021-2024  CEA, EDF
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -79,7 +79,7 @@ def compute_interpolation_P0P0_matrix_with_geom(srcMesh,trgMesh):
 
     :return: a matrix with the same format than mc.MEDCouplingRemapper.getCrudeMatrix (use mc.MEDCouplingRemapper.ToCSRMatrix to convert it into scipy sparse format)
     """
-    mat_geom = trgMesh.getNumberOfCells()*[{}]
+    mat_geom = [ {} for i in range(trgMesh.getNumberOfCells()) ]
     for j in range(trgMesh.getNumberOfCells()):
         for i in range(srcMesh.getNumberOfCells()):
             mc_src_mesh = srcMesh[i]