From: ageay Date: Fri, 10 Feb 2012 11:23:54 +0000 (+0000) Subject: Addition of MEDCouplingCMesh::clone and FieldDouble::getValueOnPos X-Git-Tag: V6_main_FINAL~875 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d684b3524f89faaf937adb724463ae61aee89f9a;p=tools%2Fmedcoupling.git Addition of MEDCouplingCMesh::clone and FieldDouble::getValueOnPos --- diff --git a/src/MEDCoupling_Swig/MEDCoupling.i b/src/MEDCoupling_Swig/MEDCoupling.i index 243af238d..15a50a65f 100644 --- a/src/MEDCoupling_Swig/MEDCoupling.i +++ b/src/MEDCoupling_Swig/MEDCoupling.i @@ -268,6 +268,7 @@ using namespace INTERP_KERNEL; %newobject ParaMEDMEM::MEDCouplingExtrudedMesh::New; %newobject ParaMEDMEM::MEDCouplingExtrudedMesh::build3DUnstructuredMesh; %newobject ParaMEDMEM::MEDCouplingCMesh::New; +%newobject ParaMEDMEM::MEDCouplingCMesh::clone; %newobject ParaMEDMEM::MEDCouplingCMesh::getCoordsAt; %newobject ParaMEDMEM::MEDCouplingMultiFields::New; %newobject ParaMEDMEM::MEDCouplingMultiFields::deepCpy; @@ -1462,6 +1463,7 @@ namespace ParaMEDMEM { public: static MEDCouplingCMesh *New(); + MEDCouplingCMesh *clone(bool recDeepCpy) const; void setCoords(const DataArrayDouble *coordsX, const DataArrayDouble *coordsY=0, const DataArrayDouble *coordsZ=0) throw(INTERP_KERNEL::Exception); @@ -4537,6 +4539,14 @@ namespace ParaMEDMEM return convertDblArrToPyList(res,sz); } + PyObject *getValueOnPos(int i, int j, int k) const throw(INTERP_KERNEL::Exception) + { + int sz=self->getNumberOfComponents(); + INTERP_KERNEL::AutoPtr res=new double[sz]; + self->getValueOnPos(i,j,k,res); + return convertDblArrToPyList(res,sz); + } + DataArrayDouble *getValueOnMulti(PyObject *li) const throw(INTERP_KERNEL::Exception) { void *da=0;