}
}
+std::vector< INTERP_KERNEL::NormalizedCellType > MEDMeshMultiLev::getGeoTypes() const
+{
+ return _geo_types;
+}
+
void MEDMeshMultiLev::setFamilyIdsOnCells(DataArrayInt *famIds, bool isNoCopy)
{
_cell_fam_ids=famIds;
MEDLOADER_EXPORT void retrieveNumberIdsOnCells(DataArrayInt *& numIds, bool& isWithoutCopy) const;
MEDLOADER_EXPORT void retrieveFamilyIdsOnNodes(DataArrayInt *& famIds, bool& isWithoutCopy) const;
MEDLOADER_EXPORT void retrieveNumberIdsOnNodes(DataArrayInt *& numIds, bool& isWithoutCopy) const;
+ MEDLOADER_EXPORT std::vector< INTERP_KERNEL::NormalizedCellType > getGeoTypes() const;
void setFamilyIdsOnCells(DataArrayInt *famIds, bool isNoCopy);
void setNumberIdsOnCells(DataArrayInt *numIds, bool isNoCopy);
void setFamilyIdsOnNodes(DataArrayInt *famIds, bool isNoCopy);
PyTuple_SetItem(ret,1,ret1Py);
return ret;
}
+
+ PyObject *getGeoTypes() const throw(INTERP_KERNEL::Exception)
+ {
+ std::vector< INTERP_KERNEL::NormalizedCellType > result(self->getGeoTypes());
+ std::vector< INTERP_KERNEL::NormalizedCellType >::const_iterator iL(result.begin());
+ PyObject *res(PyList_New(result.size()));
+ for(int i=0;iL!=result.end(); i++, iL++)
+ PyList_SetItem(res,i,PyInt_FromLong(*iL));
+ return res;
+ }
}
};
mml=fcscp.buildFromScratchDataSetSupport(0,fields)
mml2=mml.prepare()
self.assertTrue(isinstance(mml2,MEDUMeshMultiLev))
+ self.assertEqual([3,4,0],mml2.getGeoTypes())
ncc,a0,a1,a2,a3,a4,a5=mml2.buildVTUArrays()
self.assertTrue(not ncc)
self.assertTrue(a0.isEqual(DataArrayDouble([0.,1.,0.,1.,1.,0.,2.,1.,0.,0.,2.,0.,1.,2.,0.,0.,3.,0.],6,3),1e-12))