HDF5_controller_procedures Submodule

Contains module procedures associated with the HDF5 controller class


Uses


Module Subroutines

module subroutine initHDF5Controller(this, varCont, varNames, filepath)

HDF5 controller initialization routine - determines variables this controller is responsible for and the output path. The default path is "./", corresponding to the executable location in the build tree.

Arguments

Type IntentOptional Attributes Name
class(HDF5Controller), intent(inout) :: this
type(VariableContainer), intent(in) :: varCont

Reference variable container

type(StringArray), intent(in), dimension(:) :: varNames

Names of variables this controller is responsible for

character(len=*), intent(in), optional :: filepath

Filepath this controller will use

module subroutine outputVarsSerial(this, mpiCont, varCont, filename, IDNum)

Gather and output variables this controller is responsible for. Default filename is "ReMKiT1DVarOutput". If IDnum is present it is appended to the filename. The output is serial from processor 0.

Arguments

Type IntentOptional Attributes Name
class(HDF5Controller), intent(inout) :: this
type(MPIController), intent(inout) :: mpiCont

MPIController used by the HDF5 controller for communication

type(VariableContainer), intent(in) :: varCont

Variable container used for output

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

Name of output file

integer(kind=ik), intent(in), optional :: IDNum

IDNum to be appended to filename

module subroutine loadVarsSerial(this, mpiCont, varCont, filename)

Load and scatter variables this controller is responsible for. Default filename is "ReMKiT1DVarInput". If a variable is not found in the file it is set to 0.

Arguments

Type IntentOptional Attributes Name
class(HDF5Controller), intent(inout) :: this
type(MPIController), intent(inout) :: mpiCont

MPIController used by the HDF5 controller for communication

type(VariableContainer), intent(inout) :: varCont

Variable container to be loaded into

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

Name of input file

module subroutine outputGridDataSerial(this, mpiCont, gridObj, filename)

Gather and output grid data. Default filename is "ReMKiT1DGridOutput". The output is serial from processor 0.

Arguments

Type IntentOptional Attributes Name
class(HDF5Controller), intent(inout) :: this
type(MPIController), intent(inout) :: mpiCont

MPIController used by the HDF5 controller for communication

type(Grid), intent(in) :: gridObj

Output grid object

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

Name of output file

module subroutine dumpRestartFiles(this, mpiCont, varCont, filename)

Each processor dumps all of its variables into separate files. Default filename "restart", appended with processor rank.

Arguments

Type IntentOptional Attributes Name
class(HDF5Controller), intent(inout) :: this
type(MPIController), intent(inout) :: mpiCont

MPIController used by the HDF5 controller for communication

type(VariableContainer), intent(in) :: varCont

Variable container used for output

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

Name of output file

module subroutine loadRestartFiles(this, mpiCont, varCont, filename)

Each processor loads all of its variables from files of the form filename_rank.h5. It is assumed that the files exist and that they are compatible with the variable container

Arguments

Type IntentOptional Attributes Name
class(HDF5Controller), intent(inout) :: this
type(MPIController), intent(inout) :: mpiCont

MPIController used by the HDF5 controller for communication

type(VariableContainer), intent(inout) :: varCont

Variable container used for output

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

Name of output file