silo_obj Derived Type

type, public :: silo_obj


Inherits

type~~silo_obj~~InheritsGraph type~silo_obj silo_obj MPI_Comm MPI_Comm type~silo_obj->MPI_Comm silo_comm type~parallel_obj parallel_obj type~silo_obj->type~parallel_obj parallel MPI_Datatype MPI_Datatype type~parallel_obj->MPI_Datatype REAL_SP, REAL_DP, REAL_WP, COMPLEX_SP, COMPLEX_DP, COMPLEX_WP, INTEGER, INT8, LOGICAL MPI_Info MPI_Info type~parallel_obj->MPI_Info mpi_info type~communicators communicators type~parallel_obj->type~communicators comm type~patch patch type~parallel_obj->type~patch rank type~communicators->MPI_Comm w, g

Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: access_flag

Access flag

character(len=5), public :: dirname

Name of directory within group file

integer(kind=leapI4), public :: fid_DAT

File identifier for silo group files

integer(kind=leapI4), public :: fid_VDB

File identifier for silo VDB files

integer(kind=leapI4), public :: fid_VisIt

File identifier for VisIt file

character(len=str64), public :: filename

Base name

character(len=str64), public :: filepath

Path to VDB and group files

integer, public, allocatable :: group_ids(:)

ID for silo groups

integer, public :: nproc_node

Number of procs per silo

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

Associated parallel structure

type(MPI_Comm), public :: silo_comm
integer, public :: silo_rank
character(len=str64), public :: siloname

Name of silo group file

character(len=str64), public :: vdbname

Name of silo VDB file

character(len=str64), public :: visitname

Name of VisIt file


Type-Bound Procedures

procedure, public :: CreateGroups => silo_CreateGroups

  • private subroutine silo_CreateGroups(this)

    Set up silo groups for poor man's IO. Split MPI ranks into groups of size nproc_node. Each group will write squentially to its own file.

    Arguments

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

    A silo object

procedure, public :: Finalize => silo_Final

  • private subroutine silo_Final(this)

    Finalize structure

    Arguments

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

    A silo object

procedure, public :: Initialize => silo_Init

  • private subroutine silo_Init(this, filename, access_flag, parallel, nproc_node)

    Initialize structure

    Arguments

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

    A silo object

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

    File to read/write

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

    File access mode

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

    parallel structure from main program

    integer, intent(in), optional :: nproc_node

    Number of procs per silo

procedure, public :: NewTimeStep => silo_NewTimeStep

  • private subroutine silo_NewTimeStep(this, time)

    Create a new Silo virtual data base (VDB) for this timestep

    Arguments

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

    A silo object

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

    Time value for this time step

procedure, public :: SetupGroupFiles => silo_SetupGroupFiles

  • private subroutine silo_SetupGroupFiles(this, flag)

    Create silo files and their internal structure

    Arguments

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

    A silo object

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

    IO flag

generic, public :: Write => silo_WriteScalar3D

  • private subroutine silo_WriteScalar3D(this, name, array, lo, hi, staggering)

    Write Eulerian/3D data to a hdf5 file with silo

    Arguments

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

    A silo object

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

    Variable name

    class(*), intent(in) :: array(:,:,:)

    3-D data array

    integer, intent(in) :: lo(3)

    Low bounds

    integer, intent(in) :: hi(3)

    High bounds

    integer, intent(in) :: staggering

    Staggering value

procedure, public :: WriteGrid => silo_WriteGrid

  • private subroutine silo_WriteGrid(this, block, iter, time)

    Write the grid attributes

    Arguments

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

    A silo object

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

    Block object

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

procedure, private :: silo_WriteScalar3D

  • private subroutine silo_WriteScalar3D(this, name, array, lo, hi, staggering)

    Write Eulerian/3D data to a hdf5 file with silo

    Arguments

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

    A silo object

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

    Variable name

    class(*), intent(in) :: array(:,:,:)

    3-D data array

    integer, intent(in) :: lo(3)

    Low bounds

    integer, intent(in) :: hi(3)

    High bounds

    integer, intent(in) :: staggering

    Staggering value