12 use hecmw,
only: hecmw_abort, hecmw_comm_get_comm
19 character(len=*),
intent(in) :: message
21 if(
myrank == 0 )
write(*,*)
'ERROR: ', trim(message)
22 call hecmw_abort(hecmw_comm_get_comm())
28 integer(kind=kint),
intent(in) :: nnode
30 if( .not.
associated(fstrsolid%shell_node_mode) )
then
32 else if(
size(fstrsolid%shell_node_mode) /= nnode )
then
35 if( .not.
associated(fstrsolid%shell_rot_state) )
then
37 else if(
size(fstrsolid%shell_rot_state) /= nnode )
then
40 if( .not.
associated(fstrsolid%shell_ref_triad) )
then
42 else if(
size(fstrsolid%shell_ref_triad) /= 9*nnode )
then
45 if( .not.
associated(fstrsolid%shell_triad) )
then
47 else if(
size(fstrsolid%shell_triad) /= 9*nnode )
then
50 if( .not.
associated(fstrsolid%shell_triad_bak) )
then
52 else if(
size(fstrsolid%shell_triad_bak) /= 9*nnode )
then
55 if( .not.
associated(fstrsolid%shell_dtriad) )
then
57 else if(
size(fstrsolid%shell_dtriad) /= 9*nnode )
then
60 if( .not.
associated(fstrsolid%shell_drill) )
then
62 else if(
size(fstrsolid%shell_drill) /= nnode )
then
65 if( .not.
associated(fstrsolid%shell_drill_bak) )
then
67 else if(
size(fstrsolid%shell_drill_bak) /= nnode )
then
70 if( .not.
associated(fstrsolid%shell_ddrill) )
then
72 else if(
size(fstrsolid%shell_ddrill) /= nnode )
then
84 if( .not.
associated(fstrsolid%elements) )
return
85 do i = 1,
size(fstrsolid%elements)
86 if(
associated(fstrsolid%elements(i)%shell_layer_gausses) )
then
96 integer(kind=kint),
intent(in) :: restart_version
98 if( restart_version >= 6 )
return
101 'restart VERSION >= 6 is required for finite-rotation or layered shell state.')
107 integer(kind=kint) :: nif(2)
108 real(kind=kreal) :: scalars(4)
111 if(
associated(gauss%istatus) ) nif(1) =
size(gauss%istatus)
112 if(
associated(gauss%fstatus) ) nif(2) =
size(gauss%fstatus)
113 scalars = (/ gauss%plstrain, gauss%strain_energy, gauss%strain_energy_bak, gauss%plpotential /)
114 call hecmw_restart_add_int(nif,
size(nif))
115 call hecmw_restart_add_real(gauss%strain,
size(gauss%strain))
116 call hecmw_restart_add_real(gauss%strain_bak,
size(gauss%strain_bak))
117 call hecmw_restart_add_real(gauss%stress,
size(gauss%stress))
118 call hecmw_restart_add_real(gauss%stress_bak,
size(gauss%stress_bak))
119 call hecmw_restart_add_real(gauss%nqm,
size(gauss%nqm))
120 call hecmw_restart_add_real(gauss%strain_out,
size(gauss%strain_out))
121 call hecmw_restart_add_real(gauss%stress_out,
size(gauss%stress_out))
122 call hecmw_restart_add_real(scalars,
size(scalars))
123 if( nif(1) > 0 )
call hecmw_restart_add_int(gauss%istatus, nif(1))
124 if( nif(2) > 0 )
call hecmw_restart_add_real(gauss%fstatus, nif(2))
130 integer(kind=kint) :: nif(2), current_nif(2)
131 real(kind=kreal) :: scalars(4)
133 call hecmw_restart_read_int(nif)
135 if(
associated(gauss%istatus) ) current_nif(1) =
size(gauss%istatus)
136 if(
associated(gauss%fstatus) ) current_nif(2) =
size(gauss%fstatus)
137 if( any(current_nif /= nif) )
then
138 call fstr_restart_abort(
'shell material-state dimensions do not match the restart file.')
140 call hecmw_restart_read_real(gauss%strain)
141 call hecmw_restart_read_real(gauss%strain_bak)
142 call hecmw_restart_read_real(gauss%stress)
143 call hecmw_restart_read_real(gauss%stress_bak)
144 call hecmw_restart_read_real(gauss%nqm)
145 call hecmw_restart_read_real(gauss%strain_out)
146 call hecmw_restart_read_real(gauss%stress_out)
147 call hecmw_restart_read_real(scalars)
148 gauss%plstrain = scalars(1)
149 gauss%strain_energy = scalars(2)
150 gauss%strain_energy_bak = scalars(3)
151 gauss%plpotential = scalars(4)
152 if( nif(1) > 0 )
call hecmw_restart_read_int(gauss%istatus)
153 if( nif(2) > 0 )
call hecmw_restart_read_real(gauss%fstatus)
158 type(hecmwst_local_mesh),
intent(in) :: hecmesh
160 integer(kind=kint) :: nodal_meta(2), layer_meta(3)
164 if( fstrsolid%has_finite_rotation_kinematics )
then
166 nodal_meta = (/ 1_kint, int(hecmesh%n_node, kind=kint) /)
168 call hecmw_restart_add_int(nodal_meta,
size(nodal_meta))
169 if( nodal_meta(1) == 1 )
then
170 call hecmw_restart_add_int(fstrsolid%shell_node_mode,
size(fstrsolid%shell_node_mode))
171 call hecmw_restart_add_int(fstrsolid%shell_rot_state,
size(fstrsolid%shell_rot_state))
172 call hecmw_restart_add_real(fstrsolid%shell_ref_triad,
size(fstrsolid%shell_ref_triad))
173 call hecmw_restart_add_real(fstrsolid%shell_triad,
size(fstrsolid%shell_triad))
174 call hecmw_restart_add_real(fstrsolid%shell_triad_bak,
size(fstrsolid%shell_triad_bak))
175 call hecmw_restart_add_real(fstrsolid%shell_drill,
size(fstrsolid%shell_drill))
176 call hecmw_restart_add_real(fstrsolid%shell_drill_bak,
size(fstrsolid%shell_drill_bak))
179 do i = 1, hecmesh%n_elem
181 if(
associated(fstrsolid%elements(i)%shell_layer_gausses) )
then
182 layer_meta(1) = fstrsolid%elements(i)%shell_nlayer
183 layer_meta(2) = fstrsolid%elements(i)%shell_nthick
184 layer_meta(3) =
size(fstrsolid%elements(i)%shell_layer_gausses)
186 call hecmw_restart_add_int(layer_meta,
size(layer_meta))
187 do j = 1, layer_meta(3)
195 type(hecmwst_local_mesh),
intent(in) :: hecMESH
197 integer(kind=kint) :: nodal_meta(2), layer_meta(3)
200 call hecmw_restart_read_int(nodal_meta)
201 if( nodal_meta(1) == 1 )
then
202 if( .not. fstrsolid%has_finite_rotation_kinematics )
then
203 call fstr_restart_abort(
'restart contains finite-rotation shell state for an incompatible model.')
205 if( nodal_meta(2) /= hecmesh%n_node )
then
206 call fstr_restart_abort(
'finite-rotation shell restart node count does not match the mesh.')
209 call hecmw_restart_read_int(fstrsolid%shell_node_mode)
210 call hecmw_restart_read_int(fstrsolid%shell_rot_state)
211 call hecmw_restart_read_real(fstrsolid%shell_ref_triad)
212 call hecmw_restart_read_real(fstrsolid%shell_triad)
213 call hecmw_restart_read_real(fstrsolid%shell_triad_bak)
214 call hecmw_restart_read_real(fstrsolid%shell_drill)
215 call hecmw_restart_read_real(fstrsolid%shell_drill_bak)
216 fstrsolid%shell_dtriad = fstrsolid%shell_triad
217 fstrsolid%shell_ddrill = fstrsolid%shell_drill
218 fstrsolid%finite_rotation_state_ready = .true.
219 else if( fstrsolid%has_finite_rotation_kinematics )
then
223 do i = 1, hecmesh%n_elem
224 call hecmw_restart_read_int(layer_meta)
225 if( layer_meta(3) > 0 )
then
226 if( .not.
associated(fstrsolid%elements(i)%shell_layer_gausses) )
then
228 'restart contains shell layer state for an unallocated element.')
230 if( layer_meta(1) /= fstrsolid%elements(i)%shell_nlayer .or. &
231 layer_meta(2) /= fstrsolid%elements(i)%shell_nthick .or. &
232 layer_meta(3) /=
size(fstrsolid%elements(i)%shell_layer_gausses) )
then
234 'shell layer restart dimensions do not match the current model.')
236 else if(
associated(fstrsolid%elements(i)%shell_layer_gausses) )
then
238 'restart file has no shell layer state required by the current model.')
240 do j = 1, layer_meta(3)
248 subroutine fstr_read_restart(cstep,substep,step_count,ctime,dtime,hecMESH,fstrSOLID,fstrPARAM,contactNode)
250 integer,
intent(out) :: cstep
251 integer,
intent(out) :: substep
252 integer,
intent(out) :: step_count
253 real(kind=kreal),
intent(out) :: ctime
254 real(kind=kreal),
intent(out) :: dtime
255 integer,
intent(out) :: contactNode
256 type (hecmwST_local_mesh),
intent(in) :: hecMESH
257 type (fstr_solid),
intent(inout) :: fstrSOLID
260 integer :: i,j,restrt_step(3),nif(2),istat(1),nload_prev(1),naux(2)
261 real(kind=kreal) :: times(3)
263 call hecmw_restart_open()
265 call hecmw_restart_read_int(restrt_step)
266 if( fstrparam%restart_version >= 5 )
then
267 if(
myrank == 0 )
write(*,*)
'Reading restart file as new format(>=ver5.0)'
268 call hecmw_restart_read_real(times)
269 call hecmw_restart_read_int(fstrsolid%NRstat_i)
270 call hecmw_restart_read_real(fstrsolid%NRstat_r)
271 call hecmw_restart_read_int(istat)
273 if(
myrank == 0 )
write(*,*)
'Reading restart file as old format(<ver5.0)'
275 call hecmw_restart_read_int(nload_prev)
276 if( nload_prev(1)>0 )
then
277 allocate(fstrsolid%step_ctrl_restart%Load(nload_prev(1)))
278 call hecmw_restart_read_int(fstrsolid%step_ctrl_restart%Load)
281 call hecmw_restart_read_real(fstrsolid%unode)
282 call hecmw_restart_read_real(fstrsolid%unode_bak)
283 call hecmw_restart_read_real(fstrsolid%QFORCE)
287 do i= 1, hecmesh%n_elem
288 if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
289 if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
290 do j= 1,
size(fstrsolid%elements(i)%gausses)
291 call hecmw_restart_read_int(nif)
292 call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%strain)
293 call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%strain_bak)
294 call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%stress)
295 call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%stress_bak)
296 if( nif(1)>0 )
call hecmw_restart_read_int(fstrsolid%elements(i)%gausses(j)%istatus)
297 if( nif(2)>0 )
call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%fstatus)
299 call hecmw_restart_read_int(naux)
301 call hecmw_restart_read_real(fstrsolid%elements(i)%aux(:,j))
305 if(
associated( fstrsolid%contacts ) )
then
306 call hecmw_restart_read_int(nif)
308 do i= 1, fstrsolid%n_contacts
309 do j= 1,
size(fstrsolid%contacts(i)%slave)
310 call hecmw_restart_read_int(nif)
311 fstrsolid%contacts(i)%states(j)%surface = nif(1)
312 fstrsolid%contacts(i)%states(j)%state = nif(2)
313 call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%lpos)
314 call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%direction)
315 call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%multiplier)
316 call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%tangentForce_trial)
317 call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%tangentForce_final)
318 fstrsolid%contacts(i)%states(j)%tangentForce(1:3) = fstrsolid%contacts(i)%states(j)%tangentForce_final(1:3)
319 fstrsolid%contacts(i)%states(j)%tangentForce1(1:3) = fstrsolid%contacts(i)%states(j)%tangentForce_final(1:3)
324 call hecmw_restart_close()
326 cstep = restrt_step(1)
327 substep = restrt_step(2) + 1
328 step_count = restrt_step(3)
329 if( fstrparam%restart_version >= 5 )
then
332 fstrsolid%AutoINC_stat = istat(1)
333 if( dabs(times(1)-times(3)) < 1.d-10 )
then
337 do i=1,
size(fstrsolid%step_ctrl)
338 fstrsolid%step_ctrl(i)%starttime = fstrsolid%step_ctrl(i)%starttime + times(3)
341 ctime = fstrsolid%step_ctrl(cstep)%starttime
342 ctime = ctime + dble(substep-1)*fstrsolid%step_ctrl(cstep)%initdt
343 dtime = fstrsolid%step_ctrl(cstep)%initdt
344 if( dabs(ctime-fstrsolid%step_ctrl(cstep)%starttime-fstrsolid%step_ctrl(cstep)%elapsetime) < 1.d-10 )
then
355 & fstrSOLID,fstrPARAM,is_StepFinished,contactNode)
357 integer,
intent(in) :: cstep
358 integer,
intent(in) :: cstep_ext
359 integer,
intent(in) :: substep
360 integer,
intent(in) :: step_count
361 real(kind=kreal),
intent(in) :: ctime
362 real(kind=kreal),
intent(in) :: dtime
363 logical,
intent(in) :: is_StepFinished
364 integer,
intent(in) :: contactNode
365 type (hecmwST_local_mesh),
intent(in) :: hecMESH
366 type (fstr_solid),
intent(in) :: fstrSOLID
369 integer :: i,j,restrt_step(3),nif(2),istat(1),nload_prev(1),naux(2)
370 real(kind=kreal) :: times(3)
372 restrt_step(1) = cstep_ext
373 restrt_step(2) = substep
374 restrt_step(3) = step_count
377 if( is_stepfinished )
then
380 times(3) = fstrsolid%step_ctrl(cstep)%starttime
382 istat(1) = fstrsolid%AutoINC_stat
383 call hecmw_restart_add_int(restrt_step,
size(restrt_step))
384 if( fstrparam%restart_version >= 5 )
then
385 call hecmw_restart_add_real(times,
size(times))
386 call hecmw_restart_add_int(fstrsolid%NRstat_i,
size(fstrsolid%NRstat_i))
387 call hecmw_restart_add_real(fstrsolid%NRstat_r,
size(fstrsolid%NRstat_r))
388 call hecmw_restart_add_int(istat,1)
391 if( is_stepfinished )
then
392 if(
associated(fstrsolid%step_ctrl(cstep)%Load) ) nload_prev(1) =
size(fstrsolid%step_ctrl(cstep)%Load)
393 call hecmw_restart_add_int(nload_prev,1)
394 if( nload_prev(1)>0 )
call hecmw_restart_add_int(fstrsolid%step_ctrl(cstep)%Load,nload_prev(1))
397 if(
associated(fstrsolid%step_ctrl(cstep-1)%Load) ) nload_prev(1) =
size(fstrsolid%step_ctrl(cstep-1)%Load)
398 call hecmw_restart_add_int(nload_prev,1)
399 if( nload_prev(1)>0 )
call hecmw_restart_add_int(fstrsolid%step_ctrl(cstep-1)%Load,nload_prev(1))
401 if(
associated(fstrsolid%step_ctrl_restart%Load) ) nload_prev(1) =
size(fstrsolid%step_ctrl_restart%Load)
402 call hecmw_restart_add_int(nload_prev,1)
403 if( nload_prev(1)>0 )
call hecmw_restart_add_int(fstrsolid%step_ctrl_restart%Load,nload_prev(1))
407 call hecmw_restart_add_real(fstrsolid%unode,
size(fstrsolid%unode))
408 call hecmw_restart_add_real(fstrsolid%unode_bak,
size(fstrsolid%unode_bak))
409 call hecmw_restart_add_real(fstrsolid%QFORCE,
size(fstrsolid%QFORCE))
413 do i= 1, hecmesh%n_elem
414 if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
415 if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
416 do j= 1,
size(fstrsolid%elements(i)%gausses)
418 if(
associated(fstrsolid%elements(i)%gausses(j)%istatus) ) nif(1)=
size(fstrsolid%elements(i)%gausses(j)%istatus)
419 if(
associated(fstrsolid%elements(i)%gausses(j)%fstatus) ) nif(2)=
size(fstrsolid%elements(i)%gausses(j)%fstatus)
420 call hecmw_restart_add_int(nif,
size(nif))
421 call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%strain,
size(fstrsolid%elements(i)%gausses(j)%strain))
422 call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%strain_bak,
size(fstrsolid%elements(i)%gausses(j)%strain_bak))
423 call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%stress,
size(fstrsolid%elements(i)%gausses(j)%stress))
424 call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%stress_bak,
size(fstrsolid%elements(i)%gausses(j)%stress_bak))
426 call hecmw_restart_add_int(fstrsolid%elements(i)%gausses(j)%istatus,
size(fstrsolid%elements(i)%gausses(j)%istatus))
429 call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%fstatus,
size(fstrsolid%elements(i)%gausses(j)%fstatus))
433 if(
associated(fstrsolid%elements(i)%aux) ) naux=shape(fstrsolid%elements(i)%aux)
434 call hecmw_restart_add_int(naux,
size(naux))
436 call hecmw_restart_add_real(fstrsolid%elements(i)%aux(:,j),naux(1))
440 if(
associated( fstrsolid%contacts ) )
then
442 call hecmw_restart_add_int(nif,
size(nif))
443 do i= 1, fstrsolid%n_contacts
444 do j= 1,
size(fstrsolid%contacts(i)%slave)
445 nif(1) = fstrsolid%contacts(i)%states(j)%surface
446 nif(2) = fstrsolid%contacts(i)%states(j)%state
447 call hecmw_restart_add_int(nif,
size(nif))
448 call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%lpos,
size(fstrsolid%contacts(i)%states(j)%lpos))
449 call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%direction,
size(fstrsolid%contacts(i)%states(j)%direction))
450 call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%multiplier,
size(fstrsolid%contacts(i)%states(j)%multiplier))
451 call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%tangentForce_trial, &
452 size(fstrsolid%contacts(i)%states(j)%tangentForce_trial))
453 call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%tangentForce_final, &
454 size(fstrsolid%contacts(i)%states(j)%tangentForce_final))
459 call hecmw_restart_write()
467 integer,
intent(out) :: cstep
468 integer,
intent(out) :: substep
469 integer,
intent(out),
optional :: contactNode
470 integer,
intent(out),
optional :: step_count
471 type (hecmwST_local_mesh),
intent(in) :: hecMESH
472 type (fstr_solid),
intent(inout) :: fstrSOLID
473 type ( fstr_dynamic),
intent(inout) :: fstrDYNAMIC
476 integer :: i,j,restrt_step(3),nif(2),istat(1),nload_prev(1),naux(2),dyna_int(1)
477 real(kind=kreal) :: times(3),dyna_data(1)
479 call hecmw_restart_open()
482 call hecmw_restart_read_int(restrt_step)
483 if( fstrparam%restart_version >= 5 )
then
484 if(
myrank == 0 )
write(*,*)
'Reading dynamic restart file as new format(>=ver5.0)'
485 call hecmw_restart_read_real(times)
486 call hecmw_restart_read_int(fstrsolid%NRstat_i)
487 call hecmw_restart_read_real(fstrsolid%NRstat_r)
488 call hecmw_restart_read_int(istat)
490 if(
myrank == 0 )
write(*,*)
'Reading dynamic restart file as old format(<ver5.0)'
492 call hecmw_restart_read_int(nload_prev)
493 if( nload_prev(1)>0 )
then
494 allocate(fstrsolid%step_ctrl_restart%Load(nload_prev(1)))
495 call hecmw_restart_read_int(fstrsolid%step_ctrl_restart%Load)
498 call hecmw_restart_read_real(fstrsolid%unode)
499 call hecmw_restart_read_real(fstrsolid%unode_bak)
500 call hecmw_restart_read_real(fstrsolid%QFORCE)
504 do i= 1, hecmesh%n_elem
505 if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
506 if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
507 do j= 1,
size(fstrsolid%elements(i)%gausses)
508 call hecmw_restart_read_int(nif)
509 call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%strain)
510 call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%strain_bak)
511 call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%stress)
512 call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%stress_bak)
513 if( nif(1)>0 )
call hecmw_restart_read_int(fstrsolid%elements(i)%gausses(j)%istatus)
514 if( nif(2)>0 )
call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%fstatus)
516 call hecmw_restart_read_int(naux)
518 call hecmw_restart_read_real(fstrsolid%elements(i)%aux(:,j))
522 if(
present(contactnode))
then
523 call hecmw_restart_read_int(nif)
525 do i= 1, fstrsolid%n_contacts
526 do j= 1,
size(fstrsolid%contacts(i)%slave)
527 call hecmw_restart_read_int(nif)
528 fstrsolid%contacts(i)%states(j)%surface = nif(1)
529 fstrsolid%contacts(i)%states(j)%state = nif(2)
530 call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%lpos)
531 call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%direction)
532 call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%multiplier)
533 call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%tangentForce_trial)
534 call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%tangentForce_final)
535 fstrsolid%contacts(i)%states(j)%tangentForce(1:3) = fstrsolid%contacts(i)%states(j)%tangentForce_final(1:3)
536 fstrsolid%contacts(i)%states(j)%tangentForce1(1:3) = fstrsolid%contacts(i)%states(j)%tangentForce_final(1:3)
542 call hecmw_restart_read_int(dyna_int)
543 fstrdynamic%idx_eqa = dyna_int(1)
544 call hecmw_restart_read_real(dyna_data)
545 fstrdynamic%strainEnergy = dyna_data(1)
546 if( fstrdynamic%idx_eqa == 1 )
then
547 call hecmw_restart_read_real(fstrdynamic%DISP(:,1))
548 call hecmw_restart_read_real(fstrdynamic%VEL(:,1))
549 call hecmw_restart_read_real(fstrdynamic%ACC(:,1))
551 call hecmw_restart_read_real(fstrdynamic%DISP(:,1))
552 call hecmw_restart_read_real(fstrdynamic%DISP(:,3))
554 do i= 1, hecmesh%n_elem
555 if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
556 if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
557 call hecmw_restart_read_real(fstrsolid%elements(i)%equiForces)
560 call hecmw_restart_close()
563 cstep = restrt_step(1)
564 substep = restrt_step(2) + 1
565 if(
present(step_count) ) step_count = restrt_step(3)
566 if( fstrparam%restart_version >= 5 )
then
567 fstrdynamic%t_curr = times(1)
568 fstrdynamic%t_delta = times(2)
569 fstrsolid%AutoINC_stat = istat(1)
570 if( dabs(times(1)-times(3)) < 1.d-10 )
then
574 do i=1,
size(fstrsolid%step_ctrl)
575 fstrsolid%step_ctrl(i)%starttime = fstrsolid%step_ctrl(i)%starttime + times(3)
578 fstrdynamic%t_curr = fstrsolid%step_ctrl(cstep)%starttime
579 fstrdynamic%t_curr = fstrdynamic%t_curr + dble(substep-1)*fstrsolid%step_ctrl(cstep)%initdt
580 fstrdynamic%t_delta = fstrsolid%step_ctrl(cstep)%initdt
581 if( dabs(fstrdynamic%t_curr-fstrsolid%step_ctrl(cstep)%starttime &
582 -fstrsolid%step_ctrl(cstep)%elapsetime) < 1.d-10 )
then
593 fstrDYNAMIC,fstrPARAM,is_StepFinished,contactNode,step_count)
595 integer,
intent(in) :: cstep
596 integer,
intent(in) :: substep
597 logical,
intent(in) :: is_StepFinished
598 integer,
intent(in),
optional :: contactNode
599 integer,
intent(in),
optional :: step_count
600 type (hecmwST_local_mesh),
intent(in) :: hecMESH
601 type (fstr_solid),
intent(in) :: fstrSOLID
602 type ( fstr_dynamic),
intent(in) :: fstrDYNAMIC
605 integer :: i,j,restrt_step(3),nif(2),istat(1),nload_prev(1),naux(2),dyna_int(1)
606 real(kind=kreal) :: times(3),dyna_data(1)
609 restrt_step(1) = cstep
610 restrt_step(2) = substep
611 if(
present(step_count) )
then
612 restrt_step(3) = step_count
616 call hecmw_restart_add_int(restrt_step,
size(restrt_step))
617 if( fstrparam%restart_version >= 5 )
then
618 times(1) = fstrdynamic%t_curr
619 times(2) = fstrdynamic%t_delta
620 if( is_stepfinished )
then
621 times(3) = fstrdynamic%t_curr
623 times(3) = fstrsolid%step_ctrl(cstep)%starttime
625 call hecmw_restart_add_real(times,
size(times))
626 call hecmw_restart_add_int(fstrsolid%NRstat_i,
size(fstrsolid%NRstat_i))
627 call hecmw_restart_add_real(fstrsolid%NRstat_r,
size(fstrsolid%NRstat_r))
628 istat(1) = fstrsolid%AutoINC_stat
629 call hecmw_restart_add_int(istat,1)
632 call hecmw_restart_add_int(nload_prev,1)
634 call hecmw_restart_add_real(fstrsolid%unode,
size(fstrsolid%unode))
635 call hecmw_restart_add_real(fstrsolid%unode_bak,
size(fstrsolid%unode_bak))
636 call hecmw_restart_add_real(fstrsolid%QFORCE,
size(fstrsolid%QFORCE))
640 do i= 1, hecmesh%n_elem
641 if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
642 if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
643 do j= 1,
size(fstrsolid%elements(i)%gausses)
645 if(
associated(fstrsolid%elements(i)%gausses(j)%istatus) ) nif(1)=
size(fstrsolid%elements(i)%gausses(j)%istatus)
646 if(
associated(fstrsolid%elements(i)%gausses(j)%fstatus) ) nif(2)=
size(fstrsolid%elements(i)%gausses(j)%fstatus)
647 call hecmw_restart_add_int(nif,
size(nif))
648 call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%strain,
size(fstrsolid%elements(i)%gausses(j)%strain))
649 call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%strain_bak,
size(fstrsolid%elements(i)%gausses(j)%strain_bak))
650 call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%stress,
size(fstrsolid%elements(i)%gausses(j)%stress))
651 call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%stress_bak,
size(fstrsolid%elements(i)%gausses(j)%stress_bak))
653 call hecmw_restart_add_int(fstrsolid%elements(i)%gausses(j)%istatus,
size(fstrsolid%elements(i)%gausses(j)%istatus))
656 call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%fstatus,
size(fstrsolid%elements(i)%gausses(j)%fstatus))
660 if(
associated(fstrsolid%elements(i)%aux) ) naux=shape(fstrsolid%elements(i)%aux)
661 call hecmw_restart_add_int(naux,
size(naux))
663 call hecmw_restart_add_real(fstrsolid%elements(i)%aux(:,j),naux(1))
667 if(
present(contactnode))
then
669 call hecmw_restart_add_int(nif,
size(nif))
670 do i= 1, fstrsolid%n_contacts
671 do j= 1,
size(fstrsolid%contacts(i)%slave)
672 nif(1) = fstrsolid%contacts(i)%states(j)%surface
673 nif(2) = fstrsolid%contacts(i)%states(j)%state
674 call hecmw_restart_add_int(nif,
size(nif))
675 call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%lpos,
size(fstrsolid%contacts(i)%states(j)%lpos))
676 call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%direction,
size(fstrsolid%contacts(i)%states(j)%direction))
677 call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%multiplier,
size(fstrsolid%contacts(i)%states(j)%multiplier))
678 call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%tangentForce_trial, &
679 size(fstrsolid%contacts(i)%states(j)%tangentForce_trial))
680 call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%tangentForce_final, &
681 size(fstrsolid%contacts(i)%states(j)%tangentForce_final))
687 dyna_int(1) = fstrdynamic%idx_eqa
688 call hecmw_restart_add_int(dyna_int,1)
689 dyna_data(1) = fstrdynamic%strainEnergy
690 call hecmw_restart_add_real(dyna_data,
size(dyna_data))
691 if( fstrdynamic%idx_eqa == 1 )
then
692 call hecmw_restart_add_real(fstrdynamic%DISP(:,1),
size(fstrdynamic%DISP(:,1)))
693 call hecmw_restart_add_real(fstrdynamic%VEL(:,1),
size(fstrdynamic%VEL(:,1)))
694 call hecmw_restart_add_real(fstrdynamic%ACC(:,1),
size(fstrdynamic%ACC(:,1)))
696 call hecmw_restart_add_real(fstrdynamic%DISP(:,1),
size(fstrdynamic%DISP(:,1)))
697 call hecmw_restart_add_real(fstrdynamic%DISP(:,3),
size(fstrdynamic%DISP(:,3)))
699 do i= 1, hecmesh%n_elem
700 if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
701 if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
702 call hecmw_restart_add_real(fstrsolid%elements(i)%equiForces,
size(fstrsolid%elements(i)%equiForces))
705 call hecmw_restart_write()
This module provides functions to read in and write out restart files.
logical function fstr_requires_shell_restart_v6(fstrSOLID)
Return true when the model contains shell state that cannot be represented by restart version 5.
subroutine fstr_write_restart_shell_gauss(gauss)
Store one complete shell layer/thickness Gauss state.
subroutine fstr_read_restart_dyna_nl(cstep, substep, hecMESH, fstrSOLID, fstrDYNAMIC, fstrPARAM, contactNode, step_count)
Read in restart file for nonlinear dynamic analysis.
subroutine fstr_read_restart(cstep, substep, step_count, ctime, dtime, hecMESH, fstrSOLID, fstrPARAM, contactNode)
Read in restart file.
subroutine fstr_require_shell_restart_version(fstrSOLID, restart_version)
Abort instead of silently discarding finite-rotation or layer shell state.
subroutine fstr_write_restart_shell_state(hecMESH, fstrSOLID)
Write committed nodal shell kinematics and all layer/thickness material histories.
subroutine fstr_restart_abort(message)
Stop restart processing with a rank-zero diagnostic.
subroutine fstr_write_restart_dyna_nl(cstep, substep, hecMESH, fstrSOLID, fstrDYNAMIC, fstrPARAM, is_StepFinished, contactNode, step_count)
write out restart file for nonlinear dynamic analysis
subroutine fstr_write_restart(cstep, cstep_ext, substep, step_count, ctime, dtime, hecMESH, fstrSOLID, fstrPARAM, is_StepFinished, contactNode)
write out restart file
subroutine fstr_read_restart_shell_state(hecMESH, fstrSOLID)
Restore committed nodal shell kinematics and all layer/thickness material histories.
subroutine fstr_read_restart_shell_gauss(gauss)
Restore one complete shell layer/thickness Gauss state.
subroutine fstr_validate_shell_nodal_state(fstrSOLID, nnode)
Validate the allocated nodal arrays required by the version-6 shell block.
This module defines common data and basic structures for analysis.
integer(kind=kint) myrank
PARALLEL EXECUTION.
This module provides aux functions.
This modules defines a structure to record history dependent parameter in static analysis.
FSTR INNER CONTROL PARAMETERS (fstrPARAM)
All data should be recorded in every quadrature points.