diff --git a/doc/user-manual/fpakc_UserManual.pdf b/doc/user-manual/fpakc_UserManual.pdf index 0e70306..e4bd94e 100644 Binary files a/doc/user-manual/fpakc_UserManual.pdf and b/doc/user-manual/fpakc_UserManual.pdf differ diff --git a/doc/user-manual/fpakc_UserManual.tex b/doc/user-manual/fpakc_UserManual.tex index ac366ed..567e1f5 100644 --- a/doc/user-manual/fpakc_UserManual.tex +++ b/doc/user-manual/fpakc_UserManual.tex @@ -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. diff --git a/runs/1D_Cathode/inputCart.json b/runs/1D_Cathode/inputCart.json index 95c5e52..5d04eb2 100644 --- a/runs/1D_Cathode/inputCart.json +++ b/runs/1D_Cathode/inputCart.json @@ -5,7 +5,8 @@ "triggerOutput": 100, "cpuTime": false, "numColl": false, - "EMField": true + "EMField": true, + "folder": "Cartesian" }, "reference": { "density": 1.0e16, diff --git a/runs/1D_Cathode/inputRad.json b/runs/1D_Cathode/inputRad.json index 95b53a9..32518e5 100644 --- a/runs/1D_Cathode/inputRad.json +++ b/runs/1D_Cathode/inputRad.json @@ -5,7 +5,8 @@ "triggerOutput": 100, "cpuTime": false, "numColl": false, - "EMField": true + "EMField": true, + "folder": "Radial" }, "reference": { "density": 1.0e16, diff --git a/runs/ALPHIE_Grid/inputDiffTau.json b/runs/ALPHIE_Grid/inputDiffTau.json index 020c303..1ce7035 100644 --- a/runs/ALPHIE_Grid/inputDiffTau.json +++ b/runs/ALPHIE_Grid/inputDiffTau.json @@ -5,7 +5,8 @@ "triggerCPUTime": 1, "cpuTime": true, "numColl": false, - "EMField": true + "EMField": true, + "folder": "Diff_tau" }, "geometry": { "type": "2DCyl", diff --git a/runs/ALPHIE_Grid/inputSameTau.json b/runs/ALPHIE_Grid/inputSameTau.json index e92d299..74e920a 100644 --- a/runs/ALPHIE_Grid/inputSameTau.json +++ b/runs/ALPHIE_Grid/inputSameTau.json @@ -5,7 +5,8 @@ "triggerCPUTime": 1, "cpuTime": true, "numColl": false, - "EMField": true + "EMField": true, + "folder": "Same_tau" }, "geometry": { "type": "2DCyl", diff --git a/runs/Argon_Expansion/CX_case.json b/runs/Argon_Expansion/CX_case.json index 2b1f2f2..d2d89db 100644 --- a/runs/Argon_Expansion/CX_case.json +++ b/runs/Argon_Expansion/CX_case.json @@ -3,7 +3,8 @@ "path": "./runs/Argon_Expansion/", "triggerOutput": 10, "cpuTime": false, - "numColl": true + "numColl": true, + "folder": "CX_case" }, "geometry": { "type": "2DCyl", diff --git a/runs/Argon_Expansion/base_case.json b/runs/Argon_Expansion/base_case.json index 78e16ed..8cc7238 100644 --- a/runs/Argon_Expansion/base_case.json +++ b/runs/Argon_Expansion/base_case.json @@ -3,7 +3,8 @@ "path": "./runs/Argon_Expansion/", "triggerOutput": 10, "cpuTime": false, - "numColl": false + "numColl": false, + "folder": "base_case" }, "geometry": { "type": "2DCyl", diff --git a/src/modules/moduleInput.f90 b/src/modules/moduleInput.f90 index 82694cd..2a6e334 100644 --- a/src/modules/moduleInput.f90 +++ b/src/modules/moduleInput.f90 @@ -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)