Giter Club home page Giter Club logo

Comments (5)

MakisH avatar MakisH commented on June 12, 2024

It looks like Code_Aster uses a subdirectory of /tmp/ as a working directory.

In solid.export, I see the following:

P proxy_dir /tmp
P rep_trav /tmp/tester-tester-VirtualBox-interactif_6834

@micheltakken any idea how to change this? (i.e. without modifying this file, but maybe through ASTK)

from code_aster-adapter.

MakisH avatar MakisH commented on June 12, 2024

I cannot find any way to set a different rep_trav without changing this file, but if I set it to the working directory, it looks like it is working in the beginning, but at the end of the simulation, it deletes the complete directory. Therefore, let's not do this.

P rep_trav /home/tester/tutorials-CA_OpenFOAM/CHT/flow-over-plate/buoyantSimpleFoam-aster

The effort for fixing this seems to overcome the benefit at the moment.

from code_aster-adapter.

micheltakken avatar micheltakken commented on June 12, 2024

I cannot find any way to set a different rep_trav without changing this file, but if I set it to the working directory, it looks like it is working in the beginning, but at the end of the simulation, it deletes the complete directory. Therefore, let's not do this.

P rep_trav /home/tester/tutorials-CA_OpenFOAM/CHT/flow-over-plate/buoyantSimpleFoam-aster

The effort for fixing this seems to overcome the benefit at the moment.

I came across this solution on the Code_Aster forum. It might be worth it to try setting rep_trav in both the export file, and in ~/etc/codeaster/asrun (For me, however, changing rep_trav in the export file, crashes the Solid solver in the very beginning).
On the post redirects to a file ~/.astkrc/config, which doesn't exist on my Code_Aster installation, so it even seems to be an outdated solution.
In the end I agree that it's better to just set an absolute path in the preCICE config file, as the means defy the goal to use less absolute paths at this point.

from code_aster-adapter.

MakisH avatar MakisH commented on June 12, 2024

Then I have another (a little bit crazy) idea.

Facts:

  • The adapter finds precice-config.xml, which is located in the same directory as precice-run/
  • We only need the adapter to know where precice-run/ is, we don't want to affect what Code_Aster does.

Idea:
We could ask the adapter to create a symbolic link from e.g. /tmp/my-simulation/precice-run/ to /path/to/precice-config/precice-run/.

We already know where precice-config.xml is (e.g. /path/to/config), so we can use os.symlink to create a link, e.g. (check):

os.symlink("/path/to/config/"+"precice-run", "precice-run", True, *, None)

If we directly have the file path and we need the folder path, we can split it. Maybe we need to define a code_aster file unit somewhere.

Furthermore, we should give the user the option to still specify a custom exchange-directory, so we could have an option to set this on or off (in config.comm).

@micheltakken what do you think?

from code_aster-adapter.

MakisH avatar MakisH commented on June 12, 2024

On the post redirects to a file ~/.astkrc/config, which doesn't exist on my Code_Aster installation, so it even seems to be an outdated solution.

It is common that such .[something]rc files don't exist by default, as they are optional files where the user can define some user-specific options. See, e.g. .bashrc, .gitconfig, etc.

from code_aster-adapter.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.