eulerian_set Derived Type

type, public :: eulerian_set

A utility to manage Eulerian objects.


Inherits

type~~eulerian_set~~InheritsGraph type~eulerian_set eulerian_set type~block_obj block_obj type~eulerian_set->type~block_obj block type~eulerian_ptr eulerian_ptr type~eulerian_set->type~eulerian_ptr field type~hashtbl_obj hashtbl_obj type~eulerian_set->type~hashtbl_obj tbl type~parallel_obj parallel_obj type~eulerian_set->type~parallel_obj parallel type~block_obj->type~parallel_obj parallel MPI_Datatype MPI_Datatype type~block_obj->MPI_Datatype gc_slab_r, gc_slab_i type~axis_obj axis_obj type~block_obj->type~axis_obj axis, axis_partition type~hdf5_obj hdf5_obj type~block_obj->type~hdf5_obj hdf5 type~eulerian_obj_base eulerian_obj_base type~eulerian_ptr->type~eulerian_obj_base p type~sllist_obj sllist_obj type~hashtbl_obj->type~sllist_obj vec type~parallel_obj->MPI_Datatype REAL_SP, REAL_DP, REAL_WP, COMPLEX_SP, COMPLEX_DP, COMPLEX_WP, INTEGER, INT8, LOGICAL type~communicators communicators type~parallel_obj->type~communicators comm type~patch patch type~parallel_obj->type~patch rank MPI_Comm MPI_Comm type~communicators->MPI_Comm w, g type~eulerian_obj_base->type~block_obj block type~eulerian_obj_base->type~parallel_obj parallel type~hdf5_obj->type~hashtbl_obj tbl type~hdf5_obj->type~parallel_obj parallel type~sllist_obj->type~sllist_obj child

Inherited by

type~~eulerian_set~~InheritedByGraph type~eulerian_set eulerian_set type~cdifs_obj cdifs_obj type~cdifs_obj->type~eulerian_set fields type~grans_obj grans_obj type~grans_obj->type~eulerian_set fields

Components

Type Visibility Attributes Name Initial
type(block_obj), public, pointer :: block => null()

Associated block structure

type(eulerian_ptr), public, allocatable :: field(:)

Array of Eulerian objects

type(parallel_obj), public, pointer :: parallel => null()

Associated parallel structure

logical, private :: overwrite = .true.

Switch to overwrite IO files

character(len=str64), private :: read_file

File to read

type(hashtbl_obj), private :: tbl

Hash table

character(len=str64), private :: write_file

File to write


Type-Bound Procedures

procedure, public :: Add => eulerian_set_Add

  • private impure subroutine eulerian_set_Add(this, name, stag, obj)

    Adds a eulerian object to the eulerian set.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

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

    Name of variable

    integer, intent(in) :: stag

    Staggering

    class(eulerian_obj_base), intent(inout), target :: obj

    Eulerian obj to link and Initialize

procedure, public :: Finalize => eulerian_set_Final

  • private pure subroutine eulerian_set_Final(this)

    Finalizes object and frees up memory.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

procedure, public :: GetIndex => eulerian_set_GetIndex

  • private pure function eulerian_set_GetIndex(this, name) result(val)

    Returns the index of an Eulerian_obj contained in this%fields given its name.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(in) :: this

    An Eulerian Set

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

    Name of the field

    Return Value integer

    Result

procedure, public :: GetOverwrite => eulerian_set_GetOverwrite

  • private pure function eulerian_set_GetOverwrite(this) result(val)

    Returns whether overwriting is true or false

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(in) :: this

    An Eulerian Set

    Return Value logical

    Overwrite value

procedure, public :: GetReadFileName => eulerian_set_GetReadFileName

  • private pure function eulerian_set_GetReadFileName(this) result(name)

    Returns the base name of file to write

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(in) :: this

    An Eulerian Set

    Return Value character(len=str64)

    Name of file

procedure, public :: GetWriteFileName => eulerian_set_GetWriteFileName

  • private pure function eulerian_set_GetWriteFileName(this) result(name)

    Returns the base name of file to write.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(in) :: this

    An Eulerian Set

    Return Value character(len=str64)

    Name of file

procedure, public :: Info => eulerian_set_Info

  • private impure subroutine eulerian_set_Info(this)

    Prints info about this collection of eulerian objects

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

procedure, public :: Initialize => eulerian_set_Init

  • private impure subroutine eulerian_set_Init(this, block, parallel)

    Initializes an Eulerian Set.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    type(block_obj), intent(in), target :: block

    A block object

    type(parallel_obj), intent(in), target :: parallel

    Parallel structure to link with

procedure, public :: Read => eulerian_set_ReadH5HUT

  • private impure subroutine eulerian_set_ReadH5HUT(this, iter, time, list, step)

    Reads Eulerian data using H5HUT.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    integer, intent(out) :: iter

    Iteration at write

    real(kind=wp), intent(out) :: time

    Time at write

    character(len=str8), intent(in), optional :: list(:)

    Names of fields to write

    integer, intent(in), optional :: step

    User supplied step to open

procedure, public :: ReadH5HUT => eulerian_set_ReadH5HUT

  • private impure subroutine eulerian_set_ReadH5HUT(this, iter, time, list, step)

    Reads Eulerian data using H5HUT.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    integer, intent(out) :: iter

    Iteration at write

    real(kind=wp), intent(out) :: time

    Time at write

    character(len=str8), intent(in), optional :: list(:)

    Names of fields to write

    integer, intent(in), optional :: step

    User supplied step to open

procedure, public :: ReadHDF5 => eulerian_set_ReadHDF5

  • private impure subroutine eulerian_set_ReadHDF5(this, iter, time, list)

    Reads Eulerian data with LEAP's HDF5.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    an eulerian set

    integer, intent(out) :: iter

    iteration in file

    real(kind=wp), intent(out) :: time

    time in file

    character(len=str8), intent(in), optional :: list(:)

    names of fields to read

generic, public :: ReadSingle => eulerian_set_ReadSingleH5HUT, eulerian_set_ReadSingleHDF5

  • private impure subroutine eulerian_set_ReadSingleH5HUT(this, h5, ind)

    Reads one Eulerian object based on name with H5HUT.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    type(h5hut_obj), intent(inout) :: h5

    H5hut structure

    integer, intent(in) :: ind

    Index of Eulerian object

  • private impure subroutine eulerian_set_ReadSingleHDF5(this, hdf5, ind)

    Reads one Eulerian object based on name using LEAP's HDF5.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    type(hdf5_obj), intent(inout) :: hdf5
    integer, intent(in) :: ind

    Index of Eulerian object

procedure, public :: SetOverwrite => eulerian_set_SetOverwrite

  • private pure subroutine eulerian_set_SetOverwrite(this, overwrite)

    Sets file overwritting

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    logical, intent(in) :: overwrite

    Name of file

procedure, public :: SetReadFileName => eulerian_set_SetReadFileName

  • private pure subroutine eulerian_set_SetReadFileName(this, name)

    Set the base name of file to read

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

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

    Name of file

procedure, public :: SetWriteFileName => eulerian_set_SetWriteFileName

  • private pure subroutine eulerian_set_SetWriteFileName(this, name)

    Sets the base name of file to write.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

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

    Name of file

procedure, public :: Write => eulerian_set_WriteH5HUT

  • private impure subroutine eulerian_set_WriteH5HUT(this, iter, time, list)

    Writes Eulerian data using H5HUT.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    integer, intent(in) :: iter

    Iteration at write

    real(kind=wp), intent(in) :: time

    Time at write

    character(len=str8), intent(in), optional :: list(:)

    Names of fields to write

procedure, public :: WriteH5HUT => eulerian_set_WriteH5HUT

  • private impure subroutine eulerian_set_WriteH5HUT(this, iter, time, list)

    Writes Eulerian data using H5HUT.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    integer, intent(in) :: iter

    Iteration at write

    real(kind=wp), intent(in) :: time

    Time at write

    character(len=str8), intent(in), optional :: list(:)

    Names of fields to write

procedure, public :: WriteHDF5 => eulerian_set_WriteHDF5

  • private impure subroutine eulerian_set_WriteHDF5(this, iter, time, list)

    Write Eulerian data using LEAP's HDF5.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    integer, intent(in) :: iter

    Iteration at write

    real(kind=wp), intent(in) :: time

    Time at write

    character(len=str8), intent(in), optional :: list(:)

    Names of fields to write

procedure, public :: WriteSILO => eulerian_set_WriteSILO

  • private impure subroutine eulerian_set_WriteSILO(this, iter, time, list)

    Write Eulerian data using SILO.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    integer, intent(in) :: iter

    Iteration at write

    real(kind=wp), intent(in) :: time

    Time at write

    character(len=str8), intent(in), optional :: list(:)

    Names of fields to write

  • private impure subroutine eulerian_set_WriteSingleH5HUT(this, h5, ind)

    Write a single Eulerian object to file using H5HUT.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    type(h5hut_obj), intent(inout) :: h5

    H5hut structure

    integer, intent(in) :: ind

    Index of Eulerian object

  • private impure subroutine eulerian_set_WriteSingleHDF5(this, hdf5, ind)

    Write a single Eulerian object to file using LEAP's HDF5.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    type(hdf5_obj), intent(inout) :: hdf5
    integer, intent(in) :: ind

    Index of Eulerian object

  • private impure subroutine eulerian_set_WriteSingleSILO(this, silo, ind)

    Write a single Eulerian objects to file using SILO.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    type(silo_obj), intent(inout) :: silo

    Silo structure

    integer, intent(in) :: ind

    Index of Eulerian object

procedure, private :: eulerian_set_ReadSingleH5HUT

  • private impure subroutine eulerian_set_ReadSingleH5HUT(this, h5, ind)

    Reads one Eulerian object based on name with H5HUT.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    type(h5hut_obj), intent(inout) :: h5

    H5hut structure

    integer, intent(in) :: ind

    Index of Eulerian object

procedure, private :: eulerian_set_ReadSingleHDF5

  • private impure subroutine eulerian_set_ReadSingleHDF5(this, hdf5, ind)

    Reads one Eulerian object based on name using LEAP's HDF5.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    type(hdf5_obj), intent(inout) :: hdf5
    integer, intent(in) :: ind

    Index of Eulerian object

procedure, private :: eulerian_set_WriteSingleH5HUT

  • private impure subroutine eulerian_set_WriteSingleH5HUT(this, h5, ind)

    Write a single Eulerian object to file using H5HUT.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    type(h5hut_obj), intent(inout) :: h5

    H5hut structure

    integer, intent(in) :: ind

    Index of Eulerian object

procedure, private :: eulerian_set_WriteSingleHDF5

  • private impure subroutine eulerian_set_WriteSingleHDF5(this, hdf5, ind)

    Write a single Eulerian object to file using LEAP's HDF5.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    type(hdf5_obj), intent(inout) :: hdf5
    integer, intent(in) :: ind

    Index of Eulerian object

procedure, private :: eulerian_set_WriteSingleSILO

  • private impure subroutine eulerian_set_WriteSingleSILO(this, silo, ind)

    Write a single Eulerian objects to file using SILO.

    Arguments

    Type IntentOptional Attributes Name
    class(eulerian_set), intent(inout) :: this

    An Eulerian Set

    type(silo_obj), intent(inout) :: silo

    Silo structure

    integer, intent(in) :: ind

    Index of Eulerian object

Source Code

  type :: eulerian_set
    !> A utility to manage Eulerian objects.
    type(eulerian_ptr), allocatable :: field(:)                                !! Array of Eulerian objects
    type(parallel_obj),     pointer :: parallel  => null()                     !! Associated parallel structure
    type(block_obj),        pointer :: block     => null()                     !! Associated block structure
    character(len=str64),   private :: read_file                               !! File to read
    character(len=str64),   private :: write_file                              !! File to write
    logical,                private :: overwrite = .true.                      !! Switch to overwrite IO files
    type(hashtbl_obj),      private :: tbl                                     !! Hash table
    contains
      procedure :: Initialize          => eulerian_set_Init
      procedure :: Finalize            => eulerian_set_Final
      ! Eulerian object related procedures
      procedure :: Add                 => eulerian_set_Add
      procedure :: GetIndex            => eulerian_set_GetIndex
      ! I/O related procedures
      procedure :: SetWriteFileName    => eulerian_set_SetWriteFileName
      procedure :: GetWriteFileName    => eulerian_set_GetWriteFileName
      procedure :: SetReadFileName     => eulerian_set_SetReadFileName
      procedure :: GetReadFileName     => eulerian_set_GetReadFileName
      procedure :: SetOverwrite        => eulerian_set_SetOverwrite
      procedure :: GetOverwrite        => eulerian_set_GetOverwrite
      procedure :: Read                => eulerian_set_ReadH5HUT
      procedure :: ReadHDF5            => eulerian_set_ReadHDF5
      procedure :: ReadH5HUT           => eulerian_set_ReadH5HUT
      generic   :: ReadSingle          => eulerian_set_ReadSingleH5HUT,  &
                                          eulerian_set_ReadSingleHDF5
      procedure :: Write               => eulerian_set_WriteH5HUT
      procedure :: WriteHDF5           => eulerian_set_WriteHDF5
      procedure :: WriteH5HUT          => eulerian_set_WriteH5HUT
      procedure :: WriteSILO           => eulerian_set_WriteSILO
      generic   :: WriteSingle         => eulerian_set_WriteSingleH5HUT, &
                                          eulerian_set_WriteSingleHDF5,  &
                                          eulerian_set_WriteSingleSILO
      ! Other procedures
      procedure :: Info                => eulerian_set_Info
      ! Internal/private procedures
      procedure, private :: eulerian_set_ReadSingleH5HUT
      procedure, private :: eulerian_set_ReadSingleHDF5
      procedure, private :: eulerian_set_WriteSingleH5HUT
      procedure, private :: eulerian_set_WriteSingleHDF5
      procedure, private :: eulerian_set_WriteSingleSILO
  end type eulerian_set