Salome HOME
projects
/
tools
/
medcoupling.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Deal with pipes
[tools/medcoupling.git]
/
src
/
RENUMBER
/
RENUMBER_METISRenumbering.cxx
diff --git
a/src/RENUMBER/RENUMBER_METISRenumbering.cxx
b/src/RENUMBER/RENUMBER_METISRenumbering.cxx
index ca07cf8dc6043fb2354e85209b10db458fbf6cc8..b89d793e53ffa61f68b41239a5f2dc0a87abfc95 100644
(file)
--- a/
src/RENUMBER/RENUMBER_METISRenumbering.cxx
+++ b/
src/RENUMBER/RENUMBER_METISRenumbering.cxx
@@
-1,9
+1,9
@@
-// Copyright (C) 2007-201
3
CEA/DEN, EDF R&D
+// Copyright (C) 2007-201
6
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
//
// 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
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-28,13
+28,18
@@
extern "C"
#include "metis.h"
}
#include "metis.h"
}
+#include "MEDCouplingMemArray.hxx"
+#include "MCAuto.hxx"
+
#include "RENUMBER_METISRenumbering.hxx"
#include "RENUMBER_METISRenumbering.hxx"
-void METISRenumbering::renumber(const int
* graph,const int* index_graph,int nb_cell,std::vector<int>& iperm,std::vector<int>&
perm)
+void METISRenumbering::renumber(const int
*graph, const int *index_graph, int nbCell, MEDCoupling::DataArrayInt *&iperm, MEDCoupling::DataArrayInt *&
perm)
{
{
- iperm.resize(nb_cell,0);
- perm.resize(nb_cell,0);
+ MEDCoupling::MCAuto<MEDCoupling::DataArrayInt> out0(MEDCoupling::DataArrayInt::New()),out1(MEDCoupling::DataArrayInt::New());
+ out0->alloc(nbCell,1); out1->alloc(nbCell,1);
+ out0->fillWithZero(); out1->fillWithZero();
int num_flag=1;
int options=0;
int num_flag=1;
int options=0;
- METIS_NodeND(&nb_cell,(int*)index_graph,(int*)graph,&num_flag,&options,&iperm[0],&perm[0]);
+ METIS_NodeND(&nbCell,(int*)index_graph,(int*)graph,&num_flag,&options,out0->getPointer(),out1->getPointer());
+ iperm=out0.retn(); perm=out1.retn();
}
}