MPI-AMRVAC
3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code
|
Module for reading input and writing output. More...
Functions/Subroutines | |
subroutine | read_arguments () |
Read the command line arguments passed to amrvac. More... | |
subroutine | read_par_files () |
Read in the user-supplied parameter-file. More... | |
subroutine | get_fields_string (line, delims, n_max, fields, n_found, fully_read) |
Routine to find entries in a string. More... | |
subroutine | saveamrfile (ifile) |
logical function | snapshot_exists (ix) |
integer function | get_snapshot_index (filename) |
subroutine, public | snapshot_write_header (fh, offset_tree, offset_block) |
Write header for a snapshot. More... | |
subroutine | snapshot_read_header (fh, offset_tree, offset_block) |
Read header for a snapshot. More... | |
subroutine | write_snapshot |
subroutine | read_snapshot |
Routine to read in snapshots (.dat files). When it cannot recognize the file version, it will automatically try the 'old' reader. More... | |
subroutine | read_snapshot_old () |
subroutine | printlog_default |
Write volume-averaged values and other information to the log file. More... | |
subroutine | printlog_regression_test () |
Print a log that can be used to check whether the code still produces the same output (regression test) More... | |
subroutine | get_volume_average (power, mode, volume) |
Compute mean(w**power) over the leaves of the grid. The first mode (power=1) corresponds to the mean, the second to the mean squared values and so on. More... | |
subroutine | get_volume_coverage (vol_cov) |
Compute how much of the domain is covered by each grid level. This routine does not take a non-Cartesian geometry into account. More... | |
subroutine | get_volume_average_func (func, f_avg, volume) |
Compute the volume average of func(w) over the leaves of the grid. More... | |
subroutine | get_global_maxima (wmax) |
Compute global maxima of iw variables over the leaves of the grid. More... | |
subroutine | get_global_minima (wmin) |
Compute global minima of iw variables over the leaves of the grid. More... | |
Variables | |
integer, dimension(3), parameter | compatible_versions = [3, 4, 5] |
List of compatible versions. More... | |
integer | nw_found |
number of w found in dat files More... | |
character(len= *), parameter | fmt_r = 'es16.8' |
character(len= *), parameter | fmt_r2 = 'es10.2' |
character(len= *), parameter | fmt_i = 'i8' |
Module for reading input and writing output.
subroutine mod_input_output::get_fields_string | ( | character(len=*), intent(in) | line, |
character(len=*), intent(in) | delims, | ||
integer, intent(in) | n_max, | ||
character(len=*), dimension(n_max), intent(inout) | fields, | ||
integer, intent(inout) | n_found, | ||
logical, intent(out), optional | fully_read | ||
) |
Routine to find entries in a string.
[in] | line | The line from which we want to read |
[in] | delims | A string with delimiters. For example delims = " ,'"""//char(9) |
[in] | n_max | Maximum number of entries to read in |
[in,out] | n_found | Number of entries found |
[in,out] | fields | Fields in the strings |
Definition at line 1671 of file mod_input_output.t.
subroutine mod_input_output::get_global_maxima | ( | double precision, dimension(nw), intent(out) | wmax | ) |
Compute global maxima of iw variables over the leaves of the grid.
[out] | wmax | The global maxima |
Definition at line 2788 of file mod_input_output.t.
subroutine mod_input_output::get_global_minima | ( | double precision, dimension(nw), intent(out) | wmin | ) |
Compute global minima of iw variables over the leaves of the grid.
[out] | wmin | The global maxima |
Definition at line 2815 of file mod_input_output.t.
integer function mod_input_output::get_snapshot_index | ( | character(len=*), intent(in) | filename | ) |
Definition at line 1784 of file mod_input_output.t.
subroutine mod_input_output::get_volume_average | ( | integer, intent(in) | power, |
double precision, dimension(nw), intent(out) | mode, | ||
double precision, intent(out) | volume | ||
) |
Compute mean(w**power) over the leaves of the grid. The first mode (power=1) corresponds to the mean, the second to the mean squared values and so on.
[in] | power | Which mode to compute |
[out] | mode | The computed mode |
[out] | volume | The total grid volume |
Definition at line 2681 of file mod_input_output.t.
subroutine mod_input_output::get_volume_average_func | ( | func, | |
double precision, intent(out) | f_avg, | ||
double precision, intent(out) | volume | ||
) |
Compute the volume average of func(w) over the leaves of the grid.
[out] | f_avg | The volume average of func |
[out] | volume | The total grid volume |
Definition at line 2745 of file mod_input_output.t.
subroutine mod_input_output::get_volume_coverage | ( | double precision, dimension(1:refine_max_level), intent(out) | vol_cov | ) |
Compute how much of the domain is covered by each grid level. This routine does not take a non-Cartesian geometry into account.
Definition at line 2719 of file mod_input_output.t.
subroutine mod_input_output::printlog_default |
Write volume-averaged values and other information to the log file.
Definition at line 2509 of file mod_input_output.t.
subroutine mod_input_output::printlog_regression_test |
Print a log that can be used to check whether the code still produces the same output (regression test)
Definition at line 2640 of file mod_input_output.t.
subroutine mod_input_output::read_arguments |
Read the command line arguments passed to amrvac.
Definition at line 36 of file mod_input_output.t.
subroutine mod_input_output::read_par_files |
Read in the user-supplied parameter-file.
How to apply dimensional splitting to the source terms, see Discretization
Which flux scheme of spatial discretization to use (per grid level)
Which type of the maximal bound speed of Riemann fan to use
Which time stepper to use
Which time integrator to use
type of curl operator
Limiter used for prolongation to refined grids and ghost cells
How to compute the CFL-limited time step. Options are 'maxsum': max(sum(c/dx)); 'summax': sum(max(c/dx)) and 'minimum: max(c/dx), where the summations loop over the grid dimensions and c is the velocity. The default 'maxsum' is the conventiontal way of computing CFL-limited time steps.
Definition at line 175 of file mod_input_output.t.
subroutine mod_input_output::read_snapshot |
Routine to read in snapshots (.dat files). When it cannot recognize the file version, it will automatically try the 'old' reader.
Definition at line 2162 of file mod_input_output.t.
subroutine mod_input_output::read_snapshot_old |
subroutine mod_input_output::saveamrfile | ( | integer | ifile | ) |
logical function mod_input_output::snapshot_exists | ( | integer, intent(in) | ix | ) |
[in] | ix | Index of snapshot |
Definition at line 1775 of file mod_input_output.t.
subroutine mod_input_output::snapshot_read_header | ( | integer, intent(in) | fh, |
integer(mpi_offset_kind), intent(out) | offset_tree, | ||
integer(mpi_offset_kind), intent(out) | offset_block | ||
) |
Read header for a snapshot.
If you edit the header, don't forget to update: snapshot_write_header(), snapshot_read_header(), doc/fileformat.md, tools/python/dat_reader.py
[in] | fh | File handle |
[out] | offset_tree | Offset of tree info |
[out] | offset_block | Offset of block data |
Definition at line 1815 of file mod_input_output.t.
subroutine, public mod_input_output::snapshot_write_header | ( | integer, intent(in) | fh, |
integer(kind=mpi_offset_kind), intent(in) | offset_tree, | ||
integer(kind=mpi_offset_kind), intent(in) | offset_block | ||
) |
Write header for a snapshot.
If you edit the header, don't forget to update: snapshot_write_header(), snapshot_read_header(), doc/fileformat.md, tools/python/dat_reader.py
[in] | fh | File handle |
[in] | offset_tree | Offset of tree info |
[in] | offset_block | Offset of block data |
Definition at line 1799 of file mod_input_output.t.
subroutine mod_input_output::write_snapshot |
integer, dimension(3), parameter mod_input_output::compatible_versions = [3, 4, 5] |
List of compatible versions.
Definition at line 10 of file mod_input_output.t.
character(len=*), parameter mod_input_output::fmt_i = 'i8' |
Definition at line 28 of file mod_input_output.t.
character(len=*), parameter mod_input_output::fmt_r = 'es16.8' |
Definition at line 26 of file mod_input_output.t.
character(len=*), parameter mod_input_output::fmt_r2 = 'es10.2' |
Definition at line 27 of file mod_input_output.t.
integer mod_input_output::nw_found |
number of w found in dat files
Definition at line 13 of file mod_input_output.t.