Added and option to include an output folder name. The date and time of
creation is still appended to the folder name provided.
This commit is contained in:
parent
4fb1940085
commit
2a6628d529
9 changed files with 33 additions and 11 deletions
Binary file not shown.
|
|
@ -284,7 +284,7 @@ make
|
|||
in a command line from the root \acrshort{fpakc} folder.
|
||||
Substitute \lstinline|path/to/input-file.json| with the path to the input file of the case you want to run.
|
||||
The examples in the run directory are presented in Chapter \ref{ch:exampleRuns}.
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\chapter{Input File}\label{ch:input_file}
|
||||
The input files for \Gls{fpakc} is divided between to files: a mesh file and a case file.
|
||||
|
|
@ -309,6 +309,10 @@ make
|
|||
\begin{itemize}
|
||||
\item \textbf{path}: Character.
|
||||
Path for the output files. This path is also used to locate the mesh input file.
|
||||
\item \textbf{folder}: Character.
|
||||
Base name of the folder in wich output files are placed.
|
||||
The date and time is appended to this name.
|
||||
If none is provided, only the date and time is writted as the folder name.
|
||||
\item \textbf{triggerOutput}: Integer.
|
||||
Determines the number of iterations between writing output files for macroscopic quantities.
|
||||
\item \textbf{cpuTime}: Logical.
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
"triggerOutput": 100,
|
||||
"cpuTime": false,
|
||||
"numColl": false,
|
||||
"EMField": true
|
||||
"EMField": true,
|
||||
"folder": "Cartesian"
|
||||
},
|
||||
"reference": {
|
||||
"density": 1.0e16,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
"triggerOutput": 100,
|
||||
"cpuTime": false,
|
||||
"numColl": false,
|
||||
"EMField": true
|
||||
"EMField": true,
|
||||
"folder": "Radial"
|
||||
},
|
||||
"reference": {
|
||||
"density": 1.0e16,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
"triggerCPUTime": 1,
|
||||
"cpuTime": true,
|
||||
"numColl": false,
|
||||
"EMField": true
|
||||
"EMField": true,
|
||||
"folder": "Diff_tau"
|
||||
},
|
||||
"geometry": {
|
||||
"type": "2DCyl",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
"triggerCPUTime": 1,
|
||||
"cpuTime": true,
|
||||
"numColl": false,
|
||||
"EMField": true
|
||||
"EMField": true,
|
||||
"folder": "Same_tau"
|
||||
},
|
||||
"geometry": {
|
||||
"type": "2DCyl",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
"path": "./runs/Argon_Expansion/",
|
||||
"triggerOutput": 10,
|
||||
"cpuTime": false,
|
||||
"numColl": true
|
||||
"numColl": true,
|
||||
"folder": "CX_case"
|
||||
},
|
||||
"geometry": {
|
||||
"type": "2DCyl",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
"path": "./runs/Argon_Expansion/",
|
||||
"triggerOutput": 10,
|
||||
"cpuTime": false,
|
||||
"numColl": false
|
||||
"numColl": false,
|
||||
"folder": "base_case"
|
||||
},
|
||||
"geometry": {
|
||||
"type": "2DCyl",
|
||||
|
|
|
|||
|
|
@ -347,6 +347,7 @@ MODULE moduleInput
|
|||
TYPE(json_file), INTENT(inout):: config
|
||||
LOGICAL:: found
|
||||
CHARACTER(:), ALLOCATABLE:: object
|
||||
CHARACTER(:), ALLOCATABLE:: baseName
|
||||
CHARACTER(8) :: date_now=''
|
||||
CHARACTER(10) :: time_now=''
|
||||
|
||||
|
|
@ -359,11 +360,22 @@ MODULE moduleInput
|
|||
|
||||
END IF
|
||||
|
||||
!Creates output folder
|
||||
!TODO: Add option for custon name output_folder
|
||||
!Gets actual date and time
|
||||
CALL DATE_AND_TIME(date_now, time_now)
|
||||
folder = date_now(1:4) // '-' // date_now(5:6) // '-' // date_now(7:8) // '_' &
|
||||
// time_now(1:2) // '.' // time_now(3:4) // '.' // time_now(5:6)
|
||||
|
||||
!Gets the basename of the folder
|
||||
CALL config%get(object // '.folder', baseName, found)
|
||||
PRINT *, baseName
|
||||
IF (found) THEN
|
||||
folder = baseName
|
||||
|
||||
END IF
|
||||
|
||||
!Compose the folder name
|
||||
folder = folder // '_' // date_now(1:4) // '-' // date_now(5:6) // '-' // date_now(7:8) // '_' &
|
||||
// time_now(1:2) // '.' // time_now(3:4) // '.' // time_now(5:6)
|
||||
|
||||
!Creates the folder
|
||||
CALL EXECUTE_COMMAND_LINE('mkdir ' // path // folder )
|
||||
|
||||
CALL config%get(object // '.cpuTime', timeOutput, found)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue