pyfsi / coconut

Coupling Code for Numerical Tools. The documentation can be found at
https://pyfsi.github.io/coconut/
GNU General Public License v3.0
29 stars 4 forks source link

Run individual solver wrappers tests from their files #100

Closed nicolasdlss closed 2 years ago

nicolasdlss commented 3 years ago

Currently, it is not possible to run an individual solver wrapper tests (for Fluent and Abaqus) from the file itself, because the paths are configured to run from the tests directory. Nonetheless, this would be a nice option. By modifying some paths this will be possible.

These Python commands are useful in that regard: os.path.dirname(__file__) this method returns a string value which represents the directory name from the specified path os.path.realpath() eliminating any symbolic links encountered in the path os.getcwd() this method returns current working directory of a process

Alternatively, this command can be used os.chdir(tmp_example_path) to change the path from where the files are run (similar to cd in the terminal).

nicolasdlss commented 3 years ago

Is already possible for all 'fast' tests (all tests except Fluent, Abaqus, OpenFOAM and Kratos). Can be done by doing the setup and changing the working directory path similar to the Python solver wrappers.

nicolasdlss commented 3 years ago

Has been done for the Fluent tests.

navaneethkn commented 3 years ago

@nicolasdlss kratos and openfoam tests have this capability.

nicolasdlss commented 3 years ago

I see that you can indeed run them from their folder. But, I was also talking about using the green arrows in PyCharm or running the file from anywhere. It's not a necessary feature and not at all urgent, but its also not that much work. I just thought it would be nice (as is now the case for Fluent and the Pycharm solvers), but we can discuss this later.

nicolasdlss commented 3 years ago

Has been done for the OpenFOAM tests (#123 ).

nicolasdlss commented 2 years ago

Closed by #181