* Use it with care !
* @param 'newNodeNumbers' in old2New convention
*/
-void MEDCouplingUMesh::renumberNodesInConn(const int *newNodeNumbers)
+void MEDCouplingUMesh::renumberNodesInConn(const int *newNodeNumbersO2N)
{
int *conn=getNodalConnectivity()->getPointer();
const int *connIndex=getNodalConnectivityIndex()->getConstPointer();
int& node=conn[iconn];
if(node>=0)//avoid polyhedron separator
{
- node=newNodeNumbers[node];
+ node=newNodeNumbersO2N[node];
}
}
_nodal_connec->declareAsNew();
MEDCOUPLING_EXPORT DataArrayInt *findCellsIdsOnBoundary() const throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT void renumberNodes(const int *newNodeNumbers, int newNbOfNodes);
MEDCOUPLING_EXPORT void renumberNodes2(const int *newNodeNumbers, int newNbOfNodes);
+ MEDCOUPLING_EXPORT void renumberNodesInConn(const int *newNodeNumbersO2N);
MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT void getCellsInBoundingBox(const double *bbox, double eps, std::vector<int>& elems) const;
MEDCOUPLING_EXPORT void getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps, std::vector<int>& elems);
DataArrayInt *simplexizePol0() throw(INTERP_KERNEL::Exception);
DataArrayInt *simplexizePol1() throw(INTERP_KERNEL::Exception);
void subDivide2DMesh(const int *nodeSubdived, const int *nodeIndxSubdived, const int *desc, const int *descIndex) throw(INTERP_KERNEL::Exception);
- void renumberNodesInConn(const int *newNodeNumbers);
void fillCellIdsToKeepFromNodeIds(const int *begin, const int *end, bool fullyIn, std::vector<int>& cellIdsKept) const;
void split3DCurveWithPlane(const double *origin, const double *vec, double eps, std::vector<int>& cut3DCurve) throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *buildExtrudedMeshFromThisLowLev(int nbOfNodesOf1Lev, bool isQuad) const;
void renumberNodes(PyObject *li, int newNbOfNodes) throw(INTERP_KERNEL::Exception)
{
void *da=0;
- int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 );
+ int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 );
if (!SWIG_IsOK(res1))
{
int size;
void renumberNodes2(PyObject *li, int newNbOfNodes) throw(INTERP_KERNEL::Exception)
{
void *da=0;
- int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 );
+ int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 );
if (!SWIG_IsOK(res1))
{
int size;
return ret;
}
+ void renumberNodesInConn(PyObject *li) throw(INTERP_KERNEL::Exception)
+ {
+ void *da=0;
+ int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 );
+ if (!SWIG_IsOK(res1))
+ {
+ int size;
+ INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
+ self->renumberNodesInConn(tmp);
+ }
+ else
+ {
+ DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+ if(!da2)
+ throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+ da2->checkAllocated();
+ self->renumberNodesInConn(da2->getConstPointer());
+ }
+ }
+
PyObject *getLevArrPerCellTypes(PyObject *li) const throw(INTERP_KERNEL::Exception)
{
int sz;