[Gmsh] Error in MED format output
Yvan FOURNIER
yvan.fournier at edf.fr
Tue Sep 22 11:50:40 CEST 2009
Hello,
I would like to report 2 issues with MED output format (in Gmsh 2.4.2 and
all older versions I have tested)
- elements are not oriented correctly, meaning they probably do not follow
the MED element numbering conventions.
- Families in MED files do not contain groups or attributes (attributes
should be deprecated soon, so groups are best).
In GModel_IO_MED.cpp, we have of the following form:
if(MEDfamCr(fid, meshName, (char*)familyName.c_str(),
(med_int)num, 0, 0, 0, 0, (char*)groupName.c_str(),
(med_int)entities[i]->physicals.size()) < 0)
The last argument of MEDfamCr should be the number of associated groups,
which is always 1
if families are mapped 1-to-1 with physical entities, so I beleive the
call should be :
if(MEDfamCr(fid, meshName, (char*)familyName.c_str(),
(med_int)num, 0, 0, 0, 0, (char*)groupName.c_str(),
(med_int)entities[i]->physicals.size()) > 0)
(i.e. the sign is wrong in the test for the original version).
Normally, even if entities[i]->physicals.size() == 0, Families should
contain a group, so
maybe another wy of defining the group should be sued in this case, and
the call
would simply be :
if(MEDfamCr(fid, meshName, (char*)familyName.c_str(),
(med_int)num, 0, 0, 0, 0, (char*)groupName.c_str(), 1)
I have not tested the patch or built a complete GMSH compilation
environment,
but I beleive this could fix the second bug (i.e. missing group
definitons) with MED output.
I may try to look into element node numbering for the first bug in the
future, but
this may have to wait a bit.
Best regards,
Yvan Fournier
EDF R&D
Fluid Dynamcis, Power Generation, and Environment
6 quai Watier - BP 49
78401 Chatou Cedex
FRANCE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20090922/f2481bd9/attachment.html>
-------------- next part --------------
Ce message et toutes les pi?ces jointes (ci-apr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
E-mail communication cannot be guaranteed to be timely secure, error or virus-free.