- 04 May, 2017 1 commit
-
-
David Deepwell authored
Diagnostic values (like total KE/ total enstrophy/ mass/ etc) are often desired outputs at each time-step. These values are easily printed to a txt file using two functions: add_diagnostic and write_diagnostics. add_diagnostic adds the name and value of a diagnostic into a pair of strings which will be written into diagnostics.txt which the function write_diagnostics. Usage of add_diagnostic is as follows: add_diagnostic(name, value, header, line); This will add the string, 'name', onto the string, 'header', which will be the header of the diagnostics.txt file. The double (or int), 'value', will be added onto the string, 'line', which will be a row (or line) in the diagnostics.txt file. write_diagnostics will write these lines (header and line) into diagnostics.txt.
-
- 04 Feb, 2017 3 commits
-
-
David Deepwell authored
The empty shell of check_timestep in BaseCase has been filled with what was essentially the same thing in each case file. Again, this is just more case file house cleaning. A few ancillary functions have also been written to help. The most important might be get_dt_max() which returns dt_max. dt_max can either be specified in spins.conf or defined in the case file based on the buoyancy frequency. Currently, if dt_max > 0 and in spins.conf, then that value is used. Otherwise, 0.5/sqrt(N2_max) is used. The re-definition of check_timestep in each case file can now be removed so long as the associated ancillary functions and parameters are included.
-
David Deepwell authored
The generic code block to check the restart sequence is not needed in the case file and has been moved into Options.cpp. This streamlines the case file and makes a single copy for all other case files to use.
-
David Deepwell authored
The re-definition of get_restart_sequence() was missing in gravity_current.cpp. This resulted in all restarts to read output zero (*.0). Restarting will now properly read the output number specified by restart_sequence.
-
- 27 Jan, 2017 2 commits
-
-
David Deepwell authored
gravity_current.cpp accepts filter parameters (f_cutoff, f_order, f_strength) as optional input arguments. Easy adjustment of the filter is useful when the flow become suddenly becomes too chaotic.
-
David Deepwell authored
Parsing of expansion types in gravity_current.cpp moved to Options.cpp. This is a general procedure that other case files will and should make use of. It also simplifies the case file to the specific set-up of that case.
-
- 24 Jan, 2017 2 commits
-
-
David Deepwell authored
Moved the section of gravity_current.cpp regarding the adjustment of temporal values (restarting, initial_time, etc.) when restarting from dump into Options.cpp as it is a standard piece of code and should be in a centralized location.
-
Christopher Subich authored
The gravity_current case was located in a subdirectory, but its #include directives had only one ".." in the path. This updates those directive to properly refer to the grandparent subdirectory (src/), allowing the case to be built as: make -j# cases/gravity_current/gravity_current.x
-
- 16 Jan, 2017 1 commit
-
-
David Deepwell authored
This case file is restartable and will dump all variables at the end of the requested computation time (stated in spins.conf) when run on SCINET or SHARCNET. The spins.conf enables the quick set-up of a parameter sweep as parameters are set within it and not within the case file which would need to be re-compiled. This file will be used as a basis for the upcoming additions and changes to BaseCase.cpp and Science.cpp.
-