Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic run directories #162

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

icojb25
Copy link
Contributor

@icojb25 icojb25 commented Mar 23, 2024

Makes changes to the Preferences panel to allow setting a relative directory to FoamAnalysis as a subdirectory in the same directory in which the FCStd is located.

@icojb25
Copy link
Contributor Author

icojb25 commented Mar 23, 2024

See #148

@icojb25 icojb25 marked this pull request as ready for review March 29, 2024 07:03
@oliveroxtoby
Copy link
Collaborator

Hi @icojb25. Thanks a lot for your efforts.

Would it be possible to modify this to use the name of the document rather than 'FoamAnalysis' as the subdirectory? So that the case directories for different files don't overwrite each other. This was the initial complaint raised in #148 if I understood correctly.

@icojb25
Copy link
Contributor Author

icojb25 commented Mar 31, 2024

Hi @icojb25. Thanks a lot for your efforts.

Would it be possible to modify this to use the name of the document rather than 'FoamAnalysis' as the subdirectory? So that the case directories for different files don't overwrite each other. This was the initial complaint raised in #148 if I understood correctly.

Sure, but its not clear what the OP wanted. He talked about use the Project label but also "beside FCStd" so. Current behaviour is /tmp/meshCase or /tmp/case. So what is the expected behaviour:

  1. Remove /tmp as default and use active project label as default (this will not write on /, where should it default to writing?) (still under /tmp ie /tmp/MyProjectname/meshCase and /tmp/MyProjectname/case, and then
  2. Use BesideFCStd file option and write to ./currentFCStddir/MyProjectname/meshcase and ./currentFCStddir/MyProjectname/case

To my mind, 1) is not a great option since /tmp is supposed to be temporary and not a persistence location. Using what i guess is OP's original suggestion will end up with reams of folders under /tmp which are never cleaned up. Defaulting to $HOME/MyProjectname or something under $HOME/CfdOF/MyProjectname would be better.

Perhaps someone can define the behaviour better.

Also NB Opening the Preferences pane before a project is opened is going to break the code since there is no ActiveDocument at this stage.

@oliveroxtoby
Copy link
Collaborator

Sure, but its not clear what the OP wanted. He talked about use the Project label but also "beside FCStd" so. Current behaviour is /tmp/meshCase or /tmp/case. So what is the expected behaviour:

What I had in mind was
<user specified dir>/MyProjectname/{meshCase,case}
or
currentFCStddir/MyProjectname/{meshCase,case}
if 'Beside .FCStd file' is checked

To my mind, 1) is not a great option since /tmp is supposed to be temporary and not a persistence location. Using what i guess is OP's original suggestion will end up with reams of folders under /tmp which are never cleaned up. Defaulting to $HOME/MyProjectname or something under $HOME/CfdOF/MyProjectname would be better.

/tmp does get cleaned on reboot (on Linux anyway), but you have a point. I suppose this is the reason why the FEM workbench has a third option to manage the storage automatically on /tmp. I guess it probably overwrites the data when in this mode.

Maybe the safest option would be to have another check box to turn on or off the appending of the document name to the path.

Also NB Opening the Preferences pane before a project is opened is going to break the code since there is no ActiveDocument at this stage.

I would not recommend having the document label appear in the preference page. I would just append it to the path when the case is written.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants