Problem with MED : cannot create a group with a polygon inside
Problem with MED : cannot create a group with a polygon insidePosted by Guy HUBERT at February 04. 2011
I have a problem with the polygons in MED.
I have made a single mesh with a python script, which contains :
and one polygon (with 6 nodes)
I can create a mixed group with TRIA and QUAD,
but I cannot create a group (named GrpPOLYGON in the example) with my polygon.
When I create the group, if I put in the group object the cell numbered 8, I get an error :
RuntimeError: Salome Exception : getElementTypeWithPoly : globalNumber < 1
Is it a limitation of the MED format ?
Or my python script is not correct ?
Re: Problem with MED : cannot create a group with a polygon insidePosted by Anthony GEAY at February 04. 2011
No MED file format allows it of course ! MEDMEM seems not
In attached file a way to perform the job with SALOME 5.1.5 in MEDCoupling/MEDLoader rather than MEDMEM. Just a piece of advice, numbering in MEDCoupling is C like [0,n-1] and not Fortran like medmem [1,n].
I hope it will help.
Re: Problem with MED : cannot create a group with a polygon insidePosted by Saint Michael at February 04. 2011
Your script is incorrect, the errors are:
> meshDimension = spaceDimension # because there 3D cells in the mesh
All your cells are 2D
You have only one type in GrpPOLYGON: MED_POLYGON. This error leads to
reading uninitialized memory by myGroup2.setGeometricType(myTypes).
> ##myTypes = [MED_POLYGON] no, error at writing
> myTypes = [MED_CELL]
Correct is myTypes = [MED_POLYGON], your problem comes from myGroup2.setNumberOfGeometricType(2)
> values = 
The number of your polygon is 9 not 8
Re: Problem with MED : cannot create a group with a polygon insidePosted by Guy HUBERT at March 14. 2011
thank u, i will test it as soon as possible ...
Activate by Guy HUBERT on Feb 04, 2011 01:40 PM