silo_obj Derived Type

type, public :: silo_obj

A utility that writes SILO data.


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 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

MPI communication for SILO tasks

integer, public :: silo_rank

SILO task's rank in the SILO MPI communicator

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_obj_CreateGroups

  • private impure subroutine silo_obj_CreateGroups(this)

    Sets up silo groups for poor man's IO. Splits MPI ranks into groups of size nproc_node. Each group writes squentially to its own file.

    Arguments

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

    A silo object

procedure, public :: Finalize => silo_obj_Final

  • private impure subroutine silo_obj_Final(this)

    Finalizes structure and frees memory.

    Arguments

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

    A silo object

procedure, public :: Initialize => silo_obj_Init

  • private impure subroutine silo_obj_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 to link with

    integer, intent(in), optional :: nproc_node

    Number of procs per silo

procedure, public :: NewTimeStep => silo_obj_NewTimeStep

  • private impure subroutine silo_obj_NewTimeStep(this, time)

    Creates 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_obj_SetupGroupFiles

  • private impure subroutine silo_obj_SetupGroupFiles(this, flag)

    Creates 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_obj_WriteScalar1D, silo_obj_WriteScalar3D

  • private impure subroutine silo_obj_WriteScalar1D(this, name, array)

    Writes 1D array 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

  • private impure subroutine silo_obj_WriteScalar3D(this, name, mesh_name, array)

    Writes 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

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

    Mesh name

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

    3-D data array

procedure, public :: WriteGrid => silo_obj_WriteGrid

  • private impure subroutine silo_obj_WriteGrid(this, mesh_name, x1, x2, x3, iter, time)

    Writes grid attributes.

    Arguments

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

    A silo object

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

    Mesh name

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

    x1-axis

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

    x2-axis

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

    x3-axis

    integer, intent(in) :: iter

    Iteration at write

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

    Time at write

procedure, public :: WriteLagrangianMesh => silo_obj_WriteLagrangianMesh

  • private impure subroutine silo_obj_WriteLagrangianMesh(this, x1, x2, x3, iter, time)

    Writes Lagrangian mesh attributes.

    Arguments

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

    A silo object

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

    x1-coordinates

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

    x2-coordinates

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

    x3-coordinates

    integer, intent(in) :: iter

    Iteration at write

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

    Time at write

procedure, private :: silo_obj_WriteScalar1D

  • private impure subroutine silo_obj_WriteScalar1D(this, name, array)

    Writes 1D array 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

procedure, private :: silo_obj_WriteScalar3D

  • private impure subroutine silo_obj_WriteScalar3D(this, name, mesh_name, array)

    Writes 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

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

    Mesh name

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

    3-D data array