%newobject ParaMEDMEM::MEDCouplingFieldDouble::buildNewTimeReprFromThis;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::getValueOnMulti;
%newobject ParaMEDMEM::MEDCouplingFieldTemplate::New;
+%newobject ParaMEDMEM::DataArray::deepCpy;
%newobject ParaMEDMEM::DataArray::selectByTupleRanges;
+%newobject ParaMEDMEM::DataArray::selectByTupleId;
+%newobject ParaMEDMEM::DataArray::selectByTupleIdSafe;
+%newobject ParaMEDMEM::DataArray::selectByTupleId2;
+%newobject ParaMEDMEM::DataArray::Aggregate;
%newobject ParaMEDMEM::DataArrayInt::New;
%newobject ParaMEDMEM::DataArrayInt::__iter__;
%newobject ParaMEDMEM::DataArrayInt::convertToDblArr;
-%newobject ParaMEDMEM::DataArrayInt::deepCpy;
%newobject ParaMEDMEM::DataArrayInt::performCpy;
%newobject ParaMEDMEM::DataArrayInt::substr;
%newobject ParaMEDMEM::DataArrayInt::changeNbOfComponents;
%newobject ParaMEDMEM::DataArrayInt::accumulatePerChunck;
-%newobject ParaMEDMEM::DataArrayInt::selectByTupleId;
-%newobject ParaMEDMEM::DataArrayInt::selectByTupleIdSafe;
-%newobject ParaMEDMEM::DataArrayInt::selectByTupleId2;
%newobject ParaMEDMEM::DataArrayInt::checkAndPreparePermutation;
%newobject ParaMEDMEM::DataArrayInt::transformWithIndArrR;
%newobject ParaMEDMEM::DataArrayInt::renumber;
%newobject ParaMEDMEM::DataArrayInt::buildUnique;
%newobject ParaMEDMEM::DataArrayInt::deltaShiftIndex;
%newobject ParaMEDMEM::DataArrayInt::buildExplicitArrByRanges;
+%newobject ParaMEDMEM::DataArrayInt::buildExplicitArrOfSliceOnScaledArr;
%newobject ParaMEDMEM::DataArrayInt::findRangeIdForEachTuple;
%newobject ParaMEDMEM::DataArrayInt::findIdInRangeForEachTuple;
%newobject ParaMEDMEM::DataArrayInt::duplicateEachTupleNTimes;
%newobject ParaMEDMEM::DataArrayInt::buildPermutationArr;
%newobject ParaMEDMEM::DataArrayInt::buildPermArrPerLevel;
%newobject ParaMEDMEM::DataArrayInt::getDifferentValues;
+%newobject ParaMEDMEM::DataArrayInt::FindPermutationFromFirstToSecond;
%newobject ParaMEDMEM::DataArrayInt::__neg__;
%newobject ParaMEDMEM::DataArrayInt::__add__;
%newobject ParaMEDMEM::DataArrayInt::__radd__;
%newobject ParaMEDMEM::DataArrayInt::__pow__;
%newobject ParaMEDMEM::DataArrayInt::__rpow__;
%newobject ParaMEDMEM::DataArrayIntTuple::buildDAInt;
-%newobject ParaMEDMEM::DataArrayChar::deepCpy;
%newobject ParaMEDMEM::DataArrayChar::convertToIntArr;
%newobject ParaMEDMEM::DataArrayChar::renumber;
%newobject ParaMEDMEM::DataArrayChar::renumberR;
%newobject ParaMEDMEM::DataArrayChar::renumberAndReduce;
-%newobject ParaMEDMEM::DataArrayChar::selectByTupleIdSafe;
-%newobject ParaMEDMEM::DataArrayChar::selectByTupleId2;
%newobject ParaMEDMEM::DataArrayChar::changeNbOfComponents;
%newobject ParaMEDMEM::DataArrayChar::getIdsEqual;
%newobject ParaMEDMEM::DataArrayChar::getIdsNotEqual;
%newobject ParaMEDMEM::DataArrayDouble::New;
%newobject ParaMEDMEM::DataArrayDouble::__iter__;
%newobject ParaMEDMEM::DataArrayDouble::convertToIntArr;
-%newobject ParaMEDMEM::DataArrayDouble::deepCpy;
%newobject ParaMEDMEM::DataArrayDouble::performCpy;
%newobject ParaMEDMEM::DataArrayDouble::Aggregate;
%newobject ParaMEDMEM::DataArrayDouble::Meld;
%newobject ParaMEDMEM::DataArrayDouble::changeNbOfComponents;
%newobject ParaMEDMEM::DataArrayDouble::accumulatePerChunck;
%newobject ParaMEDMEM::DataArrayDouble::getIdsInRange;
-%newobject ParaMEDMEM::DataArrayDouble::selectByTupleId;
-%newobject ParaMEDMEM::DataArrayDouble::selectByTupleIdSafe;
-%newobject ParaMEDMEM::DataArrayDouble::selectByTupleId2;
%newobject ParaMEDMEM::DataArrayDouble::negate;
%newobject ParaMEDMEM::DataArrayDouble::applyFunc;
%newobject ParaMEDMEM::DataArrayDouble::applyFunc2;
%newobject ParaMEDMEM::DataArrayDouble::fromSpherToCart;
%newobject ParaMEDMEM::DataArrayDouble::getDifferentValues;
%newobject ParaMEDMEM::DataArrayDouble::findClosestTupleId;
+%newobject ParaMEDMEM::DataArrayDouble::computeNbOfInteractionsWith;
%newobject ParaMEDMEM::DataArrayDouble::duplicateEachTupleNTimes;
%newobject ParaMEDMEM::DataArrayDouble::__neg__;
%newobject ParaMEDMEM::DataArrayDouble::__radd__;
%newobject ParaMEDMEM::MEDCouplingMesh::checkTypeConsistencyAndContig;
%newobject ParaMEDMEM::MEDCouplingMesh::computeNbOfNodesPerCell;
%newobject ParaMEDMEM::MEDCouplingMesh::computeNbOfFacesPerCell;
+%newobject ParaMEDMEM::MEDCouplingMesh::computeEffectiveNbOfNodesPerCell;
%newobject ParaMEDMEM::MEDCouplingMesh::buildPartRange;
%newobject ParaMEDMEM::MEDCouplingMesh::giveCellsWithType;
%newobject ParaMEDMEM::MEDCouplingMesh::getCoordinatesAndOwner;
%newobject ParaMEDMEM::MEDCouplingPointSet::fillCellIdsToKeepFromNodeIds;
%newobject ParaMEDMEM::MEDCouplingPointSet::getCellIdsLyingOnNodes;
%newobject ParaMEDMEM::MEDCouplingPointSet::deepCpyConnectivityOnly;
+%newobject ParaMEDMEM::MEDCouplingPointSet::getBoundingBoxForBBTree;
+%newobject ParaMEDMEM::MEDCouplingPointSet::ComputeNbOfInteractionsWithSrcCells;
%newobject ParaMEDMEM::MEDCouplingPointSet::__getitem__;
%newobject ParaMEDMEM::MEDCouplingUMesh::New;
%newobject ParaMEDMEM::MEDCouplingUMesh::getNodalConnectivity;
%newobject ParaMEDMEM::MEDCoupling1GTUMesh::AggregateOnSameCoordsToUMesh;
%newobject ParaMEDMEM::MEDCoupling1SGTUMesh::New;
%newobject ParaMEDMEM::MEDCoupling1SGTUMesh::buildSetInstanceFromThis;
+%newobject ParaMEDMEM::MEDCoupling1SGTUMesh::computeDualMesh;
%newobject ParaMEDMEM::MEDCoupling1SGTUMesh::Merge1SGTUMeshes;
%newobject ParaMEDMEM::MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords;
%newobject ParaMEDMEM::MEDCoupling1DGTUMesh::New;
%newobject ParaMEDMEM::MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords;
%newobject ParaMEDMEM::MEDCouplingExtrudedMesh::New;
%newobject ParaMEDMEM::MEDCouplingExtrudedMesh::build3DUnstructuredMesh;
+%newobject ParaMEDMEM::MEDCouplingStructuredMesh::buildStructuredSubPart;
+%newobject ParaMEDMEM::MEDCouplingStructuredMesh::build1SGTUnstructured;
+%newobject ParaMEDMEM::MEDCouplingStructuredMesh::BuildExplicitIdsFrom;
+%newobject ParaMEDMEM::MEDCouplingStructuredMesh::Build1GTNodalConnectivity;
%newobject ParaMEDMEM::MEDCouplingCMesh::New;
%newobject ParaMEDMEM::MEDCouplingCMesh::clone;
%newobject ParaMEDMEM::MEDCouplingCMesh::getCoordsAt;
{
public:
void setName(const char *name);
- const char *getName() const;
+ std::string getName() const;
void setDescription(const char *descr);
- const char *getDescription() const;
+ std::string getDescription() const;
void setTime(double val, int iteration, int order);
void setTimeUnit(const char *unit);
const char *getTimeUnit() const;
virtual DataArrayInt *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception);
virtual DataArrayInt *computeNbOfNodesPerCell() const throw(INTERP_KERNEL::Exception);
virtual DataArrayInt *computeNbOfFacesPerCell() const throw(INTERP_KERNEL::Exception);
+ virtual DataArrayInt *computeEffectiveNbOfNodesPerCell() const throw(INTERP_KERNEL::Exception);
virtual MEDCouplingMesh *buildPartRange(int beginCellIds, int endCellIds, int stepCellIds) const throw(INTERP_KERNEL::Exception);
virtual int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception);
virtual INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const throw(INTERP_KERNEL::Exception);
virtual void tryToShareSameCoordsPermute(const MEDCouplingPointSet& other, double epsilon) throw(INTERP_KERNEL::Exception);
static DataArrayDouble *MergeNodesArray(const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2) throw(INTERP_KERNEL::Exception);
static MEDCouplingPointSet *BuildInstanceFromMeshType(MEDCouplingMeshType type) throw(INTERP_KERNEL::Exception);
+ static DataArrayInt *ComputeNbOfInteractionsWithSrcCells(const MEDCouplingPointSet *srcMesh, const MEDCouplingPointSet *trgMesh, double eps) throw(INTERP_KERNEL::Exception);
+ virtual int getNumberOfNodesInCell(int cellId) const throw(INTERP_KERNEL::Exception);
virtual MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const throw(INTERP_KERNEL::Exception);
virtual DataArrayInt *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps) throw(INTERP_KERNEL::Exception);
virtual DataArrayInt *zipCoordsTraducer() throw(INTERP_KERNEL::Exception);
virtual void checkFullyDefined() const throw(INTERP_KERNEL::Exception);
virtual bool isEmptyMesh(const std::vector<int>& tinyInfo) const throw(INTERP_KERNEL::Exception);
virtual MEDCouplingPointSet *deepCpyConnectivityOnly() const throw(INTERP_KERNEL::Exception);
+ virtual DataArrayDouble *getBoundingBoxForBBTree() const throw(INTERP_KERNEL::Exception);
%extend
{
std::string __str__() const throw(INTERP_KERNEL::Exception)
void setConnectivity(DataArrayInt *conn, DataArrayInt *connIndex, bool isComputingTypes=true) throw(INTERP_KERNEL::Exception);
INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const throw(INTERP_KERNEL::Exception);
void setPartOfMySelf2(int start, int end, int step, const MEDCouplingUMesh& otherOnSameCoordsThanThis) throw(INTERP_KERNEL::Exception);
- int getNumberOfNodesInCell(int cellId) const throw(INTERP_KERNEL::Exception);
int getMeshLength() const throw(INTERP_KERNEL::Exception);
void computeTypes() throw(INTERP_KERNEL::Exception);
std::string reprConnectivityOfThis() const throw(INTERP_KERNEL::Exception);
PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
return ret;
}
+
+ PyObject *tetrahedrize(int policy) throw(INTERP_KERNEL::Exception)
+ {
+ int ret2(-1);
+ DataArrayInt *ret1(0);
+ MEDCoupling1SGTUMesh *ret0(self->tetrahedrize(policy,ret1,ret2));
+ PyObject *ret=PyTuple_New(3);
+ PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__MEDCoupling1SGTUMesh, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,2,PyInt_FromLong(ret2));
+ return ret;
+ }
PyObject *checkButterflyCells(double eps=1e-12) throw(INTERP_KERNEL::Exception)
{
INTERP_KERNEL::NormalizedCellType getCellModelEnum() const throw(INTERP_KERNEL::Exception);
int getNodalConnectivityLength() const throw(INTERP_KERNEL::Exception);
virtual void allocateCells(int nbOfCells=0) throw(INTERP_KERNEL::Exception);
+ virtual void checkCoherencyOfConnectivity() const throw(INTERP_KERNEL::Exception);
%extend
{
virtual void insertNextCell(PyObject *li) throw(INTERP_KERNEL::Exception)
int getNumberOfNodesPerCell() const throw(INTERP_KERNEL::Exception);
static MEDCoupling1SGTUMesh *Merge1SGTUMeshes(const MEDCoupling1SGTUMesh *mesh1, const MEDCoupling1SGTUMesh *mesh2) throw(INTERP_KERNEL::Exception);
MEDCoupling1SGTUMesh *buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception);
+ MEDCoupling1GTUMesh *computeDualMesh() const throw(INTERP_KERNEL::Exception);
%extend
{
MEDCoupling1SGTUMesh(const char *name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception)
return MEDCoupling1SGTUMesh::New(name,type);
}
+ MEDCoupling1SGTUMesh(const MEDCouplingUMesh *m) throw(INTERP_KERNEL::Exception)
+ {
+ return MEDCoupling1SGTUMesh::New(m);
+ }
+
std::string __str__() const throw(INTERP_KERNEL::Exception)
{
return self->simpleRepr();
return MEDCoupling1DGTUMesh::New(name,type);
}
+ MEDCoupling1DGTUMesh(const MEDCouplingUMesh *m) throw(INTERP_KERNEL::Exception)
+ {
+ return MEDCoupling1DGTUMesh::New(m);
+ }
+
std::string __str__() const throw(INTERP_KERNEL::Exception)
{
return self->simpleRepr();
public:
int getCellIdFromPos(int i, int j, int k) const throw(INTERP_KERNEL::Exception);
int getNodeIdFromPos(int i, int j, int k) const throw(INTERP_KERNEL::Exception);
+ virtual std::vector<int> getNodeGridStructure() const throw(INTERP_KERNEL::Exception);
+ std::vector<int> getCellGridStructure() const throw(INTERP_KERNEL::Exception);
+ MEDCoupling1SGTUMesh *build1SGTUnstructured() const throw(INTERP_KERNEL::Exception);
static INTERP_KERNEL::NormalizedCellType GetGeoTypeGivenMeshDimension(int meshDim) throw(INTERP_KERNEL::Exception);
+ %extend
+ {
+ virtual MEDCouplingStructuredMesh *buildStructuredSubPart(PyObject *cellPart) const throw(INTERP_KERNEL::Exception)
+ {
+ int tmpp1=-1,tmpp2=-1;
+ std::vector<int> tmp=fillArrayWithPyListInt2(cellPart,tmpp1,tmpp2);
+ std::vector< std::pair<int,int> > inp;
+ if(tmpp2==2)
+ {
+ inp.resize(tmpp1);
+ for(int i=0;i<tmpp1;i++)
+ { inp[i].first=tmp[2*i]; inp[i].second=tmp[2*i+1]; }
+ }
+ else if(tmpp2==1)
+ {
+ if(tmpp1%2!=0)
+ throw INTERP_KERNEL::Exception("Wrap of MEDCouplingStructuredMesh.buildStructuredSubPart : invalid input size ! Must be even size !");
+ inp.resize(tmpp1/2);
+ for(int i=0;i<tmpp1/2;i++)
+ { inp[i].first=tmp[2*i]; inp[i].second=tmp[2*i+1]; }
+ }
+ else
+ throw INTERP_KERNEL::Exception("Wrap of MEDCouplingStructuredMesh.buildStructuredSubPart : invalid input size !");
+ return self->buildStructuredSubPart(inp);
+ }
+
+ static DataArrayInt *BuildExplicitIdsFrom(PyObject *st, PyObject *part) throw(INTERP_KERNEL::Exception)
+ {
+ int tmpp1=-1,tmpp2=-1;
+ std::vector<int> tmp=fillArrayWithPyListInt2(part,tmpp1,tmpp2);
+ std::vector< std::pair<int,int> > inp;
+ if(tmpp2==2)
+ {
+ inp.resize(tmpp1);
+ for(int i=0;i<tmpp1;i++)
+ { inp[i].first=tmp[2*i]; inp[i].second=tmp[2*i+1]; }
+ }
+ else if(tmpp2==1)
+ {
+ if(tmpp1%2!=0)
+ throw INTERP_KERNEL::Exception("Wrap of MEDCouplingStructuredMesh.BuildExplicitIdsFrom : invalid input size ! Must be even size !");
+ inp.resize(tmpp1/2);
+ for(int i=0;i<tmpp1/2;i++)
+ { inp[i].first=tmp[2*i]; inp[i].second=tmp[2*i+1]; }
+ }
+ else
+ throw INTERP_KERNEL::Exception("Wrap of MEDCouplingStructuredMesh.BuildExplicitIdsFrom : invalid input size !");
+ //
+ int szArr,sw,iTypppArr;
+ std::vector<int> stdvecTyyppArr;
+ const int *tmp4=convertObjToPossibleCpp1_Safe(st,sw,szArr,iTypppArr,stdvecTyyppArr);
+ std::vector<int> tmp5(tmp4,tmp4+szArr);
+ //
+ return MEDCouplingStructuredMesh::BuildExplicitIdsFrom(tmp5,inp);
+ }
+
+ static DataArrayInt *Build1GTNodalConnectivity(PyObject *li) throw(INTERP_KERNEL::Exception)
+ {
+ int szArr,sw,iTypppArr;
+ std::vector<int> stdvecTyyppArr;
+ const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+ return MEDCouplingStructuredMesh::Build1GTNodalConnectivity(tmp,tmp+szArr);
+ }
+
+ static PyObject *IsPartStructured(PyObject *li, PyObject *st) throw(INTERP_KERNEL::Exception)
+ {
+ int szArr,sw,iTypppArr;
+ std::vector<int> stdvecTyyppArr;
+ const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+ int szArr2,sw2,iTypppArr2;
+ std::vector<int> stdvecTyyppArr2;
+ const int *tmp2=convertObjToPossibleCpp1_Safe(st,sw2,szArr2,iTypppArr2,stdvecTyyppArr2);
+ std::vector<int> tmp3(tmp2,tmp2+szArr2);
+ std::vector< std::pair<int,int> > partCompactFormat;
+ bool ret0=MEDCouplingStructuredMesh::IsPartStructured(tmp,tmp+szArr,tmp3,partCompactFormat);
+ PyObject *ret=PyTuple_New(2);
+ PyObject *ret0Py=ret0?Py_True:Py_False; Py_XINCREF(ret0Py);
+ PyTuple_SetItem(ret,0,ret0Py);
+ PyObject *ret1Py=PyList_New(partCompactFormat.size());
+ for(std::size_t i=0;i<partCompactFormat.size();i++)
+ {
+ PyObject *tmp4=PyTuple_New(2);
+ PyTuple_SetItem(tmp4,0,PyInt_FromLong(partCompactFormat[i].first));
+ PyTuple_SetItem(tmp4,1,PyInt_FromLong(partCompactFormat[i].second));
+ PyList_SetItem(ret1Py,i,tmp4);
+ }
+ PyTuple_SetItem(ret,1,ret1Py);
+ return ret;
+ }
+ }
};
//== MEDCouplingCMesh
static MEDCouplingCurveLinearMesh *New(const char *meshName);
MEDCouplingCurveLinearMesh *clone(bool recDeepCpy) const;
void setCoords(const DataArrayDouble *coords) throw(INTERP_KERNEL::Exception);
- std::vector<int> getNodeGridStructure() const throw(INTERP_KERNEL::Exception);
%extend {
MEDCouplingCurveLinearMesh()
{
PyTuple_SetItem(pyRet,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
return pyRet;
}
+
+ int getNumberOfTuplesExpectedRegardingCode(const MEDCouplingMesh *mesh, PyObject *code, PyObject *idsPerType) const throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<int> inp0;
+ convertPyToNewIntArr4(code,1,3,inp0);
+ std::vector<const DataArrayInt *> inp1;
+ convertFromPyObjVectorOfObj<const ParaMEDMEM::DataArrayInt *>(idsPerType,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,"DataArrayInt",inp1);
+ return self->getNumberOfTuplesExpectedRegardingCode(mesh,inp0,inp1);
+ }
}
%extend ParaMEDMEM::MEDCouplingFieldDiscretizationP0
virtual void copyTinyStringsFrom(const MEDCouplingField *other) throw(INTERP_KERNEL::Exception);
void setMesh(const ParaMEDMEM::MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
void setName(const char *name) throw(INTERP_KERNEL::Exception);
- const char *getDescription() const throw(INTERP_KERNEL::Exception);
+ std::string getDescription() const throw(INTERP_KERNEL::Exception);
void setDescription(const char *desc) throw(INTERP_KERNEL::Exception);
- const char *getName() const throw(INTERP_KERNEL::Exception);
+ std::string getName() const throw(INTERP_KERNEL::Exception);
TypeOfField getTypeOfField() const throw(INTERP_KERNEL::Exception);
NatureOfField getNature() const throw(INTERP_KERNEL::Exception);
virtual void setNature(NatureOfField nat) throw(INTERP_KERNEL::Exception);
std::copy(tmp.begin(),tmp.end(),ret->getPointer());
return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
}
+
+ int getNumberOfTuplesExpectedRegardingCode(PyObject *code, PyObject *idsPerType) const throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<int> inp0;
+ convertPyToNewIntArr4(code,1,3,inp0);
+ std::vector<const DataArrayInt *> inp1;
+ convertFromPyObjVectorOfObj<const ParaMEDMEM::DataArrayInt *>(idsPerType,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,"DataArrayInt",inp1);
+ return self->getNumberOfTuplesExpectedRegardingCode(inp0,inp1);
+ }
}
};
}
void renumberCells(PyObject *li, bool check=true) 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->renumberCells(tmp,check);
- }
- else
- {
- DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
- if(!da2)
- throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
- da2->checkAllocated();
- self->renumberCells(da2->getConstPointer(),check);
- }
+ int szArr,sw,iTypppArr;
+ std::vector<int> stdvecTyyppArr;
+ const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+ self->renumberCells(tmp,check);
+ }
+
+ void renumberCellsWithoutMesh(PyObject *li, bool check=true) throw(INTERP_KERNEL::Exception)
+ {
+ int szArr,sw,iTypppArr;
+ std::vector<int> stdvecTyyppArr;
+ const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+ self->renumberCellsWithoutMesh(tmp,check);
}
+
void renumberNodes(PyObject *li, double eps=1e-15) 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->renumberNodes(tmp,eps);
- }
- else
- {
- DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
- if(!da2)
- throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
- da2->checkAllocated();
- self->renumberNodes(da2->getConstPointer(),eps);
- }
+ int szArr,sw,iTypppArr;
+ std::vector<int> stdvecTyyppArr;
+ const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+ self->renumberNodes(tmp,eps);
+ }
+
+ void renumberNodesWithoutMesh(PyObject *li, int newNbOfNodes, double eps=1e-15) throw(INTERP_KERNEL::Exception)
+ {
+ int szArr,sw,iTypppArr;
+ std::vector<int> stdvecTyyppArr;
+ const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+ self->renumberNodesWithoutMesh(tmp,newNbOfNodes,eps);
}
MEDCouplingFieldDouble *buildSubPart(PyObject *li) const throw(INTERP_KERNEL::Exception)