Salome HOME
MEDFileCurveLinearMesh -> getSpaceDimension() was missing
[tools/medcoupling.git] / src / MEDPartitioner / MEDPARTITIONER_UserGraph.cxx
index f3ef8bcbc1be13d443807932de25112e37b77609..badb00a96e83629cb08035acea81c88880119707 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,6 +20,8 @@
 #include "MEDPARTITIONER_Graph.hxx"
 #include "MEDPARTITIONER_UserGraph.hxx"
 
+#include "MEDCouplingSkyLineArray.hxx"
+
 #include <iostream>
 #include <vector>
 
@@ -30,19 +32,19 @@ using namespace MEDPARTITIONER;
  *        (domain numbers range from 0 to ndomain-1
  * \param n number of cells in the mesh
  */
-UserGraph::UserGraph(MEDPARTITIONER::SkyLineArray *array, const int *partition, int n):Graph(array,0)
+UserGraph::UserGraph(MEDCoupling::MEDCouplingSkyLineArray *array, const int *partition, mcIdType n):Graph(array,0)
 {
 
-  std::vector<int> index(n+1),value(n);
+  std::vector<mcIdType> index(n+1),value(n);
 
   index[0]=0;
-  for (int i=0; i<n; i++)
+  for (mcIdType i=0; i<n; i++)
     {
       index[i+1]=index[i]+1;
       value[i]=partition[i];
     }
 
-  _partition = new MEDPARTITIONER::SkyLineArray(index,value);
+  _partition = MEDCoupling::MEDCouplingSkyLineArray::New(index,value);
 
 }