Hi everyone,
Is it possible to make ElmerSolver honor capitalization when it saves variables to a vtu file? E.g. I would need to export the displacement as "Displacement" and temperature as "Temperature". The reason for that is that I'm currently implementing ElmerSolver support for the FreeCAD CAD workbench as part of my gsoc project. FreeCAD atm only searches for variable names with the first character in upper case. See https://forum.freecadweb.org/viewtopic. ... 20#p179666 for a video reporting my progress so far.
Regards,
Markus
Naming of variables in vtu
Re: Naming of variables in vtu
Hi,
AFAIK Elmer systematically converts everything to lowercase.
One could make a small change in the code of ResultOutputSolver to capitalize the first letter of certain keywords, maybe using an extra flag
FreeCAD Format = Logical True
or the like.
Have a look at ResultOutputSolve.src. It's a little bit of FORTRAN, should not be hard to do.
When done, you can ask the Elmer team to include it into the official distribution, so that the patch doesn't need to be applied at every new Elmer version.
HTH,
Matthias
AFAIK Elmer systematically converts everything to lowercase.
One could make a small change in the code of ResultOutputSolver to capitalize the first letter of certain keywords, maybe using an extra flag
FreeCAD Format = Logical True
or the like.
Have a look at ResultOutputSolve.src. It's a little bit of FORTRAN, should not be hard to do.
When done, you can ask the Elmer team to include it into the official distribution, so that the patch doesn't need to be applied at every new Elmer version.
HTH,
Matthias
Re: Naming of variables in vtu
Hi,
Thanks for the fast answer and your suggestion. But I think that this would be too much of a hack to be included upstream (at least I wouldn't include it if it were my project xD). I'm going to extend the FreeCAD code to be a little bit more flexible when parsing the vtu file. That's probably much easier (for me) and should be done anyway.
Thanks for the fast answer and your suggestion. But I think that this would be too much of a hack to be included upstream (at least I wouldn't include it if it were my project xD). I'm going to extend the FreeCAD code to be a little bit more flexible when parsing the vtu file. That's probably much easier (for me) and should be done anyway.
Re: Naming of variables in vtu
There are quite some of such"hacks" in Elmer - as long as there is a keyword controlling the corresponding behaviour in a backward compatible way, that is usually no problem. But if it's easier for you to do it in FreeCAD, it's just as fine.
Matthias
Matthias
-
- Site Admin
- Posts: 4825
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Naming of variables in vtu
Hi
The variables are always lower case simply because they are all transformed to lower case internally. This makes string comparisons easier etc.
Now one could indeed transfer names to start with a capital letter just for the VTU output. But if you already have a fix maybe that's the path to take. We try to be open to contributions but still it takes an effort to include them.
-Peter
The variables are always lower case simply because they are all transformed to lower case internally. This makes string comparisons easier etc.
Now one could indeed transfer names to start with a capital letter just for the VTU output. But if you already have a fix maybe that's the path to take. We try to be open to contributions but still it takes an effort to include them.
-Peter