test added
This commit is contained in:
parent
e80d91e30a
commit
236f0297ac
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit b898a8b5552bd9d1c555edc3d8134564dd32fe53
|
Subproject commit f3b0cfa68febbc90369e414c38733ccdc22258bb
|
|
@ -74,7 +74,6 @@ subroutine grid_thermal_spectral_init(T_0)
|
||||||
PetscInt, dimension(0:worldsize-1) :: localK
|
PetscInt, dimension(0:worldsize-1) :: localK
|
||||||
integer :: i, j, k, ce
|
integer :: i, j, k, ce
|
||||||
DM :: thermal_grid
|
DM :: thermal_grid
|
||||||
real(pReal), dimension(:), allocatable :: T_restart, T_lastInc_restart
|
|
||||||
PetscScalar, dimension(:,:,:), pointer :: T_PETSc
|
PetscScalar, dimension(:,:,:), pointer :: T_PETSc
|
||||||
integer(HID_T) :: fileHandle, groupHandle
|
integer(HID_T) :: fileHandle, groupHandle
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
|
@ -146,10 +145,8 @@ subroutine grid_thermal_spectral_init(T_0)
|
||||||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
||||||
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||||
|
|
||||||
call HDF5_read(T_restart,groupHandle,'T',.false.)
|
call HDF5_read(T_current,groupHandle,'T',.false.)
|
||||||
T_current = reshape(T_restart,[grid(1),grid(2),grid3])
|
call HDF5_read(T_lastInc,groupHandle,'T_lastInc',.false.)
|
||||||
call HDF5_read(T_lastInc_restart,groupHandle,'T_lastInc',.false.)
|
|
||||||
T_lastInc = reshape(T_lastInc_restart,[grid(1),grid(2),grid3])
|
|
||||||
end if restartRead
|
end if restartRead
|
||||||
|
|
||||||
ce = 0
|
ce = 0
|
||||||
|
@ -270,10 +267,10 @@ subroutine grid_thermal_spectral_restartWrite
|
||||||
call SNESGetDM(thermal_snes,dm_local,ierr); CHKERRQ(ierr)
|
call SNESGetDM(thermal_snes,dm_local,ierr); CHKERRQ(ierr)
|
||||||
call DMDAVecGetArrayF90(dm_local,solution_vec,T,ierr); CHKERRQ(ierr)
|
call DMDAVecGetArrayF90(dm_local,solution_vec,T,ierr); CHKERRQ(ierr)
|
||||||
|
|
||||||
print'(1x,a)', 'writing solver data required for restart to file'; flush(IO_STDOUT)
|
print'(1x,a)', 'writing thermal solver data required for restart to file'; flush(IO_STDOUT)
|
||||||
|
|
||||||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','w')
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','a')
|
||||||
groupHandle = HDF5_addGroup(fileHandle,'solver')
|
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||||
call HDF5_write(T,groupHandle,'T')
|
call HDF5_write(T,groupHandle,'T')
|
||||||
call HDF5_write(T_lastInc,groupHandle,'T_lastInc')
|
call HDF5_write(T_lastInc,groupHandle,'T_lastInc')
|
||||||
call HDF5_closeGroup(groupHandle)
|
call HDF5_closeGroup(groupHandle)
|
||||||
|
|
Loading…
Reference in New Issue