working directory setting

About the development of the FEM module/workbench.

Moderator: bernd

fandaL
Posts: 333
Joined: Thu Jul 24, 2014 8:29 am

working directory setting

Postby fandaL » Tue Feb 19, 2019 9:41 am

Is this a small bug or intended behavior?

Open example FemCalculixCantilever3D and before writing inp file select the working directory inside Mechanical analysis (i.e. CalculiXccxTools object). Contrary to my expectations it is written to the working directory defined in Edit – Preferences – FEM.

When using new solver example FemCalculixCantilever3D_newSolver (i.e. solverCalculiX object), it works as expected.

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15860 (Git)
Build type: Release
Branch: master
Hash: 3b708c7f84b0425076b520e1d95627b20fd75fe0
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Czech/CzechRepublic (cs_CZ)
User avatar
bernd
Posts: 8215
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: working directory setting

Postby bernd » Tue Feb 19, 2019 11:57 am

fandaL wrote:
Tue Feb 19, 2019 9:41 am
Is this a small bug or intended behavior?

Open example FemCalculixCantilever3D and before writing inp file select the working directory inside Mechanical analysis (i.e. CalculiXccxTools object). Contrary to my expectations it is written to the working directory defined in Edit – Preferences – FEM.

When using new solver example FemCalculixCantilever3D_newSolver (i.e. solverCalculiX object), it works as expected.

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15860 (Git)
Build type: Release
Branch: master
Hash: 3b708c7f84b0425076b520e1d95627b20fd75fe0
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Czech/CzechRepublic (cs_CZ)
it is not a bug it is a feature :mrgreen: The idea is to use an own working dir, no matter what directory is set in the analyis solver object. Thie is quite important for debugging ... Before this feature my linux machine started to have C:/ path names when opening files from others :shock: If you would like to use the solver setting just do not activate the working dir in preferences.

To be honest I am not happy with this setting at all. Thus in the solver framework solver it is not possible to set the directory in the solver object.
fandaL
Posts: 333
Joined: Thu Jul 24, 2014 8:29 am

Re: working directory setting

Postby fandaL » Tue Feb 19, 2019 1:30 pm

Ok.

If I understand it correctly working directory setting (in the figure) has no effect if it is already defined in preferences. For me it was confusing that something “far from eyes” has priority over what I just see on the screen. Would it be worth to inform a user during writing the inp file if this does not match?
setting_working_directory.png
setting_working_directory.png (13.11 KiB) Viewed 370 times
Jee-Bee
Posts: 1940
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: working directory setting

Postby Jee-Bee » Tue Feb 19, 2019 3:47 pm

I would say that if the working directoy isn't set from the solver than it used the one from preferences.

Now it goes about thesolver directory. my preference is set to "Beside FCstd file" but it's never there but always in temp...
User avatar
bernd
Posts: 8215
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: working directory setting

Postby bernd » Tue Feb 19, 2019 4:14 pm

Jee-Bee wrote:
Tue Feb 19, 2019 3:47 pm
I would say that if the working directoy isn't set from the solver than it used the one from preferences.

Now it goes about thesolver directory. my preference is set to "Beside FCstd file" but it's never there but always in temp...
read carefully ... "Working directory general FEM solver frame work" (found a typo in gui :oops: ) and "Working directory ccx tools" solver! It depends which solve you gone use.
User avatar
bernd
Posts: 8215
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: working directory setting

Postby bernd » Tue Feb 19, 2019 4:16 pm

fandaL wrote:
Tue Feb 19, 2019 1:30 pm
If I understand it correctly working directory setting (in the figure) has no effect if it is already defined in preferences.
exactly

fandaL wrote:
Tue Feb 19, 2019 1:30 pm
For me it was confusing that something “far from eyes” has priority over what I just see on the screen. Would it be worth to inform a user during writing the inp file if this does not match?
I see your point.
Jee-Bee
Posts: 1940
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: working directory setting

Postby Jee-Bee » Tue Feb 19, 2019 7:37 pm

bernd wrote:
Tue Feb 19, 2019 4:14 pm
read carefully ... "Working directory general FEM solver frame work" (found a typo in gui :oops: ) and "Working directory ccx tools" solver! It depends which solve you gone use.
fandaL start the first post about a specified path in the FEM general settings tab
If it is "general FEM solver frame work" i assume that ALL solvers work with this system otherwise is it not general.
If the best place is the general tab but it is not general i expect a restriction.
  • Let FreeCAD manage (create, delete) the working directories for ALL solver. Use temporary directories.
  • Create a directory in the same folder in which the FCStd file of the documentis located. Use subfolder for EACH solver. ...
  • Use directory set below. create own subfolder for EVERY solver. ...
There is in the text no restriction at all.
ps. It's a bit weird that the words all, each and every are used trough each other...
User avatar
bernd
Posts: 8215
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: working directory setting

Postby bernd » Tue Feb 19, 2019 9:08 pm

there are two totally different systems, the ccx tools dolver and all solvers from the solver frame work.

I try to make this more clear for the user.
User avatar
bernd
Posts: 8215
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: working directory setting

Postby bernd » Tue Feb 26, 2019 7:04 am