pyccx icon indicating copy to clipboard operation
pyccx copied to clipboard

Simulation.results does not take into account working directory

Open FranseFrikandel opened this issue 2 years ago • 1 comments

It appears that in the Simulation class (pyccx/analysis/analysis.py), the working directory that was set on object creation is not taken into account when trying to retrieve the results using the results() function. This causes a file not found error when trying to retrieve the results of an analysis when the working directory is not the same as the directory the python script was executed from.

Changing line 500 from: return ResultProcessor('input') To: return ResultProcessor(os.path.join(self._workingDirectory, 'input'))

Appears to resolve this issue.

FranseFrikandel avatar Sep 02 '23 12:09 FranseFrikandel

Thank you for the suggestion. Yes, I agree with the issue and will incorporate this in the future.

I would like to also consider using input decks (.inp) with time information to ensure that the simulation runs are unique.

drlukeparry avatar Sep 02 '23 16:09 drlukeparry