Merge branch 'language-polish' into 'development'
Additional language polish See merge request damask/DAMASK!765
This commit is contained in:
commit
a8875677cd
28
src/CLI.f90
28
src/CLI.f90
|
@ -62,12 +62,12 @@ subroutine CLI_init()
|
||||||
|
|
||||||
workingDirArg = getCWD()
|
workingDirArg = getCWD()
|
||||||
|
|
||||||
print'(/,1x,a)', '<<<+- CLI init -+>>>'
|
print '(/,1x,a)', '<<<+- CLI init -+>>>'
|
||||||
|
|
||||||
! http://patorjk.com/software/taag/#p=display&f=Lean&t=DAMASK%203
|
! http://patorjk.com/software/taag/#p=display&f=Lean&t=DAMASK%203
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
print*, achar(27)//'[31m'
|
print '(a)', achar(27)//'[31m'
|
||||||
print'(1x,a,/)', 'debug version - debug version - debug version - debug version - debug version'
|
print '(1x,a,/)', 'debug version - debug version - debug version - debug version - debug version'
|
||||||
#else
|
#else
|
||||||
print '(a)', achar(27)//'[94m'
|
print '(a)', achar(27)//'[94m'
|
||||||
#endif
|
#endif
|
||||||
|
@ -82,7 +82,7 @@ subroutine CLI_init()
|
||||||
print '(1x,a)', 'Mesh solver'
|
print '(1x,a)', 'Mesh solver'
|
||||||
#endif
|
#endif
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
print'(/,1x,a)', 'debug version - debug version - debug version - debug version - debug version'
|
print '(/,1x,a)', 'debug version - debug version - debug version - debug version - debug version'
|
||||||
#endif
|
#endif
|
||||||
print '(a)', achar(27)//'[0m'
|
print '(a)', achar(27)//'[0m'
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ subroutine CLI_init()
|
||||||
end do
|
end do
|
||||||
|
|
||||||
if (.not. all([allocated(loadcaseArg),allocated(geometryArg),allocated(materialArg)])) then
|
if (.not. all([allocated(loadcaseArg),allocated(geometryArg),allocated(materialArg)])) then
|
||||||
print'(/,1x,a)', 'ERROR: Please specify geometry AND load case AND material configuration (-h for help)'
|
print '(/,1x,a)', 'ERROR: Please specify geometry AND load case AND material configuration (-h for help)'
|
||||||
call quit(1)
|
call quit(1)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
@ -174,17 +174,17 @@ subroutine CLI_init()
|
||||||
|
|
||||||
commandLine = getArg(-1)
|
commandLine = getArg(-1)
|
||||||
|
|
||||||
print'(/,1x,a)', 'Host name: '//getHostName()
|
print '(/,1x,a)', 'Host name: '//getHostName()
|
||||||
print'(1x,a)', 'User name: '//getUserName()
|
print '(1x,a)', 'User name: '//getUserName()
|
||||||
|
|
||||||
print'(/,1x,a,/)', 'Command line call: '//trim(commandLine)
|
print '(/,1x,a,/)', 'Command line call: '//trim(commandLine)
|
||||||
print'(1x,a)', 'Working directory: '//IO_glueDiffering(getCWD(),workingDirArg)
|
print '(1x,a)', 'Working directory: '//IO_glueDiffering(getCWD(),workingDirArg)
|
||||||
print'(1x,a)', 'Geometry: '//IO_glueDiffering(CLI_geomFile,geometryArg)
|
print '(1x,a)', 'Geometry: '//IO_glueDiffering(CLI_geomFile,geometryArg)
|
||||||
print'(1x,a)', 'Load case: '//IO_glueDiffering(CLI_loadFile,loadCaseArg)
|
print '(1x,a)', 'Load case: '//IO_glueDiffering(CLI_loadFile,loadCaseArg)
|
||||||
print'(1x,a)', 'Material config: '//IO_glueDiffering(CLI_materialFile,materialArg)
|
print '(1x,a)', 'Material config: '//IO_glueDiffering(CLI_materialFile,materialArg)
|
||||||
print'(1x,a)', 'Solver job name: '//getSolverJobName()
|
print '(1x,a)', 'Solver job name: '//getSolverJobName()
|
||||||
if (CLI_restartInc > 0) &
|
if (CLI_restartInc > 0) &
|
||||||
print'(1x,a,i6.6)', 'Restart from increment: ', CLI_restartInc
|
print '(1x,a,i6.6)', 'Restart from increment: ', CLI_restartInc
|
||||||
|
|
||||||
|
|
||||||
end subroutine CLI_init
|
end subroutine CLI_init
|
||||||
|
|
|
@ -363,7 +363,7 @@ subroutine skip_empty_lines(blck,s_blck)
|
||||||
|
|
||||||
|
|
||||||
empty = .true.
|
empty = .true.
|
||||||
do while(empty .and. len_trim(blck(s_blck:)) /= 0)
|
do while (empty .and. len_trim(blck(s_blck:)) /= 0)
|
||||||
empty = len_trim(IO_rmComment(blck(s_blck:s_blck + index(blck(s_blck:),IO_EOL) - 2))) == 0
|
empty = len_trim(IO_rmComment(blck(s_blck:s_blck + index(blck(s_blck:),IO_EOL) - 2))) == 0
|
||||||
if (empty) s_blck = s_blck + index(blck(s_blck:),IO_EOL)
|
if (empty) s_blck = s_blck + index(blck(s_blck:),IO_EOL)
|
||||||
end do
|
end do
|
||||||
|
@ -439,10 +439,10 @@ subroutine remove_line_break(blck,s_blck,e_char,flow_line)
|
||||||
logical :: line_end
|
logical :: line_end
|
||||||
|
|
||||||
|
|
||||||
line_end =.false.
|
line_end = .false.
|
||||||
flow_line = ''
|
flow_line = ''
|
||||||
|
|
||||||
do while(.not.line_end)
|
do while (.not. line_end)
|
||||||
flow_line = flow_line//IO_rmComment(blck(s_blck:s_blck + index(blck(s_blck:),IO_EOL) - 2))//' '
|
flow_line = flow_line//IO_rmComment(blck(s_blck:s_blck + index(blck(s_blck:),IO_EOL) - 2))//' '
|
||||||
line_end = flow_is_closed(flow_line,e_char)
|
line_end = flow_is_closed(flow_line,e_char)
|
||||||
s_blck = s_blck + index(blck(s_blck:),IO_EOL)
|
s_blck = s_blck + index(blck(s_blck:),IO_EOL)
|
||||||
|
@ -472,7 +472,7 @@ subroutine list_item_inline(blck,s_blck,inline,offset)
|
||||||
|
|
||||||
indent_next = indentDepth(blck(s_blck:))
|
indent_next = indentDepth(blck(s_blck:))
|
||||||
|
|
||||||
do while(indent_next > indent)
|
do while (indent_next > indent)
|
||||||
inline = inline//' '//trim(adjustl(IO_rmComment(blck(s_blck:s_blck + index(blck(s_blck:),IO_EOL) - 2))))
|
inline = inline//' '//trim(adjustl(IO_rmComment(blck(s_blck:s_blck + index(blck(s_blck:),IO_EOL) - 2))))
|
||||||
s_blck = s_blck + index(blck(s_blck:),IO_EOL)
|
s_blck = s_blck + index(blck(s_blck:),IO_EOL)
|
||||||
indent_next = indentDepth(blck(s_blck:))
|
indent_next = indentDepth(blck(s_blck:))
|
||||||
|
@ -502,45 +502,45 @@ recursive subroutine line_isFlow(flow,s_flow,line)
|
||||||
if (index(adjustl(line),'[') == 1) then
|
if (index(adjustl(line),'[') == 1) then
|
||||||
s = index(line,'[')
|
s = index(line,'[')
|
||||||
flow(s_flow:s_flow) = '['
|
flow(s_flow:s_flow) = '['
|
||||||
s_flow = s_flow +1
|
s_flow = s_flow+1
|
||||||
do while(s < len_trim(line))
|
do while (s < len_trim(line))
|
||||||
list_chunk = s + find_end(line(s+1:),']')
|
list_chunk = s + find_end(line(s+1:),']')
|
||||||
if (iskeyValue(line(s+1:list_chunk-1))) then
|
if (iskeyValue(line(s+1:list_chunk-1))) then
|
||||||
flow(s_flow:s_flow) = '{'
|
flow(s_flow:s_flow) = '{'
|
||||||
s_flow = s_flow +1
|
s_flow = s_flow+1
|
||||||
call keyValue_toFlow(flow,s_flow,line(s+1:list_chunk-1))
|
call keyValue_toFlow(flow,s_flow,line(s+1:list_chunk-1))
|
||||||
flow(s_flow:s_flow) = '}'
|
flow(s_flow:s_flow) = '}'
|
||||||
s_flow = s_flow +1
|
s_flow = s_flow+1
|
||||||
elseif (isFlow(line(s+1:list_chunk-1))) then
|
elseif (isFlow(line(s+1:list_chunk-1))) then
|
||||||
call line_isFlow(flow,s_flow,line(s+1:list_chunk-1))
|
call line_isFlow(flow,s_flow,line(s+1:list_chunk-1))
|
||||||
else
|
else
|
||||||
call line_toFlow(flow,s_flow,line(s+1:list_chunk-1))
|
call line_toFlow(flow,s_flow,line(s+1:list_chunk-1))
|
||||||
end if
|
end if
|
||||||
flow(s_flow:s_flow+1) = ', '
|
flow(s_flow:s_flow+1) = ', '
|
||||||
s_flow = s_flow +2
|
s_flow = s_flow+2
|
||||||
s = s + find_end(line(s+1:),']')
|
s = s + find_end(line(s+1:),']')
|
||||||
end do
|
end do
|
||||||
s_flow = s_flow - 1
|
s_flow = s_flow-1
|
||||||
if (flow(s_flow-1:s_flow-1) == ',') s_flow = s_flow - 1
|
if (flow(s_flow-1:s_flow-1) == ',') s_flow = s_flow-1
|
||||||
flow(s_flow:s_flow) = ']'
|
flow(s_flow:s_flow) = ']'
|
||||||
s_flow = s_flow+1
|
s_flow = s_flow+1
|
||||||
|
|
||||||
elseif (index(adjustl(line),'{') == 1) then
|
elseif (index(adjustl(line),'{') == 1) then
|
||||||
s = index(line,'{')
|
s = index(line,'{')
|
||||||
flow(s_flow:s_flow) = '{'
|
flow(s_flow:s_flow) = '{'
|
||||||
s_flow = s_flow +1
|
s_flow = s_flow+1
|
||||||
do while(s < len_trim(line))
|
do while (s < len_trim(line))
|
||||||
dict_chunk = s + find_end(line(s+1:),'}')
|
dict_chunk = s + find_end(line(s+1:),'}')
|
||||||
if ( .not. iskeyValue(line(s+1:dict_chunk-1))) call IO_error(705,ext_msg=line)
|
if (.not. iskeyValue(line(s+1:dict_chunk-1))) call IO_error(705,ext_msg=line)
|
||||||
call keyValue_toFlow(flow,s_flow,line(s+1:dict_chunk-1))
|
call keyValue_toFlow(flow,s_flow,line(s+1:dict_chunk-1))
|
||||||
flow(s_flow:s_flow+1) = ', '
|
flow(s_flow:s_flow+1) = ', '
|
||||||
s_flow = s_flow +2
|
s_flow = s_flow+2
|
||||||
s = s + find_end(line(s+1:),'}')
|
s = s + find_end(line(s+1:),'}')
|
||||||
end do
|
end do
|
||||||
s_flow = s_flow -1
|
s_flow = s_flow-1
|
||||||
if (flow(s_flow-1:s_flow-1) == ',') s_flow = s_flow -1
|
if (flow(s_flow-1:s_flow-1) == ',') s_flow = s_flow-1
|
||||||
flow(s_flow:s_flow) = '}'
|
flow(s_flow:s_flow) = '}'
|
||||||
s_flow = s_flow +1
|
s_flow = s_flow+1
|
||||||
else
|
else
|
||||||
call line_toFlow(flow,s_flow,line)
|
call line_toFlow(flow,s_flow,line)
|
||||||
end if
|
end if
|
||||||
|
@ -682,13 +682,13 @@ recursive subroutine lst(blck,flow,s_blck,s_flow,offset)
|
||||||
|
|
||||||
if (isScalar(line) .or. isFlow(line)) then
|
if (isScalar(line) .or. isFlow(line)) then
|
||||||
flow(s_flow:s_flow+1) = ', '
|
flow(s_flow:s_flow+1) = ', '
|
||||||
s_flow = s_flow + 2
|
s_flow = s_flow+2
|
||||||
end if
|
end if
|
||||||
|
|
||||||
end do
|
end do
|
||||||
|
|
||||||
s_flow = s_flow - 1
|
s_flow = s_flow-1
|
||||||
if (flow(s_flow-1:s_flow-1) == ',') s_flow = s_flow - 1
|
if (flow(s_flow-1:s_flow-1) == ',') s_flow = s_flow-1
|
||||||
|
|
||||||
end subroutine lst
|
end subroutine lst
|
||||||
|
|
||||||
|
@ -739,7 +739,7 @@ recursive subroutine dct(blck,flow,s_blck,s_flow,offset)
|
||||||
line = line(indentDepth(line)+1:)
|
line = line(indentDepth(line)+1:)
|
||||||
if (previous_isKey) then
|
if (previous_isKey) then
|
||||||
flow(s_flow-1:s_flow) = ', '
|
flow(s_flow-1:s_flow) = ', '
|
||||||
s_flow = s_flow + 1
|
s_flow = s_flow+1
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if (isKeyValue(line)) then
|
if (isKeyValue(line)) then
|
||||||
|
@ -763,19 +763,19 @@ recursive subroutine dct(blck,flow,s_blck,s_flow,offset)
|
||||||
|
|
||||||
if (isScalar(line) .or. isKeyValue(line)) then
|
if (isScalar(line) .or. isKeyValue(line)) then
|
||||||
flow(s_flow:s_flow) = ','
|
flow(s_flow:s_flow) = ','
|
||||||
s_flow = s_flow + 1
|
s_flow = s_flow+1
|
||||||
previous_isKey = .false.
|
previous_isKey = .false.
|
||||||
else
|
else
|
||||||
previous_isKey = .true.
|
previous_isKey = .true.
|
||||||
end if
|
end if
|
||||||
|
|
||||||
flow(s_flow:s_flow) = ' '
|
flow(s_flow:s_flow) = ' '
|
||||||
s_flow = s_flow + 1
|
s_flow = s_flow+1
|
||||||
offset = 0
|
offset = 0
|
||||||
end do
|
end do
|
||||||
|
|
||||||
s_flow = s_flow - 1
|
s_flow = s_flow-1
|
||||||
if (flow(s_flow-1:s_flow-1) == ',') s_flow = s_flow - 1
|
if (flow(s_flow-1:s_flow-1) == ',') s_flow = s_flow-1
|
||||||
|
|
||||||
end subroutine dct
|
end subroutine dct
|
||||||
|
|
||||||
|
@ -800,20 +800,20 @@ recursive subroutine decide(blck,flow,s_blck,s_flow,offset)
|
||||||
if (trim(line) == '---' .or. trim(line) == '...') then
|
if (trim(line) == '---' .or. trim(line) == '...') then
|
||||||
continue ! end parsing at this point but not stop the simulation
|
continue ! end parsing at this point but not stop the simulation
|
||||||
elseif (len_trim(line) == 0) then
|
elseif (len_trim(line) == 0) then
|
||||||
s_blck = e_blck +2
|
s_blck = e_blck + 2
|
||||||
call decide(blck,flow,s_blck,s_flow,offset)
|
call decide(blck,flow,s_blck,s_flow,offset)
|
||||||
elseif (isListItem(line)) then
|
elseif (isListItem(line)) then
|
||||||
flow(s_flow:s_flow) = '['
|
flow(s_flow:s_flow) = '['
|
||||||
s_flow = s_flow + 1
|
s_flow = s_flow+1
|
||||||
call lst(blck,flow,s_blck,s_flow,offset)
|
call lst(blck,flow,s_blck,s_flow,offset)
|
||||||
flow(s_flow:s_flow) = ']'
|
flow(s_flow:s_flow) = ']'
|
||||||
s_flow = s_flow + 1
|
s_flow = s_flow+1
|
||||||
elseif (isKey(line) .or. isKeyValue(line)) then
|
elseif (isKey(line) .or. isKeyValue(line)) then
|
||||||
flow(s_flow:s_flow) = '{'
|
flow(s_flow:s_flow) = '{'
|
||||||
s_flow = s_flow + 1
|
s_flow = s_flow+1
|
||||||
call dct(blck,flow,s_blck,s_flow,offset)
|
call dct(blck,flow,s_blck,s_flow,offset)
|
||||||
flow(s_flow:s_flow) = '}'
|
flow(s_flow:s_flow) = '}'
|
||||||
s_flow = s_flow + 1
|
s_flow = s_flow+1
|
||||||
elseif (isFlow(line)) then
|
elseif (isFlow(line)) then
|
||||||
if (isFlowList(line)) then
|
if (isFlowList(line)) then
|
||||||
call remove_line_break(blck,s_blck,']',flow_line)
|
call remove_line_break(blck,s_blck,']',flow_line)
|
||||||
|
@ -824,7 +824,7 @@ recursive subroutine decide(blck,flow,s_blck,s_flow,offset)
|
||||||
else
|
else
|
||||||
line = line(indentDepth(line)+1:)
|
line = line(indentDepth(line)+1:)
|
||||||
call line_toFlow(flow,s_flow,line)
|
call line_toFlow(flow,s_flow,line)
|
||||||
s_blck = e_blck +2
|
s_blck = e_blck + 2
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
|
|
@ -343,7 +343,7 @@ program DAMASK_grid
|
||||||
end if
|
end if
|
||||||
|
|
||||||
writeUndeformed: if (CLI_restartInc < 1) then
|
writeUndeformed: if (CLI_restartInc < 1) then
|
||||||
print'(/,1x,a)', '... writing initial configuration to file .................................'
|
print'(/,1x,a)', '... saving initial configuration ..........................................'
|
||||||
flush(IO_STDOUT)
|
flush(IO_STDOUT)
|
||||||
call materialpoint_result(0,0.0_pREAL)
|
call materialpoint_result(0,0.0_pREAL)
|
||||||
end if writeUndeformed
|
end if writeUndeformed
|
||||||
|
@ -462,15 +462,15 @@ program DAMASK_grid
|
||||||
cutBackLevel = max(0, cutBackLevel - 1) ! try half number of subincs next inc
|
cutBackLevel = max(0, cutBackLevel - 1) ! try half number of subincs next inc
|
||||||
|
|
||||||
if (all(solres(:)%converged)) then
|
if (all(solres(:)%converged)) then
|
||||||
print'(/,1x,a,i0,a)', 'increment ', totalIncsCounter, ' converged'
|
print'(/,1x,a,1x,i0,1x,a)', 'increment', totalIncsCounter, 'converged'
|
||||||
else
|
else
|
||||||
print'(/,1x,a,i0,a)', 'increment ', totalIncsCounter, ' NOT converged'
|
print'(/,1x,a,1x,i0,1x,a)', 'increment', totalIncsCounter, 'NOT converged'
|
||||||
end if; flush(IO_STDOUT)
|
end if; flush(IO_STDOUT)
|
||||||
|
|
||||||
call MPI_Allreduce(signal_SIGUSR1,sig,1_MPI_INTEGER_KIND,MPI_LOGICAL,MPI_LOR,MPI_COMM_WORLD,err_MPI)
|
call MPI_Allreduce(signal_SIGUSR1,sig,1_MPI_INTEGER_KIND,MPI_LOGICAL,MPI_LOR,MPI_COMM_WORLD,err_MPI)
|
||||||
if (err_MPI /= 0_MPI_INTEGER_KIND) error stop 'MPI error'
|
if (err_MPI /= 0_MPI_INTEGER_KIND) error stop 'MPI error'
|
||||||
if (mod(inc,loadCases(l)%f_out) == 0 .or. sig) then
|
if (mod(inc,loadCases(l)%f_out) == 0 .or. sig) then
|
||||||
print'(/,1x,a)', '... writing results to file ...............................................'
|
print'(/,1x,a)', '... saving results ........................................................'
|
||||||
flush(IO_STDOUT)
|
flush(IO_STDOUT)
|
||||||
call materialpoint_result(totalIncsCounter,t)
|
call materialpoint_result(totalIncsCounter,t)
|
||||||
end if
|
end if
|
||||||
|
|
|
@ -175,7 +175,7 @@ subroutine grid_damage_spectral_init()
|
||||||
end if
|
end if
|
||||||
|
|
||||||
restartRead: if (CLI_restartInc > 0) then
|
restartRead: if (CLI_restartInc > 0) then
|
||||||
print'(/,1x,a,i0,a)', 'reading restart data of increment ', CLI_restartInc, ' from file'
|
print'(/,1x,a,1x,i0)', 'loading restart data of increment', CLI_restartInc
|
||||||
|
|
||||||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
||||||
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||||
|
@ -219,7 +219,7 @@ function grid_damage_spectral_solution(Delta_t) result(solution)
|
||||||
PetscErrorCode :: err_PETSc
|
PetscErrorCode :: err_PETSc
|
||||||
SNESConvergedReason :: reason
|
SNESConvergedReason :: reason
|
||||||
|
|
||||||
solution%converged =.false.
|
solution%converged = .false.
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! set module wide availabe data
|
! set module wide availabe data
|
||||||
|
|
|
@ -236,7 +236,7 @@ subroutine grid_mechanical_FEM_init
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! init fields
|
! init fields
|
||||||
restartRead: if (CLI_restartInc > 0) then
|
restartRead: if (CLI_restartInc > 0) then
|
||||||
print'(/,1x,a,i0,a)', 'reading restart data of increment ', CLI_restartInc, ' from file'
|
print'(/,1x,a,1x,i0)', 'loading restart data of increment', CLI_restartInc
|
||||||
|
|
||||||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
||||||
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||||
|
@ -278,7 +278,7 @@ subroutine grid_mechanical_FEM_init
|
||||||
CHKERRQ(err_PETSc)
|
CHKERRQ(err_PETSc)
|
||||||
|
|
||||||
restartRead2: if (CLI_restartInc > 0) then
|
restartRead2: if (CLI_restartInc > 0) then
|
||||||
print'(1x,a,i0,a)', 'reading more restart data of increment ', CLI_restartInc, ' from file'
|
print'(1x,a,1x,i0)', 'loading additional restart data of increment', CLI_restartInc
|
||||||
call HDF5_read(C_volAvg,groupHandle,'C_volAvg',.false.)
|
call HDF5_read(C_volAvg,groupHandle,'C_volAvg',.false.)
|
||||||
call MPI_Bcast(C_volAvg,81_MPI_INTEGER_KIND,MPI_DOUBLE,0_MPI_INTEGER_KIND,MPI_COMM_WORLD,err_MPI)
|
call MPI_Bcast(C_volAvg,81_MPI_INTEGER_KIND,MPI_DOUBLE,0_MPI_INTEGER_KIND,MPI_COMM_WORLD,err_MPI)
|
||||||
if (err_MPI /= 0_MPI_INTEGER_KIND) error stop 'MPI error'
|
if (err_MPI /= 0_MPI_INTEGER_KIND) error stop 'MPI error'
|
||||||
|
|
|
@ -200,7 +200,7 @@ subroutine grid_mechanical_spectral_basic_init()
|
||||||
CHKERRQ(err_PETSc)
|
CHKERRQ(err_PETSc)
|
||||||
|
|
||||||
restartRead: if (CLI_restartInc > 0) then
|
restartRead: if (CLI_restartInc > 0) then
|
||||||
print'(/,1x,a,i0,a)', 'reading restart data of increment ', CLI_restartInc, ' from file'
|
print'(/,1x,a,1x,i0)', 'loading restart data of increment', CLI_restartInc
|
||||||
|
|
||||||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
||||||
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||||
|
@ -236,7 +236,7 @@ subroutine grid_mechanical_spectral_basic_init()
|
||||||
CHKERRQ(err_PETSc)
|
CHKERRQ(err_PETSc)
|
||||||
|
|
||||||
restartRead2: if (CLI_restartInc > 0) then
|
restartRead2: if (CLI_restartInc > 0) then
|
||||||
print'(1x,a,i0,a)', 'reading more restart data of increment ', CLI_restartInc, ' from file'
|
print'(1x,a,1x,i0)', 'loading additional restart data of increment', CLI_restartInc
|
||||||
call HDF5_read(C_volAvg,groupHandle,'C_volAvg',.false.)
|
call HDF5_read(C_volAvg,groupHandle,'C_volAvg',.false.)
|
||||||
call MPI_Bcast(C_volAvg,81_MPI_INTEGER_KIND,MPI_DOUBLE,0_MPI_INTEGER_KIND,MPI_COMM_WORLD,err_MPI)
|
call MPI_Bcast(C_volAvg,81_MPI_INTEGER_KIND,MPI_DOUBLE,0_MPI_INTEGER_KIND,MPI_COMM_WORLD,err_MPI)
|
||||||
if (err_MPI /= 0_MPI_INTEGER_KIND) error stop 'MPI error'
|
if (err_MPI /= 0_MPI_INTEGER_KIND) error stop 'MPI error'
|
||||||
|
|
|
@ -132,10 +132,10 @@ subroutine grid_mechanical_spectral_polarisation_init()
|
||||||
extmsg = ''
|
extmsg = ''
|
||||||
|
|
||||||
|
|
||||||
print'(/,1x,a)', '<<<+- grid_mechanical_spectral_polarization init -+>>>'; flush(IO_STDOUT)
|
print '(/,1x,a)', '<<<+- grid_mechanical_spectral_polarization init -+>>>'; flush(IO_STDOUT)
|
||||||
|
|
||||||
print'(/,1x,a)', 'P. Shanthraj et al., International Journal of Plasticity 66:31–45, 2015'
|
print '(/,1x,a)', 'P. Shanthraj et al., International Journal of Plasticity 66:31–45, 2015'
|
||||||
print'( 1x,a)', 'https://doi.org/10.1016/j.ijplas.2014.02.006'
|
print '( 1x,a)', 'https://doi.org/10.1016/j.ijplas.2014.02.006'
|
||||||
|
|
||||||
|
|
||||||
!-------------------------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------------------------
|
||||||
|
@ -223,7 +223,7 @@ subroutine grid_mechanical_spectral_polarisation_init()
|
||||||
F_tau => FandF_tau(9:17,:,:,:)
|
F_tau => FandF_tau(9:17,:,:,:)
|
||||||
|
|
||||||
restartRead: if (CLI_restartInc > 0) then
|
restartRead: if (CLI_restartInc > 0) then
|
||||||
print'(/,1x,a,i0,a)', 'reading restart data of increment ', CLI_restartInc, ' from file'
|
print '(/,1x,a,1x,i0)', 'loading restart data of increment', CLI_restartInc
|
||||||
|
|
||||||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
||||||
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||||
|
@ -265,7 +265,7 @@ subroutine grid_mechanical_spectral_polarisation_init()
|
||||||
CHKERRQ(err_PETSc)
|
CHKERRQ(err_PETSc)
|
||||||
|
|
||||||
restartRead2: if (CLI_restartInc > 0) then
|
restartRead2: if (CLI_restartInc > 0) then
|
||||||
print'(1x,a,i0,a)', 'reading more restart data of increment ', CLI_restartInc, ' from file'
|
print '(1x,a,1x,i0)', 'loading additional restart data of increment', CLI_restartInc
|
||||||
call HDF5_read(C_volAvg,groupHandle,'C_volAvg',.false.)
|
call HDF5_read(C_volAvg,groupHandle,'C_volAvg',.false.)
|
||||||
call MPI_Bcast(C_volAvg,81_MPI_INTEGER_KIND,MPI_DOUBLE,0_MPI_INTEGER_KIND,MPI_COMM_WORLD,err_MPI)
|
call MPI_Bcast(C_volAvg,81_MPI_INTEGER_KIND,MPI_DOUBLE,0_MPI_INTEGER_KIND,MPI_COMM_WORLD,err_MPI)
|
||||||
if (err_MPI /= 0_MPI_INTEGER_KIND) error stop 'MPI error'
|
if (err_MPI /= 0_MPI_INTEGER_KIND) error stop 'MPI error'
|
||||||
|
@ -464,7 +464,7 @@ subroutine grid_mechanical_spectral_polarisation_restartWrite
|
||||||
|
|
||||||
if (num%update_gamma) C_minMaxAvgRestart = C_minMaxAvg
|
if (num%update_gamma) C_minMaxAvgRestart = C_minMaxAvg
|
||||||
|
|
||||||
print'(1x,a)', 'saving solver data required for restart'; flush(IO_STDOUT)
|
print '(1x,a)', 'saving solver data required for restart'; flush(IO_STDOUT)
|
||||||
|
|
||||||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','w')
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','w')
|
||||||
groupHandle = HDF5_addGroup(fileHandle,'solver')
|
groupHandle = HDF5_addGroup(fileHandle,'solver')
|
||||||
|
@ -527,14 +527,14 @@ subroutine converged(snes_local,PETScIter,devNull1,devNull2,devNull3,reason,dumm
|
||||||
reason = 0
|
reason = 0
|
||||||
end if
|
end if
|
||||||
|
|
||||||
print'(/,1x,a)', '... reporting .............................................................'
|
print '(/,1x,a)', '... reporting .............................................................'
|
||||||
print'(/,1x,a,f12.2,a,es8.2,a,es9.2,a)', 'error divergence = ', &
|
print '(/,1x,a,f12.2,a,es8.2,a,es9.2,a)', 'error divergence = ', &
|
||||||
err_div/divTol, ' (',err_div, ' / m, tol = ',divTol,')'
|
err_div/divTol, ' (',err_div, ' / m, tol = ',divTol,')'
|
||||||
print '(1x,a,f12.2,a,es8.2,a,es9.2,a)', 'error curl = ', &
|
print '(1x,a,f12.2,a,es8.2,a,es9.2,a)', 'error curl = ', &
|
||||||
err_curl/curlTol,' (',err_curl,' -, tol = ',curlTol,')'
|
err_curl/curlTol,' (',err_curl,' -, tol = ',curlTol,')'
|
||||||
print '(1x,a,f12.2,a,es8.2,a,es9.2,a)', 'error mech BC = ', &
|
print '(1x,a,f12.2,a,es8.2,a,es9.2,a)', 'error mech BC = ', &
|
||||||
err_BC/BCTol, ' (',err_BC, ' Pa, tol = ',BCTol,')'
|
err_BC/BCTol, ' (',err_BC, ' Pa, tol = ',BCTol,')'
|
||||||
print'(/,1x,a)', '==========================================================================='
|
print '(/,1x,a)', '==========================================================================='
|
||||||
flush(IO_STDOUT)
|
flush(IO_STDOUT)
|
||||||
err_PETSc = 0
|
err_PETSc = 0
|
||||||
|
|
||||||
|
@ -586,11 +586,11 @@ subroutine formResidual(residual_subdomain, FandF_tau, &
|
||||||
|
|
||||||
newIteration: if (totalIter <= PETScIter) then
|
newIteration: if (totalIter <= PETScIter) then
|
||||||
totalIter = totalIter + 1
|
totalIter = totalIter + 1
|
||||||
print'(1x,a,3(a,i0))', trim(incInfo), ' @ Iteration ', num%itmin, '≤',totalIter, '≤', num%itmax
|
print '(1x,a,3(a,i0))', trim(incInfo), ' @ Iteration ', num%itmin, '≤',totalIter, '≤', num%itmax
|
||||||
if (any(dNeq(params%rotation_BC%asQuaternion(), real([1.0, 0.0, 0.0, 0.0],pREAL)))) &
|
if (any(dNeq(params%rotation_BC%asQuaternion(), real([1.0, 0.0, 0.0, 0.0],pREAL)))) &
|
||||||
print'(/,1x,a,/,2(3(f12.7,1x)/),3(f12.7,1x))', &
|
print '(/,1x,a,/,2(3(f12.7,1x)/),3(f12.7,1x))', &
|
||||||
'deformation gradient aim (lab) =', transpose(params%rotation_BC%rotate(F_aim,active=.true.))
|
'deformation gradient aim (lab) =', transpose(params%rotation_BC%rotate(F_aim,active=.true.))
|
||||||
print'(/,1x,a,/,2(3(f12.7,1x)/),3(f12.7,1x))', &
|
print '(/,1x,a,/,2(3(f12.7,1x)/),3(f12.7,1x))', &
|
||||||
'deformation gradient aim =', transpose(F_aim)
|
'deformation gradient aim =', transpose(F_aim)
|
||||||
flush(IO_STDOUT)
|
flush(IO_STDOUT)
|
||||||
end if newIteration
|
end if newIteration
|
||||||
|
|
|
@ -149,7 +149,7 @@ subroutine grid_thermal_spectral_init()
|
||||||
|
|
||||||
|
|
||||||
restartRead: if (CLI_restartInc > 0) then
|
restartRead: if (CLI_restartInc > 0) then
|
||||||
print'(/,1x,a,i0,a)', 'reading restart data of increment ', CLI_restartInc, ' from file'
|
print'(/,1x,a,1x,i0)', 'loading restart data of increment', CLI_restartInc
|
||||||
|
|
||||||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
||||||
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||||
|
@ -195,7 +195,7 @@ function grid_thermal_spectral_solution(Delta_t) result(solution)
|
||||||
PetscErrorCode :: err_PETSc
|
PetscErrorCode :: err_PETSc
|
||||||
SNESConvergedReason :: reason
|
SNESConvergedReason :: reason
|
||||||
|
|
||||||
solution%converged =.false.
|
solution%converged = .false.
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! set module wide availabe data
|
! set module wide availabe data
|
||||||
|
|
|
@ -91,7 +91,7 @@ subroutine materialpoint_init()
|
||||||
|
|
||||||
|
|
||||||
if (CLI_restartInc > 0) then
|
if (CLI_restartInc > 0) then
|
||||||
print'(/,a,i0,a)', ' reading restart information of increment from file'; flush(IO_STDOUT)
|
print'(/,1x,a,1x,i0)', 'loading restart information of increment',CLI_restartInc; flush(IO_STDOUT)
|
||||||
|
|
||||||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,7 @@ program DAMASK_mesh
|
||||||
errorID = 0
|
errorID = 0
|
||||||
checkLoadcases: do currentLoadCase = 1, size(loadCases)
|
checkLoadcases: do currentLoadCase = 1, size(loadCases)
|
||||||
write (loadcase_string, '(i0)' ) currentLoadCase
|
write (loadcase_string, '(i0)' ) currentLoadCase
|
||||||
print'(/,1x,a,i0)', 'load case: ', currentLoadCase
|
print'(/,1x,a,1x,i0)', 'load case:', currentLoadCase
|
||||||
if (.not. loadCases(currentLoadCase)%followFormerTrajectory) &
|
if (.not. loadCases(currentLoadCase)%followFormerTrajectory) &
|
||||||
print'(2x,a)', 'drop guessing along trajectory'
|
print'(2x,a)', 'drop guessing along trajectory'
|
||||||
print'(2x,a)', 'Field '//trim(FIELD_MECH_label)
|
print'(2x,a)', 'Field '//trim(FIELD_MECH_label)
|
||||||
|
@ -238,7 +238,7 @@ program DAMASK_mesh
|
||||||
write(statUnit,'(a)') 'Increment Time CutbackLevel Converged IterationsNeeded' ! statistics file
|
write(statUnit,'(a)') 'Increment Time CutbackLevel Converged IterationsNeeded' ! statistics file
|
||||||
end if
|
end if
|
||||||
|
|
||||||
print'(/,1x,a)', '... writing initial configuration to file .................................'
|
print'(/,1x,a)', '... saving initial configuration ..........................................'
|
||||||
flush(IO_STDOUT)
|
flush(IO_STDOUT)
|
||||||
call materialpoint_result(0,0.0_pREAL)
|
call materialpoint_result(0,0.0_pREAL)
|
||||||
|
|
||||||
|
@ -318,13 +318,13 @@ program DAMASK_mesh
|
||||||
cutBackLevel = max(0, cutBackLevel - 1) ! try half number of subincs next inc
|
cutBackLevel = max(0, cutBackLevel - 1) ! try half number of subincs next inc
|
||||||
|
|
||||||
if (all(solres(:)%converged)) then
|
if (all(solres(:)%converged)) then
|
||||||
print'(/,1x,a,i0,a)', 'increment ', totalIncsCounter, ' converged'
|
print'(/,1x,a,1x,i0,1x,a)', 'increment', totalIncsCounter, 'converged'
|
||||||
else
|
else
|
||||||
print'(/,1x,a,i0,a)', 'increment ', totalIncsCounter, ' NOT converged'
|
print'(/,1x,a,1x,i0,1x,a)', 'increment', totalIncsCounter, 'NOT converged'
|
||||||
end if; flush(IO_STDOUT)
|
end if; flush(IO_STDOUT)
|
||||||
|
|
||||||
if (mod(inc,loadCases(currentLoadCase)%outputFrequency) == 0) then ! at output frequency
|
if (mod(inc,loadCases(currentLoadCase)%outputFrequency) == 0) then ! at output frequency
|
||||||
print'(/,1x,a)', '... writing results to file ...............................................'
|
print'(/,1x,a)', '... saving results ........................................................'
|
||||||
call FEM_mechanical_updateCoords()
|
call FEM_mechanical_updateCoords()
|
||||||
call materialpoint_result(totalIncsCounter,time)
|
call materialpoint_result(totalIncsCounter,time)
|
||||||
end if
|
end if
|
||||||
|
|
|
@ -329,7 +329,7 @@ type(tSolutionState) function FEM_mechanical_solution( &
|
||||||
SNESConvergedReason :: reason
|
SNESConvergedReason :: reason
|
||||||
|
|
||||||
incInfo = incInfoIn
|
incInfo = incInfoIn
|
||||||
FEM_mechanical_solution%converged =.false.
|
FEM_mechanical_solution%converged = .false.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! set module wide availabe data
|
! set module wide availabe data
|
||||||
params%timeinc = timeinc
|
params%timeinc = timeinc
|
||||||
|
|
Loading…
Reference in New Issue