Alamo
src
IO
FileNameParse.H
Go to the documentation of this file.
1
//
2
// This manages the processing of the :code:`plot_file` input, which defines the output file.
3
// Both variable substitution and time wildcards are supported.
4
//
5
// **Variable substitution**: you can use braces to substitute variable names in the input file.
6
// For example, if your input file contains :code:`myinput.value = 3`, then you can specify
7
// :code:`plot_file = output_{myinput.value}` to substitute the input's value.
8
//
9
// **Time and dimension wildcards**: You can use the following strings:
10
//
11
// - :code:`%Y`: 4-digit year
12
// - :code:`%m`: 2-digit month (01-12)
13
// - :code:`%d`: 2-digit day (00-31)
14
// - :code:`%H`: 2 digit hour (00-23)
15
// - :code:`%M`: 2 digit minute (00-59)
16
// - :code:`%S`: 2 digit second (00-59)
17
// - :code:`%f`: 2 digit microsecond (00-59)
18
// - :code:`%D`: spatial dimension
19
//
20
// So a :code:`plot_file = output_%Y%m%d_%H%M%S` may resolve to
21
// :code:`output_20250307_211201` (etc) depending on the time the
22
// output was created.
23
24
#ifndef IO_FILENAMEPARSE_H
25
#define IO_FILENAMEPARSE_H
26
27
#include <string>
28
29
30
namespace
IO
31
{
32
33
void
FileNameParse
(std::string &filename);
34
35
}
36
37
#endif
IO
Definition
FileNameParse.H:31
IO::FileNameParse
void FileNameParse(std::string &filename)
Internal function to do processing of the file name.
Definition
FileNameParse.cpp:12
Generated by
1.9.8