34 fstrDYNAMIC,fstrRESULT,fstrPARAM,fstrCPL, restrt_step_num )
37 integer,
intent(in) :: cstep
38 type(hecmwst_local_mesh) :: hecMESH
39 type(hecmwst_matrix) :: hecMAT
42 type(hecmwst_result_data) :: fstrRESULT
45 type(hecmwst_matrix_lagrange) :: hecLagMAT
49 type(hecmwst_local_mesh),
pointer :: hecMESHmpc
50 type(hecmwst_matrix),
pointer :: hecMATmpc
51 type(hecmwst_matrix),
pointer :: hecMAT0
52 integer(kind=kint) :: nnod, ndof, numnp, nn
53 integer(kind=kint) :: i, j, ids, ide, ims, ime, kk, idm, imm
54 integer(kind=kint) :: iter
55 integer(kind=kint) :: iiii5, iexit
56 integer(kind=kint) :: revocap_flag
57 integer(kind=kint) :: kkk0, kkk1
58 integer(kind=kint) :: restrt_step_num
59 integer(kind=kint) :: n_node_global
60 integer(kind=kint) :: ierr
62 real(kind=kreal) :: a1, a2, a3, b1, b2, b3, c1, c2
63 real(kind=kreal) :: bsize, res, resb
64 real(kind=kreal) :: time_1, time_2
65 real(kind=kreal),
parameter :: pi = 3.14159265358979323846d0
66 real(kind=kreal),
allocatable :: coord(:)
73 call hecmw_mpc_mat_init(hecmesh, hecmat, hecmeshmpc, hecmatmpc)
77 n_node_global = hecmesh%nn_internal
78 call hecmw_allreduce_i1(hecmesh,n_node_global,hecmw_sum)
80 hecmat%NDOF=hecmesh%n_dof
85 allocate(coord(hecmesh%n_node*ndof))
88 time_1 = hecmw_wtime()
91 if(dabs(fstrdynamic%beta) < 1.0e-20)
then
92 if( hecmesh%my_rank == 0 )
then
93 write(
imsg,*)
'stop due to Newmark-beta = 0'
95 call hecmw_abort( hecmw_comm_get_comm())
99 if(fstrdynamic%idx_mas == 1)
then
100 call setmass(fstrsolid,hecmesh,hecmat,fstreig)
103 else if(fstrdynamic%idx_mas == 2)
then
104 if( hecmesh%my_rank .eq. 0 )
then
105 write(
imsg,*)
'stop: consistent mass matrix is not yet available !'
107 call hecmw_abort( hecmw_comm_get_comm())
110 hecmat%Iarray(98) = 1
111 hecmat%Iarray(97) = 1
114 a1 = 0.5d0/fstrdynamic%beta - 1.0d0
115 a2 = 1.0d0/(fstrdynamic%beta*fstrdynamic%t_delta)
116 a3 = 1.0d0/(fstrdynamic%beta*fstrdynamic%t_delta*fstrdynamic%t_delta)
117 b1 = (0.5d0*fstrdynamic%ganma/fstrdynamic%beta - 1.0d0 )*fstrdynamic%t_delta
118 b2 = fstrdynamic%ganma/fstrdynamic%beta - 1.0d0
119 b3 = fstrdynamic%ganma/(fstrdynamic%beta*fstrdynamic%t_delta)
120 c1 = 1.0d0 + fstrdynamic%ray_k*b3
121 c2 = a3 + fstrdynamic%ray_m*b3
124 if( restrt_step_num == 1 )
then
129 fstrdynamic%VEC3(:) =0.0d0
133 do i = restrt_step_num, fstrdynamic%n_step
134 if(ndof == 4 .and. hecmesh%my_rank==0)
write(*,
'(a,i5)')
"iter: ",i
136 fstrdynamic%i_step = i
137 fstrdynamic%t_curr = fstrdynamic%t_delta * i
139 if(hecmesh%my_rank==0)
then
141 write(
ista,
'('' time step='',i10,'' time='',1pe13.4e3)') i,fstrdynamic%t_curr
145 fstrdynamic%VEC1(j) = a1*fstrdynamic%ACC(j,1) + a2*fstrdynamic%VEL(j,1)
146 fstrdynamic%VEC2(j) = b1*fstrdynamic%ACC(j,1) + b2*fstrdynamic%VEL(j,1)
152 fstrsolid%dunode(:) =0.d0
156 do iter = 1, fstrsolid%step_ctrl(cstep)%max_iter
157 if (fstrparam%nlgeom)
then
158 call fstr_stiffmatrix( hecmesh, hecmat, fstrsolid, fstrdynamic%t_curr, fstrdynamic%t_delta )
160 if (.not.
associated(hecmat0))
then
161 call fstr_stiffmatrix( hecmesh, hecmat, fstrsolid, fstrdynamic%t_curr, fstrdynamic%t_delta )
163 call hecmw_mat_init(hecmat0)
164 call hecmw_mat_copy_profile(hecmat, hecmat0)
165 call hecmw_mat_copy_val(hecmat, hecmat0)
167 call hecmw_mat_copy_val(hecmat0, hecmat)
171 if( fstrdynamic%ray_k/=0.d0 .or. fstrdynamic%ray_m/=0.d0 )
then
173 hecmat%X(j) = fstrdynamic%VEC2(j) - b3*fstrsolid%dunode(j)
176 if( fstrdynamic%ray_k/=0.d0 )
then
177 if( hecmesh%n_dof == 3 )
then
178 call hecmw_matvec (hecmesh, hecmat, hecmat%X, fstrdynamic%VEC3)
179 else if( hecmesh%n_dof == 2 )
then
180 call hecmw_matvec (hecmesh, hecmat, hecmat%X, fstrdynamic%VEC3)
181 else if( hecmesh%n_dof == 6 )
then
182 call matvec(fstrdynamic%VEC3, hecmat%X, hecmat, ndof, hecmat%D, hecmat%AU, hecmat%AL)
188 do j=1, hecmesh%n_node* hecmesh%n_dof
189 hecmat%B(j) = hecmat%B(j)- fstrsolid%QFORCE(j) + fstreig%mass(j)*( fstrdynamic%VEC1(j)-a3*fstrsolid%dunode(j) &
190 + fstrdynamic%ray_m* hecmat%X(j) ) + fstrdynamic%ray_k*fstrdynamic%VEC3(j)
196 & fstrparam, fstrdynamic, fstrcpl, restrt_step_num, pi, i)
198 do j = 1 ,nn*hecmat%NP
199 hecmat%D(j) = c1* hecmat%D(j)
201 do j = 1 ,nn*hecmat%NPU
202 hecmat%AU(j) = c1* hecmat%AU(j)
204 do j = 1 ,nn*hecmat%NPL
205 hecmat%AL(j) = c1*hecmat%AL(j)
209 idm = nn*(j-1)+1 + (ndof+1)*(kk-1)
210 imm = ndof*(j-1) + kk
211 hecmat%D(idm) = hecmat%D(idm) + c2*fstreig%mass(imm)
216 call dynamic_mat_ass_bc (hecmesh, hecmat, fstrsolid, fstrdynamic, fstrparam, heclagmat, iter)
219 call hecmw_mpc_mat_ass(hecmesh, hecmat, hecmeshmpc, hecmatmpc)
220 call hecmw_mpc_trans_rhs(hecmesh, hecmat, hecmatmpc)
224 call hecmw_innerproduct_r(hecmesh, ndof, hecmatmpc%B, hecmatmpc%B, bsize)
231 res = dsqrt(bsize/resb)
232 if( fstrparam%nlgeom .and. ndof /= 4 )
then
233 if(hecmesh%my_rank==0)
write(*,
'(a,i5,a,1pe12.4)')
"iter: ",iter,
", res: ",res
234 if(hecmesh%my_rank==0)
write(
ista,
'(''iter='',I5,''- Residual'',E15.7)')iter,res
235 if( res<fstrsolid%step_ctrl(cstep)%converg )
exit
240 if( iexit .ne. 1 )
then
241 if( fstrparam%nlgeom )
then
243 hecmatmpc%Iarray(97) = 2
245 hecmatmpc%Iarray(97) = 1
249 call solve_lineq(hecmeshmpc,hecmatmpc)
250 if( fstrparam%nlgeom )
then
254 call hecmw_mpc_tback_sol(hecmesh, hecmat, hecmatmpc)
256 do j=1,hecmesh%n_node*ndof
257 fstrsolid%dunode(j) = fstrsolid%dunode(j)+hecmat%X(j)
261 & fstrdynamic%t_delta, iter, fstrdynamic%strainEnergy )
263 if(.not. fstrparam%nlgeom)
exit
268 if( iter>fstrsolid%step_ctrl(cstep)%max_iter )
then
269 if( hecmesh%my_rank==0)
then
270 write(
ilog,*)
'### Fail to Converge : at step=', i
271 write(
ista,*)
'### Fail to Converge : at step=', i
272 write( *,*)
' ### Fail to Converge : at step=', i
280 & fstrparam, fstrdynamic, fstrcpl, a1, a2, a3, b1, b2, b3, i, is_cycle)
287 fstrdynamic%kineticEnergy = 0.0d0
289 fstrdynamic%ACC (j,2) = -a1*fstrdynamic%ACC(j,1) - a2*fstrdynamic%VEL(j,1) + &
290 a3*fstrsolid%dunode(j)
291 fstrdynamic%VEL (j,2) = -b1*fstrdynamic%ACC(j,1) - b2*fstrdynamic%VEL(j,1) + &
292 b3*fstrsolid%dunode(j)
293 fstrdynamic%ACC (j,1) = fstrdynamic%ACC (j,2)
294 fstrdynamic%VEL (j,1) = fstrdynamic%VEL (j,2)
296 fstrsolid%unode(j) = fstrsolid%unode(j)+fstrsolid%dunode(j)
297 fstrdynamic%DISP(j,2) = fstrsolid%unode(j)
299 fstrdynamic%kineticEnergy = fstrdynamic%kineticEnergy + &
300 0.5d0*fstreig%mass(j)*fstrdynamic%VEL(j,2)*fstrdynamic%VEL(j,2)
311 if( fstrdynamic%restart_nout > 0 )
then
312 if( mod(i,fstrdynamic%restart_nout).eq.0 .or. i.eq.fstrdynamic%n_step)
then
319 time_2 = hecmw_wtime()
321 if( hecmesh%my_rank == 0 )
then
322 write(
ista,
'(a,f10.2,a)')
' solve (sec) :', time_2 - time_1,
's'
326 call hecmw_mpc_mat_finalize(hecmesh, hecmat, hecmeshmpc, hecmatmpc)
327 if (
associated(hecmat0))
then
328 call hecmw_mat_finalize(hecmat0)
336 ,fstrDYNAMIC,fstrRESULT,fstrPARAM &
337 ,fstrCPL,hecLagMAT,restrt_step_num,infoCTChange &
341 integer,
intent(in) :: cstep
342 type(hecmwst_local_mesh) :: hecMESH
343 type(hecmwst_matrix) :: hecMAT
344 type(hecmwst_matrix),
pointer :: hecMAT0
347 type(hecmwst_result_data) :: fstrRESULT
351 type(hecmwst_matrix_lagrange) :: hecLagMAT
352 type(fstr_info_contactchange) :: infoCTChange
353 type(hecmwst_matrix) :: conMAT
356 integer(kind=kint) :: nnod, ndof, numnp, nn
357 integer(kind=kint) :: i, j, ids, ide, ims, ime, kk, idm, imm
358 integer(kind=kint) :: iter
359 real(kind=kreal) :: a1, a2, a3, b1, b2, b3, c1, c2
360 real(kind=kreal) :: bsize, res, res1, rf
361 real(kind=kreal) :: res0, relres
362 real :: time_1, time_2
363 real(kind=kreal),
parameter :: pi = 3.14159265358979323846d0
365 integer(kind=kint) :: restrt_step_num
366 integer(kind=kint) :: ctAlgo
367 integer(kind=kint) :: max_iter_contact, count_step
368 integer(kind=kint) :: stepcnt
369 real(kind=kreal) :: maxdlag, converg_dlag
371 integer(kind=kint) :: n_node_global
372 integer(kind=kint) :: contact_changed_global
373 integer(kind=kint) :: nndof,npdof
374 logical :: is_mat_symmetric
377 real(kind=kreal),
allocatable :: tmp_conb(:)
378 real(kind=kreal),
allocatable :: coord(:)
383 n_node_global = hecmesh%nn_internal
384 call hecmw_allreduce_i1(hecmesh,n_node_global,hecmw_sum)
386 ctalgo = fstrparam%contact_algo
389 write(*,*)
' This type of direct solver is not yet available in such case ! '
390 write(*,*)
' Please use intel MKL direct solver !'
391 call hecmw_abort(hecmw_comm_get_comm())
394 hecmat%NDOF=hecmesh%n_dof
400 allocate(coord(hecmesh%n_node*ndof))
404 time_1 = hecmw_wtime()
407 if(dabs(fstrdynamic%beta) < 1.0e-20)
then
408 if( hecmesh%my_rank == 0 )
then
409 write(
imsg,*)
'stop due to Newmark-beta = 0'
411 call hecmw_abort( hecmw_comm_get_comm())
415 if(fstrdynamic%idx_mas == 1)
then
416 call setmass(fstrsolid,hecmesh,hecmat,fstreig)
419 else if(fstrdynamic%idx_mas == 2)
then
420 if( hecmesh%my_rank .eq. 0 )
then
421 write(
imsg,*)
'stop: consistent mass matrix is not yet available !'
423 call hecmw_abort( hecmw_comm_get_comm())
426 hecmat%Iarray(98) = 1
427 hecmat%Iarray(97) = 1
430 if( restrt_step_num == 1 .and. fstrdynamic%VarInitialize .and. fstrdynamic%ray_m /= 0.0d0 ) &
434 a1 = .5d0/fstrdynamic%beta - 1.d0
435 a2 = 1.d0/(fstrdynamic%beta*fstrdynamic%t_delta)
436 a3 = 1.d0/(fstrdynamic%beta*fstrdynamic%t_delta*fstrdynamic%t_delta)
437 b1 = ( .5d0*fstrdynamic%ganma/fstrdynamic%beta - 1.d0 )*fstrdynamic%t_delta
438 b2 = fstrdynamic%ganma/fstrdynamic%beta - 1.d0
439 b3 = fstrdynamic%ganma/(fstrdynamic%beta*fstrdynamic%t_delta)
440 c1 = 1.d0 + fstrdynamic%ray_k*b3
441 c2 = a3 + fstrdynamic%ray_m*b3
444 if( restrt_step_num == 1 )
then
449 fstrdynamic%VEC3(:) =0.d0
453 call fstr_scan_contact_state(cstep, restrt_step_num, 0, fstrdynamic%t_delta, ctalgo, hecmesh, fstrsolid, infoctchange, hecmat%B)
455 call hecmw_mat_copy_profile( hecmat, conmat )
459 elseif( hecmat%Iarray(99)==4 )
then
460 write(*,*)
' This type of direct solver is not yet available in such case ! '
461 write(*,*)
' Please change solver type to intel MKL direct solver !'
462 call hecmw_abort(hecmw_comm_get_comm())
467 max_iter_contact = fstrsolid%step_ctrl(cstep)%max_contiter
468 converg_dlag = fstrsolid%step_ctrl(cstep)%converg_lag
471 do i = restrt_step_num, fstrdynamic%n_step
473 fstrdynamic%i_step = i
474 fstrdynamic%t_curr = fstrdynamic%t_delta * i
476 if(hecmesh%my_rank==0)
then
477 write(
ista,
'('' time step='',i10,'' time='',1pe13.4e3)') i,fstrdynamic%t_curr
478 write(*,
'(A)')
'-------------------------------------------------'
479 write(*,
'('' time step='',i10,'' time='',1pe13.4e3)') i,fstrdynamic%t_curr
483 fstrdynamic%VEC1(j) = a1*fstrdynamic%ACC(j,1) + a2*fstrdynamic%VEL(j,1)
484 fstrdynamic%VEC2(j) = b1*fstrdynamic%ACC(j,1) + b2*fstrdynamic%VEL(j,1)
492 fstrsolid%dunode(:) =0.d0
496 loopforcontactanalysis:
do while( .true. )
497 count_step = count_step + 1
504 do iter = 1, fstrsolid%step_ctrl(cstep)%max_iter
506 if (fstrparam%nlgeom)
then
507 call fstr_stiffmatrix( hecmesh, hecmat, fstrsolid, fstrdynamic%t_curr, fstrdynamic%t_delta )
509 if (.not.
associated(hecmat0))
then
510 call fstr_stiffmatrix( hecmesh, hecmat, fstrsolid, fstrdynamic%t_curr, fstrdynamic%t_delta )
512 call hecmw_mat_init(hecmat0)
513 call hecmw_mat_copy_profile(hecmat, hecmat0)
514 call hecmw_mat_copy_val(hecmat, hecmat0)
516 call hecmw_mat_copy_val(hecmat0, hecmat)
520 if( fstrdynamic%ray_k/=0.d0 .or. fstrdynamic%ray_m/=0.d0 )
then
522 hecmat%X(j) = fstrdynamic%VEC2(j) - b3*fstrsolid%dunode(j)
525 if( fstrdynamic%ray_k/=0.d0 )
then
526 if( hecmesh%n_dof == 3 )
then
527 call hecmw_matvec (hecmesh, hecmat, hecmat%X, fstrdynamic%VEC3)
528 else if( hecmesh%n_dof == 2 )
then
529 call hecmw_matvec (hecmesh, hecmat, hecmat%X, fstrdynamic%VEC3)
530 else if( hecmesh%n_dof == 6 )
then
531 call matvec(fstrdynamic%VEC3, hecmat%X, hecmat, ndof, hecmat%D, hecmat%AU, hecmat%AL)
537 do j=1, hecmesh%n_node* hecmesh%n_dof
538 hecmat%B(j)=hecmat%B(j)- fstrsolid%QFORCE(j) + fstreig%mass(j)*( fstrdynamic%VEC1(j)-a3*fstrsolid%dunode(j) &
539 + fstrdynamic%ray_m* hecmat%X(j) ) + fstrdynamic%ray_k*fstrdynamic%VEC3(j)
544 & fstrparam, fstrdynamic, fstrcpl, restrt_step_num, pi, i)
546 do j = 1 ,nn*hecmat%NP
547 hecmat%D(j) = c1* hecmat%D(j)
549 do j = 1 ,nn*hecmat%NPU
550 hecmat%AU(j) = c1* hecmat%AU(j)
552 do j = 1 ,nn*hecmat%NPL
553 hecmat%AL(j) = c1*hecmat%AL(j)
557 idm = nn*(j-1)+1 + (ndof+1)*(kk-1)
558 imm = ndof*(j-1) + kk
559 hecmat%D(idm) = hecmat%D(idm) + c2*fstreig%mass(imm)
563 call hecmw_mat_clear( conmat )
564 call hecmw_mat_clear_b( conmat )
573 call dynamic_mat_ass_bc (hecmesh, hecmat, fstrsolid, fstrdynamic, fstrparam, heclagmat, stepcnt, conmat=conmat)
574 call dynamic_mat_ass_bc_vl(hecmesh, hecmat, fstrsolid, fstrdynamic, fstrparam, heclagmat, stepcnt, conmat=conmat)
575 call dynamic_mat_ass_bc_ac(hecmesh, hecmat, fstrsolid, fstrdynamic, fstrparam, heclagmat, stepcnt, conmat=conmat)
587 elseif( maxdlag == 0.0d0)
then
590 call hecmw_allreduce_r1(hecmesh, maxdlag, hecmw_max)
592 res = dsqrt(res/res0)
593 if( hecmesh%my_rank==0 )
then
594 if(hecmesh%my_rank==0)
write(*,
'(a,i5,a,1pe12.4)')
"iter: ",iter,
", res: ",res
595 if(hecmesh%my_rank==0)
write(
ista,
'(''iter='',I5,''- Residual'',E15.7)')iter,res
596 write(*,
'(a,1e15.7)')
' - MaxDLag =',maxdlag
597 write(
ista,
'(a,1e15.7)')
' - MaxDLag =',maxdlag
599 if( res<fstrsolid%step_ctrl(cstep)%converg .and. maxdlag < converg_dlag )
exit
608 call hecmw_update_r (hecmesh, hecmat%X, hecmat%NP, hecmat%NDOF)
611 do j=1,hecmesh%n_node*ndof
612 fstrsolid%dunode(j) = fstrsolid%dunode(j)+hecmat%X(j)
615 & fstrdynamic%t_delta,iter, fstrdynamic%strainEnergy )
617 if(.not. fstrparam%nlgeom)
exit
622 do j=1,heclagmat%num_lagrange
623 heclagmat%lagrange(j) = heclagmat%lagrange(j) + hecmat%X(hecmesh%n_node*ndof+j)
624 if(dabs(hecmat%X(hecmesh%n_node*ndof+j))>maxdlag) maxdlag=dabs(hecmat%X(hecmesh%n_node*ndof+j))
631 if( iter>fstrsolid%step_ctrl(cstep)%max_iter )
then
632 if( hecmesh%my_rank==0)
then
633 write(
ilog,*)
'### Fail to Converge : at step=', i
634 write(
ista,*)
'### Fail to Converge : at step=', i
635 write( *,*)
' ### Fail to Converge : at step=', i
640 call fstr_scan_contact_state(cstep, i, count_step, fstrdynamic%t_delta, ctalgo, hecmesh, fstrsolid, infoctchange, hecmat%B)
643 write(*,*)
' This type of direct solver is not yet available in such case ! '
644 write(*,*)
' Please use intel MKL direct solver !'
645 call hecmw_abort(hecmw_comm_get_comm())
649 contact_changed_global=0
651 exit loopforcontactanalysis
654 contact_changed_global=1
656 call hecmw_allreduce_i1(hecmesh,contact_changed_global,hecmw_max)
657 if (contact_changed_global > 0)
then
658 call hecmw_mat_clear_b( hecmat )
659 call hecmw_mat_clear_b( conmat )
663 if( count_step > max_iter_contact )
exit loopforcontactanalysis
665 enddo loopforcontactanalysis
669 & fstrparam, fstrdynamic, fstrcpl, a1, a2, a3, b1, b2, b3, i, is_cycle)
675 fstrdynamic%kineticEnergy = 0.0d0
677 fstrdynamic%ACC (j,2) = -a1*fstrdynamic%ACC(j,1) - a2*fstrdynamic%VEL(j,1) + &
678 a3*fstrsolid%dunode(j)
679 fstrdynamic%VEL (j,2) = -b1*fstrdynamic%ACC(j,1) - b2*fstrdynamic%VEL(j,1) + &
680 b3*fstrsolid%dunode(j)
681 fstrdynamic%ACC (j,1) = fstrdynamic%ACC (j,2)
682 fstrdynamic%VEL (j,1) = fstrdynamic%VEL (j,2)
684 fstrsolid%unode(j) = fstrsolid%unode(j)+fstrsolid%dunode(j)
685 fstrdynamic%DISP(j,2) = fstrsolid%unode(j)
687 fstrdynamic%kineticEnergy = fstrdynamic%kineticEnergy + &
688 0.5d0*fstreig%mass(j)*fstrdynamic%VEL(j,2)*fstrdynamic%VEL(j,2)
700 if( fstrdynamic%restart_nout > 0 )
then
701 if( mod(i,fstrdynamic%restart_nout).eq.0 .or. i.eq.fstrdynamic%n_step )
then
703 infoctchange%contactNode_current)
710 if (
associated(hecmat0))
then
711 call hecmw_mat_finalize(hecmat0)
715 time_2 = hecmw_wtime()
716 if( hecmesh%my_rank == 0 )
then
717 write(
ista,
'(a,f10.2,a)')
' solve (sec) :', time_2 - time_1,
's'
727 if( fstrparam%fg_couple == 1)
then
728 if( fstrparam%fg_couple_type==1 .or. &
729 fstrparam%fg_couple_type==3 .or. &
735 & fstrPARAM, fstrDYNAMIC, fstrCPL, restrt_step_num, PI, i)
737 type(hecmwst_local_mesh) :: hecMESH
738 type(hecmwst_matrix) :: hecMAT
743 integer(kint) :: kkk0, kkk1, j, kk, i, restrt_step_num
744 real(kreal) :: bsize, PI
746 if( fstrparam%fg_couple == 1)
then
747 if( fstrparam%fg_couple_first /= 0 )
then
748 bsize = dfloat( i ) / dfloat( fstrparam%fg_couple_first )
749 if( bsize > 1.0 ) bsize = 1.0
750 do kkk0 = 1, fstrcpl%coupled_node_n
752 fstrcpl%trac(kkk1-2) = bsize * fstrcpl%trac(kkk1-2)
753 fstrcpl%trac(kkk1-1) = bsize * fstrcpl%trac(kkk1-1)
754 fstrcpl%trac(kkk1 ) = bsize * fstrcpl%trac(kkk1 )
757 if( fstrparam%fg_couple_window > 0 )
then
758 j = i - restrt_step_num + 1
759 kk = fstrdynamic%n_step - restrt_step_num + 1
760 bsize = 0.5*(1.0-cos(2.0*pi*dfloat(j)/dfloat(kk)))
761 do kkk0 = 1, fstrcpl%coupled_node_n
763 fstrcpl%trac(kkk1-2) = bsize * fstrcpl%trac(kkk1-2)
764 fstrcpl%trac(kkk1-1) = bsize * fstrcpl%trac(kkk1-1)
765 fstrcpl%trac(kkk1 ) = bsize * fstrcpl%trac(kkk1 )
773 & fstrPARAM, fstrDYNAMIC, fstrCPL, a1, a2, a3, b1, b2, b3, i, is_cycle)
775 type(hecmwst_local_mesh) :: hecMESH
776 type(hecmwst_matrix) :: hecMAT
781 integer(kint) :: kkk0, kkk1, j, i, revocap_flag
782 real(kreal) :: bsize, a1, a2, a3, b1, b2, b3
787 if( fstrparam%fg_couple == 1 )
then
788 if( fstrparam%fg_couple_type>1 )
then
789 do j=1, fstrcpl%coupled_node_n
790 if( fstrcpl%dof == 3 )
then
792 kkk1 = fstrcpl%coupled_node(j)*3
794 fstrcpl%disp (kkk0-2) = fstrsolid%unode(kkk1-2) + fstrsolid%dunode(kkk1-2)
795 fstrcpl%disp (kkk0-1) = fstrsolid%unode(kkk1-1) + fstrsolid%dunode(kkk1-1)
796 fstrcpl%disp (kkk0 ) = fstrsolid%unode(kkk1 ) + fstrsolid%dunode(kkk1 )
798 fstrcpl%velo (kkk0-2) = -b1*fstrdynamic%ACC(kkk1-2,1) - b2*fstrdynamic%VEL(kkk1-2,1) + &
799 b3*fstrsolid%dunode(kkk1-2)
800 fstrcpl%velo (kkk0-1) = -b1*fstrdynamic%ACC(kkk1-1,1) - b2*fstrdynamic%VEL(kkk1-1,1) + &
801 b3*fstrsolid%dunode(kkk1-1)
802 fstrcpl%velo (kkk0 ) = -b1*fstrdynamic%ACC(kkk1,1) - b2*fstrdynamic%VEL(kkk1,1) + &
803 b3*fstrsolid%dunode(kkk1)
804 fstrcpl%accel(kkk0-2) = -a1*fstrdynamic%ACC(kkk1-2,1) - a2*fstrdynamic%VEL(kkk1-2,1) + &
805 a3*fstrsolid%dunode(kkk1-2)
806 fstrcpl%accel(kkk0-1) = -a1*fstrdynamic%ACC(kkk1-1,1) - a2*fstrdynamic%VEL(kkk1-1,1) + &
807 a3*fstrsolid%dunode(kkk1-1)
808 fstrcpl%accel(kkk0 ) = -a1*fstrdynamic%ACC(kkk1,1) - a2*fstrdynamic%VEL(kkk1,1) + &
809 a3*fstrsolid%dunode(kkk1)
812 kkk1 = fstrcpl%coupled_node(j)*2
814 fstrcpl%disp (kkk0-1) = fstrsolid%unode(kkk1-1) + fstrsolid%dunode(kkk1-1)
815 fstrcpl%disp (kkk0 ) = fstrsolid%unode(kkk1 ) + fstrsolid%dunode(kkk1 )
817 fstrcpl%velo (kkk0-1) = -b1*fstrdynamic%ACC(kkk1-1,1) - b2*fstrdynamic%VEL(kkk1-1,1) + &
818 b3*fstrsolid%dunode(kkk1-1)
819 fstrcpl%velo (kkk0 ) = -b1*fstrdynamic%ACC(kkk1,1) - b2*fstrdynamic%VEL(kkk1,1) + &
820 b3*fstrsolid%dunode(kkk1)
821 fstrcpl%accel(kkk0-1) = -a1*fstrdynamic%ACC(kkk1-1,1) - a2*fstrdynamic%VEL(kkk1-1,1) + &
822 a3*fstrsolid%dunode(kkk1-1)
823 fstrcpl%accel(kkk0 ) = -a1*fstrdynamic%ACC(kkk1,1) - a2*fstrdynamic%VEL(kkk1,1) + &
824 a3*fstrsolid%dunode(kkk1)
830 select case ( fstrparam%fg_couple_type )
835 if( revocap_flag==0 ) is_cycle = .true.
838 if( revocap_flag==0 )
then