Afivo  0.3
Data Types | Functions/Subroutines
m_a2_output Module Reference

This module contains routines for writing output files with Afivo. The Silo format should probably be used for larger files, especially in 3D. More...

Functions/Subroutines

subroutine, public a2_prepend_directory (filename, dir, out_name)
 
subroutine, public a2_write_tree (tree, filename, dir)
 Write full tree in binary format. More...
 
subroutine, public a2_read_tree (tree, filename)
 Read full tree in binary format. More...
 
subroutine, public a2_tree_copy_variable (tree_from, ivs_from, tree_to, ivs_to)
 
subroutine, public a2_write_line (tree, filename, ivs, r_min, r_max, n_points, dir)
 Write line data in a text file. More...
 
subroutine, public a2_write_plane (tree, filename, ivs, r_min, r_max, n_pixels, dir)
 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 a2_write_vtk (tree, filename, n_cycle, time, ixs_cc, dir, 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 a2_write_silo (tree, filename, n_cycle, time, ixs_cc, dir, add_vars, add_names)
 Write the cell centered data of a tree to a Silo file. Only the leaves of the tree are used. More...
 

Detailed Description

This module contains routines for writing output files with Afivo. The Silo format should probably be used for larger files, especially in 3D.

Function/Subroutine Documentation

§ a2_prepend_directory()

subroutine, public m_a2_output::a2_prepend_directory ( character(len=*), intent(in)  filename,
character(len=*), intent(in), optional  dir,
character(len=*), intent(inout)  out_name 
)

Definition at line 32 of file m_a2_output.f90.

§ a2_write_tree()

subroutine, public m_a2_output::a2_write_tree ( type(a2_t), intent(in)  tree,
character(len=*), intent(in)  filename,
character(len=*), intent(in), optional  dir 
)

Write full tree in binary format.

Parameters
[in]treeTree to write out
[in]filenameFilename for the output
[in]dirDirectory to place output in

Definition at line 54 of file m_a2_output.f90.

§ a2_read_tree()

subroutine, public m_a2_output::a2_read_tree ( type(a2_t), intent(out)  tree,
character(len=*), intent(in)  filename 
)

Read full tree in binary format.

Parameters
[out]treeTree to read in
[in]filenameFilename for the input

Definition at line 117 of file m_a2_output.f90.

§ a2_tree_copy_variable()

subroutine, public m_a2_output::a2_tree_copy_variable ( type(a2_t), intent(in)  tree_from,
integer, dimension(:), intent(in)  ivs_from,
type(a2_t), intent(inout)  tree_to,
integer, dimension(:), intent(in)  ivs_to 
)
Parameters
[in]tree_fromCopy from this grid
[in]ivs_fromFrom these variable
[in,out]tree_toCopy to this grid
[in]ivs_toTo these variable

Definition at line 193 of file m_a2_output.f90.

§ a2_write_line()

subroutine, public m_a2_output::a2_write_line ( type(a2_t), intent(in)  tree,
character(len=*), intent(in)  filename,
integer, dimension(:), intent(in)  ivs,
real(dp), dimension(2), intent(in)  r_min,
real(dp), dimension(2), intent(in)  r_max,
integer, intent(in)  n_points,
character(len=*), intent(in), optional  dir 
)

Write line data in a text file.

Parameters
[in]treeTree to write out
[in]filenameFilename for the vtk file
[in]ivsVariables to write
[in]r_minMinimum coordinate of line
[in]r_maxMaximum coordinate of line
[in]n_pointsNumber of points along line
[in]dirDirectory to place files in

Definition at line 223 of file m_a2_output.f90.

§ a2_write_plane()

subroutine, public m_a2_output::a2_write_plane ( type(a2_t), intent(in)  tree,
character(len=*), intent(in)  filename,
integer, dimension(:), intent(in)  ivs,
real(dp), dimension(2), intent(in)  r_min,
real(dp), dimension(2), intent(in)  r_max,
integer, dimension(2), intent(in)  n_pixels,
character(len=*), intent(in), optional  dir 
)

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).

Parameters
[in]treeTree to write out
[in]filenameFilename for the vtk file
[in]ivsVariables to write
[in]r_minMinimum coordinate of plane
[in]r_maxMaximum coordinate of plane
[in]n_pixelsNumber of pixels in the plane
[in]dirDirectory to place files in

Definition at line 273 of file m_a2_output.f90.

§ a2_write_vtk()

subroutine, public m_a2_output::a2_write_vtk ( type(a2_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,
character(len=*), intent(in), optional  dir,
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.

Parameters
[in]treeTree to write out
[in]filenameFilename for the vtk file
[in]n_cycleCycle-number for vtk file (counter)
[in]timeTime for output file
[in]ixs_ccOncly include these cell variables
[in]dirDirectory to place files in
add_varsOptional routine to add extra variables
[in]add_namesNames of extra variables

Definition at line 338 of file m_a2_output.f90.

§ a2_write_silo()

subroutine, public m_a2_output::a2_write_silo ( type(a2_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,
character(len=*), intent(in), optional  dir,
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 Silo file. Only the leaves of the tree are used.

Parameters
[in]treeTree to write out
filenameFilename for the vtk file
[in]n_cycleCycle-number for vtk file (counter)
[in]timeTime for output file
[in]ixs_ccOncly include these cell variables
[in]dirDirectory to place files in
add_varsOptional routine to add extra variables
[in]add_namesNames of extra variables

Definition at line 470 of file m_a2_output.f90.