FrontISTR  5.9.0
Large-scale structural analysis program with finit element method
fstr_Restart.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
2 ! Copyright (c) 2019 FrontISTR Commons
3 ! This software is released under the MIT License, see LICENSE.txt
4 !-------------------------------------------------------------------------------
7 
9  use m_utilities
10  use m_fstr
11  implicit none
12 
13 contains
14 
16  !----------------------------------------------------------------------*
17  subroutine fstr_read_restart(cstep,substep,step_count,ctime,dtime,hecMESH,fstrSOLID,fstrPARAM,contactNode)
18  !----------------------------------------------------------------------*
19  integer, intent(out) :: cstep
20  integer, intent(out) :: substep
21  integer, intent(out) :: step_count
22  real(kind=kreal), intent(out) :: ctime
23  real(kind=kreal), intent(out) :: dtime
24  integer, intent(out) :: contactNode
25  type (hecmwST_local_mesh), intent(in) :: hecMESH
26  type (fstr_solid),intent(inout) :: fstrSOLID
27  type(fstr_param), intent(in) :: fstrPARAM
28 
29  integer :: i,j,restrt_step(3),nif(2),istat(1),nload_prev(1),naux(2)
30  real(kind=kreal) :: times(3)
31 
32  call hecmw_restart_open()
33 
34  call hecmw_restart_read_int(restrt_step)
35  if( fstrparam%restart_version >= 5 ) then
36  if( myrank == 0 ) write(*,*) 'Reading restart file as new format(>=ver5.0)'
37  call hecmw_restart_read_real(times)
38  call hecmw_restart_read_int(fstrsolid%NRstat_i)
39  call hecmw_restart_read_real(fstrsolid%NRstat_r)
40  call hecmw_restart_read_int(istat)
41  else
42  if( myrank == 0 ) write(*,*) 'Reading restart file as old format(<ver5.0)'
43  endif
44  call hecmw_restart_read_int(nload_prev) !load info at previous step
45  if( nload_prev(1)>0 ) then
46  allocate(fstrsolid%step_ctrl_restart%Load(nload_prev(1)))
47  call hecmw_restart_read_int(fstrsolid%step_ctrl_restart%Load)
48  endif
49 
50  call hecmw_restart_read_real(fstrsolid%unode)
51  call hecmw_restart_read_real(fstrsolid%unode_bak)
52  call hecmw_restart_read_real(fstrsolid%QFORCE)
53 
54  do i= 1, hecmesh%n_elem
55  if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
56  if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
57  do j= 1, size(fstrsolid%elements(i)%gausses)
58  call hecmw_restart_read_int(nif)
59  call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%strain)
60  call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%strain_bak)
61  call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%stress)
62  call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%stress_bak)
63  if( nif(1)>0 ) call hecmw_restart_read_int(fstrsolid%elements(i)%gausses(j)%istatus)
64  if( nif(2)>0 ) call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%fstatus)
65  enddo
66  call hecmw_restart_read_int(naux)
67  do j= 1, naux(2)
68  call hecmw_restart_read_real(fstrsolid%elements(i)%aux(:,j))
69  enddo
70  enddo
71 
72  if( associated( fstrsolid%contacts ) ) then
73  call hecmw_restart_read_int(nif)
74  contactnode = nif(1)
75  do i= 1, fstrsolid%n_contacts
76  do j= 1, size(fstrsolid%contacts(i)%slave)
77  call hecmw_restart_read_int(nif)
78  fstrsolid%contacts(i)%states(j)%surface = nif(1)
79  fstrsolid%contacts(i)%states(j)%state = nif(2)
80  call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%lpos)
81  call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%direction)
82  call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%multiplier)
83  call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%tangentForce_trial)
84  call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%tangentForce_final)
85  enddo
86  enddo
87  endif
88 
89  call hecmw_restart_close()
90 
91  cstep = restrt_step(1)
92  substep = restrt_step(2) + 1
93  step_count = restrt_step(3)
94  if( fstrparam%restart_version >= 5 ) then
95  ctime = times(1)
96  dtime = times(2)
97  fstrsolid%AutoINC_stat = istat(1)
98  if( dabs(times(1)-times(3)) < 1.d-10 ) then
99  cstep = cstep + 1
100  substep = 1
101  endif
102  do i=1,size(fstrsolid%step_ctrl) !shift start time
103  fstrsolid%step_ctrl(i)%starttime = fstrsolid%step_ctrl(i)%starttime + times(3)
104  end do
105  else
106  ctime = fstrsolid%step_ctrl(cstep)%starttime
107  ctime = ctime + dble(substep-1)*fstrsolid%step_ctrl(cstep)%initdt
108  dtime = fstrsolid%step_ctrl(cstep)%initdt
109  if( dabs(ctime-fstrsolid%step_ctrl(cstep)%starttime-fstrsolid%step_ctrl(cstep)%elapsetime) < 1.d-10 ) then
110  cstep = cstep + 1
111  substep = 1
112  endif
113  endif
114 
115  end subroutine fstr_read_restart
116 
118  !----------------------------------------------------------------------*
119  subroutine fstr_write_restart(cstep,cstep_ext,substep,step_count,ctime,dtime,hecMESH, &
120  & fstrSOLID,fstrPARAM,is_StepFinished,contactNode)
121  !----------------------------------------------------------------------*
122  integer, intent(in) :: cstep
123  integer, intent(in) :: cstep_ext
124  integer, intent(in) :: substep
125  integer, intent(in) :: step_count
126  real(kind=kreal), intent(in) :: ctime
127  real(kind=kreal), intent(in) :: dtime
128  logical, intent(in) :: is_StepFinished
129  integer, intent(in) :: contactNode
130  type (hecmwST_local_mesh), intent(in) :: hecMESH
131  type (fstr_solid), intent(in) :: fstrSOLID
132  type(fstr_param), intent(in) :: fstrPARAM
133 
134  integer :: i,j,restrt_step(3),nif(2),istat(1),nload_prev(1),naux(2)
135  real(kind=kreal) :: times(3)
136 
137  restrt_step(1) = cstep_ext
138  restrt_step(2) = substep
139  restrt_step(3) = step_count
140  times(1) = ctime
141  times(2) = dtime
142  if( is_stepfinished ) then
143  times(3) = ctime
144  else
145  times(3) = fstrsolid%step_ctrl(cstep)%starttime
146  end if
147  istat(1) = fstrsolid%AutoINC_stat
148  call hecmw_restart_add_int(restrt_step,size(restrt_step))
149  if( fstrparam%restart_version >= 5 ) then
150  call hecmw_restart_add_real(times,size(times))
151  call hecmw_restart_add_int(fstrsolid%NRstat_i,size(fstrsolid%NRstat_i))
152  call hecmw_restart_add_real(fstrsolid%NRstat_r,size(fstrsolid%NRstat_r))
153  call hecmw_restart_add_int(istat,1)
154  endif
155  nload_prev(1) = 0
156  if( is_stepfinished ) then
157  if( associated(fstrsolid%step_ctrl(cstep)%Load) ) nload_prev(1) = size(fstrsolid%step_ctrl(cstep)%Load)
158  call hecmw_restart_add_int(nload_prev,1)
159  if( nload_prev(1)>0 ) call hecmw_restart_add_int(fstrsolid%step_ctrl(cstep)%Load,nload_prev(1))
160  else
161  if( cstep>1 ) then
162  if( associated(fstrsolid%step_ctrl(cstep-1)%Load) ) nload_prev(1) = size(fstrsolid%step_ctrl(cstep-1)%Load)
163  call hecmw_restart_add_int(nload_prev,1)
164  if( nload_prev(1)>0 ) call hecmw_restart_add_int(fstrsolid%step_ctrl(cstep-1)%Load,nload_prev(1))
165  else
166  if( associated(fstrsolid%step_ctrl_restart%Load) ) nload_prev(1) = size(fstrsolid%step_ctrl_restart%Load)
167  call hecmw_restart_add_int(nload_prev,1)
168  if( nload_prev(1)>0 ) call hecmw_restart_add_int(fstrsolid%step_ctrl_restart%Load,nload_prev(1))
169  endif
170  end if
171 
172  call hecmw_restart_add_real(fstrsolid%unode,size(fstrsolid%unode))
173  call hecmw_restart_add_real(fstrsolid%unode_bak,size(fstrsolid%unode_bak))
174  call hecmw_restart_add_real(fstrsolid%QFORCE,size(fstrsolid%QFORCE))
175 
176  do i= 1, hecmesh%n_elem
177  if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
178  if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
179  do j= 1, size(fstrsolid%elements(i)%gausses)
180  nif = 0
181  if( associated(fstrsolid%elements(i)%gausses(j)%istatus) ) nif(1)=size(fstrsolid%elements(i)%gausses(j)%istatus)
182  if( associated(fstrsolid%elements(i)%gausses(j)%fstatus) ) nif(2)=size(fstrsolid%elements(i)%gausses(j)%fstatus)
183  call hecmw_restart_add_int(nif,size(nif))
184  call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%strain,size(fstrsolid%elements(i)%gausses(j)%strain))
185  call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%strain_bak,size(fstrsolid%elements(i)%gausses(j)%strain_bak))
186  call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%stress,size(fstrsolid%elements(i)%gausses(j)%stress))
187  call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%stress_bak,size(fstrsolid%elements(i)%gausses(j)%stress_bak))
188  if( nif(1)>0 ) then
189  call hecmw_restart_add_int(fstrsolid%elements(i)%gausses(j)%istatus,size(fstrsolid%elements(i)%gausses(j)%istatus))
190  endif
191  if( nif(2)>0 ) then
192  call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%fstatus,size(fstrsolid%elements(i)%gausses(j)%fstatus))
193  endif
194  enddo
195  naux = 0
196  if( associated(fstrsolid%elements(i)%aux) ) naux=shape(fstrsolid%elements(i)%aux)
197  call hecmw_restart_add_int(naux,size(naux))
198  do j= 1, naux(2)
199  call hecmw_restart_add_real(fstrsolid%elements(i)%aux(:,j),naux(1))
200  enddo
201  enddo
202 
203  if( associated( fstrsolid%contacts ) ) then
204  nif(1) = contactnode
205  call hecmw_restart_add_int(nif,size(nif))
206  do i= 1, fstrsolid%n_contacts
207  do j= 1, size(fstrsolid%contacts(i)%slave)
208  nif(1) = fstrsolid%contacts(i)%states(j)%surface
209  nif(2) = fstrsolid%contacts(i)%states(j)%state
210  call hecmw_restart_add_int(nif,size(nif))
211  call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%lpos,size(fstrsolid%contacts(i)%states(j)%lpos))
212  call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%direction,size(fstrsolid%contacts(i)%states(j)%direction))
213  call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%multiplier,size(fstrsolid%contacts(i)%states(j)%multiplier))
214  call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%tangentForce_trial, &
215  size(fstrsolid%contacts(i)%states(j)%tangentForce_trial))
216  call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%tangentForce_final, &
217  size(fstrsolid%contacts(i)%states(j)%tangentForce_final))
218  enddo
219  enddo
220  endif
221 
222  call hecmw_restart_write()
223 
224  end subroutine fstr_write_restart
225 
227  !----------------------------------------------------------------------*
228  subroutine fstr_read_restart_dyna_nl(cstep,substep,hecMESH,fstrSOLID,fstrDYNAMIC,fstrPARAM,contactNode,step_count)
229  !----------------------------------------------------------------------*
230  integer, intent(out) :: cstep
231  integer, intent(out) :: substep
232  integer, intent(out), optional :: contactNode
233  integer, intent(out), optional :: step_count
234  type (hecmwST_local_mesh), intent(in) :: hecMESH
235  type (fstr_solid),intent(inout) :: fstrSOLID
236  type ( fstr_dynamic), intent(inout) :: fstrDYNAMIC
237  type(fstr_param), intent(in) :: fstrPARAM
238 
239  integer :: i,j,restrt_step(3),nif(2),istat(1),nload_prev(1),naux(2),dyna_int(1)
240  real(kind=kreal) :: times(3),dyna_data(1)
241 
242  call hecmw_restart_open()
243 
244  !--- Common header (same format as static restart) ---
245  call hecmw_restart_read_int(restrt_step)
246  if( fstrparam%restart_version >= 5 ) then
247  if( myrank == 0 ) write(*,*) 'Reading dynamic restart file as new format(>=ver5.0)'
248  call hecmw_restart_read_real(times)
249  call hecmw_restart_read_int(fstrsolid%NRstat_i)
250  call hecmw_restart_read_real(fstrsolid%NRstat_r)
251  call hecmw_restart_read_int(istat)
252  else
253  if( myrank == 0 ) write(*,*) 'Reading dynamic restart file as old format(<ver5.0)'
254  endif
255  call hecmw_restart_read_int(nload_prev)
256  if( nload_prev(1)>0 ) then
257  allocate(fstrsolid%step_ctrl_restart%Load(nload_prev(1)))
258  call hecmw_restart_read_int(fstrsolid%step_ctrl_restart%Load)
259  endif
260 
261  call hecmw_restart_read_real(fstrsolid%unode)
262  call hecmw_restart_read_real(fstrsolid%unode_bak)
263  call hecmw_restart_read_real(fstrsolid%QFORCE)
264 
265  do i= 1, hecmesh%n_elem
266  if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
267  if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
268  do j= 1, size(fstrsolid%elements(i)%gausses)
269  call hecmw_restart_read_int(nif)
270  call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%strain)
271  call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%strain_bak)
272  call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%stress)
273  call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%stress_bak)
274  if( nif(1)>0 ) call hecmw_restart_read_int(fstrsolid%elements(i)%gausses(j)%istatus)
275  if( nif(2)>0 ) call hecmw_restart_read_real(fstrsolid%elements(i)%gausses(j)%fstatus)
276  enddo
277  call hecmw_restart_read_int(naux)
278  do j= 1, naux(2)
279  call hecmw_restart_read_real(fstrsolid%elements(i)%aux(:,j))
280  enddo
281  enddo
282 
283  if(present(contactnode)) then
284  call hecmw_restart_read_int(nif)
285  contactnode = nif(1)
286  do i= 1, fstrsolid%n_contacts
287  do j= 1, size(fstrsolid%contacts(i)%slave)
288  call hecmw_restart_read_int(nif)
289  fstrsolid%contacts(i)%states(j)%surface = nif(1)
290  fstrsolid%contacts(i)%states(j)%state = nif(2)
291  call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%lpos)
292  call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%direction)
293  call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%multiplier)
294  call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%tangentForce_trial)
295  call hecmw_restart_read_real(fstrsolid%contacts(i)%states(j)%tangentForce_final)
296  enddo
297  enddo
298  endif
299 
300  !--- Dynamic-specific data ---
301  call hecmw_restart_read_int(dyna_int)
302  fstrdynamic%idx_eqa = dyna_int(1)
303  call hecmw_restart_read_real(dyna_data)
304  fstrdynamic%strainEnergy = dyna_data(1)
305  if( fstrdynamic%idx_eqa == 1 ) then
306  call hecmw_restart_read_real(fstrdynamic%DISP(:,1))
307  call hecmw_restart_read_real(fstrdynamic%VEL(:,1))
308  call hecmw_restart_read_real(fstrdynamic%ACC(:,1))
309  else
310  call hecmw_restart_read_real(fstrdynamic%DISP(:,1))
311  call hecmw_restart_read_real(fstrdynamic%DISP(:,3))
312  endif
313  do i= 1, hecmesh%n_elem
314  if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
315  if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
316  call hecmw_restart_read_real(fstrsolid%elements(i)%equiForces)
317  enddo
318 
319  call hecmw_restart_close()
320 
321  !--- Restore step info (same logic as static restart) ---
322  cstep = restrt_step(1)
323  substep = restrt_step(2) + 1
324  if( present(step_count) ) step_count = restrt_step(3)
325  if( fstrparam%restart_version >= 5 ) then
326  fstrdynamic%t_curr = times(1)
327  fstrdynamic%t_delta = times(2)
328  fstrsolid%AutoINC_stat = istat(1)
329  if( dabs(times(1)-times(3)) < 1.d-10 ) then
330  cstep = cstep + 1
331  substep = 1
332  endif
333  do i=1,size(fstrsolid%step_ctrl)
334  fstrsolid%step_ctrl(i)%starttime = fstrsolid%step_ctrl(i)%starttime + times(3)
335  end do
336  else
337  fstrdynamic%t_curr = fstrsolid%step_ctrl(cstep)%starttime
338  fstrdynamic%t_curr = fstrdynamic%t_curr + dble(substep-1)*fstrsolid%step_ctrl(cstep)%initdt
339  fstrdynamic%t_delta = fstrsolid%step_ctrl(cstep)%initdt
340  if( dabs(fstrdynamic%t_curr-fstrsolid%step_ctrl(cstep)%starttime &
341  -fstrsolid%step_ctrl(cstep)%elapsetime) < 1.d-10 ) then
342  cstep = cstep + 1
343  substep = 1
344  endif
345  endif
346 
347  end subroutine fstr_read_restart_dyna_nl
348 
350  !----------------------------------------------------------------------*
351  subroutine fstr_write_restart_dyna_nl(cstep,substep,hecMESH,fstrSOLID, &
352  fstrDYNAMIC,fstrPARAM,is_StepFinished,contactNode,step_count)
353  !----------------------------------------------------------------------*
354  integer, intent(in) :: cstep
355  integer, intent(in) :: substep
356  logical, intent(in) :: is_StepFinished
357  integer, intent(in), optional :: contactNode
358  integer, intent(in), optional :: step_count
359  type (hecmwST_local_mesh), intent(in) :: hecMESH
360  type (fstr_solid), intent(in) :: fstrSOLID
361  type ( fstr_dynamic), intent(in) :: fstrDYNAMIC
362  type(fstr_param), intent(in) :: fstrPARAM
363 
364  integer :: i,j,restrt_step(3),nif(2),istat(1),nload_prev(1),naux(2),dyna_int(1)
365  real(kind=kreal) :: times(3),dyna_data(1)
366 
367  !--- Common header (same format as static restart) ---
368  restrt_step(1) = cstep
369  restrt_step(2) = substep
370  if( present(step_count) ) then
371  restrt_step(3) = step_count
372  else
373  restrt_step(3) = 0
374  endif
375  call hecmw_restart_add_int(restrt_step,size(restrt_step))
376  if( fstrparam%restart_version >= 5 ) then
377  times(1) = fstrdynamic%t_curr
378  times(2) = fstrdynamic%t_delta
379  if( is_stepfinished ) then
380  times(3) = fstrdynamic%t_curr
381  else
382  times(3) = fstrsolid%step_ctrl(cstep)%starttime
383  end if
384  call hecmw_restart_add_real(times,size(times))
385  call hecmw_restart_add_int(fstrsolid%NRstat_i,size(fstrsolid%NRstat_i))
386  call hecmw_restart_add_real(fstrsolid%NRstat_r,size(fstrsolid%NRstat_r))
387  istat(1) = fstrsolid%AutoINC_stat
388  call hecmw_restart_add_int(istat,1)
389  endif
390  nload_prev(1) = 0
391  call hecmw_restart_add_int(nload_prev,1)
392 
393  call hecmw_restart_add_real(fstrsolid%unode,size(fstrsolid%unode))
394  call hecmw_restart_add_real(fstrsolid%unode_bak,size(fstrsolid%unode_bak))
395  call hecmw_restart_add_real(fstrsolid%QFORCE,size(fstrsolid%QFORCE))
396 
397  do i= 1, hecmesh%n_elem
398  if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
399  if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
400  do j= 1, size(fstrsolid%elements(i)%gausses)
401  nif = 0
402  if( associated(fstrsolid%elements(i)%gausses(j)%istatus) ) nif(1)=size(fstrsolid%elements(i)%gausses(j)%istatus)
403  if( associated(fstrsolid%elements(i)%gausses(j)%fstatus) ) nif(2)=size(fstrsolid%elements(i)%gausses(j)%fstatus)
404  call hecmw_restart_add_int(nif,size(nif))
405  call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%strain,size(fstrsolid%elements(i)%gausses(j)%strain))
406  call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%strain_bak,size(fstrsolid%elements(i)%gausses(j)%strain_bak))
407  call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%stress,size(fstrsolid%elements(i)%gausses(j)%stress))
408  call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%stress_bak,size(fstrsolid%elements(i)%gausses(j)%stress_bak))
409  if( nif(1)>0 ) then
410  call hecmw_restart_add_int(fstrsolid%elements(i)%gausses(j)%istatus,size(fstrsolid%elements(i)%gausses(j)%istatus))
411  endif
412  if( nif(2)>0 ) then
413  call hecmw_restart_add_real(fstrsolid%elements(i)%gausses(j)%fstatus,size(fstrsolid%elements(i)%gausses(j)%fstatus))
414  endif
415  enddo
416  naux = 0
417  if( associated(fstrsolid%elements(i)%aux) ) naux=shape(fstrsolid%elements(i)%aux)
418  call hecmw_restart_add_int(naux,size(naux))
419  do j= 1, naux(2)
420  call hecmw_restart_add_real(fstrsolid%elements(i)%aux(:,j),naux(1))
421  enddo
422  enddo
423 
424  if(present(contactnode)) then
425  nif(1) = contactnode
426  call hecmw_restart_add_int(nif,size(nif))
427  do i= 1, fstrsolid%n_contacts
428  do j= 1, size(fstrsolid%contacts(i)%slave)
429  nif(1) = fstrsolid%contacts(i)%states(j)%surface
430  nif(2) = fstrsolid%contacts(i)%states(j)%state
431  call hecmw_restart_add_int(nif,size(nif))
432  call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%lpos,size(fstrsolid%contacts(i)%states(j)%lpos))
433  call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%direction,size(fstrsolid%contacts(i)%states(j)%direction))
434  call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%multiplier,size(fstrsolid%contacts(i)%states(j)%multiplier))
435  call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%tangentForce_trial, &
436  size(fstrsolid%contacts(i)%states(j)%tangentForce_trial))
437  call hecmw_restart_add_real(fstrsolid%contacts(i)%states(j)%tangentForce_final, &
438  size(fstrsolid%contacts(i)%states(j)%tangentForce_final))
439  enddo
440  enddo
441  endif
442 
443  !--- Dynamic-specific data ---
444  dyna_int(1) = fstrdynamic%idx_eqa
445  call hecmw_restart_add_int(dyna_int,1)
446  dyna_data(1) = fstrdynamic%strainEnergy
447  call hecmw_restart_add_real(dyna_data,size(dyna_data))
448  if( fstrdynamic%idx_eqa == 1 ) then
449  call hecmw_restart_add_real(fstrdynamic%DISP(:,1),size(fstrdynamic%DISP(:,1)))
450  call hecmw_restart_add_real(fstrdynamic%VEL(:,1),size(fstrdynamic%VEL(:,1)))
451  call hecmw_restart_add_real(fstrdynamic%ACC(:,1),size(fstrdynamic%ACC(:,1)))
452  else
453  call hecmw_restart_add_real(fstrdynamic%DISP(:,1),size(fstrdynamic%DISP(:,1)))
454  call hecmw_restart_add_real(fstrdynamic%DISP(:,3),size(fstrdynamic%DISP(:,3)))
455  endif
456  do i= 1, hecmesh%n_elem
457  if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
458  if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
459  call hecmw_restart_add_real(fstrsolid%elements(i)%equiForces,size(fstrsolid%elements(i)%equiForces))
460  enddo
461 
462  call hecmw_restart_write()
463 
464  end subroutine fstr_write_restart_dyna_nl
465 
466 end module m_fstr_restart
This module provides functions to read in and write out restart files.
Definition: fstr_Restart.f90:8
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_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
This module defines common data and basic structures for analysis.
Definition: m_fstr.F90:15
integer(kind=kint) myrank
PARALLEL EXECUTION.
Definition: m_fstr.F90:98
This module provides aux functions.
Definition: utilities.f90:6
FSTR INNER CONTROL PARAMETERS (fstrPARAM)
Definition: m_fstr.F90:156