CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Bugs

SKA.C reads fileName read from dynamicMeshDict without expanding it

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 28, 2010, 15:37
Default SKA.C reads fileName read from dynamicMeshDict without expanding it
  #1
Member
 
Michael Wild
Join Date: Mar 2009
Location: Bern, Switzerland
Posts: 79
Rep Power: 8
mwild is on a distinguished road
src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SKA/SKA.C loads a fileName read from dynamicMeshDict without calling the fileName::expand() function. Thus one can't use e.g. $FOAM_CASE in the dictionary, making it impossible to run e.g. the sloshingTank3D6DoF case from outside the case directory without hard-coding the absolute path in the dictionary.

Attached patch fixes both SKA.C and sloshingTank3D6DoF/constant/dynamicMeshDict.
Attached Files
File Type: patch fix-unexpanded-filename-in-ska.patch (1.7 KB, 12 views)

Last edited by mwild; July 29, 2010 at 02:41.
mwild is offline   Reply With Quote

Old   July 29, 2010, 06:16
Default
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 13
henry is on a distinguished road
I have added this enhancement and pushed it into 1.7.x

H
henry is offline   Reply With Quote

Old   July 30, 2010, 04:22
Default
  #3
Member
 
Michael Wild
Join Date: Mar 2009
Location: Bern, Switzerland
Posts: 79
Rep Power: 8
mwild is on a distinguished road
Did you forget to "git push"?
mwild is offline   Reply With Quote

Old   August 3, 2010, 06:50
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,258
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings to all!

This is only slightly off-topic, but also related to the fix made for SKA.C...
I've got a request to the developers: a method like "fileName::isPathAbsolute()" would be really helpful. Why? Two reasons:
  1. These four files (the only ones I found so far) rely on finding the first character to be '/', in order to assume it's an absolute path:
    Code:
    src/OpenFOAM/global/argList/argList.C
    src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.C
    src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C
    src/OpenFOAM/db/IOobject/IOobject.C
    This isn't the only possible absolute path type, since it could start with "C:" (Windows, Amiga OS, RISC OS, etc...) or even be a URL address "http:" (in case you want to add web capabilities to OpenFOAM later on).
  2. SKA.C could probably take advantage of allowing relative path definition, in the same way it's done in chemkinReader.C! So, if the method isPathAbsolute already existed, "allowing for relative path" in SKA.C might have not been forgotten...

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 15:37


All times are GMT -4. The time now is 17:56.