|
Afivo 0.3
|
This module contains routines for writing output files with Afivo. The Silo format should probably be used for larger files, especially in 3D. More...
Data Types | |
| interface | subr_add_vars |
| interface | subr_other_data |
Functions/Subroutines | |
| subroutine, public | af_write_tree (tree, filename, write_other_data) |
| Write full tree in binary format. More... | |
| subroutine, public | af_read_tree (tree, filename, read_other_data) |
| Read full tree in binary format. More... | |
| subroutine, public | af_tree_copy_variable (tree_from, ivs_from, tree_to, ivs_to) |
| subroutine, public | af_write_line (tree, filename, ivs, r_min, r_max, n_points) |
| Write line data in a text file. More... | |
| subroutine, public | af_write_plane (tree, filename, ivs, r_min, r_max, n_pixels) |
| Write data in a plane (2D) to a VTK ASCII file. In 3D, r_min and r_max should have one identical coordinate (i.e., they differ in two coordinates). More... | |
| subroutine, public | af_write_vtk (tree, filename, n_cycle, time, ixs_cc, add_vars, add_names) |
| Write the cell centered data of a tree to a vtk unstructured file. Only the leaves of the tree are used. More... | |
| subroutine, public | af_write_numpy (tree, filename, r_min, r_max, n_points, n_cycle, time, ixs_cc) |
| Write uniform data interpolated from a region to a .npy or .npz numpy file. The format is determined based on the extension of filename. More... | |
| subroutine, public | af_write_silo (tree, filename, n_cycle, time, ixs_cc, add_vars, add_names, max_lvl) |
| Note: a 1D version is present below, and seems to work, but its output cannot be visualized by Visit. That's why we use curve output for 1D cases. More... | |
| subroutine, public | af_write_silo (tree, filename, n_cycle, time, ixs_cc, add_vars, add_names, add_curve_names, add_curve_dat, max_lvl) |
| Write the cell centered data of a tree to a Silo file. Only the leaves of the tree are used. More... | |
| subroutine | get_output_vars (tree, ix_out) |
Variables | |
| integer, parameter | af_dat_file_version = 3 |
This module contains routines for writing output files with Afivo. The Silo format should probably be used for larger files, especially in 3D.
| subroutine, public m_af_output::af_write_tree | ( | type(af_t), intent(in) | tree, |
| character(len=*), intent(in) | filename, | ||
| procedure(subr_other_data), optional | write_other_data | ||
| ) |
Write full tree in binary format.
| [in] | tree | Tree to write out |
| [in] | filename | Filename for the output |
Definition at line 41 of file m_af_output.f90.
| subroutine, public m_af_output::af_read_tree | ( | type(af_t), intent(inout) | tree, |
| character(len=*), intent(in) | filename, | ||
| procedure(subr_other_data), optional | read_other_data | ||
| ) |
Read full tree in binary format.
| [in,out] | tree | Tree to read in |
| [in] | filename | Filename for the input |
Definition at line 197 of file m_af_output.f90.
| subroutine, public m_af_output::af_tree_copy_variable | ( | type(af_t), intent(in) | tree_from, |
| integer, dimension(:), intent(in) | ivs_from, | ||
| type(af_t), intent(inout) | tree_to, | ||
| integer, dimension(:), intent(in) | ivs_to | ||
| ) |
| [in] | tree_from | Copy from this grid |
| [in] | ivs_from | From these variable |
| [in,out] | tree_to | Copy to this grid |
| [in] | ivs_to | To these variable |
Definition at line 376 of file m_af_output.f90.
| subroutine, public m_af_output::af_write_line | ( | type(af_t), intent(in) | tree, |
| character(len=*), intent(in) | filename, | ||
| integer, dimension(:), intent(in) | ivs, | ||
| real(dp), dimension(ndim), intent(in) | r_min, | ||
| real(dp), dimension(ndim), intent(in) | r_max, | ||
| integer, intent(in) | n_points | ||
| ) |
Write line data in a text file.
| [in] | tree | Tree to write out |
| [in] | filename | Filename for the vtk file |
| [in] | ivs | Variables to write |
| [in] | r_min | Minimum coordinate of line |
| [in] | r_max | Maximum coordinate of line |
| [in] | n_points | Number of points along line |
Definition at line 407 of file m_af_output.f90.
| subroutine, public m_af_output::af_write_plane | ( | type(af_t), intent(in) | tree, |
| character(len=*), intent(in) | filename, | ||
| integer, dimension(:), intent(in) | ivs, | ||
| real(dp), dimension(ndim), intent(in) | r_min, | ||
| real(dp), dimension(ndim), intent(in) | r_max, | ||
| integer, dimension(2), intent(in) | n_pixels | ||
| ) |
Write data in a plane (2D) to a VTK ASCII file. In 3D, r_min and r_max should have one identical coordinate (i.e., they differ in two coordinates).
| [in] | tree | Tree to write out |
| [in] | filename | Filename for the vtk file |
| [in] | ivs | Variables to write |
| [in] | r_min | Minimum coordinate of plane |
| [in] | r_max | Maximum coordinate of plane |
| [in] | n_pixels | Number of pixels in the plane |
Definition at line 465 of file m_af_output.f90.
| subroutine, public m_af_output::af_write_vtk | ( | type(af_t), intent(in) | tree, |
| character(len=*), intent(in) | filename, | ||
| integer, intent(in), optional | n_cycle, | ||
| real(dp), intent(in), optional | time, | ||
| integer, dimension(:), intent(in), optional | ixs_cc, | ||
| procedure(subr_add_vars), optional | add_vars, | ||
| character(len=*), dimension(:), intent(in), optional | add_names | ||
| ) |
Write the cell centered data of a tree to a vtk unstructured file. Only the leaves of the tree are used.
| [in] | tree | Tree to write out |
| [in] | filename | Filename for the vtk file |
| [in] | n_cycle | Cycle-number for vtk file (counter) |
| [in] | time | Time for output file |
| [in] | ixs_cc | Only include these cell variables |
| add_vars | Optional routine to add extra variables | |
| [in] | add_names | Names of extra variables |
Definition at line 556 of file m_af_output.f90.
| subroutine, public m_af_output::af_write_numpy | ( | type(af_t), intent(inout) | tree, |
| character(len=*), intent(in) | filename, | ||
| real(dp), dimension(ndim), intent(in), optional | r_min, | ||
| real(dp), dimension(ndim), intent(in), optional | r_max, | ||
| integer, dimension(ndim), intent(in), optional | n_points, | ||
| integer, intent(in), optional | n_cycle, | ||
| real(dp), intent(in), optional | time, | ||
| integer, dimension(:), intent(in), optional | ixs_cc | ||
| ) |
Write uniform data interpolated from a region to a .npy or .npz numpy file. The format is determined based on the extension of filename.
| [in,out] | tree | Tree to save |
| [in] | filename | Filename, possible extensions: .npz, .npy |
| [in] | n_points | Number of points to use |
| [in] | r_min | Minimum coordinates |
| [in] | r_max | Maximum coordinates |
| [in] | n_cycle | Cycle-number (counter) |
| [in] | ixs_cc | Only include these cell variables |
Definition at line 756 of file m_af_output.f90.
| subroutine, public m_af_output::af_write_silo | ( | type(af_t), intent(in) | tree, |
| character(len=*) | filename, | ||
| integer, intent(in), optional | n_cycle, | ||
| real(dp), intent(in), optional | time, | ||
| integer, dimension(:), intent(in), optional | ixs_cc, | ||
| procedure(subr_add_vars), optional | add_vars, | ||
| character(len=*), dimension(:), intent(in), optional | add_names, | ||
| integer, intent(in), optional | max_lvl | ||
| ) |
Note: a 1D version is present below, and seems to work, but its output cannot be visualized by Visit. That's why we use curve output for 1D cases.
| [in] | tree | Tree to write out |
| filename | Filename for the vtk file | |
| [in] | n_cycle | Cycle-number for vtk file (counter) |
| [in] | time | Time for output file |
| [in] | ixs_cc | Only include these cell variables |
| add_vars | Optional routine to add extra variables | |
| [in] | add_names | Names of extra variables |
| [in] | max_lvl | Maximum refinement level for output |
Definition at line 903 of file m_af_output.f90.
| subroutine, public m_af_output::af_write_silo | ( | type(af_t), intent(in) | tree, |
| character(len=*) | filename, | ||
| integer, intent(in), optional | n_cycle, | ||
| real(dp), intent(in), optional | time, | ||
| integer, dimension(:), intent(in), optional | ixs_cc, | ||
| procedure(subr_add_vars), optional | add_vars, | ||
| character(len=*), dimension(:), intent(in), optional | add_names, | ||
| character(len=*), dimension(:), intent(in), optional | add_curve_names, | ||
| real(dp), dimension(:, :, :), intent(in), optional | add_curve_dat, | ||
| integer, intent(in), optional | max_lvl | ||
| ) |
Write the cell centered data of a tree to a Silo file. Only the leaves of the tree are used.
| [in] | tree | Tree to write out |
| filename | Filename for the vtk file | |
| [in] | n_cycle | Cycle-number for vtk file (counter) |
| [in] | time | Time for output file |
| [in] | ixs_cc | Only include these cell variables |
| add_vars | Optional routine to add extra variables | |
| [in] | add_curve_names | Names of extra variables or curves |
| [in] | add_curve_dat | Data for additional curves (#curves, x/y-dimensions, #points) |
| [in] | max_lvl | Maximum refinement level for output. Note that the user has to ensure the coarse grid data is up to date |
Definition at line 1005 of file m_af_output.f90.
| subroutine m_af_output::get_output_vars | ( | type(af_t), intent(in) | tree, |
| integer, dimension(:), intent(inout), allocatable | ix_out | ||
| ) |
Definition at line 1582 of file m_af_output.f90.
|
private |
Definition at line 10 of file m_af_output.f90.