PB3D  [2.45]
Ideal linear high-n MHD stability in 3-D
Public Member Functions | List of all members
output_ops::plot_hdf5 Interface Reference

Prints variables vars with names var_names in an HDF5 file with name c file_name and accompanying XDMF file. More...

Public Member Functions

subroutine plot_hdf5_ind (var_name, file_name, var, tot_dim, loc_offset, X, Y, Z, cont_plot, descr)
 individual version More...
 
subroutine plot_hdf5_arr (var_names, file_name, vars, tot_dim, loc_offset, X, Y, Z, col_id, col, sym_type, cont_plot, descr)
 array version More...
 

Detailed Description

Prints variables vars with names var_names in an HDF5 file with name c file_name and accompanying XDMF file.

For XDMF collections ([18]), only the first value for var_names is used, so it should have a size of one.

The plot is generally 3-D, but if one of the dimensions provided is equal to 1, it is checked whether there is poloidal or toroidal axisymmetry and if so, the plot becomes 2-D. This can be forced using the optional input argument sym_type.

Optionally, the (curvilinear) grid can be provided through X, Y and Z. If not, the grid is assumed to be Cartesian with discrete indices where X corresponds to the first dimensions, Y to the second and Z to the third.

Additionally, the total grid size and local offset can be provided in tot_dim and loc_offset to run this routine in parallel automatically. Optionally, one of the dimensions (col_id, default 4) can be associated to a collection dimension using col different from 1:

Furthermore, using the variable cont_plot, a plot can be (over-)written in multiple writes. By this is meant that there should be an initial plot, with collection type 1, 2, 3 or 4, which can then be followed by an arbitrary number of additional writes. As these additional writes currently cannot modify the plot structure, nor the XDMF variables, their collection dimension should be complete from the start.

This has no implications for single plots but means that for collection types 2 to 4 all the elements in the collection have to be present, though they do not necessary need to have been completely written in the other dimensions.

Subsequent writes with cont_plot can then, for instance, write parts of the data that had not yet been written, or overwrite ones that had. This can be useful for post-processing where the memory requirements are large so that the work has to be split.

Note
  1. For a vector field, the number of variables has to be 2 for 2-D plots or 3 for 3-D plots. This should be rewritten in the future, so that collections can be used for vectors as well.
  2. In order to merge collections in their collection dimension, the XDMF files can always easily be joined.
  3. If necessary, a lock system should be used when multiple processes are writing the same file, including continued writes.
  4. To plot this with VisIt, use:
    • for temporal collections: pseudocolor using the variable name (other names are ignored).
    • for spatial collections: subset of blocks or pseudocolor using the variable name (other names are ignored).
    • for vector plot: Vector plot.
    • for without collections: pseudocolor using the variable names.
  5. Currently all of possibly multiple processes that write data have to cover the entire range of the variables in the dimension indicated by col_id. (This could be implemented by changing how n_plot is defined and selectively letting each processer write in the main loop at its corresponding indices.)
  6. To project the data to 2-D in VisIt, use the projection tool under Operators > Transform

Definition at line 137 of file output_ops.f90.

Member Function/Subroutine Documentation

◆ plot_hdf5_arr()

subroutine output_ops::plot_hdf5::plot_hdf5_arr ( character(len=*), dimension(:), intent(in)  var_names,
character(len=*), intent(in)  file_name,
real(dp), dimension(:,:,:,:), intent(in), target  vars,
integer, dimension(4), intent(in), optional  tot_dim,
integer, dimension(4), intent(in), optional  loc_offset,
real(dp), dimension(:,:,:,:), intent(in), optional, target  X,
real(dp), dimension(:,:,:,:), intent(in), optional, target  Y,
real(dp), dimension(:,:,:,:), intent(in), optional, target  Z,
integer, intent(in), optional  col_id,
integer, intent(in), optional  col,
integer, intent(in), optional  sym_type,
logical, intent(in), optional  cont_plot,
character(len=*), intent(in), optional  descr 
)

array version

Parameters
[in]var_namesnames of variable to be plot
[in]file_namefile name
[in]varsvariables to plot
[in]tot_dimtotal dimensions of the arrays
[in]loc_offsetoffset of local dimensions
[in]xcurvilinear grid X points
[in]ycurvilinear grid Y points
[in]zcurvilinear grid Z points
[in]col_idindex of time dimension
[in]colwhether a collection is made
[in]sym_typetype of symmetry (1: no symmetry, 2: toroidal, 3: poloidal)
[in]cont_plotcontinued plot
[in]descrdescription

Definition at line 435 of file output_ops.f90.

+ Here is the call graph for this function:

◆ plot_hdf5_ind()

subroutine output_ops::plot_hdf5::plot_hdf5_ind ( character(len=*), intent(in)  var_name,
character(len=*), intent(in)  file_name,
real(dp), dimension(:,:,:), intent(in)  var,
integer, dimension(3), intent(in), optional  tot_dim,
integer, dimension(3), intent(in), optional  loc_offset,
real(dp), dimension(:,:,:), intent(in), optional, target  X,
real(dp), dimension(:,:,:), intent(in), optional, target  Y,
real(dp), dimension(:,:,:), intent(in), optional, target  Z,
logical, intent(in), optional  cont_plot,
character(len=*), intent(in), optional  descr 
)

individual version

Parameters
[in]var_namename of variable to be plot
[in]file_namefile name
[in]varvariable to plot
[in]tot_dimtotal dimensions of the arrays
[in]loc_offsetoffset of local dimensions
[in]xcurvilinear grid X points
[in]ycurvilinear grid Y points
[in]zcurvilinear grid Z points
[in]cont_plotcontinued plot
[in]descrdescription

Definition at line 949 of file output_ops.f90.


The documentation for this interface was generated from the following file: