gmshToFoam failure
Summary
gmshToFoam is unable to convert the example meshes in the source tree. This worked fine in v2012.
Steps to reproduce
Run Allrun in the attached minimal example. This is a example mesh from the source tree.
Example case
What is the current bug behaviour?
gmshToFoam exits with the error:
Wrong token type - expected word, found on line 0: variable "$MeshFormat"
file: input at line 0.
From Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::word&)
in file primitives/strings/word/wordIO.C at line 70.
FOAM exiting
What is the expected correct behavior?
(No error)
Environment information
- OpenFOAM version : v2106
- Operating system : ubuntu
- Hardware info :
- Compiler : (OpenCFD binary package)
Possible fixes
In gmshToFoam.C, replacing all occurrences of
word tag(lineStr);
with
string tag(token(tagStr).stringToken());
seems to do the trick.