make use of HDF5 and structure data
This commit is contained in:
parent
10f2c53256
commit
ab4a98fb53
|
@ -93,24 +93,24 @@ subroutine CPFEM_init
|
||||||
|
|
||||||
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5')
|
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5')
|
||||||
|
|
||||||
call HDF5_read(fileHandle,crystallite_F0, 'convergedF')
|
call HDF5_read(fileHandle,crystallite_F0, 'F')
|
||||||
call HDF5_read(fileHandle,crystallite_Fp0,'convergedFp')
|
call HDF5_read(fileHandle,crystallite_Fp0,'Fp')
|
||||||
call HDF5_read(fileHandle,crystallite_Fi0,'convergedFi')
|
call HDF5_read(fileHandle,crystallite_Fi0,'Fi')
|
||||||
call HDF5_read(fileHandle,crystallite_Lp0,'convergedLp')
|
call HDF5_read(fileHandle,crystallite_Lp0,'Lp')
|
||||||
call HDF5_read(fileHandle,crystallite_Li0,'convergedLi')
|
call HDF5_read(fileHandle,crystallite_Li0,'Li')
|
||||||
call HDF5_read(fileHandle,crystallite_S0, 'convergedS')
|
call HDF5_read(fileHandle,crystallite_S0, 'S')
|
||||||
|
|
||||||
groupPlasticID = HDF5_openGroup(fileHandle,'PlasticPhases')
|
groupPlasticID = HDF5_openGroup(fileHandle,'constituent')
|
||||||
do ph = 1,size(phase_plasticity)
|
do ph = 1,size(phase_plasticity)
|
||||||
write(PlasticItem,*) ph,'_'
|
write(PlasticItem,*) ph,'_'
|
||||||
call HDF5_read(groupPlasticID,plasticState(ph)%state0,trim(PlasticItem)//'convergedStateConst')
|
call HDF5_read(groupPlasticID,plasticState(ph)%state0,trim(PlasticItem)//'omega_plastic')
|
||||||
enddo
|
enddo
|
||||||
call HDF5_closeGroup(groupPlasticID)
|
call HDF5_closeGroup(groupPlasticID)
|
||||||
|
|
||||||
groupHomogID = HDF5_openGroup(fileHandle,'HomogStates')
|
groupHomogID = HDF5_openGroup(fileHandle,'materialpoint')
|
||||||
do homog = 1, material_Nhomogenization
|
do homog = 1, material_Nhomogenization
|
||||||
write(HomogItem,*) homog,'_'
|
write(HomogItem,*) homog,'_'
|
||||||
call HDF5_read(groupHomogID,homogState(homog)%state0, trim(HomogItem)//'convergedStateHomog')
|
call HDF5_read(groupHomogID,homogState(homog)%state0, trim(HomogItem)//'omega_homogenization')
|
||||||
enddo
|
enddo
|
||||||
call HDF5_closeGroup(groupHomogID)
|
call HDF5_closeGroup(groupHomogID)
|
||||||
|
|
||||||
|
@ -168,24 +168,24 @@ subroutine CPFEM_restartWrite
|
||||||
write(rankStr,'(a1,i0)')'_',worldrank
|
write(rankStr,'(a1,i0)')'_',worldrank
|
||||||
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5','a')
|
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5','a')
|
||||||
|
|
||||||
call HDF5_write(fileHandle,crystallite_partionedF, 'convergedF')
|
call HDF5_write(fileHandle,crystallite_partionedF,'F')
|
||||||
call HDF5_write(fileHandle,crystallite_Fp, 'convergedFp')
|
call HDF5_write(fileHandle,crystallite_Fp, 'Fp')
|
||||||
call HDF5_write(fileHandle,crystallite_Fi, 'convergedFi')
|
call HDF5_write(fileHandle,crystallite_Fi, 'Fi')
|
||||||
call HDF5_write(fileHandle,crystallite_Lp, 'convergedLp')
|
call HDF5_write(fileHandle,crystallite_Lp, 'Lp')
|
||||||
call HDF5_write(fileHandle,crystallite_Li, 'convergedLi')
|
call HDF5_write(fileHandle,crystallite_Li, 'Li')
|
||||||
call HDF5_write(fileHandle,crystallite_S, 'convergedS')
|
call HDF5_write(fileHandle,crystallite_S, 'S')
|
||||||
|
|
||||||
groupPlastic = HDF5_addGroup(fileHandle,'PlasticPhases')
|
groupPlastic = HDF5_addGroup(fileHandle,'constituent')
|
||||||
do ph = 1,size(phase_plasticity)
|
do ph = 1,size(phase_plasticity)
|
||||||
write(PlasticItem,*) ph,'_'
|
write(PlasticItem,*) ph,'_'
|
||||||
call HDF5_write(groupPlastic,plasticState(ph)%state,trim(PlasticItem)//'convergedStateConst')
|
call HDF5_write(groupPlastic,plasticState(ph)%state,trim(PlasticItem)//'omega_plastic')
|
||||||
enddo
|
enddo
|
||||||
call HDF5_closeGroup(groupPlastic)
|
call HDF5_closeGroup(groupPlastic)
|
||||||
|
|
||||||
groupHomog = HDF5_addGroup(fileHandle,'HomogStates')
|
groupHomog = HDF5_addGroup(fileHandle,'materialpoint')
|
||||||
do homog = 1, material_Nhomogenization
|
do homog = 1, material_Nhomogenization
|
||||||
write(HomogItem,*) homog,'_'
|
write(HomogItem,*) homog,'_'
|
||||||
call HDF5_write(groupHomog,homogState(homog)%state,trim(HomogItem)//'convergedStateHomog')
|
call HDF5_write(groupHomog,homogState(homog)%state,trim(HomogItem)//'omega_homogenization')
|
||||||
enddo
|
enddo
|
||||||
call HDF5_closeGroup(groupHomog)
|
call HDF5_closeGroup(groupHomog)
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ subroutine grid_mech_FEM_init
|
||||||
1.0_pReal, 1.0_pReal, 1.0_pReal, 1.0_pReal], [4,8])
|
1.0_pReal, 1.0_pReal, 1.0_pReal, 1.0_pReal], [4,8])
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
integer :: rank
|
integer :: rank
|
||||||
integer(HID_T) :: fileHandle
|
integer(HID_T) :: fileHandle, groupHandle
|
||||||
character(len=1024) :: rankStr
|
character(len=1024) :: rankStr
|
||||||
real(pReal), dimension(3,3,3,3) :: devNull
|
real(pReal), dimension(3,3,3,3) :: devNull
|
||||||
PetscScalar, pointer, dimension(:,:,:,:) :: &
|
PetscScalar, pointer, dimension(:,:,:,:) :: &
|
||||||
|
@ -188,15 +188,16 @@ subroutine grid_mech_FEM_init
|
||||||
'reading values of increment ', interface_restartInc, ' from file'
|
'reading values of increment ', interface_restartInc, ' from file'
|
||||||
|
|
||||||
write(rankStr,'(a1,i0)')'_',worldrank
|
write(rankStr,'(a1,i0)')'_',worldrank
|
||||||
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5')
|
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5')
|
||||||
|
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||||
|
|
||||||
call HDF5_read(fileHandle,F_aim, 'F_aim')
|
call HDF5_read(groupHandle,F_aim, 'F_aim')
|
||||||
call HDF5_read(fileHandle,F_aim_lastInc,'F_aim_lastInc')
|
call HDF5_read(groupHandle,F_aim_lastInc,'F_aim_lastInc')
|
||||||
call HDF5_read(fileHandle,F_aimDot, 'F_aimDot')
|
call HDF5_read(groupHandle,F_aimDot, 'F_aimDot')
|
||||||
call HDF5_read(fileHandle,F, 'F')
|
call HDF5_read(groupHandle,F, 'F')
|
||||||
call HDF5_read(fileHandle,F_lastInc, 'F_lastInc')
|
call HDF5_read(groupHandle,F_lastInc, 'F_lastInc')
|
||||||
call HDF5_read(fileHandle,u_current, 'u')
|
call HDF5_read(groupHandle,u_current, 'u')
|
||||||
call HDF5_read(fileHandle,u_lastInc, 'u_lastInc')
|
call HDF5_read(groupHandle,u_lastInc, 'u_lastInc')
|
||||||
|
|
||||||
elseif (interface_restartInc == 0) then restartRead
|
elseif (interface_restartInc == 0) then restartRead
|
||||||
F_lastInc = spread(spread(spread(math_I3,3,grid(1)),4,grid(2)),5,grid3) ! initialize to identity
|
F_lastInc = spread(spread(spread(math_I3,3,grid(1)),4,grid(2)),5,grid3) ! initialize to identity
|
||||||
|
@ -216,9 +217,12 @@ subroutine grid_mech_FEM_init
|
||||||
restartRead2: if (interface_restartInc > 0) then
|
restartRead2: if (interface_restartInc > 0) then
|
||||||
write(6,'(/,a,'//IO_intOut(interface_restartInc)//',a)') &
|
write(6,'(/,a,'//IO_intOut(interface_restartInc)//',a)') &
|
||||||
'reading more values of increment ', interface_restartInc, ' from file'
|
'reading more values of increment ', interface_restartInc, ' from file'
|
||||||
call HDF5_read(fileHandle,C_volAvg, 'C_volAvg')
|
call HDF5_read(groupHandle,C_volAvg, 'C_volAvg')
|
||||||
call HDF5_read(fileHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
call HDF5_read(groupHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
||||||
|
|
||||||
|
call HDF5_closeGroup(groupHandle)
|
||||||
call HDF5_closeFile(fileHandle)
|
call HDF5_closeFile(fileHandle)
|
||||||
|
|
||||||
endif restartRead2
|
endif restartRead2
|
||||||
|
|
||||||
end subroutine grid_mech_FEM_init
|
end subroutine grid_mech_FEM_init
|
||||||
|
@ -363,7 +367,7 @@ subroutine grid_mech_FEM_restartWrite()
|
||||||
|
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
PetscScalar, dimension(:,:,:,:), pointer :: u_current,u_lastInc
|
PetscScalar, dimension(:,:,:,:), pointer :: u_current,u_lastInc
|
||||||
integer(HID_T) :: fileHandle
|
integer(HID_T) :: fileHandle, groupHandle
|
||||||
character(len=32) :: rankStr
|
character(len=32) :: rankStr
|
||||||
|
|
||||||
call DMDAVecGetArrayF90(mech_grid,solution_current,u_current,ierr); CHKERRQ(ierr)
|
call DMDAVecGetArrayF90(mech_grid,solution_current,u_current,ierr); CHKERRQ(ierr)
|
||||||
|
@ -373,18 +377,20 @@ subroutine grid_mech_FEM_restartWrite()
|
||||||
|
|
||||||
write(rankStr,'(a1,i0)')'_',worldrank
|
write(rankStr,'(a1,i0)')'_',worldrank
|
||||||
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5','w')
|
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5','w')
|
||||||
|
groupHandle = HDF5_addGroup(fileHandle,'solver')
|
||||||
|
|
||||||
call HDF5_write(fileHandle,F_aim, 'F_aim')
|
call HDF5_write(groupHandle,F_aim, 'F_aim')
|
||||||
call HDF5_write(fileHandle,F_aim_lastInc, 'F_aim_lastInc')
|
call HDF5_write(groupHandle,F_aim_lastInc,'F_aim_lastInc')
|
||||||
call HDF5_write(fileHandle,F_aimDot, 'F_aimDot')
|
call HDF5_write(groupHandle,F_aimDot, 'F_aimDot')
|
||||||
call HDF5_write(fileHandle,F, 'F')
|
call HDF5_write(groupHandle,F, 'F')
|
||||||
call HDF5_write(fileHandle,F_lastInc, 'F_lastInc')
|
call HDF5_write(groupHandle,F_lastInc, 'F_lastInc')
|
||||||
call HDF5_write(fileHandle,u_current, 'u')
|
call HDF5_write(groupHandle,u_current, 'u')
|
||||||
call HDF5_write(fileHandle,u_lastInc, 'u_lastInc')
|
call HDF5_write(groupHandle,u_lastInc, 'u_lastInc')
|
||||||
|
|
||||||
call HDF5_write(fileHandle,C_volAvg, 'C_volAvg')
|
call HDF5_write(groupHandle,C_volAvg, 'C_volAvg')
|
||||||
call HDF5_write(fileHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
call HDF5_write(groupHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
||||||
|
|
||||||
|
call HDF5_closeGroup(groupHandle)
|
||||||
call HDF5_closeFile(fileHandle)
|
call HDF5_closeFile(fileHandle)
|
||||||
|
|
||||||
call DMDAVecRestoreArrayF90(mech_grid,solution_current,u_current,ierr);CHKERRQ(ierr)
|
call DMDAVecRestoreArrayF90(mech_grid,solution_current,u_current,ierr);CHKERRQ(ierr)
|
||||||
|
|
|
@ -94,8 +94,8 @@ subroutine grid_mech_spectral_basic_init
|
||||||
PetscScalar, pointer, dimension(:,:,:,:) :: &
|
PetscScalar, pointer, dimension(:,:,:,:) :: &
|
||||||
F ! pointer to solution data
|
F ! pointer to solution data
|
||||||
PetscInt, dimension(worldsize) :: localK
|
PetscInt, dimension(worldsize) :: localK
|
||||||
integer(HID_T) :: fileHandle
|
integer(HID_T) :: fileHandle, groupHandle
|
||||||
integer :: fileUnit
|
integer :: fileUnit
|
||||||
character(len=1024) :: rankStr
|
character(len=1024) :: rankStr
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- grid_mech_spectral_basic init -+>>>'
|
write(6,'(/,a)') ' <<<+- grid_mech_spectral_basic init -+>>>'
|
||||||
|
@ -150,18 +150,19 @@ subroutine grid_mech_spectral_basic_init
|
||||||
! init fields
|
! init fields
|
||||||
call DMDAVecGetArrayF90(da,solution_vec,F,ierr); CHKERRQ(ierr) ! places pointer on PETSc data
|
call DMDAVecGetArrayF90(da,solution_vec,F,ierr); CHKERRQ(ierr) ! places pointer on PETSc data
|
||||||
|
|
||||||
restartRead: if (interface_restartInc > 0) then
|
restartRead: if (interface_restartInc > 0) then
|
||||||
write(6,'(/,a,'//IO_intOut(interface_restartInc)//',a)') &
|
write(6,'(/,a,'//IO_intOut(interface_restartInc)//',a)') &
|
||||||
' reading values of increment ', interface_restartInc, ' from file'
|
' reading values of increment ', interface_restartInc, ' from file'
|
||||||
|
|
||||||
write(rankStr,'(a1,i0)')'_',worldrank
|
write(rankStr,'(a1,i0)')'_',worldrank
|
||||||
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5')
|
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5')
|
||||||
|
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||||
|
|
||||||
call HDF5_read(fileHandle,F_aim, 'F_aim')
|
call HDF5_read(groupHandle,F_aim, 'F_aim')
|
||||||
call HDF5_read(fileHandle,F_aim_lastInc,'F_aim_lastInc')
|
call HDF5_read(groupHandle,F_aim_lastInc,'F_aim_lastInc')
|
||||||
call HDF5_read(fileHandle,F_aimDot, 'F_aimDot')
|
call HDF5_read(groupHandle,F_aimDot, 'F_aimDot')
|
||||||
call HDF5_read(fileHandle,F, 'F')
|
call HDF5_read(groupHandle,F, 'F')
|
||||||
call HDF5_read(fileHandle,F_lastInc, 'F_lastInc')
|
call HDF5_read(groupHandle,F_lastInc, 'F_lastInc')
|
||||||
|
|
||||||
elseif (interface_restartInc == 0) then restartRead
|
elseif (interface_restartInc == 0) then restartRead
|
||||||
F_lastInc = spread(spread(spread(math_I3,3,grid(1)),4,grid(2)),5,grid3) ! initialize to identity
|
F_lastInc = spread(spread(spread(math_I3,3,grid(1)),4,grid(2)),5,grid3) ! initialize to identity
|
||||||
|
@ -179,8 +180,10 @@ subroutine grid_mech_spectral_basic_init
|
||||||
restartRead2: if (interface_restartInc > 0) then
|
restartRead2: if (interface_restartInc > 0) then
|
||||||
write(6,'(/,a,'//IO_intOut(interface_restartInc)//',a)') &
|
write(6,'(/,a,'//IO_intOut(interface_restartInc)//',a)') &
|
||||||
'reading more values of increment ', interface_restartInc, ' from file'
|
'reading more values of increment ', interface_restartInc, ' from file'
|
||||||
call HDF5_read(fileHandle,C_volAvg, 'C_volAvg')
|
call HDF5_read(groupHandle,C_volAvg, 'C_volAvg')
|
||||||
call HDF5_read(fileHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
call HDF5_read(groupHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
||||||
|
|
||||||
|
call HDF5_closeGroup(groupHandle)
|
||||||
call HDF5_closeFile(fileHandle)
|
call HDF5_closeFile(fileHandle)
|
||||||
|
|
||||||
call MPI_File_open(PETSC_COMM_WORLD, trim(getSolverJobName())//'.C_ref', &
|
call MPI_File_open(PETSC_COMM_WORLD, trim(getSolverJobName())//'.C_ref', &
|
||||||
|
@ -333,7 +336,7 @@ subroutine grid_mech_spectral_basic_restartWrite()
|
||||||
|
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
PetscScalar, dimension(:,:,:,:), pointer :: F
|
PetscScalar, dimension(:,:,:,:), pointer :: F
|
||||||
integer(HID_T) :: fileHandle
|
integer(HID_T) :: fileHandle, groupHandle
|
||||||
character(len=32) :: rankStr
|
character(len=32) :: rankStr
|
||||||
|
|
||||||
call DMDAVecGetArrayF90(da,solution_vec,F,ierr); CHKERRQ(ierr)
|
call DMDAVecGetArrayF90(da,solution_vec,F,ierr); CHKERRQ(ierr)
|
||||||
|
@ -342,17 +345,19 @@ subroutine grid_mech_spectral_basic_restartWrite()
|
||||||
|
|
||||||
write(rankStr,'(a1,i0)')'_',worldrank
|
write(rankStr,'(a1,i0)')'_',worldrank
|
||||||
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5','w')
|
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5','w')
|
||||||
|
groupHandle = HDF5_addGroup(fileHandle,'solver')
|
||||||
|
|
||||||
call HDF5_write(fileHandle,F_aim, 'F_aim')
|
call HDF5_write(groupHandle,F_aim, 'F_aim')
|
||||||
call HDF5_write(fileHandle,F_aim_lastInc,'F_aim_lastInc')
|
call HDF5_write(groupHandle,F_aim_lastInc,'F_aim_lastInc')
|
||||||
call HDF5_write(fileHandle,F_aimDot, 'F_aimDot')
|
call HDF5_write(groupHandle,F_aimDot, 'F_aimDot')
|
||||||
call HDF5_write(fileHandle,F, 'F')
|
call HDF5_write(groupHandle,F, 'F')
|
||||||
call HDF5_write(fileHandle,F_lastInc, 'F_lastInc')
|
call HDF5_write(groupHandle,F_lastInc, 'F_lastInc')
|
||||||
|
|
||||||
call HDF5_write(fileHandle,C_volAvg, 'C_volAvg')
|
call HDF5_write(groupHandle,C_volAvg, 'C_volAvg')
|
||||||
call HDF5_write(fileHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
call HDF5_write(groupHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
||||||
call HDF5_write(fileHandle,C_minMaxAvg, 'C_minMaxAvg')
|
call HDF5_write(groupHandle,C_minMaxAvg, 'C_minMaxAvg')
|
||||||
|
|
||||||
|
call HDF5_closeGroup(groupHandle)
|
||||||
call HDF5_closeFile(fileHandle)
|
call HDF5_closeFile(fileHandle)
|
||||||
|
|
||||||
if (num%update_gamma) call utilities_saveReferenceStiffness
|
if (num%update_gamma) call utilities_saveReferenceStiffness
|
||||||
|
|
|
@ -102,8 +102,8 @@ subroutine grid_mech_spectral_polarisation_init
|
||||||
F, & ! specific (sub)pointer
|
F, & ! specific (sub)pointer
|
||||||
F_tau ! specific (sub)pointer
|
F_tau ! specific (sub)pointer
|
||||||
PetscInt, dimension(worldsize) :: localK
|
PetscInt, dimension(worldsize) :: localK
|
||||||
integer(HID_T) :: fileHandle
|
integer(HID_T) :: fileHandle, groupHandle
|
||||||
integer :: fileUnit
|
integer :: fileUnit
|
||||||
character(len=1024) :: rankStr
|
character(len=1024) :: rankStr
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- grid_mech_spectral_polarisation init -+>>>'
|
write(6,'(/,a)') ' <<<+- grid_mech_spectral_polarisation init -+>>>'
|
||||||
|
@ -156,23 +156,24 @@ subroutine grid_mech_spectral_polarisation_init
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! init fields
|
! init fields
|
||||||
call DMDAVecGetArrayF90(da,solution_vec,FandF_tau,ierr); CHKERRQ(ierr) ! places pointer on PETSc data
|
call DMDAVecGetArrayF90(da,solution_vec,FandF_tau,ierr); CHKERRQ(ierr) ! places pointer on PETSc data
|
||||||
F => FandF_tau( 0: 8,:,:,:)
|
F => FandF_tau(0: 8,:,:,:)
|
||||||
F_tau => FandF_tau( 9:17,:,:,:)
|
F_tau => FandF_tau(9:17,:,:,:)
|
||||||
|
|
||||||
restartRead: if (interface_restartInc > 0) then
|
restartRead: if (interface_restartInc > 0) then
|
||||||
write(6,'(/,a,'//IO_intOut(interface_restartInc)//',a)') &
|
write(6,'(/,a,'//IO_intOut(interface_restartInc)//',a)') &
|
||||||
' reading values of increment ', interface_restartInc, ' from file'
|
' reading values of increment ', interface_restartInc, ' from file'
|
||||||
|
|
||||||
write(rankStr,'(a1,i0)')'_',worldrank
|
write(rankStr,'(a1,i0)')'_',worldrank
|
||||||
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5')
|
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5')
|
||||||
|
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||||
|
|
||||||
call HDF5_read(fileHandle,F_aim, 'F_aim')
|
call HDF5_read(groupHandle,F_aim, 'F_aim')
|
||||||
call HDF5_read(fileHandle,F_aim_lastInc,'F_aim_lastInc')
|
call HDF5_read(groupHandle,F_aim_lastInc,'F_aim_lastInc')
|
||||||
call HDF5_read(fileHandle,F_aimDot, 'F_aimDot')
|
call HDF5_read(groupHandle,F_aimDot, 'F_aimDot')
|
||||||
call HDF5_read(fileHandle,F, 'F')
|
call HDF5_read(groupHandle,F, 'F')
|
||||||
call HDF5_read(fileHandle,F_lastInc, 'F_lastInc')
|
call HDF5_read(groupHandle,F_lastInc, 'F_lastInc')
|
||||||
call HDF5_read(fileHandle,F_tau, 'F_tau')
|
call HDF5_read(groupHandle,F_tau, 'F_tau')
|
||||||
call HDF5_read(fileHandle,F_tau_lastInc,'F_tau_lastInc')
|
call HDF5_read(groupHandle,F_tau_lastInc,'F_tau_lastInc')
|
||||||
|
|
||||||
elseif (interface_restartInc == 0) then restartRead
|
elseif (interface_restartInc == 0) then restartRead
|
||||||
F_lastInc = spread(spread(spread(math_I3,3,grid(1)),4,grid(2)),5,grid3) ! initialize to identity
|
F_lastInc = spread(spread(spread(math_I3,3,grid(1)),4,grid(2)),5,grid3) ! initialize to identity
|
||||||
|
@ -192,8 +193,10 @@ subroutine grid_mech_spectral_polarisation_init
|
||||||
restartRead2: if (interface_restartInc > 0) then
|
restartRead2: if (interface_restartInc > 0) then
|
||||||
write(6,'(/,a,'//IO_intOut(interface_restartInc)//',a)') &
|
write(6,'(/,a,'//IO_intOut(interface_restartInc)//',a)') &
|
||||||
' reading more values of increment ', interface_restartInc, ' from file'
|
' reading more values of increment ', interface_restartInc, ' from file'
|
||||||
call HDF5_read(fileHandle,C_volAvg, 'C_volAvg')
|
call HDF5_read(groupHandle,C_volAvg, 'C_volAvg')
|
||||||
call HDF5_read(fileHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
call HDF5_read(groupHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
||||||
|
|
||||||
|
call HDF5_closeGroup(groupHandle)
|
||||||
call HDF5_closeFile(fileHandle)
|
call HDF5_closeFile(fileHandle)
|
||||||
|
|
||||||
call MPI_File_open(PETSC_COMM_WORLD, trim(getSolverJobName())//'.C_ref', &
|
call MPI_File_open(PETSC_COMM_WORLD, trim(getSolverJobName())//'.C_ref', &
|
||||||
|
@ -362,7 +365,7 @@ subroutine grid_mech_spectral_polarisation_age()
|
||||||
PetscScalar, dimension(:,:,:,:), pointer :: FandF_tau, F
|
PetscScalar, dimension(:,:,:,:), pointer :: FandF_tau, F
|
||||||
|
|
||||||
call DMDAVecGetArrayF90(da,solution_vec,FandF_tau,ierr); CHKERRQ(ierr)
|
call DMDAVecGetArrayF90(da,solution_vec,FandF_tau,ierr); CHKERRQ(ierr)
|
||||||
F => FandF_tau(0: 8,:,:,:)
|
F => FandF_tau(0:8,:,:,:)
|
||||||
materialpoint_F0 = reshape(F,[3,3,1,product(grid(1:2))*grid3])
|
materialpoint_F0 = reshape(F,[3,3,1,product(grid(1:2))*grid3])
|
||||||
call utilities_updateCoords(F)
|
call utilities_updateCoords(F)
|
||||||
call DMDAVecRestoreArrayF90(da,solution_vec,FandF_tau,ierr); CHKERRQ(ierr)
|
call DMDAVecRestoreArrayF90(da,solution_vec,FandF_tau,ierr); CHKERRQ(ierr)
|
||||||
|
@ -377,7 +380,7 @@ subroutine grid_mech_spectral_polarisation_restartWrite()
|
||||||
|
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
PetscScalar, dimension(:,:,:,:), pointer :: FandF_tau, F, F_tau
|
PetscScalar, dimension(:,:,:,:), pointer :: FandF_tau, F, F_tau
|
||||||
integer(HID_T) :: fileHandle
|
integer(HID_T) :: fileHandle, groupHandle
|
||||||
character(len=32) :: rankStr
|
character(len=32) :: rankStr
|
||||||
|
|
||||||
call DMDAVecGetArrayF90(da,solution_vec,FandF_tau,ierr); CHKERRQ(ierr)
|
call DMDAVecGetArrayF90(da,solution_vec,FandF_tau,ierr); CHKERRQ(ierr)
|
||||||
|
@ -387,19 +390,21 @@ subroutine grid_mech_spectral_polarisation_restartWrite()
|
||||||
write(6,'(a)') ' writing solver data required for restart to file';flush(6)
|
write(6,'(a)') ' writing solver data required for restart to file';flush(6)
|
||||||
|
|
||||||
write(rankStr,'(a1,i0)')'_',worldrank
|
write(rankStr,'(a1,i0)')'_',worldrank
|
||||||
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5','w')
|
fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5','w')
|
||||||
|
groupHandle = HDF5_addGroup(fileHandle,'solver')
|
||||||
|
|
||||||
call HDF5_write(fileHandle,F_aim, 'F_aim')
|
call HDF5_write(groupHandle,F_aim, 'F_aim')
|
||||||
call HDF5_write(fileHandle,F_aim_lastInc, 'F_aim_lastInc')
|
call HDF5_write(groupHandle,F_aim_lastInc,'F_aim_lastInc')
|
||||||
call HDF5_write(fileHandle,F_aimDot, 'F_aimDot')
|
call HDF5_write(groupHandle,F_aimDot, 'F_aimDot')
|
||||||
call HDF5_write(fileHandle,F, 'F')
|
call HDF5_write(groupHandle,F, 'F')
|
||||||
call HDF5_write(fileHandle,F_lastInc, 'F_lastInc')
|
call HDF5_write(groupHandle,F_lastInc, 'F_lastInc')
|
||||||
call HDF5_write(fileHandle,F_tau, 'F_tau')
|
call HDF5_write(groupHandle,F_tau, 'F_tau')
|
||||||
call HDF5_write(fileHandle,F_tau_lastInc, 'F_tau_lastInc')
|
call HDF5_write(groupHandle,F_tau_lastInc,'F_tau_lastInc')
|
||||||
|
|
||||||
call HDF5_write(fileHandle,C_volAvg, 'C_volAvg')
|
call HDF5_write(groupHandle,C_volAvg, 'C_volAvg')
|
||||||
call HDF5_write(fileHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
call HDF5_write(groupHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
||||||
|
|
||||||
|
call HDF5_closeGroup(groupHandle)
|
||||||
call HDF5_closeFile(fileHandle)
|
call HDF5_closeFile(fileHandle)
|
||||||
|
|
||||||
if(num%update_gamma) call utilities_saveReferenceStiffness
|
if(num%update_gamma) call utilities_saveReferenceStiffness
|
||||||
|
@ -483,13 +488,13 @@ subroutine formResidual(in, FandF_tau, &
|
||||||
integer :: &
|
integer :: &
|
||||||
i, j, k, e
|
i, j, k, e
|
||||||
|
|
||||||
F => FandF_tau(1:3,1:3,1,&
|
F => FandF_tau(1:3,1:3,1,&
|
||||||
XG_RANGE,YG_RANGE,ZG_RANGE)
|
XG_RANGE,YG_RANGE,ZG_RANGE)
|
||||||
F_tau => FandF_tau(1:3,1:3,2,&
|
F_tau => FandF_tau(1:3,1:3,2,&
|
||||||
XG_RANGE,YG_RANGE,ZG_RANGE)
|
XG_RANGE,YG_RANGE,ZG_RANGE)
|
||||||
residual_F => residuum(1:3,1:3,1,&
|
residual_F => residuum(1:3,1:3,1,&
|
||||||
X_RANGE, Y_RANGE, Z_RANGE)
|
X_RANGE, Y_RANGE, Z_RANGE)
|
||||||
residual_F_tau => residuum(1:3,1:3,2,&
|
residual_F_tau => residuum(1:3,1:3,2,&
|
||||||
X_RANGE, Y_RANGE, Z_RANGE)
|
X_RANGE, Y_RANGE, Z_RANGE)
|
||||||
|
|
||||||
F_av = sum(sum(sum(F,dim=5),dim=4),dim=3) * wgt
|
F_av = sum(sum(sum(F,dim=5),dim=4),dim=3) * wgt
|
||||||
|
|
Loading…
Reference in New Issue