From 4f5b370b38f731e9282baf293aa193a568cb230b Mon Sep 17 00:00:00 2001 From: ageay Date: Mon, 5 Aug 2013 12:50:18 +0000 Subject: [PATCH] Improve perf of P1P0,P0P1,P1P1 --- src/MEDCoupling_Swig/MEDCouplingBasicsTest.py | 2 +- src/MEDCoupling_Swig/MEDCouplingCommon.i | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py index 7ebacabdd..19d4fed7d 100644 --- a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py +++ b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py @@ -13637,7 +13637,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): m4.allocateCells(0) m4.insertNextCell(NORM_HEXA8,[3,2,1,0,7,6,5,4]) c,a,b=m4.tetrahedrize(PLANAR_FACE_6) - m4.checkCoherency2() + c.checkCoherency2() a.isEqual(DataArrayInt([0,0,0,0,0,0])) self.assertEqual(0,b) self.assertEqual(c.getCoords().getHiddenCppPointer(),coords.getHiddenCppPointer()) diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index 3e28a515c..7959ab694 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -2022,13 +2022,15 @@ namespace ParaMEDMEM return ret; } - PyObject *simplexize3D(int policy) throw(INTERP_KERNEL::Exception) + PyObject *tetrahedrize(int policy) throw(INTERP_KERNEL::Exception) { - int ret1(-1); - DataArrayInt *ret0(self->simplexize3D(policy,ret1)); - PyObject *ret=PyTuple_New(2); - PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 )); - PyTuple_SetItem(ret,1,PyInt_FromLong(ret1)); + 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; } -- 2.30.2