Personal tools
You are here: Home Forum Other... (new forum, problems, etc.) Problem with MED : cannot create a group with a polygon inside

Problem with MED : cannot create a group with a polygon inside

Up to Other... (new forum, problems, etc.)

Problem with MED : cannot create a group with a polygon inside

Posted by Guy HUBERT at February 04. 2011

Hello,

 

I have a problem with the polygons in MED.

 

I have made a single mesh with a python script, which contains :

19 nodes

4 MED_TRIA3

4 MED_QUAD4

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 ?

 

Thanks.
Attachments

Re: Problem with MED : cannot create a group with a polygon inside

Posted by Anthony GEAY at February 04. 2011

Hello,,

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.

Regards

Attachments

Re: Problem with MED : cannot create a group with a polygon inside

Posted by Saint Michael at February 04. 2011

Hello

 

Your script is incorrect, the errors are:

 

> meshDimension = spaceDimension # because there 3D cells in the mesh

All your cells are 2D

 

>   myGroup2.setNumberOfGeometricType(2)

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 = [8]

The number of your polygon is 9 not 8

 

 

Best regards

SM

 

Re: Problem with MED : cannot create a group with a polygon inside

Posted by Guy HUBERT at March 14. 2011

thank u, i will test it as soon as possible ...

Quick reply
URLs will be automatically hyperlinked. Basic HTML tags are OK.
Powered by Ploneboard
History
Activate by Guy HUBERT on Feb 04, 2011 02:40 PM
Document Actions