//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// Author : Anthony Geay (CEA/DEN)
+// Author : Anthony Geay (EDF R&D)
-#ifndef __NORMALIZEDGEOMETRICTYPES__
-#define __NORMALIZEDGEOMETRICTYPES__
+#pragma once
namespace INTERP_KERNEL
{
typedef enum
- {
+ {// think to update the following arrays : MEDMEM_ORDER (MEDCouplingUMesh) and MEDCOUPLING2VTKTYPETRADUCER (CellModel.hxx)
NORM_POINT1 = 0,
NORM_SEG2 = 1,
NORM_SEG3 = 2,
typedef enum { PLANAR_FACE_5 = 5, PLANAR_FACE_6 = 6, GENERAL_24 = 24, GENERAL_48 = 48 } SplittingPolicy;
}
-#endif
constexpr unsigned char MEDCOUPLING2VTKTYPETRADUCER_NONE = 255;
-INTERPKERNEL_EXPORT extern unsigned char MEDCOUPLING2VTKTYPETRADUCER[INTERP_KERNEL::NORM_MAXTYPE+1];
+INTERPKERNEL_EXPORT extern unsigned char MEDCOUPLING2VTKTYPETRADUCER[MEDCOUPLING2VTKTYPETRADUCER_LGTH];
namespace INTERP_KERNEL
{
self.assertRaises(InterpKernelException,a1.findIdForEach,b1) # a1 is not single component
pass
+ def testGlobalHelpers(self):
+ arr0 = vtk2med_cell_types()
+ self.assertEqual(len(arr0),43)
+ arr1 = med2vtk_cell_types()
+ self.assertEqual(len(arr1),34)
+ arr2 = AllGeometricTypes()
+ self.assertEqual(len(arr2),25)
+ for elt in arr2:
+ MEDCouplingUMesh.GetReprOfGeometricType(elt)
+ self.assertNotEqual(MEDCouplingUMesh.GetDimensionOfGeometricType(elt),-1)
+ pass
+
pass
if __name__ == '__main__':
PyList_SetItem(ret,id,PyInt_FromLong(*it));
return ret;
}
+
+ PyObject *AllGeometricTypes()
+ {
+ Py_ssize_t sz(MEDCouplingUMesh::N_MEDMEM_ORDER);
+ PyObject *ret(PyList_New(sz));
+ for(Py_ssize_t i=0;i<sz;i++)
+ PyList_SetItem(ret,i,PyInt_FromLong(MEDCouplingUMesh::MEDMEM_ORDER[i]));
+ return ret;
+ }
}
namespace INTERP_KERNEL