snapshot_t Derived Type

type, public :: snapshot_t

Datatype for snapshout I/O


Contents


Finalization Procedures

final :: destructor

  • public subroutine destructor(self)

    Destructor

    Arguments

    Type IntentOptional Attributes Name
    type(snapshot_t), intent(inout) :: self

    Instance of the type


Type-Bound Procedures

procedure, public :: init => init_snapshot

  • public subroutine init_snapshot(self, comm_handler, mesh_cano, mesh_stag, dirpath, nvars, name_vars)

    Initialises snapshots, creates dirpath

    Arguments

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

    Instance of the type

    type(comm_handler_t), intent(in) :: comm_handler

    MPI communicator

    type(mesh_cart_t), intent(in) :: mesh_cano

    Mesh (canonical)

    type(mesh_cart_t), intent(in) :: mesh_stag

    Mesh (staggered)

    character(len=*), intent(in) :: dirpath

    Directory, where snapshot files are written

    integer, intent(in) :: nvars

    Number of variables to be written

    type(char_arr_t), intent(in), dimension(nvars) :: name_vars

    Names of variables

procedure, public :: write_snaps

  • public subroutine write_snaps(self, comm_handler, isnaps, tau, vars, isubsnaps, allow_overwrite)

    Writes snapshot

    Arguments

    Type IntentOptional Attributes Name
    class(snapshot_t), intent(in) :: self

    Instance of the type

    type(comm_handler_t), intent(in) :: comm_handler

    MPI communicator

    integer, intent(in) :: isnaps

    Snapshot number

    real(kind=GP), intent(in) :: tau

    Time

    type(variable_t), intent(in), dimension(self%nvars) :: vars

    Variables

    integer, intent(in), optional :: isubsnaps

    Optional sub-snapshot number

    logical, intent(in), optional :: allow_overwrite

    Whether to allow overwriting snapfiles

procedure, public :: read_snaps

  • public subroutine read_snaps(self, comm_handler, isnaps, tau, vars)

    Reads snapshot

    Arguments

    Type IntentOptional Attributes Name
    class(snapshot_t), intent(in) :: self

    Instance of the type

    type(comm_handler_t), intent(in) :: comm_handler

    MPI communicator

    integer, intent(in) :: isnaps

    Snapshot number

    real(kind=GP), intent(out) :: tau

    Time

    type(variable_t), intent(inout), dimension(self%nvars) :: vars

    Variables

procedure, public :: read_snaps_last

  • public subroutine read_snaps_last(self, comm_handler, isnaps, tau, vars)

    Reads last available snapshot

    Arguments

    Type IntentOptional Attributes Name
    class(snapshot_t), intent(in) :: self

    Instance of the type

    type(comm_handler_t), intent(in) :: comm_handler

    MPI communicator

    integer, intent(out) :: isnaps

    Snapshot number

    real(kind=GP), intent(out) :: tau

    Time

    type(variable_t), intent(inout), dimension(self%nvars) :: vars

    Variables

procedure, public :: display => display_snapshot

  • public subroutine display_snapshot(self)

    Displays information

    Arguments

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

    Instance of the type