more meaningful order
and intent(out) variables for read are at the front
This commit is contained in:
parent
569b1fc563
commit
5d0fc4fca3
|
@ -17,7 +17,7 @@ module HDF5_utilities
|
|||
public
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief reads integer or float data of defined shape from file ! ToDo: order of arguments wrong
|
||||
!> @brief reads integer or float data of defined shape from file
|
||||
!> @details for parallel IO, all dimension except for the last need to match
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
interface HDF5_read
|
||||
|
@ -39,7 +39,7 @@ module HDF5_utilities
|
|||
end interface HDF5_read
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief writes integer or real data of defined shape to file ! ToDo: order of arguments wrong
|
||||
!> @brief writes integer or real data of defined shape to file
|
||||
!> @details for parallel IO, all dimension except for the last need to match
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
interface HDF5_write
|
||||
|
@ -525,7 +525,7 @@ end subroutine HDF5_setLink
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief read dataset of type real with 1 dimension
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_read_real1(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_read_real1(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
real(pReal), intent(out), dimension(:) :: dataset !< data read from file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -565,7 +565,7 @@ end subroutine HDF5_read_real1
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief read dataset of type real with 2 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_read_real2(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_read_real2(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
real(pReal), intent(out), dimension(:,:) :: dataset !< data read from file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -605,7 +605,7 @@ end subroutine HDF5_read_real2
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief read dataset of type real with 2 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_read_real3(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_read_real3(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
real(pReal), intent(out), dimension(:,:,:) :: dataset !< data read from file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -645,7 +645,7 @@ end subroutine HDF5_read_real3
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief read dataset of type real with 4 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_read_real4(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_read_real4(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
real(pReal), intent(out), dimension(:,:,:,:) :: dataset !< read data
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -685,7 +685,7 @@ end subroutine HDF5_read_real4
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief read dataset of type real with 5 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_read_real5(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_read_real5(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
real(pReal), intent(out), dimension(:,:,:,:,:) :: dataset !< data read from file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -725,7 +725,7 @@ end subroutine HDF5_read_real5
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief read dataset of type real with 6 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_read_real6(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_read_real6(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
real(pReal), intent(out), dimension(:,:,:,:,:,:) :: dataset !< data read from file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -765,7 +765,7 @@ end subroutine HDF5_read_real6
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief read dataset of type real with 7 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_read_real7(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_read_real7(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
real(pReal), intent(out), dimension(:,:,:,:,:,:,:) :: dataset !< data read from file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -806,7 +806,7 @@ end subroutine HDF5_read_real7
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief read dataset of type integer with 1 dimension
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_read_int1(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_read_int1(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
integer, intent(out), dimension(:) :: dataset !< data read from file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -847,7 +847,7 @@ end subroutine HDF5_read_int1
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief read dataset of type integer with 2 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_read_int2(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_read_int2(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
integer, intent(out), dimension(:,:) :: dataset !< data read from file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -887,7 +887,7 @@ end subroutine HDF5_read_int2
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief read dataset of type integer with 3 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_read_int3(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_read_int3(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
integer, intent(out), dimension(:,:,:) :: dataset !< data read from file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -927,7 +927,7 @@ end subroutine HDF5_read_int3
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief read dataset of type integer withh 4 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_read_int4(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_read_int4(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
integer, intent(out), dimension(:,:,:,:) :: dataset !< data read from file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -967,7 +967,7 @@ end subroutine HDF5_read_int4
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief read dataset of type integer with 5 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_read_int5(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_read_int5(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
integer, intent(out), dimension(:,:,:,:,:) :: dataset !< data read from file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1007,7 +1007,7 @@ end subroutine HDF5_read_int5
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief read dataset of type integer with 6 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_read_int6(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_read_int6(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
integer, intent(out), dimension(:,:,:,:,:,:) :: dataset !< data read from file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1047,7 +1047,7 @@ end subroutine HDF5_read_int6
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief read dataset of type integer with 7 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_read_int7(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_read_int7(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
integer, intent(out), dimension(:,:,:,:,:,:,:) :: dataset !< data read from file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1088,7 +1088,7 @@ end subroutine HDF5_read_int7
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief write dataset of type real with 1 dimension
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_write_real1(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_write_real1(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
real(pReal), intent(in), dimension(:) :: dataset !< data written to file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1129,7 +1129,7 @@ end subroutine HDF5_write_real1
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief write dataset of type real with 2 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_write_real2(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_write_real2(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
real(pReal), intent(in), dimension(:,:) :: dataset !< data written to file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1170,7 +1170,7 @@ end subroutine HDF5_write_real2
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief write dataset of type real with 3 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_write_real3(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_write_real3(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
real(pReal), intent(in), dimension(:,:,:) :: dataset !< data written to file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1211,7 +1211,7 @@ end subroutine HDF5_write_real3
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief write dataset of type real with 4 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_write_real4(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_write_real4(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
real(pReal), intent(in), dimension(:,:,:,:) :: dataset !< data written to file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1253,7 +1253,7 @@ end subroutine HDF5_write_real4
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief write dataset of type real with 5 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_write_real5(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_write_real5(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
real(pReal), intent(in), dimension(:,:,:,:,:) :: dataset !< data written to file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1294,7 +1294,7 @@ end subroutine HDF5_write_real5
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief write dataset of type real with 6 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_write_real6(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_write_real6(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
real(pReal), intent(in), dimension(:,:,:,:,:,:) :: dataset !< data written to file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1335,7 +1335,7 @@ end subroutine HDF5_write_real6
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief write dataset of type real with 7 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_write_real7(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_write_real7(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
real(pReal), intent(in), dimension(:,:,:,:,:,:,:) :: dataset !< data written to file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1377,7 +1377,7 @@ end subroutine HDF5_write_real7
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief write dataset of type integer with 1 dimension
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_write_int1(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_write_int1(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
integer, intent(in), dimension(:) :: dataset !< data written to file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1418,7 +1418,7 @@ end subroutine HDF5_write_int1
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief write dataset of type integer with 2 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_write_int2(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_write_int2(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
integer, intent(in), dimension(:,:) :: dataset !< data written to file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1459,7 +1459,7 @@ end subroutine HDF5_write_int2
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief write dataset of type integer with 3 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_write_int3(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_write_int3(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
integer, intent(in), dimension(:,:,:) :: dataset !< data written to file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1500,7 +1500,7 @@ end subroutine HDF5_write_int3
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief write dataset of type integer with 4 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_write_int4(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_write_int4(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
integer, intent(in), dimension(:,:,:,:) :: dataset !< data written to file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1541,7 +1541,7 @@ end subroutine HDF5_write_int4
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief write dataset of type integer with 5 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_write_int5(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_write_int5(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
integer, intent(in), dimension(:,:,:,:,:) :: dataset !< data written to file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1582,7 +1582,7 @@ end subroutine HDF5_write_int5
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief write dataset of type integer with 6 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_write_int6(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_write_int6(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
integer, intent(in), dimension(:,:,:,:,:,:) :: dataset !< data written to file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
@ -1623,7 +1623,7 @@ end subroutine HDF5_write_int6
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief write dataset of type integer with 7 dimensions
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine HDF5_write_int7(loc_id,dataset,datasetName,parallel)
|
||||
subroutine HDF5_write_int7(dataset,loc_id,datasetName,parallel)
|
||||
|
||||
integer, intent(in), dimension(:,:,:,:,:,:,:) :: dataset !< data written to file
|
||||
integer(HID_T), intent(in) :: loc_id !< file or group handle
|
||||
|
|
|
@ -235,22 +235,22 @@ subroutine grid_mechanical_FEM_init
|
|||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
||||
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||
|
||||
call HDF5_read(groupHandle,P_aim, 'P_aim',.false.)
|
||||
call HDF5_read(P_aim,groupHandle,'P_aim',.false.)
|
||||
call MPI_Bcast(P_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
call HDF5_read(groupHandle,F_aim, 'F_aim',.false.)
|
||||
call HDF5_read(F_aim,groupHandle,'F_aim',.false.)
|
||||
call MPI_Bcast(F_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
call HDF5_read(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
|
||||
call HDF5_read(F_aim_lastInc,groupHandle,'F_aim_lastInc',.false.)
|
||||
call MPI_Bcast(F_aim_lastInc,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
call HDF5_read(groupHandle,F_aimDot, 'F_aimDot',.false.)
|
||||
call HDF5_read(F_aimDot,groupHandle,'F_aimDot',.false.)
|
||||
call MPI_Bcast(F_aimDot,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
call HDF5_read(groupHandle,F, 'F')
|
||||
call HDF5_read(groupHandle,F_lastInc, 'F_lastInc')
|
||||
call HDF5_read(groupHandle,u_current, 'u')
|
||||
call HDF5_read(groupHandle,u_lastInc, 'u_lastInc')
|
||||
call HDF5_read(F,groupHandle,'F')
|
||||
call HDF5_read(F_lastInc,groupHandle,'F_lastInc')
|
||||
call HDF5_read(u_current,groupHandle,'u')
|
||||
call HDF5_read(u_lastInc,groupHandle,'u_lastInc')
|
||||
|
||||
elseif (interface_restartInc == 0) then restartRead
|
||||
F_lastInc = spread(spread(spread(math_I3,3,grid(1)),4,grid(2)),5,grid3) ! initialize to identity
|
||||
|
@ -269,10 +269,10 @@ subroutine grid_mechanical_FEM_init
|
|||
|
||||
restartRead2: if (interface_restartInc > 0) then
|
||||
print'(a,i0,a)', ' reading more restart data of increment ', interface_restartInc, ' from file'
|
||||
call HDF5_read(groupHandle,C_volAvg, 'C_volAvg',.false.)
|
||||
call HDF5_read(C_volAvg,groupHandle,'C_volAvg',.false.)
|
||||
call MPI_Bcast(C_volAvg,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
call HDF5_read(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
|
||||
call HDF5_read(C_volAvgLastInc,groupHandle,'C_volAvgLastInc',.false.)
|
||||
call MPI_Bcast(C_volAvgLastInc,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
|
||||
|
@ -443,17 +443,17 @@ subroutine grid_mechanical_FEM_restartWrite
|
|||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','w')
|
||||
groupHandle = HDF5_addGroup(fileHandle,'solver')
|
||||
|
||||
call HDF5_write(groupHandle,P_aim, 'P_aim',.false.)
|
||||
call HDF5_write(groupHandle,F_aim, 'F_aim',.false.)
|
||||
call HDF5_write(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
|
||||
call HDF5_write(groupHandle,F_aimDot, 'F_aimDot',.false.)
|
||||
call HDF5_write(groupHandle,F, 'F')
|
||||
call HDF5_write(groupHandle,F_lastInc, 'F_lastInc')
|
||||
call HDF5_write(groupHandle,u_current, 'u')
|
||||
call HDF5_write(groupHandle,u_lastInc, 'u_lastInc')
|
||||
call HDF5_write(P_aim,groupHandle,'P_aim',.false.)
|
||||
call HDF5_write(F_aim,groupHandle,'F_aim',.false.)
|
||||
call HDF5_write(F_aim_lastInc,groupHandle,'F_aim_lastInc',.false.)
|
||||
call HDF5_write(F_aimDot,groupHandle,'F_aimDot',.false.)
|
||||
call HDF5_write(F,groupHandle,'F')
|
||||
call HDF5_write(F_lastInc,groupHandle,'F_lastInc')
|
||||
call HDF5_write(u_current,groupHandle,'u')
|
||||
call HDF5_write(u_lastInc,groupHandle,'u_lastInc')
|
||||
|
||||
call HDF5_write(groupHandle,C_volAvg, 'C_volAvg',.false.)
|
||||
call HDF5_write(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
|
||||
call HDF5_write(C_volAvg,groupHandle,'C_volAvg',.false.)
|
||||
call HDF5_write(C_volAvgLastInc,groupHandle,'C_volAvgLastInc',.false.)
|
||||
|
||||
call HDF5_closeGroup(groupHandle)
|
||||
call HDF5_closeFile(fileHandle)
|
||||
|
|
|
@ -183,20 +183,20 @@ subroutine grid_mechanical_spectral_basic_init
|
|||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
||||
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||
|
||||
call HDF5_read(groupHandle,P_aim, 'P_aim',.false.)
|
||||
call HDF5_read(P_aim,groupHandle,'P_aim',.false.)
|
||||
call MPI_Bcast(P_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
call HDF5_read(groupHandle,F_aim, 'F_aim',.false.)
|
||||
call HDF5_read(F_aim,groupHandle,'F_aim',.false.)
|
||||
call MPI_Bcast(F_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
call HDF5_read(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
|
||||
call HDF5_read(F_aim_lastInc,groupHandle,'F_aim_lastInc',.false.)
|
||||
call MPI_Bcast(F_aim_lastInc,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
call HDF5_read(groupHandle,F_aimDot, 'F_aimDot',.false.)
|
||||
call HDF5_read(F_aimDot,groupHandle,'F_aimDot',.false.)
|
||||
call MPI_Bcast(F_aimDot,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
call HDF5_read(groupHandle,F, 'F')
|
||||
call HDF5_read(groupHandle,F_lastInc, 'F_lastInc')
|
||||
call HDF5_read(F,groupHandle,'F')
|
||||
call HDF5_read(F_lastInc,groupHandle,'F_lastInc')
|
||||
|
||||
elseif (interface_restartInc == 0) then restartRead
|
||||
F_lastInc = spread(spread(spread(math_I3,3,grid(1)),4,grid(2)),5,grid3) ! initialize to identity
|
||||
|
@ -212,10 +212,10 @@ subroutine grid_mechanical_spectral_basic_init
|
|||
|
||||
restartRead2: if (interface_restartInc > 0) then
|
||||
print'(a,i0,a)', ' reading more restart data of increment ', interface_restartInc, ' from file'
|
||||
call HDF5_read(groupHandle,C_volAvg, 'C_volAvg',.false.)
|
||||
call HDF5_read(C_volAvg,groupHandle,'C_volAvg',.false.)
|
||||
call MPI_Bcast(C_volAvg,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
call HDF5_read(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
|
||||
call HDF5_read(C_volAvgLastInc,groupHandle,'C_volAvgLastInc',.false.)
|
||||
call MPI_Bcast(C_volAvgLastInc,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
|
||||
|
@ -382,16 +382,16 @@ subroutine grid_mechanical_spectral_basic_restartWrite
|
|||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','w')
|
||||
groupHandle = HDF5_addGroup(fileHandle,'solver')
|
||||
|
||||
call HDF5_write(groupHandle,P_aim, 'P_aim',.false.)
|
||||
call HDF5_write(groupHandle,F_aim, 'F_aim',.false.)
|
||||
call HDF5_write(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
|
||||
call HDF5_write(groupHandle,F_aimDot, 'F_aimDot',.false.)
|
||||
call HDF5_write(groupHandle,F, 'F')
|
||||
call HDF5_write(groupHandle,F_lastInc, 'F_lastInc')
|
||||
call HDF5_write(P_aim,groupHandle,'P_aim',.false.)
|
||||
call HDF5_write(F_aim,groupHandle,'F_aim',.false.)
|
||||
call HDF5_write(F_aim_lastInc,groupHandle,'F_aim_lastInc',.false.)
|
||||
call HDF5_write(F_aimDot,groupHandle,'F_aimDot',.false.)
|
||||
call HDF5_write(F,groupHandle,'F')
|
||||
call HDF5_write(F_lastInc,groupHandle,'F_lastInc')
|
||||
|
||||
call HDF5_write(groupHandle,C_volAvg, 'C_volAvg',.false.)
|
||||
call HDF5_write(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
|
||||
call HDF5_write(groupHandle,C_minMaxAvg, 'C_minMaxAvg',.false.)
|
||||
call HDF5_write(C_volAvg,groupHandle,'C_volAvg',.false.)
|
||||
call HDF5_write(C_volAvgLastInc,groupHandle,'C_volAvgLastInc',.false.)
|
||||
call HDF5_write(C_minMaxAvg,groupHandle,'C_minMaxAvg',.false.)
|
||||
|
||||
call HDF5_closeGroup(groupHandle)
|
||||
call HDF5_closeFile(fileHandle)
|
||||
|
|
|
@ -205,22 +205,22 @@ subroutine grid_mechanical_spectral_polarisation_init
|
|||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
||||
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||
|
||||
call HDF5_read(groupHandle,P_aim, 'P_aim',.false.)
|
||||
call HDF5_read(P_aim,groupHandle,'P_aim',.false.)
|
||||
call MPI_Bcast(P_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
call HDF5_read(groupHandle,F_aim, 'F_aim',.false.)
|
||||
call HDF5_read(F_aim,groupHandle,'F_aim',.false.)
|
||||
call MPI_Bcast(F_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
call HDF5_read(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
|
||||
call HDF5_read(F_aim_lastInc,groupHandle,'F_aim_lastInc',.false.)
|
||||
call MPI_Bcast(F_aim_lastInc,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
call HDF5_read(groupHandle,F_aimDot, 'F_aimDot',.false.)
|
||||
call HDF5_read(F_aimDot,groupHandle,'F_aimDot',.false.)
|
||||
call MPI_Bcast(F_aimDot,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
call HDF5_read(groupHandle,F, 'F')
|
||||
call HDF5_read(groupHandle,F_lastInc, 'F_lastInc')
|
||||
call HDF5_read(groupHandle,F_tau, 'F_tau')
|
||||
call HDF5_read(groupHandle,F_tau_lastInc,'F_tau_lastInc')
|
||||
call HDF5_read(F,groupHandle,'F')
|
||||
call HDF5_read(F_lastInc,groupHandle,'F_lastInc')
|
||||
call HDF5_read(F_tau,groupHandle,'F_tau')
|
||||
call HDF5_read(F_tau_lastInc,groupHandle,'F_tau_lastInc')
|
||||
|
||||
elseif (interface_restartInc == 0) then restartRead
|
||||
F_lastInc = spread(spread(spread(math_I3,3,grid(1)),4,grid(2)),5,grid3) ! initialize to identity
|
||||
|
@ -238,10 +238,10 @@ subroutine grid_mechanical_spectral_polarisation_init
|
|||
|
||||
restartRead2: if (interface_restartInc > 0) then
|
||||
print'(a,i0,a)', ' reading more restart data of increment ', interface_restartInc, ' from file'
|
||||
call HDF5_read(groupHandle,C_volAvg, 'C_volAvg',.false.)
|
||||
call HDF5_read(C_volAvg,groupHandle,'C_volAvg',.false.)
|
||||
call MPI_Bcast(C_volAvg,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
call HDF5_read(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
|
||||
call HDF5_read(C_volAvgLastInc,groupHandle,'C_volAvgLastInc',.false.)
|
||||
call MPI_Bcast(C_volAvgLastInc,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||
if(ierr /=0) error stop 'MPI error'
|
||||
|
||||
|
@ -438,17 +438,17 @@ subroutine grid_mechanical_spectral_polarisation_restartWrite
|
|||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','w')
|
||||
groupHandle = HDF5_addGroup(fileHandle,'solver')
|
||||
|
||||
call HDF5_write(groupHandle,F_aim, 'P_aim',.false.)
|
||||
call HDF5_write(groupHandle,F_aim, 'F_aim',.false.)
|
||||
call HDF5_write(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
|
||||
call HDF5_write(groupHandle,F_aimDot, 'F_aimDot',.false.)
|
||||
call HDF5_write(groupHandle,F, 'F')
|
||||
call HDF5_write(groupHandle,F_lastInc, 'F_lastInc')
|
||||
call HDF5_write(groupHandle,F_tau, 'F_tau')
|
||||
call HDF5_write(groupHandle,F_tau_lastInc,'F_tau_lastInc')
|
||||
call HDF5_write(F_aim,groupHandle,'P_aim',.false.)
|
||||
call HDF5_write(F_aim,groupHandle,'F_aim',.false.)
|
||||
call HDF5_write(F_aim_lastInc,groupHandle,'F_aim_lastInc',.false.)
|
||||
call HDF5_write(F_aimDot,groupHandle,'F_aimDot',.false.)
|
||||
call HDF5_write(F,groupHandle,'F')
|
||||
call HDF5_write(F_lastInc,groupHandle,'F_lastInc')
|
||||
call HDF5_write(F_tau,groupHandle,'F_tau')
|
||||
call HDF5_write(F_tau_lastInc,groupHandle,'F_tau_lastInc')
|
||||
|
||||
call HDF5_write(groupHandle,C_volAvg, 'C_volAvg',.false.)
|
||||
call HDF5_write(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
|
||||
call HDF5_write(C_volAvg,groupHandle,'C_volAvg',.false.)
|
||||
call HDF5_write(C_volAvgLastInc,groupHandle,'C_volAvgLastInc',.false.)
|
||||
|
||||
call HDF5_closeGroup(groupHandle)
|
||||
call HDF5_closeFile(fileHandle)
|
||||
|
|
|
@ -396,7 +396,7 @@ subroutine homogenization_restartWrite(fileHandle)
|
|||
|
||||
groupHandle(2) = HDF5_addGroup(groupHandle(1),material_name_homogenization(ho))
|
||||
|
||||
call HDF5_write(groupHandle(2),homogState(ho)%state,'omega') ! ToDo: should be done by mech
|
||||
call HDF5_write(homogState(ho)%state,groupHandle(2),'omega') ! ToDo: should be done by mech
|
||||
|
||||
call HDF5_closeGroup(groupHandle(2))
|
||||
|
||||
|
@ -423,7 +423,7 @@ subroutine homogenization_restartRead(fileHandle)
|
|||
|
||||
groupHandle(2) = HDF5_openGroup(groupHandle(1),material_name_homogenization(ho))
|
||||
|
||||
call HDF5_read(groupHandle(2),homogState(ho)%state0,'omega') ! ToDo: should be done by mech
|
||||
call HDF5_read(homogState(ho)%state0,groupHandle(2),'omega') ! ToDo: should be done by mech
|
||||
|
||||
call HDF5_closeGroup(groupHandle(2))
|
||||
|
||||
|
|
|
@ -1243,13 +1243,13 @@ module subroutine mechanical_restartWrite(groupHandle,ph)
|
|||
integer, intent(in) :: ph
|
||||
|
||||
|
||||
call HDF5_write(groupHandle,plasticState(ph)%state,'omega')
|
||||
call HDF5_write(groupHandle,phase_mechanical_Fi(ph)%data,'F_i')
|
||||
call HDF5_write(groupHandle,phase_mechanical_Li(ph)%data,'L_i')
|
||||
call HDF5_write(groupHandle,phase_mechanical_Lp(ph)%data,'L_p')
|
||||
call HDF5_write(groupHandle,phase_mechanical_Fp(ph)%data,'F_p')
|
||||
call HDF5_write(groupHandle,phase_mechanical_S(ph)%data,'S')
|
||||
call HDF5_write(groupHandle,phase_mechanical_F(ph)%data,'F')
|
||||
call HDF5_write(plasticState(ph)%state,groupHandle,'omega')
|
||||
call HDF5_write(phase_mechanical_Fi(ph)%data,groupHandle,'F_i')
|
||||
call HDF5_write(phase_mechanical_Li(ph)%data,groupHandle,'L_i')
|
||||
call HDF5_write(phase_mechanical_Lp(ph)%data,groupHandle,'L_p')
|
||||
call HDF5_write(phase_mechanical_Fp(ph)%data,groupHandle,'F_p')
|
||||
call HDF5_write(phase_mechanical_S(ph)%data,groupHandle,'S')
|
||||
call HDF5_write(phase_mechanical_F(ph)%data,groupHandle,'F')
|
||||
|
||||
end subroutine mechanical_restartWrite
|
||||
|
||||
|
@ -1260,13 +1260,13 @@ module subroutine mechanical_restartRead(groupHandle,ph)
|
|||
integer, intent(in) :: ph
|
||||
|
||||
|
||||
call HDF5_read(groupHandle,plasticState(ph)%state0,'omega')
|
||||
call HDF5_read(groupHandle,phase_mechanical_Fi0(ph)%data,'F_i')
|
||||
call HDF5_read(groupHandle,phase_mechanical_Li0(ph)%data,'L_i')
|
||||
call HDF5_read(groupHandle,phase_mechanical_Lp0(ph)%data,'L_p')
|
||||
call HDF5_read(groupHandle,phase_mechanical_Fp0(ph)%data,'F_p')
|
||||
call HDF5_read(groupHandle,phase_mechanical_S0(ph)%data,'S')
|
||||
call HDF5_read(groupHandle,phase_mechanical_F0(ph)%data,'F')
|
||||
call HDF5_read(plasticState(ph)%state0,groupHandle,'omega')
|
||||
call HDF5_read(phase_mechanical_Fi0(ph)%data,groupHandle,'F_i')
|
||||
call HDF5_read(phase_mechanical_Li0(ph)%data,groupHandle,'L_i')
|
||||
call HDF5_read(phase_mechanical_Lp0(ph)%data,groupHandle,'L_p')
|
||||
call HDF5_read(phase_mechanical_Fp0(ph)%data,groupHandle,'F_p')
|
||||
call HDF5_read(phase_mechanical_S0(ph)%data,groupHandle,'S')
|
||||
call HDF5_read(phase_mechanical_F0(ph)%data,groupHandle,'F')
|
||||
|
||||
end subroutine mechanical_restartRead
|
||||
|
||||
|
|
|
@ -304,7 +304,7 @@ subroutine results_writeScalarDataset_real(group,dataset,label,description,SIuni
|
|||
|
||||
|
||||
groupHandle = results_openGroup(group)
|
||||
call HDF5_write(groupHandle,dataset,label)
|
||||
call HDF5_write(dataset,groupHandle,label)
|
||||
call executionStamp(group//'/'//label,description,SIunit)
|
||||
call HDF5_closeGroup(groupHandle)
|
||||
|
||||
|
@ -324,7 +324,7 @@ subroutine results_writeVectorDataset_real(group,dataset,label,description,SIuni
|
|||
|
||||
|
||||
groupHandle = results_openGroup(group)
|
||||
call HDF5_write(groupHandle,dataset,label)
|
||||
call HDF5_write(dataset,groupHandle,label)
|
||||
call executionStamp(group//'/'//label,description,SIunit)
|
||||
call HDF5_closeGroup(groupHandle)
|
||||
|
||||
|
@ -361,9 +361,9 @@ subroutine results_writeTensorDataset_real(group,dataset,label,description,SIuni
|
|||
do i=1,size(dataset_transposed,3)
|
||||
dataset_transposed(:,:,i) = transpose(dataset(:,:,i))
|
||||
enddo
|
||||
call HDF5_write(groupHandle,dataset_transposed,label)
|
||||
call HDF5_write(dataset_transposed,groupHandle,label)
|
||||
else
|
||||
call HDF5_write(groupHandle,dataset,label)
|
||||
call HDF5_write(dataset,groupHandle,label)
|
||||
endif
|
||||
call executionStamp(group//'/'//label,description,SIunit)
|
||||
call HDF5_closeGroup(groupHandle)
|
||||
|
@ -384,7 +384,7 @@ subroutine results_writeVectorDataset_int(group,dataset,label,description,SIunit
|
|||
|
||||
|
||||
groupHandle = results_openGroup(group)
|
||||
call HDF5_write(groupHandle,dataset,label)
|
||||
call HDF5_write(dataset,groupHandle,label)
|
||||
call executionStamp(group//'/'//label,description,SIunit)
|
||||
call HDF5_closeGroup(groupHandle)
|
||||
|
||||
|
@ -404,7 +404,7 @@ subroutine results_writeTensorDataset_int(group,dataset,label,description,SIunit
|
|||
|
||||
|
||||
groupHandle = results_openGroup(group)
|
||||
call HDF5_write(groupHandle,dataset,label)
|
||||
call HDF5_write(dataset,groupHandle,label)
|
||||
call executionStamp(group//'/'//label,description,SIunit)
|
||||
call HDF5_closeGroup(groupHandle)
|
||||
|
||||
|
|
Loading…
Reference in New Issue