xdmf_obj Derived Type

type, public :: xdmf_obj

A utility to write XDMF files.


Inherits

type~~xdmf_obj~~InheritsGraph type~xdmf_obj xdmf_obj type~xdmf_attribute_obj xdmf_attribute_obj type~xdmf_obj->type~xdmf_attribute_obj fields type~xdmf_grid_obj xdmf_grid_obj type~xdmf_obj->type~xdmf_grid_obj grid type~xdmf_grid_obj->type~xdmf_attribute_obj axis

Components

Type Visibility Attributes Name Initial
type(xdmf_attribute_obj), public, allocatable :: fields(:)

Fields described by this XDMF file

integer, public :: fields_count

Number of fields

character(len=:), public, allocatable :: filename

XDMF file name

type(xdmf_grid_obj), public :: grid

XDMF grid


Type-Bound Procedures

procedure, public :: AddField => xdmf_obj_AddField

  • private pure subroutine xdmf_obj_AddField(this, name, type, precision, path)

    Adds field information to the xdmf object.

    Arguments

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

    XDMF object

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

    Field name in the HDF5 dataset

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

    Type is 'Float' or 'Int"

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

    8 or 4 depending on type and working precision

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

    Path to the HDF5 dataset

procedure, public :: AddGrid => xdmf_obj_AddGrid

  • private pure subroutine xdmf_obj_AddGrid(this, name, dims, path, x1name, x2name, x3name)

    Adds grid information to the xdmf object.

    Arguments

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

    XDMF object

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

    Grid name

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

    Grid size

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

    Path to block_obj containing grid data

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

    Name of x1 axis in block_obj

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

    Name of x2 axis in block_obj

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

    Name of x3 axis in block_obj

procedure, public :: Finalize => xdmf_obj_Final

  • private pure subroutine xdmf_obj_Final(this)

    Finalizes object and frees memmory.

    Arguments

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

    XDMF object

procedure, public :: Initialize => xdmf_obj_Init

  • private pure subroutine xdmf_obj_Init(this)

    Initialize XDMF object.

    Arguments

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

    XDMF object

procedure, public :: Resize => xdmf_obj_Resize

  • private pure subroutine xdmf_obj_Resize(this, size_target)

    Resizes the fields array in an xdmf object. Note that resizing occurs in increaments of size (RESIZE_INCREMENT). By default, RESIZE_INCREMENT=10, meaning that if resizing occurs, it will increase or reduce the array size by 10 slots. This is done to avoid frequent reallocating.

    Arguments

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

    XDMF object

    integer, intent(in) :: size_target

    Target new size

procedure, public :: Write => xdmf_obj_Write

  • private impure subroutine xdmf_obj_Write(this, filename)

    Write the XDMF info to a file. This is a serial subroutine and should be called by only one rank.

    Arguments

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

    XDMF object

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

    Name of file to write