Hello @all,
when I read a Salomé generated UNV file into Elmer the displayed geometry is completely broken. This can be overcome by first changing all decimal points against decimal commas (as is the usual way of writing in Germany at least).
So Elmer on my Ubuntu 10.4 box, set for a German locale for obvious reasons, wants decimal commas in the UNV file whereas Salomé writes the international dotted decimals. Is there a way to tell Elmer to expect the usual dots again?
Kind regards,
Peter
"." vs. "," in UNV files
Re: "." vs. "," in UNV files
hi,
my salome creates also dots in the files and everything is fine.
you cannot load the unv file directly into elmer. you have to use --> ElmerGrid 8 2 yourfile.unv -autoclean in console.
this command creates the .mesh files which can be loaded into ElmerGui via load mesh.
regards
martin
my salome creates also dots in the files and everything is fine.
you cannot load the unv file directly into elmer. you have to use --> ElmerGrid 8 2 yourfile.unv -autoclean in console.
this command creates the .mesh files which can be loaded into ElmerGui via load mesh.
regards
martin
Re: "." vs. "," in UNV files
Hello Martin,
everything works fine. I assume ElmerGUI doing the ElmerGrid conversion automagically - and I seem to remember that I read it somewhere in the manuals - if it deems appropriate. ElmerGUI does it also on the Salomé files, but those are broken upon loading, as described.
Therefore my question posed!
Regards,
Peter
Yes, you can. I did it frequently already, apart from this dreaded ./, problem. If I do the sed conversion in between, i.e.Koske wrote:you cannot load the unv file directly into elmer.
Code: Select all
sed "s/\./,/g" <Salome.unv >Elmer.unv
Therefore my question posed!
Regards,
Peter
-
- Site Admin
- Posts: 4836
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: "." vs. "," in UNV files
Hi, I looked at this problem and the reason seems to be the use of "strtod" function to convert strings to doubles. This depends on the locale. The remedy would be to use locale-independent strtod function. In fact I found one also under GPL and will perhaps plug it in in near future. Thanx for reporting!
In the meantime perhaps you could try something like
before running ElmerGrid. I guess when you now say locale you get LC_NUMERIC="de_DE..." which is the cause of the problems.
-Peter
In the meantime perhaps you could try something like
Code: Select all
setenv LC_NUMERIC en_US
-Peter