CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   runTime.write and making directories (https://www.cfd-online.com/Forums/openfoam-programming-development/216894-runtime-write-making-directories.html)

arsimons April 23, 2019 11:13

runTime.write and making directories
 
Hi all


I am trying to let a solver make a new folder in the case. However, OpenFOAM does not know mkdir. How should this be done?


Furthermore, I tried to find this in a solver since every solver creates new folders for new time steps. I think that the creation of a new folder either happens with runTime++ or with runTime.write. However, I cannot find the code of runTime.write. I found that runTime is defined in createTimes.H and that it is an object of the Time-class (FOAM::Time), but this class does not contain a function write?


Thanks in advance


Best regards
Arne

t.teschner April 23, 2019 15:54

yeah, inheritance can be a tricky sometimes ... your are write in that runTime is a Time object (within the Foam namespace) but it doesn't have the mwthod write defined itself. But, if inherits from objectRegistry which in turn inherits from regIOobject (which has a method write() defined), see also this post https://www.cfd-online.com/Forums/op...tml#post205530

alexeym April 23, 2019 16:00

Hi,

OpenFOAM is quite capable of mkdir - https://cpp.openfoam.org/v6/classFoa...f345e6fbbec954.


All times are GMT -4. The time now is 17:26.