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

SKA.C reads fileName read from dynamicMeshDict without expanding it

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 28, 2010, 16: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: 17
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, 15 views)

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

Old   July 29, 2010, 07:16
Default
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
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, 05:22
Default
  #3
Member
 
Michael Wild
Join Date: Mar 2009
Location: Bern, Switzerland
Posts: 79
Rep Power: 17
mwild is on a distinguished road
Did you forget to "git push"?
mwild is offline   Reply With Quote

Old   August 3, 2010, 07:50
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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


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
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 15:37


All times are GMT -4. The time now is 10:52.