|
[Sponsors] |
September 27, 2014, 13:13 |
word::stripInvalid() called for word
|
#1 |
New Member
Ryan Tunstall
Join Date: Sep 2013
Posts: 10
Rep Power: 13 |
Hi,
I'm trying to write a little program to read in a velocity profile from a file that has y and u values like so: ( 1 2 ... 3 4 ) I want to do this using an IFstream and at the minute have: string fileuIn=args.args()[6]+"/u_profile"; IFstream uDat(fileuIn); Where args.args()[6] is an argument passed at the terminal that contains the path of the folder containing the file. I am passing the full path of this folder in quotes when running the program in the terminal, but I get the error: "word::stripInvalid() called for word" then a print of the path and file name but without any "/" characters. How do I overcome this error? I know that the file exists and the path and filename are correct, it seems that foam is removing the / characters, but obviously they are essential. I don't really want to move the files from there current location if I can help it and would prefer a solution from the coding side of the problem. Thanks! |
|
November 4, 2014, 05:29 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
There is a special class in OpenFOAM to store file names and pathes, e. g.
Code:
Foam::fileName restartDir = runTime.path()/runTime.timeName(); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
terminate called after throwing an instance of 'int' | b614910 | SU2 | 10 | July 27, 2014 23:16 |
word::stripInvalid() called for word r error | immortality | OpenFOAM Running, Solving & CFD | 4 | May 12, 2013 07:03 |
word::stripInvalid() called for word r | immortality | OpenFOAM Programming & Development | 2 | December 26, 2012 05:26 |
whats the error? word::stripInvalid() called for word r | immortality | OpenFOAM Running, Solving & CFD | 0 | December 3, 2012 18:55 |
reconstructParMesh not working with an axisymetric case | francesco | OpenFOAM Bugs | 4 | May 8, 2009 06:49 |