return typmai2[std::distance(typmai,pos)];
}
+med_geometry_type MEDFileMesh::ConvertToMEDFileGeoType(INTERP_KERNEL::NormalizedCellType geoType)
+{
+ INTERP_KERNEL::NormalizedCellType *pos(std::find(typmai2,typmai2+MED_N_CELL_FIXED_GEO,geoType));
+ if(pos==typmai2+MED_N_CELL_FIXED_GEO)
+ {
+ THROW_IK_EXCEPTION("MEDFileMesh::ConvertToMEDFileGeoType : no entry for " << geoType);
+ }
+ return typmai[std::distance(typmai2,pos)];
+}
+
TypeOfField MEDFileMesh::ConvertFromMEDFileEntity(med_entity_type etype)
{
switch(etype)
void killEquivalences() { _equiv=(MEDFileEquivalences *)0; }
void initializeEquivalences() { _equiv=MEDFileEquivalences::New(this); }
MEDLOADER_EXPORT static INTERP_KERNEL::NormalizedCellType ConvertFromMEDFileGeoType(med_geometry_type geoType);
+ MEDLOADER_EXPORT static med_geometry_type ConvertToMEDFileGeoType(INTERP_KERNEL::NormalizedCellType geoType);
static TypeOfField ConvertFromMEDFileEntity(med_entity_type etype);
protected:
MEDFileMesh();
return MEDFileMesh::ConvertFromMEDFileGeoType(geoType2);
}
+ static int ConvertToMEDFileGeoType(INTERP_KERNEL::NormalizedCellType geoType)
+ {
+ return (int) MEDFileMesh::ConvertToMEDFileGeoType(geoType);
+ }
+
PyObject *getTime()
{
int tmp1,tmp2;
def testMeshConvertFromMEDFileGeoType(self):
self.assertEqual(MEDFileMesh.ConvertFromMEDFileGeoType(320),NORM_HEXA20)
+ self.assertEqual(MEDFileMesh.ConvertToMEDFileGeoType(NORM_HEXA20),320)
@WriteInTmpDir
def testFieldInt64_0(self):