From d684b3524f89faaf937adb724463ae61aee89f9a Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 10 Feb 2012 11:23:54 +0000 Subject: [PATCH] Addition of MEDCouplingCMesh::clone and FieldDouble::getValueOnPos --- src/MEDCoupling_Swig/MEDCoupling.i | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; -- 2.39.2