clearer structure
This commit is contained in:
parent
9db5cbb667
commit
378729f5c4
|
@ -73,7 +73,6 @@ program DAMASK_spectral
|
||||||
fileUnit = 0, & !< file unit for reading load case and writing results
|
fileUnit = 0, & !< file unit for reading load case and writing results
|
||||||
myStat, &
|
myStat, &
|
||||||
statUnit = 0, & !< file unit for statistics output
|
statUnit = 0, & !< file unit for statistics output
|
||||||
lastRestartWritten = 0, & !< total increment # at which last restart information was written
|
|
||||||
stagIter, &
|
stagIter, &
|
||||||
nActiveFields = 0
|
nActiveFields = 0
|
||||||
character(len=6) :: loadcase_string
|
character(len=6) :: loadcase_string
|
||||||
|
@ -95,6 +94,8 @@ program DAMASK_spectral
|
||||||
mech_forward
|
mech_forward
|
||||||
procedure(grid_mech_spectral_basic_solution), pointer :: &
|
procedure(grid_mech_spectral_basic_solution), pointer :: &
|
||||||
mech_solution
|
mech_solution
|
||||||
|
procedure(grid_mech_spectral_basic_restartWrite), pointer :: &
|
||||||
|
mech_restartWrite
|
||||||
|
|
||||||
external :: &
|
external :: &
|
||||||
quit
|
quit
|
||||||
|
@ -122,6 +123,7 @@ program DAMASK_spectral
|
||||||
mech_init => grid_mech_spectral_basic_init
|
mech_init => grid_mech_spectral_basic_init
|
||||||
mech_forward => grid_mech_spectral_basic_forward
|
mech_forward => grid_mech_spectral_basic_forward
|
||||||
mech_solution => grid_mech_spectral_basic_solution
|
mech_solution => grid_mech_spectral_basic_solution
|
||||||
|
mech_restartWrite => grid_mech_spectral_basic_restartWrite
|
||||||
|
|
||||||
case ('polarisation')
|
case ('polarisation')
|
||||||
if(iand(debug_level(debug_spectral),debug_levelBasic)/= 0) &
|
if(iand(debug_level(debug_spectral),debug_levelBasic)/= 0) &
|
||||||
|
@ -129,13 +131,15 @@ program DAMASK_spectral
|
||||||
mech_init => grid_mech_spectral_polarisation_init
|
mech_init => grid_mech_spectral_polarisation_init
|
||||||
mech_forward => grid_mech_spectral_polarisation_forward
|
mech_forward => grid_mech_spectral_polarisation_forward
|
||||||
mech_solution => grid_mech_spectral_polarisation_solution
|
mech_solution => grid_mech_spectral_polarisation_solution
|
||||||
|
mech_restartWrite => grid_mech_spectral_polarisation_restartWrite
|
||||||
|
|
||||||
case ('fem')
|
case ('fem')
|
||||||
if(iand(debug_level(debug_spectral),debug_levelBasic)/= 0) &
|
if(iand(debug_level(debug_spectral),debug_levelBasic)/= 0) &
|
||||||
call IO_warning(42, ext_msg='debug Divergence')
|
call IO_warning(42, ext_msg='debug Divergence')
|
||||||
mech_init => grid_mech_FEM_init
|
mech_init => grid_mech_FEM_init
|
||||||
mech_forward => grid_mech_FEM_forward
|
mech_forward => grid_mech_FEM_forward
|
||||||
mech_solution => grid_mech_FEM_solution
|
mech_solution => grid_mech_FEM_solution
|
||||||
|
mech_restartWrite => grid_mech_FEM_restartWrite
|
||||||
|
|
||||||
case default
|
case default
|
||||||
call IO_error(error_ID = 891, ext_msg = config_numerics%getString('spectral_solver'))
|
call IO_error(error_ID = 891, ext_msg = config_numerics%getString('spectral_solver'))
|
||||||
|
@ -528,7 +532,7 @@ program DAMASK_spectral
|
||||||
call IO_warning(850)
|
call IO_warning(850)
|
||||||
call MPI_File_close(fileUnit,ierr)
|
call MPI_File_close(fileUnit,ierr)
|
||||||
close(statUnit)
|
close(statUnit)
|
||||||
call quit(-1*(lastRestartWritten+1)) ! quit and provide information about last restart inc written
|
call quit(0) ! quit
|
||||||
endif
|
endif
|
||||||
|
|
||||||
enddo subStepLooping
|
enddo subStepLooping
|
||||||
|
@ -561,10 +565,7 @@ program DAMASK_spectral
|
||||||
fileOffset = fileOffset + sum(outputSize) ! forward to current file position
|
fileOffset = fileOffset + sum(outputSize) ! forward to current file position
|
||||||
call CPFEM_results(totalIncsCounter,time)
|
call CPFEM_results(totalIncsCounter,time)
|
||||||
endif
|
endif
|
||||||
if (mod(inc,loadCases(currentLoadCase)%restartFrequency) == 0) then ! at frequency of writing restart information
|
if (mod(inc,loadCases(currentLoadCase)%restartFrequency) == 0) call mech_restartWrite
|
||||||
restartWrite = .true. ! set restart parameter for FEsolving
|
|
||||||
lastRestartWritten = inc ! QUESTION: first call to CPFEM_general will write?
|
|
||||||
endif
|
|
||||||
|
|
||||||
endif skipping
|
endif skipping
|
||||||
|
|
||||||
|
|
|
@ -302,7 +302,6 @@ subroutine grid_mech_FEM_forward(guess,timeinc,timeinc_old,loadCaseTime,deformat
|
||||||
if (cutBack) then
|
if (cutBack) then
|
||||||
C_volAvg = C_volAvgLastInc
|
C_volAvg = C_volAvgLastInc
|
||||||
else
|
else
|
||||||
call grid_mech_FEM_restartWrite
|
|
||||||
call CPFEM_age ! age state and kinematics
|
call CPFEM_age ! age state and kinematics
|
||||||
call utilities_updateCoords(F)
|
call utilities_updateCoords(F)
|
||||||
|
|
||||||
|
@ -360,8 +359,6 @@ subroutine grid_mech_FEM_restartWrite()
|
||||||
integer(HID_T) :: fileHandle
|
integer(HID_T) :: fileHandle
|
||||||
character(len=32) :: rankStr
|
character(len=32) :: rankStr
|
||||||
|
|
||||||
if(.not. restartWrite) return
|
|
||||||
|
|
||||||
call DMDAVecGetArrayF90(mech_grid,solution_current,u_current,ierr); CHKERRQ(ierr)
|
call DMDAVecGetArrayF90(mech_grid,solution_current,u_current,ierr); CHKERRQ(ierr)
|
||||||
call DMDAVecGetArrayF90(mech_grid,solution_lastInc,u_lastInc,ierr); CHKERRQ(ierr)
|
call DMDAVecGetArrayF90(mech_grid,solution_lastInc,u_lastInc,ierr); CHKERRQ(ierr)
|
||||||
|
|
||||||
|
|
|
@ -221,7 +221,7 @@ function grid_mech_spectral_basic_solution(incInfoIn,timeinc,timeinc_old,stress_
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! update stiffness (and gamma operator)
|
! update stiffness (and gamma operator)
|
||||||
S = utilities_maskedCompliance(rotation_BC,stress_BC%maskLogical,C_volAvg)
|
S = utilities_maskedCompliance(rotation_BC,stress_BC%maskLogical,C_volAvg)
|
||||||
if (num%update_gamma) call utilities_updateGamma(C_minMaxAvg)
|
if(num%update_gamma) call utilities_updateGamma(C_minMaxAvg)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! set module wide available data
|
! set module wide available data
|
||||||
|
@ -274,7 +274,7 @@ subroutine grid_mech_spectral_basic_forward(guess,timeinc,timeinc_old,loadCaseTi
|
||||||
C_volAvg = C_volAvgLastInc
|
C_volAvg = C_volAvgLastInc
|
||||||
C_minMaxAvg = C_minMaxAvgLastInc
|
C_minMaxAvg = C_minMaxAvgLastInc
|
||||||
else
|
else
|
||||||
call grid_mech_spectral_basic_restartWrite
|
|
||||||
call CPFEM_age ! age state and kinematics
|
call CPFEM_age ! age state and kinematics
|
||||||
call utilities_updateCoords(F)
|
call utilities_updateCoords(F)
|
||||||
|
|
||||||
|
@ -324,8 +324,6 @@ subroutine grid_mech_spectral_basic_restartWrite()
|
||||||
PetscScalar, dimension(:,:,:,:), pointer :: F
|
PetscScalar, dimension(:,:,:,:), pointer :: F
|
||||||
integer(HID_T) :: fileHandle
|
integer(HID_T) :: fileHandle
|
||||||
character(len=32) :: rankStr
|
character(len=32) :: rankStr
|
||||||
|
|
||||||
if(.not. restartWrite) return
|
|
||||||
|
|
||||||
call DMDAVecGetArrayF90(da,solution_vec,F,ierr); CHKERRQ(ierr)
|
call DMDAVecGetArrayF90(da,solution_vec,F,ierr); CHKERRQ(ierr)
|
||||||
|
|
||||||
|
|
|
@ -297,7 +297,6 @@ subroutine grid_mech_spectral_polarisation_forward(guess,timeinc,timeinc_old,loa
|
||||||
C_volAvg = C_volAvgLastInc
|
C_volAvg = C_volAvgLastInc
|
||||||
C_minMaxAvg = C_minMaxAvgLastInc
|
C_minMaxAvg = C_minMaxAvgLastInc
|
||||||
else
|
else
|
||||||
call grid_mech_spectral_polarisation_restartWrite
|
|
||||||
call CPFEM_age ! age state and kinematics
|
call CPFEM_age ! age state and kinematics
|
||||||
call utilities_updateCoords(F)
|
call utilities_updateCoords(F)
|
||||||
|
|
||||||
|
@ -368,8 +367,6 @@ subroutine grid_mech_spectral_polarisation_restartWrite()
|
||||||
PetscScalar, dimension(:,:,:,:), pointer :: FandF_tau, F, F_tau
|
PetscScalar, dimension(:,:,:,:), pointer :: FandF_tau, F, F_tau
|
||||||
integer(HID_T) :: fileHandle
|
integer(HID_T) :: fileHandle
|
||||||
character(len=32) :: rankStr
|
character(len=32) :: rankStr
|
||||||
|
|
||||||
if(.not. restartWrite) return
|
|
||||||
|
|
||||||
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,:,:,:)
|
||||||
|
@ -393,7 +390,7 @@ subroutine grid_mech_spectral_polarisation_restartWrite()
|
||||||
|
|
||||||
call HDF5_closeFile(fileHandle)
|
call HDF5_closeFile(fileHandle)
|
||||||
|
|
||||||
if (num%update_gamma) call utilities_saveReferenceStiffness
|
if(num%update_gamma) call utilities_saveReferenceStiffness
|
||||||
|
|
||||||
call CPFEM_restartWrite
|
call CPFEM_restartWrite
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue