snapshot_manager_t Derived Type

type, public :: snapshot_manager_t


Inherits

type~~snapshot_manager_t~~InheritsGraph type~snapshot_manager_t snapshot_manager_t type~checkpoint_config_t checkpoint_config_t type~snapshot_manager_t->type~checkpoint_config_t config type~field_buffer_map_t field_buffer_map_t type~snapshot_manager_t->type~field_buffer_map_t field_buffers type~writer_session_t writer_session_t type~snapshot_manager_t->type~writer_session_t snapshot_writer type~base_config_t base_config_t type~checkpoint_config_t->type~base_config_t type~io_session_base_t io_session_base_t type~writer_session_t->type~io_session_base_t type~io_writer_t io_writer_t type~writer_session_t->type~io_writer_t writer type~io_file_t io_file_t type~io_session_base_t->type~io_file_t file

Inherited by

type~~snapshot_manager_t~~InheritedByGraph type~snapshot_manager_t snapshot_manager_t type~io_manager_t io_manager_t type~io_manager_t->type~snapshot_manager_t snapshot_mgr type~base_case_t base_case_t type~base_case_t->type~io_manager_t io_mgr type~case_abl_t case_abl_t type~case_abl_t->type~base_case_t type~case_channel_t case_channel_t type~case_channel_t->type~base_case_t type~case_cylinder_t case_cylinder_t type~case_cylinder_t->type~base_case_t type~case_generic_t case_generic_t type~case_generic_t->type~base_case_t type~case_tgv_t case_tgv_t type~case_tgv_t->type~base_case_t type~case_wind_turbine_t case_wind_turbine_t type~case_wind_turbine_t->type~base_case_t

Components

Type Visibility Attributes Name Initial
type(checkpoint_config_t), public :: config
integer, public, dimension(3) :: output_stride = [1, 1, 1]
type(field_buffer_map_t), public, allocatable :: field_buffers(:)
integer(kind=i8), public, dimension(3) :: last_shape_dims = 0
integer, public, dimension(3) :: last_stride_factors = 0
integer(kind=i8), public, dimension(3) :: last_output_shape = 0
character(len=:), public, allocatable :: vtk_xml
logical, public :: is_snapshot_file_open = .false.
type(writer_session_t), public :: snapshot_writer
logical, public :: convert_to_sp = .false.

Flag for single precision snapshots Steps of an existing file kept on restart; negative starts a new file

integer, public :: append_after_steps = -1

Iteration the run restarted from, and the layout of the existing file

integer, public :: restart_iter = 0
character(len=:), public, allocatable :: restart_vtk_xml

Type-Bound Procedures

procedure, public :: init

  • private subroutine init(self, comm)

    Initialise snapshot manager

    Arguments

    Type IntentOptional Attributes Name
    class(snapshot_manager_t), intent(inout) :: self
    integer, intent(in) :: comm

procedure, public :: handle_restart

  • private subroutine handle_restart(self, restart_iter, dt, comm)

    Prepare to continue the snapshot file of the run being restarted. Steps up to the restart time are kept and later ones (written past the checkpoint) are dropped, so the restarted run appends without duplicating them, whatever snapshot frequency wrote the file. The file's layout is kept so the first snapshot can check it still matches the output settings.

    Arguments

    Type IntentOptional Attributes Name
    class(snapshot_manager_t), intent(inout) :: self
    integer, intent(in) :: restart_iter
    real(kind=dp), intent(in) :: dt
    integer, intent(in) :: comm

procedure, public :: handle_snapshot_step

  • private subroutine handle_snapshot_step(self, solver, timestep, comm)

    Handle snapshot writing at a given timestep

    Arguments

    Type IntentOptional Attributes Name
    class(snapshot_manager_t), intent(inout) :: self
    class(solver_t), intent(in) :: solver
    integer, intent(in) :: timestep
    integer, intent(in), optional :: comm

procedure, public :: finalise

  • private subroutine finalise(self)

    Clean up snapshot manager

    Arguments

    Type IntentOptional Attributes Name
    class(snapshot_manager_t), intent(inout) :: self