PB3D
[2.45]
Ideal linear high-n MHD stability in 3-D
|
Operations concerning giving output, on the screen as well as in output files. More...
Interfaces and Types | |
interface | plot_hdf5 |
Prints variables vars with names var_names in an HDF5 file with name c file_name and accompanying XDMF file. More... | |
interface | print_ex_2d |
Print 2-D output on a file. More... | |
interface | print_ex_3d |
Print 3-D output on a file. More... | |
Functions/Subroutines | |
subroutine, public | draw_ex (var_names, draw_name, nplt, draw_dim, plot_on_screen, ex_plot_style, data_name, draw_ops, extra_ops, is_animated, ranges, delay, persistent) |
Use external program to draw a plot. More... | |
subroutine, public | plot_diff_hdf5 (A, B, file_name, tot_dim, loc_offset, descr, output_message) |
Takes two input vectors and plots these as well as the relative and absolute difference in a HDF5 file. More... | |
subroutine | use_execute_command_line (command, exitstat, cmdstat, cmdmsg) |
Executes command line, or displays a message if disabled. More... | |
Operations concerning giving output, on the screen as well as in output files.
subroutine, public output_ops::draw_ex | ( | character(len=*), dimension(:), intent(in) | var_names, |
character(len=*), intent(in) | draw_name, | ||
integer, intent(in) | nplt, | ||
integer, intent(in) | draw_dim, | ||
logical, intent(in) | plot_on_screen, | ||
integer, intent(in), optional | ex_plot_style, | ||
character(len=*), intent(in), optional | data_name, | ||
character(len=*), dimension(:), intent(in), optional | draw_ops, | ||
character(len=*), intent(in), optional | extra_ops, | ||
logical, intent(in), optional | is_animated, | ||
real(dp), dimension(:,:), intent(in), optional | ranges, | ||
integer, intent(in), optional | delay, | ||
logical, intent(in), optional | persistent | ||
) |
Use external program to draw a plot.
The external programs used are determined by ex_plot_style:
ex_plot_style
= 1: Use GnuPlot for 2-D and 3-Dex_plot_style
= 1: Use Bokeh in 2-D and Mayavi in 3-DThe output is saved in a file [draw_name].[ext]
where the extension depends on the plotting style and the dimension, or on the screen, depending on plot_on_screen
.
If not specified otherwise through data_name, it is assumed that the datafile to be plot is situated in [draw_name].dat
.
The title(s) of the plot(s) are provided through var_names
and the number of plots through nplt
. If there are less names than the number of plots, the first one is taken and appended by the plot number.
Furthermore, draw_dim
determines whether the plot is to be 2-D, 3-D or 2-D slices in 3-D.
Also, an optional command extra_ops
can be provided, to provide overal options, as well as draw_ops that specifies the line style for the plots from the file. If less
draw_ops are provided than plots, they will be cycled.
Finally, there is an option to provide animated plots, but is only available in 2-D. Also, for external plot style 1, no on-screen view is possible. Animations can take optional ranges arguments as well as delay.
About
draw_dim:draw_dim
= 1: 2-D plot; should be called with the output of output_ops.print_ex_2d(), nplt
should be correctly set.draw_dim
= 2: 3-D plot; should be called with the output of print_ex_3D. For GNUPlot, nplt
is ignored, but not for Mayavi, as it needs this information to be able to reconstruct 2D arrays for X, Y and Z.draw_dim
= 3: 2-D plot in 3-D slices; should be called with the output of output_ops.print_ex_2d(), nplt
should be correctly set. [in] | var_names | name of variables |
[in] | draw_name | name of drawing |
[in] | nplt | number of plots |
[in] | draw_dim | 1: 2-D, 2: 3-D, 3: decoupled 3-D |
[in] | plot_on_screen | True if on screen, false if in file |
[in] | ex_plot_style | alternative external plot style |
[in] | data_name | name of data file |
[in] | draw_ops | drawing options |
[in] | extra_ops | extra options |
[in] | is_animated | plot is animated |
[in] | ranges | x and y range of animated plot |
[in] | delay | time delay between animated plot frames |
[in] | persistent | keep on-screen plot open |
Definition at line 1079 of file output_ops.f90.
subroutine, public output_ops::plot_diff_hdf5 | ( | real(dp), dimension(:,:,:), intent(in) | A, |
real(dp), dimension(:,:,:), intent(in) | B, | ||
character(len=*), intent(in) | file_name, | ||
integer, dimension(3), intent(in), optional | tot_dim, | ||
integer, dimension(3), intent(in), optional | loc_offset, | ||
character(len=*), intent(in), optional | descr, | ||
logical, intent(in), optional | output_message | ||
) |
Takes two input vectors and plots these as well as the relative and absolute difference in a HDF5 file.
This is similar to a basic version of output_ops.plot_hdf5().
Optionally, an output message can be displayed on screen with the maximum relative and absolute error.
[in] | a | vector A |
[in] | b | vector B |
[in] | file_name | name of plot |
[in] | tot_dim | total dimensions of the arrays |
[in] | loc_offset | offset of local dimensions |
[in] | descr | description |
[in] | output_message | whether to display a message or not |
Definition at line 1765 of file output_ops.f90.
subroutine output_ops::use_execute_command_line | ( | character(len=*), intent(in) | command, |
integer, intent(inout), optional | exitstat, | ||
integer, intent(inout), optional | cmdstat, | ||
character(len=*), intent(inout), optional | cmdmsg | ||
) |
Executes command line, or displays a message if disabled.
It also keeps a log of all shell commands executed.
[in] | command | command to execute |
[in,out] | exitstat | exit status |
[in,out] | cmdstat | command status |
[in,out] | cmdmsg | command message |
Definition at line 1914 of file output_ops.f90.