CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

word::stripInvalid() called for word

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By jherb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 27, 2014, 12:13
Default word::stripInvalid() called for word
  #1
New Member
 
Ryan Tunstall
Join Date: Sep 2013
Posts: 10
Rep Power: 12
rt08 is on a distinguished road
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!
rt08 is offline   Reply With Quote

Old   November 4, 2014, 04:29
Default
  #2
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
There is a special class in OpenFOAM to store file names and pathes, e. g.
Code:
Foam::fileName restartDir = runTime.path()/runTime.timeName();
As you can see, the operator / is used to concatenate (parts of the) path and filename.
Kummi likes this.
jherb is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
terminate called after throwing an instance of 'int' b614910 SU2 10 July 27, 2014 22:16
word::stripInvalid() called for word r error immortality OpenFOAM Running, Solving & CFD 4 May 12, 2013 06:03
word::stripInvalid() called for word r immortality OpenFOAM Programming & Development 2 December 26, 2012 04:26
whats the error? word::stripInvalid() called for word r immortality OpenFOAM Running, Solving & CFD 0 December 3, 2012 17:55
reconstructParMesh not working with an axisymetric case francesco OpenFOAM Bugs 4 May 8, 2009 05:49


All times are GMT -4. The time now is 08:50.