14 real(kind=kreal),
private :: current_time = 0.d0
15 real(kind=kreal),
private :: time_inc = 0.d0
16 real(kind=kreal),
private :: time_inc_base = 0.d0
35 real(kind=kreal),
intent(in) :: time
40 real(kind=kreal),
intent(in) :: dtime
45 real(kind=kreal),
intent(in) :: dtime_base
46 time_inc_base = dtime_base
50 current_time = current_time + time_inc
55 write(
ista,
'(A10,"-+-",A60,"-+-",A40)') repeat(
"-",10),repeat(
"-",60),repeat(
"-",40)
56 write(
ista,
'(2A5," | ",2A5,2A7,3A12," | ",A40)')
' ',
' ',
' ',
' # of',
'MAX #',
'TOT #',
'',
'',
'',
''
57 write(
ista,
'(2A5," | ",2A5,2A7,3A12," | ",A7,A33)') &
58 &
'STEP',
'SUB',
'STAT',
' CONT',
'NEWTON',
'NEWTON',
'START',
'TIME',
'END',
'MESSAGE',
''
59 write(
ista,
'(2A5," | ",2A5,2A7,3A12," | ",A40)') &
60 &
'',
'STEP',
' ',
'ITER',
'ITER',
'ITER',
'TIME',
'INC',
'TIME',
''
61 write(
ista,
'(A10,"-+-",A60,"-+-",A40)') repeat(
"-",10),repeat(
"-",60),repeat(
"-",40)
67 integer(kind=kint),
intent(in) :: totstep
68 integer(kind=kint),
intent(in) :: substep
71 character(len=5) :: cstep, csstep, cstate, ccont
72 character(len=7) :: cmaxn, ctotn
73 character(len=12) :: ctime, cdtime, etime
74 character(len=40) :: message
77 painc = fstrparam%ainc(stepinfo%AincParam_id)
79 write(cstep,
'(I5)') totstep
80 write(csstep,
'(I5)') substep
81 write(ccont,
'(I5)') fstrsolid%NRstat_i(
knstciter)
82 write(cmaxn,
'(I7)') fstrsolid%NRstat_i(
knstmaxit)
83 write(ctotn,
'(I7)') fstrsolid%NRstat_i(
knstsumit)
84 write(ctime,
'(1pE12.4)') current_time
85 write(cdtime,
'(1pE12.4)') time_inc
87 if( fstrsolid%CutBack_stat > 0 )
then
88 write(etime,
'(1pE12.4)') current_time
89 write(cstate,
'(I4,A)') fstrsolid%CutBack_stat,
'F'
90 if( fstrsolid%NRstat_i(
knstdresn) == 1 )
write(message,
'(A)')
'Failed to converge due to MAXITER.'
91 if( fstrsolid%NRstat_i(
knstdresn) == 2 )
write(message,
'(A)')
'Failed to converge due to MAXRES.'
92 if( fstrsolid%NRstat_i(
knstdresn) == 3 )
write(message,
'(A)')
'Failed to converge due to MAXCONTITER.'
93 if( fstrsolid%NRstat_i(
knstdresn) == 4 )
write(message,
'(A)')
'Failed to converge due to MatSolveError.'
94 if( fstrsolid%NRstat_i(
knstdresn) == 5 )
write(message,
'(A)')
'Failed to converge due to MatNotConv.'
95 if( fstrsolid%NRstat_i(
knstdresn) == 6 )
write(message,
'(A)')
'Failed to converge due to MatDiverged.'
96 if( fstrsolid%CutBack_stat == painc%CBbound )
write(message,
'(A)')
'# of successive cutback reached max.'
98 write(etime,
'(1pE12.4)') current_time+time_inc
99 write(cstate,
'(A5)')
'S'
100 write(message,
'(A)')
''
103 write(
ista,
'(2A5," | ",2A5,2A7,3A12," | ",A40)') cstep, csstep, cstate, ccont, &
104 & cmaxn, ctotn, ctime, cdtime, etime, message
109 logical,
intent(in) :: success_flag
110 write(
ista,
'(A10,"-+-",A60,"-+-",A40)') repeat(
"-",10),repeat(
"-",60),repeat(
"-",40)
111 if(success_flag)
then
112 write(
ista,
'(A)')
'FSTR_SOLVE_NLGEOM HAS COMPLETED SUCCESSFULLY'
114 write(
ista,
'(A)')
'FSTR_SOLVE_NLGEOM HAS NOT COMPLETED SUCCESSFULLY'
122 real(kind=kreal) :: endtime, tolerance
124 endtime = stepinfo%starttime + stepinfo%elapsetime
127 tolerance = 1.d-12 * max(stepinfo%elapsetime, dabs(endtime))
138 if( stepinfo%timepoint_id == 0 )
return
141 & fstrparam%timepoints(stepinfo%timepoint_id))
148 integer(kind=kint),
intent(in) :: substep
151 real(kind=kreal) :: timeinc0
152 real(kind=kreal) :: endtime, remain
153 logical :: to_be_decreased, to_be_increased
156 painc = fstrparam%ainc(stepinfo%AincParam_id)
159 timeinc0 = stepinfo%initdt
161 if( fstrsolid%CutBack_stat > 0 )
then
162 timeinc0 = painc%ainc_Rc*time_inc
163 if(
myrank == 0)
write(*,
'(2(A,E10.3))')
'time increment is decreased from ', time_inc_base,
' to ', timeinc0
164 fstrsolid%AutoINC_stat = -1
166 if( substep == 1 )
then
167 timeinc0 = stepinfo%initdt
168 fstrsolid%AutoINC_stat = 0
170 timeinc0 = time_inc_base
173 to_be_decreased = .false.
174 if( fstrsolid%NRstat_i(
knstmaxit) > painc%NRbound_s(
knstmaxit) ) to_be_decreased = .true.
175 if( fstrsolid%NRstat_i(
knstsumit) > painc%NRbound_s(
knstsumit) ) to_be_decreased = .true.
176 if( fstrsolid%NRstat_i(
knstciter) > painc%NRbound_s(
knstciter) ) to_be_decreased = .true.
179 to_be_increased = .true.
180 if( fstrsolid%NRstat_i(
knstmaxit) > painc%NRbound_l(
knstmaxit) ) to_be_increased = .false.
181 if( fstrsolid%NRstat_i(
knstsumit) > painc%NRbound_l(
knstsumit) ) to_be_increased = .false.
182 if( fstrsolid%NRstat_i(
knstciter) > painc%NRbound_l(
knstciter) ) to_be_increased = .false.
187 if(to_be_decreased)
then
188 fstrsolid%AutoINC_stat = min(fstrsolid%AutoINC_stat,0) - 1
189 else if(to_be_increased)
then
190 fstrsolid%AutoINC_stat = max(fstrsolid%AutoINC_stat,0) + 1
192 fstrsolid%AutoINC_stat = 0
195 if( fstrsolid%AutoINC_stat <= -painc%NRtimes_s )
then
196 timeinc0 = painc%ainc_Rs*timeinc0
197 if(
myrank == 0)
write(*,
'(2(A,E10.3))')
'time increment is decreased from ', time_inc_base,
' to ', timeinc0
198 else if( fstrsolid%AutoINC_stat >= painc%NRtimes_l )
then
199 timeinc0 = dmin1(painc%ainc_Rl*timeinc0,stepinfo%maxdt)
200 if(
myrank == 0)
write(*,
'(2(A,E10.3))')
'time increment is increased from ', time_inc_base,
' to ', timeinc0
206 if( timeinc0 < stepinfo%mindt )
then
208 write(*,
'(2(A,E10.3))')
'Error: current time increment ',timeinc0,
' is smaller than lower bound',stepinfo%mindt
214 endtime = stepinfo%starttime + stepinfo%elapsetime
215 time_inc_base = dmin1(timeinc0,endtime-current_time)
216 if( stepinfo%timepoint_id > 0 )
then
218 time_inc = dmin1(time_inc_base,remain)
220 time_inc = time_inc_base
This module provides functions to deal with time and increment of stress analysis.
real(kind=kreal) function fstr_get_timeinc()
logical function fstr_timeinc_istimepoint(stepinfo, fstrPARAM)
subroutine fstr_timeinc_settimeincrement(stepinfo, fstrPARAM, substep, fstrSOLID)
real(kind=kreal) function fstr_get_timeinc_base()
subroutine fstr_set_timeinc_base(dtime_base)
real(kind=kreal) function fstr_get_time()
subroutine fstr_proceed_time()
subroutine fstr_timeinc_printstatus_final(success_flag)
subroutine fstr_timeinc_printstatus_init
subroutine fstr_set_time(time)
subroutine fstr_set_timeinc(dtime)
logical function fstr_timeinc_isstepfinished(stepinfo)
subroutine fstr_timeinc_printstatus(stepinfo, fstrPARAM, totstep, substep, fstrSOLID)
This module defines common data and basic structures for analysis.
integer(kind=kint) myrank
PARALLEL EXECUTION.
integer(kind=kint), parameter ista
This module manages step information.
integer, parameter stepfixedinc
integer(kind=kint), parameter knstmaxit
integer(kind=kint), parameter knstdresn
integer(kind=kint), parameter knstsumit
integer(kind=kint), parameter knstciter
This module manages timepoint information.
real(kind=kreal) function get_remain_to_next_timepoints(totaltime, starttime, tp)
logical function is_at_timepoints(totaltime, starttime, tp)
FSTR INNER CONTROL PARAMETERS (fstrPARAM)
Step control such as active boundary condition, convergent condition etc.