This subroutine initializes the restart in case of reading initial conditions from restart file. The dependent scheme id is passed as input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_restart_type), | intent(inout) | :: | me | |||
integer, | intent(in) | :: | comm | |||
integer, | intent(in) | :: | rank | |||
integer, | intent(in) | :: | comm_size | |||
type(tem_solveHead_type), | intent(in), | optional | :: | solver | ||
integer, | intent(in), | optional | :: | nDofs_write |
subroutine tem_init_restart_alloc( me, comm, rank, comm_size, solver, nDofs_write ) ! -------------------------------------------------------------------- ! type(tem_restart_type), intent(inout) :: me integer, intent(in) :: comm, rank, comm_size type(tem_solveHead_type), optional, intent(in) :: solver integer, optional, intent(in) :: nDofs_write ! Inherit communicator information from the tree (or subTree) we are to ! act on in this restart object: me%comm%comm = comm me%comm%rank = rank me%comm%comm_size = comm_size me%comm%root = 0 ! if provided reset the simulation name and solver tag if ( present(solver) ) then me%header%simName = trim(solver%simName) me%header%solverTag = tem_solverTag(solver) me%header%solverConfigFile = solver%configFile end if if ( present(nDofs_write) ) then me%write_file%nDofs = nDofs_write else me%write_file%nDofs = 1 end if ! Set the prefix for the header file. me%header%headerPrefix = trim(me%controller%writePrefix) & & // trim(me%header%simName) ! Set the prefix for all binary files. me%header%binPrefix = trim(me%controller%writePrefix) & & // trim(me%header%simName) ! Reset all the values of the chunk information me%nChunkElems = 0 me%write_file%chunkSize = 0 me%read_file%chunkSize = 0 me%write_file%nChunks = 0 me%read_file%nChunks = 0 me%write_file%maxnChunks = 0 me%read_file%maxnChunks = 0 end subroutine tem_init_restart_alloc