Skip to content

Conversation

@dutta-alankar
Copy link
Contributor

Customization feature to choose a directory for dumping of log files

Often having a custom directory for dumping of log files is very useful to have the code files and executable separated from the location of data dumps. In this PR, this can be achieved by specifying log_dir in the Output block of idefix.ini. I remember that PLUTO already has such an option and it was quite helpful to me, personally as it prevented me to from accidentally overwriting the log files. I hope the developers find this a useful feature to have.

I tested with the KHI HD problem. Also sharing the relevant .ini file and the cmake command used is:
cmake $IDEFIX_DIR/ -DIdefix_MPI=ON -DIdefix_HDF5=ON -DCMAKE_CXX_FLAGS="-DXDMF_DOUBLE"

Contents of idefix.ini

[Grid]
X1-grid    1  0.0  1024  u  4.0
X2-grid    1  0.0  256   u  1.0
X3-grid    1  0.0  1     u  1.0

[TimeIntegrator]
CFL         0.2
tstop       5.0
first_dt    1.e-5
nstages     2

[Hydro]
solver    hllc
csiso     constant  10.0

[Boundary]
X1-beg    periodic
X1-end    periodic
X2-beg    outflow
X2-end    outflow
X3-beg    outflow
X3-end    outflow

[Output]
vtk    0.01
xdmf   0.01
vtk_dir     ./output
xdmf_dir    ./output
log_dir     ./output/Log_Files

@dutta-alankar
Copy link
Contributor Author

This has small changes in global.cpp and global.hpp. Let me know if that is acceptable. Otherwise, I'll think of a smarter way that would only change input.cpp and input.hpp.

@glesur glesur self-assigned this Sep 27, 2024
@glesur glesur added the enhancement New feature or request label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants