Output configuration

KitAMR.jl outputs the field as .jld2 and .pvtu files for post-processing.

KitAMR.OutputType
mutable struct Output

Structure of output information.

Fields

  • vtk_celltype::Union{Type{<:KitAMR.AbstractVTKCellType}, Vector}: VTK cell type in physical space. Available options: Pixel and Triangle for 2D; Voxel and Tetra for 3D. Default is Triangle for 2D and Tetra for 3D. A Vector of cell types (e.g. [Triangle, Pixel]) may also be given; in that case a separate output (pvtu for the flow field, and its own animation collection) is written for every cell type, with the cell-type name appended to the corresponding file name.

  • vs_vtk_celltype::Type{Tv} where Tv<:KitAMR.AbstractVTKCellType: VTK cell type in velocity space. Available options: Pixel for 2D.

  • anim_dt::Float64: Time interval between animation frames. 0 (default) disables animation output, making check_for_animsave! a no-op.

  • vs_output_criterion::Function: Optional callback selecting which physical cells write their (per-cell) velocity-space distribution. Two call conventions, one per output path:

    • Final result (save_result): vs_output_criterion(ps_data, ka) -> Bool — return true to include this cell's velocity space. Default (unset): include every cell.
    • Animation frames (check_for_animsave!): vs_output_criterion(; ps_data, ka) -> (id::Int, flag::Bool)flag selects the cell and id names its output file. Default (unset): write no per-cell velocity space.

    See the User-defined functions page.

  • anim_index::Int64: Index of the last saved animation frame.
source

Supported vtk cell types are

Note that the vertices in .pvtu file are redundant. To obtain contour of the field, a cleaning process in post-process software is required. For example, using Paraview, one needs to execute Clean to Grid before contour.

Triangle and Tetra are chosen for smoother field visualization, but will not improve the accuracy of the solution. The variables on their vertices are linearly reconstructed.