27 subroutine time_loop(el_new)
38 type(el4loop),
dimension(nelem_dg),
intent(in) :: el_new
41 character*70 :: file_monitor, file_outU1, file_outU0, file_outV1, &
43 character*70 :: file_fe0, file_fe1
44 integer*4 :: unit_fe0, unit_fe1
46 integer*4 :: mm, iface, ifacene, iene, imne, ie_curr, iene_curr, trofa
48 isnap, its, fn, nn, ip, im, imon, iaz, &
49 i, j, k, is, in, id, istage, itime, &
50 ie, ielem, count_monitor, find_tag, icase, irand, isdof
53 character*70 :: file_getval_name
54 integer*4 :: file_getval_id
58 integer*4 :: it_divisor = 1000
60 integer*4,
dimension(:),
allocatable :: node_counter, vtk_numbering
63 real*8 :: start_time, final_time, time_in_seconds, &
65 tt0, tt1, tt2, deltat2, tt_int, &
71 real*8,
dimension(:),
allocatable :: jumpx, jumpy, jumpz
72 real*8,
dimension(:),
allocatable :: func_value
75 real*8 :: rho, lambda, mu, tref
77 real*8,
dimension(:),
allocatable :: ct,ww
78 real*8,
dimension(:,:),
allocatable :: dd
79 real*8,
dimension(:,:,:),
allocatable :: ux_el, uy_el, uz_el, &
80 duxdx_el, duydx_el, duzdx_el
81 duxdy_el, duydy_el, duzdy_el
82 duxdz_el, duydz_el, duzdz_el
83 sxx_el, syy_el, szz_el, &
84 syz_el, szx_el, sxy_el, &
85 fx_el, fy_el, fz_el, &
87 vx_el, vy_el, vz_el, &
88 div_el, rotx_el, roty_el,
89 strainxx_el, strainyy_el,
90 strainxy_el, strainyz_el,
91 stressxx_el, stressyy_el,
92 stressxy_el, stressyz_el,
93 rho_el, lambda_el, mu_el,
96 integer*4,
dimension(mpi_np) :: send_length, recv_length, small_send_length
97integer*4,
dimension(mpi_np) :: send_length_jump, recv_length_jump
99integer*4,
dimension(:),
allocatable :: small_send_buffer,small_recv_buffer
101 real*8,
dimension(:),
allocatable :: u_1, u0, u1, u2, v1, v2, jump
104 send_buffer, recv_buffer, &
105 double_send_buffer, double_recv_buffer
106 send_buffer_jump, recv_buffer_jump
109 real*8 :: gamma, qs_nh, qp_nh
110 real*8,
dimension(1,N_SLS) :: y_lambda_nh, y_mu_nh
111 real*8,
dimension(:),
allocatable :: mc, mck, damp_term
112 real*8,
dimension(:,:,:),
allocatable :: mc_el, mck_el
113 real*8,
dimension(:,:),
allocatable :: strain_visc
114 real*8,
dimension(:,:,:,:),
allocatable :: strain_visc_xx,strain_visc_xy
115 strain_visc_xz,strain_visc_yy
116 strain_visc_yz,strain_visc_zz
120 real*8,
dimension (:,:),
allocatable :: max_u,max_v,max_a, max_o
123 integer*4 :: im_nle, which_mat_nle,
124integer*4,
dimension(:),
allocatable :: con_spx_loc_nle
125 integer*4,
dimension(:),
allocatable :: node_nle_4_mpi
126 integer*4,
dimension(:,:,:),
allocatable :: yes_or_not_nle_el
128 real*8,
dimension(:,:,:),
allocatable :: r_el
129 real*8,
dimension(:),
allocatable :: depth_nle_el
132 real*8,
dimension(:),
allocatable :: strain, omega, stress,
135 real*8,
dimension(:),
allocatable :: a, b,c, u_int, v_int
136 real*8,
dimension(:,:),
allocatable :: kappau, kappav
139 real*8,
dimension(:,:,:),
allocatable :: gamma_new
140 real*8,
dimension(:),
allocatable :: mu_nle, gamma_nle
144 integer*4 :: nb_tra_load
145 integer*4,
dimension(:),
allocatable :: node_tra
146 real*8,
dimension(:),
allocatable :: dist_tra
149 integer*4 :: check_not_hon
153 logical :: b_instability_abort
154 logical,
dimension(mpi_np) :: b_instability_abort_all
156 b_instability_abort = .false.
160 if(mpi_id .eq. 0) start = mpi_wtime()
163 allocate(func_value(nfunc))
169 if (nmonitors_lst.ge.1)
then
171 call make_monitor_files(nmonitors_lst,el_monitor_lst,local_el_num
172 count_monitor, file_monitor,monitor_file
177 if(nmonitors_pgm .ge. 1)
then
178 allocate(max_u(nmonitors_pgm,9), max_v(nmonitors_pgm,9), max_a
179 max_u = 0.d0; max_v = 0.d0; max_a = 0.d0; max_o = 0.d0
193 allocate(sdofrecv_temp(3*
sdofnum))
214 if(nload_traz_el .gt. 0)
then
215 file_trav_load =
'TRAVPOINTS.input'
219 allocate(node_tra(nb_tra_load), dist_tra(nb_tra_load))
237 allocate(send_buffer(3*nsend)); send_buffer= 0.0d0
238 allocate(recv_buffer(3*nrecv)); recv_buffer = 0.0d0
241 send_length(i) = 3*proc_send(i); recv_length(i) = 3*proc_recv(i
242 if(opt_out_var(4) .eq. 1 .or. opt_out_var(5) .eq. 1 .or. damping_type
then
243 double_send_length(i) = 6*proc_send(i); double_recv_length(i
263 if (nelem_dg_glo .gt. 0)
then
265 allocate(send_buffer_jump(3*nsend_jump), recv_buffer_jump(3*nrecv_jump
266 send_buffer_jump = 0.0d0; recv_buffer_jump = 0.0d0
269 send_length_jump(i) = 3*proc_send_jump(i)
270 recv_length_jump(i) = 3*proc_recv_jump(i)
273 allocate(jump_minus(3*nrecv_jump))
276 in = node_send_jump(i)
278 node_send_jump(i) = id
287 allocate(fe(3*nnod_loc),fk(3*nnod_loc),mv(3*nnod_loc)); fe = 0.0d0
289 if(rk_scheme .eq.
'RUNGEKUTTA')
then
290 allocate(u1(3*nnod_loc),u2(3*nnod_loc),v1(3*nnod_loc),v2(3*nnod_loc
291 u1 = 0.0d0; u2 = 0.0d0; v1 = 0.0d0; jump = 0.0d0;
293 nmat,prop_mat, sdeg_mat
294 xx_spx_loc,yy_spx_loc
297 allocate(u0(3*nnod_loc),u1(3*nnod_loc),u2(3*nnod_loc),v1(3*nnod_loc
298 u0 = 0.0d0; u1 = 0.0d0; u2 = 0.0d0; v1 = 0.0d0; jump = 0.0d0;
300 nmat, prop_mat, sdeg_mat
301 xx_spx_loc,yy_spx_loc
320 if (make_damping_yes_or_not.eq. 1 .and. damping_type .eq. 1)
then
321 allocate(mc(3*nnod_loc), mck(3*nnod_loc)); mc = 0.d0; mck
322 elseif(damping_type .eq. 2)
then
323 allocate(strain_visc(6*nnod_loc,n_sls)); strain_visc = 0.d0
324 elseif(damping_type .eq. 3)
then
325 allocate(mc(3*nnod_loc),damp_term((3*nnod_loc))); mc = 0.d0
332 if(opt_out_var(4) .eq. 1)
then
333 allocate(stress(6*nnod_loc)); stress = 0.d0
335 if(opt_out_var(5) .eq. 1 .or. damping_type .eq. 2)
then
336 allocate(strain(6*nnod_loc)); strain = 0.d0
338 if(opt_out_var(6) .eq. 1)
then
339 allocate(omega(3*nnod_loc)); omega = 0.d0
346 if(debug .eq. 1)
then
347 allocate(mu_nle(nnod_loc), gamma_nle(nnod_loc))
348 mu_nle = 0.d0; gamma_nle = 0.d0
356 if(opt_out_var(4) .eq. 1 .or. opt_out_var(5) .eq. 1 .or. opt_out_var
357 .or. damping_type .eq. 2)
then
359 allocate(node_counter(nnod_loc)) ; node_counter = 0
362 im = con_spx_loc(con_spx_loc(ie -1)); nn = sdeg_mat(im) +1
366 is = nn*nn*(k -1) +nn*(j -1) +i; in = con_spx_loc(con_spx_loc
367 node_counter(in) = node_counter(in) + 1
373 allocate(small_recv_buffer(nrecv), small_send_buffer(nsend))
374 small_recv_buffer = 0; small_send_buffer = 0
377 small_send_length(i) = proc_send(i); small_recv_length(i) = proc_recv
381 small_send_buffer(i) = node_counter(node_send(i))
385 mpi_np,small_send_length,small_recv_length
386 mpi_comm,mpi_stat,mpi_ierr,mpi_id)
389 node_counter(node_recv(i)) = node_counter(node_recv(i)) + small_recv_buffer
392 deallocate(small_recv_buffer, small_send_buffer)
395 if(node_counter(i) .eq. 0)
write(*,
'(A)')
'Error in node counter!!!'
399 !
if (mpi_id .eq. 0)
write(*,*) node_counter
404 if(len_trim(bkp_file) .ne. 70)
then
405 file_outu0 = bkp_file(1:len_trim(bkp_file)) //
'/U0_'
406 file_outu1 = bkp_file(1:len_trim(bkp_file)) //
'/U1_'
407 file_outv1 = bkp_file(1:len_trim(bkp_file)) //
'/V1_'
408 file_outxyz = bkp_file(1:len_trim(bkp_file)) //
'/XYZ_'
409 if (damping_type .eq. 2 )
then
410 file_outsv = bkp_file(1:len_trim(bkp_file)) //
'/SV_'
413 file_outu0 =
'U0_'; file_outu1 =
'U1_'; file_outv1 =
'V1_'
414 file_outxyz =
'XYZ_';
416 if (damping_type .eq. 2 ) file_outsv =
'SV_'
420 if (tstart .gt. 0.0d0)
then
421 isnap = nint(tstart/(deltat*trestart));
424 call read_fileout(file_outu0,isnap,mpi_id,3*nnod_loc,u0)
425 call read_fileout(file_outu1,isnap,mpi_id,3*nnod_loc,u1)
426 call read_fileout(file_outv1,isnap,mpi_id,3*nnod_loc,v1)
428 if (damping_type .eq. 2)
then
442 if (nelem_loc.gt.0)
then
450 im = con_spx_loc(con_spx_loc(ie - 1)); nn = sdeg_mat(im) +
452 allocate(ct(nn), ww(nn), dd(nn,nn), mv_el(nn,nn,nn))
453 allocate(rho_el(nn,nn,nn),lambda_el(nn,nn,nn),mu_el(nn,nn,nn
456 rho_el = prop_mat(im,1); lambda_el = prop_mat(im,2)
457 mu_el = prop_mat(im,3); gamma_el = prop_mat(im,4)
464 if (n_case.gt.0)
then
468 if (val_case(icase) .eq. tag_mat(im))
then
469 if (num_testcase .ne. 0) check_not_hon = 1;
472 nn, rho_el, lambda_el
473 nnod_loc, zs_elev, zs_all
474 con_nnz_loc, con_spx_loc
475 sub_tag_all, zz_spx_loc
477 xx_spx_loc, yy_spx_loc
486 if (nmat_nhe.gt.0)
then
487 qs_nh = qs_nhe_el(ie)
488 qp_nh = qp_nhe_el(ie)
490 rho_nhe, lambda_nhe, mu_nhe
491 rho_el, lambda_el, mu_el, gamma_el
498 if (nmat_rnd.gt.0)
then
499 do irand = 1, nmat_rnd
500 if (rand_mat(irand) .eq. tag_mat(im))
then
504 is = nn*nn*(k -1) +nn*(j -1) +i
505 in = con_spx_loc(con_spx_loc(ie -1) + is)
506 rho_el(i,j,k) = rho_rnd(in);
507 lambda_el(i,j,k) = lambda_rnd(in);
508 mu_el(i,j,k) = mu_rnd(in);
523 alfa11(ie),alfa12(ie),alfa13(ie),&
524 alfa21(ie),alfa22(ie),alfa23(ie),&
525 alfa31(ie),alfa32(ie),alfa33(ie),&
526 beta11(ie),beta12(ie),beta13(ie),&
527 beta21(ie),beta22(ie),beta23(ie),&
528 beta31(ie),beta32(ie),beta33(ie),&
529 gamma1(ie),gamma2(ie),gamma3(ie),&
530 delta1(ie),delta2(ie),delta3(ie),&
538 is = nn*nn*(k -1) +nn*(j -1) +i
539 in = con_spx_loc(con_spx_loc(ie -1) + is)
541 iaz = 3*(in -1) +1; mv(iaz) = mv(iaz) + mv_el(i,j,k
542 iaz = 3*(in -1) +2; mv(iaz) = mv(iaz) + mv_el(i,j,k
543 iaz = 3*(in -1) +3; mv(iaz) = mv(iaz) + mv_el(i,j,k
549 deallocate(ct, ww, dd, mv_el, rho_el, lambda_el, mu_el, gamma_el
559 recv_buffer(3*(i -1) +1) = mv(3*(in -1) +1)
560 recv_buffer(3*(i -1) +2) = mv(3*(in -1) +2)
561 recv_buffer(3*(i -1) +3) = mv(3*(in -1) +3)
565 mpi_np,recv_length,send_length,&
566 mpi_comm,mpi_stat,mpi_ierr,mpi_id)
570 mv(3*(in -1) +1) = mv(3*(in -1) +1) +send_buffer(3*(i -1) +1)
571 mv(3*(in -1) +2) = mv(3*(in -1) +2) +send_buffer(3*(i -1) +2)
572 mv(3*(in -1) +3) = mv(3*(in -1) +3) +send_buffer(3*(i -1) +3)
579 if (make_damping_yes_or_not .eq. 1 .and. damping_type .ne. 2)
then
580 if (nelem_loc .gt. 0)
then
589 im = con_spx_loc(con_spx_loc(ie -1)); nn = sdeg_mat(im
591 allocate(ct(nn),ww(nn),dd(nn,nn))
592 allocate(rho_el(nn,nn,nn),lambda_el(nn,nn,nn),mu_el(nn,nn
595 rho_el = prop_mat(im,1); lambda_el = prop_mat(im,2)
596 mu_el = prop_mat(im,3); gamma_el = prop_mat(im,4)
598 if (damping_type .eq. 1)
allocate(mc_el(nn,nn,nn),mck_el
599 if (damping_type .eq. 3)
allocate(mc_el(nn,nn,nn))
607 if (n_case.gt.0)
then
611 if (val_case(icase) .eq. tag_mat(im))
then
615 nn, rho_el, lambda_el
616 nnod_loc, zs_elev, zs_all
617 con_nnz_loc, con_spx_loc
618 sub_tag_all, zz_spx_loc
620 xx_spx_loc, yy_spx_loc
627 if (nmat_nhe.gt.0)
then
628 qs_nh = qs_nhe_el(ie)
629 qp_nh = qp_nhe_el(ie)
631 rho_nhe, lambda_nhe, mu_nhe
632 rho_el, lambda_el, mu_el, gamma_el
639 if (nmat_rnd.gt.0)
then
640 do irand = 1, nmat_rnd
641 if (rand_mat(irand) .eq. tag_mat(im))
then
645 is = nn*nn*(k -1) +nn*(j -1) +i
646 in = con_spx_loc(con_spx_loc(ie -1) + is)
647 rho_el(i,j,k) = rho_rnd(in);
648 lambda_el(i,j,k) = lambda_rnd(in);
649 mu_el(i,j,k) = mu_rnd(in);
662 if (damping_type .eq. 1)
then
666 alfa11(ie),alfa12(ie),alfa13(ie
667 alfa21(ie),alfa22(ie),alfa23(ie
668 alfa31(ie),alfa32(ie),alfa33(ie
669 beta11(ie),beta12(ie),beta13(ie
670 beta21(ie),beta22(ie),beta23(ie
671 beta31(ie),beta32(ie),beta33(ie
672 gamma1(ie),gamma2(ie),gamma3(ie
673 delta1(ie),delta2(ie),delta3(ie
678 is = nn*nn*(k -1) +nn*(j -1) +i
679 in = con_spx_loc(con_spx_loc(ie -1) + is)
682 mc(iaz) = mc(iaz) +mc_el(i,j,k)
683 mck(iaz) = mck(iaz) +mck_el(i,j,k)
686 mc(iaz) = mc(iaz) +mc_el(i,j,k)
687 mck(iaz) = mck(iaz) +mck_el(i,j,k)
690 mc(iaz) = mc(iaz) +mc_el(i,j,k)
691 mck(iaz) = mck(iaz) +mck_el(i,j,k)
697 elseif(damping_type .eq. 3)
then
701 alfa11(ie),alfa12(ie),alfa13(ie
702 alfa21(ie),alfa22(ie),alfa23(ie
703 alfa31(ie),alfa32(ie),alfa33(ie
704 beta11(ie),beta12(ie),beta13(ie
705 beta21(ie),beta22(ie),beta23(ie
706 beta31(ie),beta32(ie),beta33(ie
707 gamma1(ie),gamma2(ie),gamma3(ie
708 delta1(ie),delta2(ie),delta3(ie
714 is = nn*nn*(k -1) +nn*(j -1) +i
715 in = con_spx_loc(con_spx_loc(ie -1) + is)
717 iaz = 3*(in -1) +1; mc(iaz) = mc(iaz) + a0_ray
718 iaz = 3*(in -1) +2; mc(iaz) = mc(iaz) + a0_ray
719 iaz = 3*(in -1) +3; mc(iaz) = mc(iaz) + a0_ray
727 deallocate(ct,ww,dd,rho_el,lambda_el,mu_el,gamma_el,mc_el
728 if (damping_type .eq. 1 )
deallocate(mck_el)
736 if (damping_type .eq. 1 .or. damping_type .eq. 3)
then
739 recv_buffer(3*(i -1) +1) = mc(3*(in -1) +1)
740 recv_buffer(3*(i -1) +2) = mc(3*(in -1) +2)
741 recv_buffer(3*(i -1) +3) = mc(3*(in -1) +3)
745 mpi_np,recv_length,send_length,&
746 mpi_comm,mpi_stat,mpi_ierr,mpi_id)
750 mc(3*(in -1) +1) = mc(3*(in -1) +1) +send_buffer(3*(i -1) +1
751 mc(3*(in -1) +2) = mc(3*(in -1) +2) +send_buffer(3*(i -1) +2
752 mc(3*(in -1) +3) = mc(3*(in -1) +3) +send_buffer(3*(i -1) +3
757 if (damping_type .eq. 1)
then
761 recv_buffer(3*(i -1) +1) = mck(3*(in -1) +1)
762 recv_buffer(3*(i -1) +2) = mck(3*(in -1) +2)
763 recv_buffer(3*(i -1) +3) = mck(3*(in -1) +3)
767 mpi_np,recv_length,send_length,&
768 mpi_comm,mpi_stat,mpi_ierr,mpi_id)
772 mck(3*(in -1) +1) = mck(3*(in -1) +1) +send_buffer(3*(i -1)
773 mck(3*(in -1) +2) = mck(3*(in -1) +2) +send_buffer(3*(i -1)
774 mck(3*(in -1) +3) = mck(3*(in -1) +3) +send_buffer(3*(i -1)
784 if (rk_scheme .eq.
'RUNGEKUTTA')
then
786 allocate(a(rk_stages), b(rk_stages), c(rk_stages))
787 a=0.d0; b=0.d0; c=0.d0
791 allocate(a(1),b(1),c(1))
792 rk_stages=1; rk_order=0;
793 a=0.d0 ; b=0.d0; c=0.d0;
796 allocate(u_int(3*nnod_loc), v_int(3*nnod_loc)); u_int = 0.d0; v_int
801 if (nmat_nle .gt. 0)
then
802 allocate(con_spx_loc_nle(0:con_nnz_loc));con_spx_loc_nle = con_spx_loc
803 allocate(depth_nle_el(nelem_loc)); depth_nle_el = 0.d0;
804 allocate(node_nle_4_mpi(1:nnod_loc)); node_nle_4_mpi = 0;
807 im = con_spx_loc(con_spx_loc(ie -1)); nn = sdeg_mat(im) +1
811 do im_nle = 1,nmat_nle
812 if (tag_mat(im).eq.tag_mat_nle(im_nle))
then
813 which_mat_nle = im_nle
814 depth_nle = val_mat_nle(im_nle,1)
817 con_spx_loc_nle(con_spx_loc_nle(ie -1)) = which_mat_nle
818 depth_nle_el(ie) = depth_nle;
819 if (which_mat_nle .eq. 0) con_spx_loc_nle(con_spx_loc_nle(ie
820 if (which_mat_nle .ne. 0)
then
824 is = nn*nn*(k -1) +nn*(j -1) +i
825 in = con_spx_loc(con_spx_loc(ie -1) + is)
826 con_spx_loc_nle(con_spx_loc_nle(ie -1) + is) =
827 node_nle_4_mpi(in) = 1;
828 if (n_case .gt. 0)
then
829 if (tag_case(1) .ne. 16 .and. tag_case(1) .ne.
then
830 if (depth_nle_el(ie) .lt. zs_elev(in) .or.
then
831 con_spx_loc_nle(con_spx_loc_nle
833 if ((tag_case(1) .gt. 0).and.(zs_all(in)
then
834 con_spx_loc_nle(con_spx_loc_nle
837 elseif(tag_case(1) .eq. 16)
then
838 if (depth_nle_el(ie) .lt. zs_elev(in) .or.
then
839 con_spx_loc_nle(con_spx_loc_nle
841 if (vs_tria(in) .ge. 450.d0)
then
842 con_spx_loc_nle(con_spx_loc_nle
845 elseif(tag_case(1) .eq. 21)
then
846 if (depth_nle_el(ie) .lt. zs_elev(in) .or.
then
847 con_spx_loc_nle(con_spx_loc_nle
849 if (vs_tria(in) .ge. 600.d0 .or. (zs_all
then
850 con_spx_loc_nle(con_spx_loc_nle
872 if(mpi_id .eq. 0)
write(*,
'(A)')
'--------------Starting the loop------------------------'
874 tt0 = tstart - dfloat(1)*deltat; tt1 = tstart; tt2 = tstart + dfloat
875 deltat = tt1 - tt0; deltat2 = deltat*deltat;
879 if (opt_out_var(4) .eq. 1) stress = 0.d0
880 if (opt_out_var(5) .eq. 1 .or. damping_type .eq. 2) strain = 0.d0
881 if (opt_out_var(6) .eq. 1) omega = 0.d0
883 if (mpi_id.eq.0)
write(*,
'(A,E14.6)')
'TIME = ',tt1
884 if (its.le. 200)
then
885 start_time = mpi_wtime()
886 elseif (mod(its, it_divisor) .eq. 0)
then
888 if (mpi_id .eq. 0)
then
889 final_time = mpi_wtime()
890 write(*,
'(A5,I9,A16,F12.3)')
'[Iter ', its,
'] Elapsed time: '
894 u_int = 0.d0; v_int = 0.d0;
900 do istage = 1, rk_stages
902 tt_int = tt1 + c(istage)*deltat
904 fk = 0.0d0; jump = 0.d0; fe = 0.0d0;
905 if (damping_type .eq. 3) damp_term = 0.d0;
928 if(nload_traz_el .gt. 0)
then
929 call find_pos(nload_traz_el,fun_traz_el,tag_func(fn
934 do i = 1, nb_tra_load
939 if(local_node_num(id) .eq. node_tra(i) .and. find_tag
then
940 iaz = 3*(id -1) +3; fe(iaz) = fe(iaz) + fel(fn
942 nfunc_data,fn,tt_int,dist_tra(i
954 if (fel(fn,(3*(id -1) +1)) .ne. 0.d0)
then
955 iaz = 3*(id -1) +1; fe(iaz) = fe(iaz) + fel(fn
958 if(fel(fn,(3*(id -1) +2)) .ne. 0.d0)
then
959 iaz = 3*(id -1) +2; fe(iaz) = fe(iaz) + fel(fn
962 if(fel(fn,(3*(id -1) +3)) .ne. 0.d0)
then
963 iaz = 3*(id -1) +3; fe(iaz) = fe(iaz) + fel(fn
971 if (locnode_buildid_map(id,1).gt.0)
then
973 do i=1, locnode_buildid_map(id,1)
974 isdof = locnode_buildid_map(id,i+1)
975 fe(iaz+1) = fe(iaz+1) + (1 /(node_counter_sdof(isdof
978 fe(iaz+2) = fe(iaz+2) + (1 /node_counter_sdof(isdof
981 fe(iaz+3) = fe(iaz+3) + (1 /node_counter_sdof(isdof
991 recv_buffer(3*(i -1) +1) = fe(3*(in -1) +1)
992 recv_buffer(3*(i -1) +2) = fe(3*(in -1) +2)
993 recv_buffer(3*(i -1) +3) = fe(3*(in -1) +3)
997 mpi_np,recv_length,send_length,&
998 mpi_comm,mpi_stat,mpi_ierr,mpi_id)
1002 fe(3*(in -1) +1) = fe(3*(in -1) +1) +send_buffer(3*(i -1)
1003 fe(3*(in -1) +2) = fe(3*(in -1) +2) +send_buffer(3*(i -1)
1004 fe(3*(in -1) +3) = fe(3*(in -1) +3) +send_buffer(3*(i -1)
1045 send_buffer(3*(i -1) +1) = u1(3*(in -1) +1)
1046 send_buffer(3*(i -1) +2) = u1(3*(in -1) +2)
1047 send_buffer(3*(i -1) +3) = u1(3*(in -1) +3)
1051 mpi_np,send_length,recv_length,&
1052 mpi_comm,mpi_stat,mpi_ierr,mpi_id)
1056 u1(3*(in -1) +1) = recv_buffer(3*(i -1) +1)
1057 u1(3*(in -1) +2) = recv_buffer(3*(i -1) +2)
1058 u1(3*(in -1) +3) = recv_buffer(3*(i -1) +3)
1063 send_buffer(3*(i -1) +1) = v1(3*(in -1) +1)
1064 send_buffer(3*(i -1) +2) = v1(3*(in -1) +2)
1065 send_buffer(3*(i -1) +3) = v1(3*(in -1) +3)
1069 mpi_np,send_length,recv_length,&
1070 mpi_comm,mpi_stat,mpi_ierr,mpi_id)
1074 v1(3*(in -1) +1) = recv_buffer(3*(i -1) +1)
1075 v1(3*(in -1) +2) = recv_buffer(3*(i -1) +2)
1076 v1(3*(in -1) +3) = recv_buffer(3*(i -1) +3)
1087 if (nelem_loc.gt.0)
then
1105 im = con_spx_loc(con_spx_loc(ie -1)); nn = sdeg_mat(im
1107 allocate(ct(nn),ww(nn),dd(nn,nn))
1108 allocate(ux_el(nn,nn,nn),uy_el(nn,nn,nn),uz_el(nn,nn,nn
1109 allocate(duxdx_el(nn,nn,nn),duydx_el(nn,nn,nn),duzdx_el
1110 allocate(duxdy_el(nn,nn,nn),duydy_el(nn,nn,nn),duzdy_el
1111 allocate(duxdz_el(nn,nn,nn),duydz_el(nn,nn,nn),duzdz_el
1112 allocate(sxx_el(nn,nn,nn),syy_el(nn,nn,nn),szz_el(nn,nn
1113 allocate(syz_el(nn,nn,nn),szx_el(nn,nn,nn),sxy_el(nn,nn
1114 allocate(fx_el(nn,nn,nn),fy_el(nn,nn,nn),fz_el(nn,nn,nn
1115 allocate(rho_el(nn,nn,nn),lambda_el(nn,nn,nn),mu_el(nn
1118 if (make_damping_yes_or_not .eq. 1 .and. damping_type .eq.
allocate
1120 if (damping_type .eq. 2) &
1121 allocate(strain_visc_xx(nn,nn,nn,n_sls),strain_visc_xy
1122 strain_visc_xz(nn,nn,nn,n_sls),strain_visc_yy
1123 strain_visc_yz(nn,nn,nn,n_sls),strain_visc_zz
1125 if (nmat_nle .gt. 0)
then
1126 allocate(r_el(nn,nn,nn), yes_or_not_nle_el(nn,nn
1127 r_el = 0; yes_or_not_nle_el = 0; gamma_new = 0
1132 if (con_spx_loc_nle(con_spx_loc_nle(ie -1)) .ne.
then
1136 is = nn*nn*(k -1) +nn*(j -1) +i
1139 yes_or_not_nle_el(i,j,k) = con_spx_loc_nle
1140 in = con_spx_loc(con_spx_loc(ie -
1142 if (yes_or_not_nle_el(i,j,k) .eq.
then
1143 iaz = 3*(in -1) +1; mc(iaz) =
1144 iaz = 3*(in -1) +2; mc(iaz) =
1145 iaz = 3*(in -1) +3; mc(iaz) =
1148 if (debug .eq. 1)
then
1149 mu_nle(in) = 0.0d0; gamma_nle(in
1162 rho_el = prop_mat(im,1); lambda_el = prop_mat(im,2)
1163 mu_el = prop_mat(im,3); gamma_el = prop_mat(im,4)
1168 is = nn*nn*(k -1) +nn*(j -1) +i
1169 in = con_spx_loc(con_spx_loc(ie -1) + is)
1171 if (damping_type .eq. 3)
then
1173 iaz = 3*(in -1) +1; ux_el(i,j,k) = u1(iaz)
1174 iaz = 3*(in -1) +2; uy_el(i,j,k) = u1(iaz)
1175 iaz = 3*(in -1) +3; uz_el(i,j,k) = u1(iaz)
1177 iaz = 3*(in -1) +1; ux_el(i,j,k) = u1(iaz)
1178 iaz = 3*(in -1) +2; uy_el(i,j,k) = u1(iaz)
1179 iaz = 3*(in -1) +3; uz_el(i,j,k) = u1(iaz)
1182 if(damping_type .eq. 2)
then
1183 strain_visc_xx(i,j,k,:) = strain_visc(6*(in
1184 strain_visc_yy(i,j,k,:) = strain_visc(6*(in
1185 strain_visc_zz(i,j,k,:) = strain_visc(6*(in
1186 strain_visc_xy(i,j,k,:) = strain_visc(6*(in
1187 strain_visc_yz(i,j,k,:) = strain_visc(6*(in
1188 strain_visc_xz(i,j,k,:) = strain_visc(6*(in
1195 alfa11(ie),alfa12(ie),alfa13
1196 alfa21(ie),alfa22(ie),alfa23
1197 alfa31(ie),alfa32(ie),alfa33
1198 beta11(ie),beta12(ie),beta13
1199 beta21(ie),beta22(ie),beta23
1200 beta31(ie),beta32(ie),beta33
1201 gamma1(ie),gamma2(ie),gamma3
1202 delta1(ie),delta2(ie),delta3
1204 duxdx_el,duydx_el,duzdx_el
1205 duxdy_el,duydy_el,duzdy_el
1206 duxdz_el,duydz_el,duzdz_el
1213 if (n_case.gt.0)
then
1214 do icase = 1, n_case
1215 if (val_case(icase) .eq. tag_mat(im))
then
1217 nn, rho_el, lambda_el
1218 nnod_loc, zs_elev, zs_all
1219 con_nnz_loc, con_spx_loc
1220 sub_tag_all, zz_spx_loc
1222 xx_spx_loc, yy_spx_loc
1228 if (nmat_nhe.gt.0)
then
1229 qs_nh = qs_nhe_el(ie)
1230 qp_nh = qp_nhe_el(ie)
1232 rho_nhe, lambda_nhe, mu_nhe
1233 rho_el, lambda_el, mu_el, gamma_el
1241 if (nmat_rnd.gt.0)
then
1242 do irand = 1, nmat_rnd
1243 if (rand_mat(irand) .eq. tag_mat(im))
then
1247 is = nn*nn*(k -1) +nn*(j -1) +i
1248 in = con_spx_loc(con_spx_loc(ie -1) + is)
1249 rho_el(i,j,k) = rho_rnd(in);
1250 lambda_el(i,j,k) = lambda_rnd(in);
1251 mu_el(i,j,k) = mu_rnd(in);
1269 if (nmat_nle .gt. 0 .and. damping_type .eq. 1)
then
1271 which_mat_nle = con_spx_loc_nle(con_spx_loc_nle(ie
1275 if (which_mat_nle .ne. 0)
then
1281 duxdx_el,duydx_el,duzdx_el
1282 duxdy_el,duydy_el,duzdy_el
1283 duxdz_el,duydz_el,duzdz_el
1284 r_el,yes_or_not_nle_el)
1287 nn,rho_el,lambda_el,mu_el
1288 con_nnz_loc,con_spx_loc
1289 func_type,func_indx,func_data
1290 nfunc,tt_int,tag_func,yes_or_not_nle_el
1296 alfa11(ie),alfa12(ie)
1297 alfa21(ie),alfa22(ie)
1298 alfa31(ie),alfa32(ie)
1299 beta11(ie),beta12(ie)
1300 beta21(ie),beta22(ie)
1301 beta31(ie),beta32(ie)
1302 gamma1(ie),gamma2(ie)
1303 delta1(ie),delta2(ie)
1305 con_nnz_loc,con_spx_loc
1306 prop_mat_nle(which_mat_nle
1307 func_type,func_indx,func_data
1308 nfunc,tt_int,tag_func
1309 tag_case(1),nnod_loc,vs_tria
1316 if (yes_or_not_nle_el(i,j,k) .eq. 1
then
1318 is = nn*nn*(k -1) +nn*(j -1) +i
1319 in = con_spx_loc(con_spx_loc(ie
1322 mc(iaz) = mc(iaz) +mc_el(i,j,k)
1323 mck(iaz) = mck(iaz) +mck_el(i,j,k
1324 if (debug .eq. 1) mu_nle(in) = mu_el
1325 if (debug .eq. 1) gamma_nle(in)
1328 mc(iaz) = mc(iaz) +mc_el(i,j,k)
1329 mck(iaz) = mck(iaz) +mck_el(i,j,k
1331 mc(iaz) = mc(iaz) + mc_el(i,j,k)
1332 mck(iaz) = mck(iaz) + mck_el(i,j
1351 if (damping_type .eq. 2)
then
1354 if (n_case.gt.0)
then
1355 do icase = 1, n_case
1356 if (val_case(icase) .eq. tag_mat(im))
then
1363 y_lambda_nh(1,:) = y_lambda(im,:);
1364 y_mu_nh(1,:) = y_mu(im,:);
1368 if (nmat_nhe.gt.0)
then
1376 duxdx_el,duydx_el,duzdx_el,&
1377 duxdy_el,duydy_el,duzdy_el,&
1378 duxdz_el,duydz_el,duzdz_el,&
1379 strain_visc_xx, strain_visc_xy, strain_visc_xz
1380 strain_visc_yy, strain_visc_yz, strain_visc_zz
1381 y_lambda_nh(1,:),y_mu_nh(1,:), n_sls,
1382 sxx_el,syy_el,szz_el,&
1383 syz_el,szx_el,sxy_el,ie)
1390 is = nn*nn*(k -1) +nn*(j -1) +i
1391 in = con_spx_loc(con_spx_loc(ie -1) + is
1393 iaz = 6*(in -1) +1; strain(iaz) = strain
1396 iaz = 6*(in -1) +2; strain(iaz) = strain
1399 iaz = 6*(in -1) +3; strain(iaz) = strain
1402 iaz = 6*(in -1) +4; strain(iaz) = strain
1406 iaz = 6*(in -1) +5; strain(iaz) = strain
1410 iaz = 6*(in -1) +6; strain(iaz) = strain
1422 duxdx_el,duydx_el,duzdx_el,&
1423 duxdy_el,duydy_el,duzdy_el,&
1424 duxdz_el,duydz_el,duzdz_el,&
1425 sxx_el,syy_el,szz_el,&
1426 syz_el,szx_el,sxy_el)
1431 if (nload_sism_el.gt.0)
then
1433 if(length_check_node_sism .gt. 0)
then
1436 sxx_el,syy_el,szz_el,syz_el
1438 check_node_sism,check_dist_node_sism
1439 length_check_node_sism,ie
1440 tau_seismic_moment,&
1441 func_type,func_indx,func_data
1442 con_nnz_loc,con_spx_loc,tag_func
1443 nelem_loc, local_el_num,
1444 nnod_loc, local_node_num
1448 if (nload_expl_el.gt.0)
then
1450 if(length_check_node_expl .gt. 0)
then
1453 sxx_el,syy_el,szz_el,syz_el
1455 check_node_expl,check_dist_node_expl
1456 length_check_node_expl,ie
1457 func_type,func_indx,func_data
1458 con_nnz_loc,con_spx_loc,tag_func
1459 nelem_loc, local_el_num,
1460 nnod_loc, local_node_num
1464 if(opt_out_var(4) .eq. 1)
then
1468 is = nn*nn*(k -1) +nn*(j -1) +i
1469 in = con_spx_loc(con_spx_loc(ie -1) + is)
1470 iaz = 6*(in -1) +1; stress(iaz) = stress(iaz)
1471 iaz = 6*(in -1) +2; stress(iaz) = stress(iaz)
1472 iaz = 6*(in -1) +3; stress(iaz) = stress(iaz)
1473 iaz = 6*(in -1) +4; stress(iaz) = stress(iaz)
1474 iaz = 6*(in -1) +5; stress(iaz) = stress(iaz)
1475 iaz = 6*(in -1) +6; stress(iaz) = stress(iaz)
1480 if(opt_out_var(5) .eq. 1 .and. damping_type .eq. 1)
then
1484 is = nn*nn*(k -1) +nn*(j -1) +i
1485 in = con_spx_loc(con_spx_loc(ie -1) + is
1486 iaz = 6*(in -1) +1; strain(iaz) = strain
1487 iaz = 6*(in -1) +2; strain(iaz) = strain
1488 iaz = 6*(in -1) +3; strain(iaz) = strain
1489 iaz = 6*(in -1) +4; strain(iaz) = strain
1491 iaz = 6*(in -1) +5; strain(iaz) = strain
1493 iaz = 6*(in -1) +6; strain(iaz) = strain
1500 if(opt_out_var(6) .eq. 1)
then
1504 is = nn*nn*(k -1) +nn*(j -1) +i
1505 in = con_spx_loc(con_spx_loc(ie -1) + is)
1506 iaz = 3*(in -1) +1; omega(iaz) = omega(iaz
1508 iaz = 3*(in -1) +2; omega(iaz) = omega(iaz
1510 iaz = 3*(in -1) +3; omega(iaz) = omega(iaz
1520 alfa11(ie),alfa12(ie),alfa13(ie),&
1521 alfa21(ie),alfa22(ie),alfa23(ie),&
1522 alfa31(ie),alfa32(ie),alfa33(ie),&
1523 beta11(ie),beta12(ie),beta13(ie),&
1524 beta21(ie),beta22(ie),beta23(ie),&
1525 beta31(ie),beta32(ie),beta33(ie),&
1526 gamma1(ie),gamma2(ie),gamma3(ie),&
1527 delta1(ie),delta2(ie),delta3(ie),&
1528 sxx_el,syy_el,szz_el,syz_el,szx_el,sxy_el
1536 is = nn*nn*(k -1) +nn*(j -1) +i
1537 in = con_spx_loc(con_spx_loc(ie -1) + is)
1539 iaz = 3*(in -1) +1; fk(iaz) = fk(iaz) +fx_el
1540 iaz = 3*(in -1) +2; fk(iaz) = fk(iaz) +fy_el
1541 iaz = 3*(in -1) +3; fk(iaz) = fk(iaz) +fz_el
1543 if (damping_type .eq. 3)
then
1544 iaz = 3*(in -1) +1; damp_term(iaz) = damp_term
1545 iaz = 3*(in -1) +2; damp_term(iaz) = damp_term
1546 iaz = 3*(in -1) +3; damp_term(iaz) = damp_term
1554 deallocate(ct,ww,dd,ux_el,uy_el,uz_el)
1555 deallocate(duxdx_el,duydx_el,duzdx_el,duxdy_el,duydy_el
1556 deallocate(sxx_el,syy_el,szz_el,syz_el,szx_el,sxy_el
1557 deallocate(rho_el,lambda_el,mu_el,gamma_el)
1558 if(damping_type .eq. 2)
deallocate(strain_visc_xx,strain_visc_xy
1559 strain_visc_yy,strain_visc_yz
1561 if (make_damping_yes_or_not .eq. 1 .and. damping_type
deallocate
1562 if (nmat_nle .gt. 0)
deallocate(r_el,yes_or_not_nle_el
1577 if (nelem_abc.gt.0)
then
1588 ielem = ielem_abc(ie,1)
1591 im = con_spx_loc(con_spx_loc(ie_curr -1)); nn = sdeg_mat(im
1593 allocate(ct(nn),ww(nn),dd(nn,nn))
1594 allocate(ux_el(nn,nn,nn),uy_el(nn,nn,nn),uz_el(nn,nn,nn))
1595 allocate(fx_el(nn,nn,nn),fy_el(nn,nn,nn),fz_el(nn,nn,nn))
1596 allocate(vx_el(nn,nn,nn),vy_el(nn,nn,nn),vz_el(nn,nn,nn))
1597 allocate(rho_el(nn,nn,nn),lambda_el(nn,nn,nn),mu_el(nn,nn
1601 rho_el = prop_mat(im,1); lambda_el = prop_mat(im,2)
1602 mu_el = prop_mat(im,3); gamma_el = prop_mat(im,4)
1607 is = nn*nn*(k -1) +nn*(j -1) +i
1608 in = con_spx_loc(con_spx_loc(ie_curr -1) + is)
1611 ux_el(i,j,k) = u1(iaz)
1612 vx_el(i,j,k) = v1(iaz)
1614 uy_el(i,j,k) = u1(iaz)
1615 vy_el(i,j,k) = v1(iaz)
1617 uz_el(i,j,k) = u1(iaz)
1618 vz_el(i,j,k) = v1(iaz)
1629 if (n_case.gt.0)
then
1630 do icase = 1, n_case
1631 if (val_case(icase) .eq. tag_mat(im))
then
1633 nn, rho_el, lambda_el
1634 nnod_loc, zs_elev, zs_all
1635 con_nnz_loc, con_spx_loc
1636 sub_tag_all, zz_spx_loc
1638 xx_spx_loc, yy_spx_loc
1645 if (nmat_nhe.gt.0)
then
1646 qs_nh = qs_nhe_el(ie)
1647 qp_nh = qp_nhe_el(ie)
1649 rho_nhe, lambda_nhe, mu_nhe
1650 rho_el, lambda_el, mu_el, gamma_el
1657 if (nmat_rnd.gt.0)
then
1658 do irand = 1, nmat_rnd
1659 if (rand_mat(irand) .eq. tag_mat(im))
then
1663 is = nn*nn*(k -1) +nn*(j -1) +i
1664 in = con_spx_loc(con_spx_loc(ie -1) + is)
1665 rho_el(i,j,k) = rho_rnd(in);
1666 lambda_el(i,j,k) = lambda_rnd(in);
1667 mu_el(i,j,k) = mu_rnd(in);
1682 rho_el,lambda_el,mu_el,&
1683 alfa11(ie_curr),alfa12(ie_curr),alfa13
1684 alfa21(ie_curr),alfa22(ie_curr),alfa23
1685 alfa31(ie_curr),alfa32(ie_curr),alfa33
1686 beta11(ie_curr),beta12(ie_curr),beta13
1687 beta21(ie_curr),beta22(ie_curr),beta23
1688 beta31(ie_curr),beta32(ie_curr),beta33
1689 gamma1(ie_curr),gamma2(ie_curr),gamma3
1690 delta1(ie_curr),delta2(ie_curr),delta3
1691 ielem_abc(ie,2),ielem_abc(ie,3),&
1692 ielem_abc(ie,4),ielem_abc(ie,5),&
1693 ielem_abc(ie,6),ielem_abc(ie,7),&
1694 ux_el,uy_el,uz_el,vx_el,vy_el,vz_el,&
1700 is = nn*nn*(k -1) +nn*(j -1) +i
1701 in = con_spx_loc(con_spx_loc(ie_curr -1) + is)
1703 iaz = 3*(in -1) +1; fk(iaz) = fk(iaz) +fx_el(i,j
1704 iaz = 3*(in -1) +2; fk(iaz) = fk(iaz) +fy_el(i,j
1705 iaz = 3*(in -1) +3; fk(iaz) = fk(iaz) +fz_el(i,j
1710 deallocate(ct,ww,dd,ux_el,uy_el,uz_el)
1711 deallocate(rho_el,lambda_el,mu_el,gamma_el)
1712 deallocate(vx_el,vy_el,vz_el)
1713 deallocate(fx_el,fy_el,fz_el)
1725 if(nelem_dg_glo .gt. 0)
then
1730 in = node_send_jump(i)
1732 if (testmode .eq. 1)
then
1733 send_buffer_jump(3*(i -1) +1) = u1(3*(in -1) +1)
1734 send_buffer_jump(3*(i -1) +2) = u1(3*(in -1) +2)
1735 send_buffer_jump(3*(i -1) +3) = u1(3*(in -1) +3)
1736 elseif (damping_type .eq. 3)
then
1737 send_buffer_jump(3*(i -1) +1) = damp_term(3*(in -1) +1)
1738 send_buffer_jump(3*(i -1) +2) = damp_term(3*(in -1) +2)
1739 send_buffer_jump(3*(i -1) +3) = damp_term(3*(in -1) +3)
1741 send_buffer_jump(3*(i -1) +1) = u1(3*(in -1) +1)
1742 send_buffer_jump(3*(i -1) +2) = u1(3*(in -1) +2)
1743 send_buffer_jump(3*(i -1) +3) = u1(3*(in -1) +3)
1749 mpi_np, send_length_jump, recv_length_jump
1750 mpi_comm, mpi_stat, mpi_ierr,mpi_id)
1753 in = node_recv_jump(i)
1754 jump_minus(3*(i -1) +1) = recv_buffer_jump(3*(in -1) +1)
1755 jump_minus(3*(i -1) +2) = recv_buffer_jump(3*(in -1) +2)
1756 jump_minus(3*(i -1) +3) = recv_buffer_jump(3*(in -1) +3)
1769 ielem = el_new(ie)%ind; nn = el_new(ie)%deg
1770 im = el_new(ie)%mate;
1773 allocate(u_p(3*nn**3),jumpx(nn**3),jumpy(nn**3),jumpz(nn*
1775 u_p = 0.d0; jumpx = 0.d0; jumpy = 0.d0; jumpz = 0.d0
1780 is = nn*nn*(k -1) +nn*(j -1) +i
1781 in = con_spx_loc(con_spx_loc(ie_curr -1) + is)
1783 if (testmode .eq. 1)
then
1784 iaz = 3*(in -1) +1; u_p(is) = u1(iaz)
1785 iaz = 3*(in -1) +2; u_p(nn**3+is) = u1(iaz)
1786 iaz = 3*(in -1) +3; u_p(2*nn**3 + is) = u1(iaz
1787 elseif(damping_type .eq. 3)
then
1788 iaz = 3*(in -1) +1; u_p(is) = u1(iaz) + a1_ray
1789 iaz = 3*(in -1) +2; u_p(nn**3+is) = u1(iaz) +
1790 iaz = 3*(in -1) +3; u_p(2*nn**3 + is) = u1(iaz
1792 iaz = 3*(in -1) +1; u_p(is) = u1(iaz)
1793 iaz = 3*(in -1) +2; u_p(nn**3+is) = u1(iaz)
1794 iaz = 3*(in -1) +3; u_p(2*nn**3 + is) = u1(iaz
1802 allocate(u_m(el_new(ie)%nnz_col)); u_m = 0.d0; jshift = 0
1804 do ic = 1, el_new(ie)%num_of_ne
1806 iene = el_new(ie)%el_conf(ic,1)
1807 imne = el_new(ie)%el_conf(ic,0)
1811 if(tag_mat(i) .eq. imne )
then
1817 if(mpi_np .gt. 1)
call check_mpi(con_nnz_dg, con_spx_dg
1819 if(trofa .eq. 1)
then
1823 is = mm*mm*(k -1) +mm*(j -1) +i
1824 id = con_spx_dg(con_spx_dg(posit-1)+is)
1826 iaz = 3*(id -1) +1; u_m(is + jshift) = jump_minus
1827 iaz = 3*(id -1) +2; u_m(mm**3 + is + jshift
1828 iaz = 3*(id -1) +3; u_m(2*(mm**3) + is + jshift
1839 is = mm*mm*(k -1) +mm*(j -1) +i
1840 id = con_spx_loc(con_spx_loc(iene_curr-1)+is
1842 if (testmode .eq. 1)
then
1843 iaz = 3*(id -1) +1; u_m(is + jshift)
1844 iaz = 3*(id -1) +2; u_m(mm**3 + is +
1845 iaz = 3*(id -1) +3; u_m(2*(mm**3) + is
1846 elseif (damping_type .eq. 3)
then
1847 iaz = 3*(id -1) +1; u_m(is + jshift)
1848 iaz = 3*(id -1) +2; u_m(mm**3 + is +
1849 iaz = 3*(id -1) +3; u_m(2*(mm**3) + is
1851 iaz = 3*(id -1) +1; u_m(is + jshift)
1852 iaz = 3*(id -1) +2; u_m(mm**3 + is +
1853 iaz = 3*(id -1) +3; u_m(2*(mm**3) + is
1860 jshift = jshift + 3*mm**3
1864 allocate(jump_all(3*nn**3))
1869 el_new(ie)%IMin, jump_all, 3*nn**3, &
1870 u_m, el_new(ie)%nnz_col,1)
1872 jumpx = jumpx + jump_all(1:nn**3)
1873 jumpy = jumpy + jump_all(nn**3+1 : 2*nn**3)
1874 jumpz = jumpz + jump_all(2*nn**3+1 : 3*nn**3)
1876 deallocate(u_m, jump_all)
1878 allocate(jump_all(3*nn**3)); jump_all = 0.d0
1881 el_new(ie)%IPlus, jump_all, 3*nn**3, &
1885 jumpx = jumpx + jump_all(1:nn**3)
1886 jumpy = jumpy + jump_all(nn**3+1 : 2*nn**3)
1887 jumpz = jumpz + jump_all(2*nn**3+1 : 3*nn**3)
1892 is = nn*nn*(k -1) +nn*(j -1) +i
1893 in = con_spx_loc(con_spx_loc(ie_curr -1) + is)
1895 iaz = 3*(in -1) + 1; jump(iaz) = jump(iaz) + jumpx
1896 iaz = 3*(in -1) + 2; jump(iaz) = jump(iaz) + jumpy
1897 iaz = 3*(in -1) + 3; jump(iaz) = jump(iaz) + jumpz
1903 deallocate(jumpx,jumpy,jumpz)
1904 deallocate(u_p, jump_all)
1920 if (nmat_nle.gt.0)
then
1924 recv_buffer(3*(i -1) +1) = mc(3*(in -1) +1)
1925 recv_buffer(3*(i -1) +2) = mc(3*(in -1) +2)
1926 recv_buffer(3*(i -1) +3) = mc(3*(in -1) +3)
1930 mpi_np,recv_length,send_length,&
1931 mpi_comm,mpi_stat,mpi_ierr,mpi_id
1949 if(node_nle_4_mpi(in) .eq. 1)
then
1950 mc(3*(in -1) +1) = mc(3*(in -1) +1) +send_buffer(3*(i
1951 mc(3*(in -1) +2) = mc(3*(in -1) +2) +send_buffer(3*(i
1952 mc(3*(in -1) +3) = mc(3*(in -1) +3) +send_buffer(3*(i
1959 recv_buffer(3*(i -1) +1) = mck(3*(in -1) +1)
1960 recv_buffer(3*(i -1) +2) = mck(3*(in -1) +2)
1961 recv_buffer(3*(i -1) +3) = mck(3*(in -1) +3)
1965 mpi_np,recv_length,send_length,&
1966 mpi_comm,mpi_stat,mpi_ierr,mpi_id
1982 if(node_nle_4_mpi(in) .eq. 1)
then
1983 mck(3*(in -1) +1) = mck(3*(in -1) +1) +send_buffer(3
1984 mck(3*(in -1) +2) = mck(3*(in -1) +2) +send_buffer(3
1985 mck(3*(in -1) +3) = mck(3*(in -1) +3) +send_buffer(3
1994 recv_buffer(3*(i -1) +1) = fk(3*(in -1) +1)
1995 recv_buffer(3*(i -1) +2) = fk(3*(in -1) +2)
1996 recv_buffer(3*(i -1) +3) = fk(3*(in -1) +3)
2000 mpi_np,recv_length,send_length,&
2001 mpi_comm,mpi_stat,mpi_ierr,mpi_id)
2005 fk(3*(in -1) +1) = fk(3*(in -1) +1) +send_buffer(3*(i -1) +1
2006 fk(3*(in -1) +2) = fk(3*(in -1) +2) +send_buffer(3*(i -1) +2
2007 fk(3*(in -1) +3) = fk(3*(in -1) +3) +send_buffer(3*(i -1) +3
2015 if (nelem_dg_glo.gt.0)
then
2019 recv_buffer(3*(i -1) +1) = jump(3*(in -1) +1)
2020 recv_buffer(3*(i -1) +2) = jump(3*(in -1) +2)
2021 recv_buffer(3*(i -1) +3) = jump(3*(in -1) +3)
2025 mpi_np,recv_length,send_length,&
2026 mpi_comm,mpi_stat,mpi_ierr,mpi_id)
2030 jump(3*(in -1) +1) = jump(3*(in -1) +1) +send_buffer(3*(i -1)
2031 jump(3*(in -1) +2) = jump(3*(in -1) +2) +send_buffer(3*(i -1)
2032 jump(3*(in -1) +3) = jump(3*(in -1) +3) +send_buffer(3*(i -1)
2038 if (rk_scheme .eq.
'RUNGEKUTTA')
then
2040 if (istage .eq. 1)
then
2042 if(make_damping_yes_or_not.eq. 1 .and. damping_type .eq. 1
2043 v_int = -deltat*(fk + jump
2044 if(make_damping_yes_or_not.eq. 1 .and. damping_type .eq. 3
2045 v_int = -deltat*(fk + jump
2046 if(make_damping_yes_or_not.eq. 0 .or. damping_type .eq. 2)
2049 u_int = a(istage)*u_int + deltat*v1
2050 if(make_damping_yes_or_not.eq. 1 .and. damping_type .eq. 1
2051 v_int = a(istage)*v_int -
2052 if(make_damping_yes_or_not.eq. 1 .and. damping_type .eq. 3
2053 v_int = a(istage)*v_int -
2054 if(make_damping_yes_or_not.eq. 0 .or. damping_type .eq. 2)
2057 u1 = u1 + b(istage)*u_int
2058 v1 = v1 + b(istage)*v_int
2065 if(rk_scheme .eq.
'RUNGEKUTTA')
then
2106 if (make_damping_yes_or_not .eq. 0 .or. damping_type .eq.
then
2107 u2(iaz) = 2.0d0 * u1(iaz) - u0(iaz) &
2108 + (fe(iaz) - fk(iaz) - jump(iaz)) / mv(iaz) *deltat2
2110 u2(iaz) = ( fe(iaz) - fk(iaz) - jump(iaz) - mck(iaz)
2111 + (mc(iaz)/(2*deltat)) * u0(iaz) + (mv(iaz)/deltat2
2112 * ( 2.0d0 * u1(iaz) - u0(iaz) ) ) / (mv(iaz)/deltat2
2115 if(abs(u2(iaz)).lt. 1.0e-30) u2(iaz) = 0.d0
2118 if (make_damping_yes_or_not.eq. 0 .or. damping_type .eq.
then
2119 u2(iaz) = 2.0d0 * u1(iaz) - u0(iaz) &
2120 + (fe(iaz) - fk(iaz) - jump(iaz)) / mv(iaz) *deltat2
2122 u2(iaz) = ( fe(iaz) - fk(iaz) - jump(iaz) - mck(iaz) *
2123 + (mc(iaz)/(2*deltat)) * u0(iaz) + (mv(iaz)/deltat2
2124 * ( 2.0d0 * u1(iaz) - u0(iaz) ) ) &
2125 / (mv(iaz)/deltat2 + mc(iaz)/(2*deltat) )
2127 if(abs(u2(iaz)).lt. 1.0e-30) u2(iaz) = 0.d0
2130 if (make_damping_yes_or_not.eq. 0 .or. damping_type .eq.
then
2131 u2(iaz) = 2.0d0 * u1(iaz) - u0(iaz) &
2132 + (fe(iaz) - fk(iaz) - jump(iaz)) / mv(iaz) *deltat2
2134 u2(iaz) = ( fe(iaz) - fk(iaz) - jump(iaz) - mck(iaz) *
2135 + (mc(iaz)/(2*deltat)) * u0(iaz) + (mv(iaz)/deltat2
2136 * ( 2.0d0 * u1(iaz) - u0(iaz) ) ) / (mv(iaz)/deltat2
2138 if(abs(u2(iaz)).lt. 1.0e-30) u2(iaz) = 0.d0
2149 func_value(fn) =
get_func_value(nfunc,func_type,func_indx,func_data
2160 if (nnode_dirx.gt.0)
then
2165 u2(iaz) = 0.0d0; u1(iaz) = 0.d0; v1(iaz) = 0.d0
2166 if(rk_scheme .eq.
'RUNGEKUTTA') v2(iaz) = 0.d0
2169 u2(iaz) = u2(iaz) + fel(fn,(3*(in -1) +1)) * func_value(fn
2170 if(rk_scheme .eq.
'RUNGEKUTTA') v2(iaz) = v2(iaz) + fel(fn
2175 if (nnode_diry.gt.0)
then
2179 u2(iaz) = 0.0d0; u1(iaz) = 0.d0; v1(iaz) = 0.d0
2180 if(rk_scheme .eq.
'RUNGEKUTTA') v2(iaz) = 0.d0
2182 u2(iaz) = u2(iaz) + fel(fn,(3*(in -1) +2)) * func_value(fn
2183 if(rk_scheme .eq.
'RUNGEKUTTA') v2(iaz) = v2(iaz) + fel(fn
2188 if (nnode_dirz.gt.0)
then
2192 u2(iaz) = 0.0d0; u1(iaz) = 0.d0; v1(iaz) = 0.d0
2193 if(rk_scheme .eq.
'RUNGEKUTTA') v2(iaz) = 0.d0
2195 u2(iaz) = u2(iaz) + fel(fn,(3*(in -1) +3)) * func_value(fn
2196 if(rk_scheme .eq.
'RUNGEKUTTA') v2(iaz) = v2(iaz) + fel(fn
2208 if(opt_out_var(4) .eq. 1)
then
2209 allocate(double_send_buffer(6*nsend)); double_send_buffer = 0
2210 allocate(double_recv_buffer(6*nrecv)); double_recv_buffer = 0
2214 double_send_buffer(6*(i -1) +1) = stress(6*(in -1) +1)
2215 double_send_buffer(6*(i -1) +2) = stress(6*(in -1) +2)
2216 double_send_buffer(6*(i -1) +3) = stress(6*(in -1) +3)
2217 double_send_buffer(6*(i -1) +4) = stress(6*(in -1) +4)
2218 double_send_buffer(6*(i -1) +5) = stress(6*(in -1) +5)
2219 double_send_buffer(6*(i -1) +6) = stress(6*(in -1) +6)
2222 call exchange_double(6*nsend,double_send_buffer,6*nrecv,double_recv_buffer
2223 mpi_np,double_send_length,double_recv_length
2224 mpi_comm,mpi_stat,mpi_ierr,mpi_id)
2228 stress(6*(in -1) +1) = double_recv_buffer(6*(i -1) +1)
2229 stress(6*(in -1) +2) = double_recv_buffer(6*(i -1) +2)
2230 stress(6*(in -1) +3) = double_recv_buffer(6*(i -1) +3)
2231 stress(6*(in -1) +4) = double_recv_buffer(6*(i -1) +4)
2232 stress(6*(in -1) +5) = double_recv_buffer(6*(i -1) +5)
2233 stress(6*(in -1) +6) = double_recv_buffer(6*(i -1) +6)
2236 deallocate(double_send_buffer,double_recv_buffer)
2241 if(opt_out_var(5) .eq. 1 .or. damping_type .eq. 2)
then
2243 allocate(double_send_buffer(6*nsend)); double_send_buffer = 0
2244 allocate(double_recv_buffer(6*nrecv)); double_recv_buffer = 0
2248 double_send_buffer(6*(i -1) +1) = strain(6*(in -1) +1)
2249 double_send_buffer(6*(i -1) +2) = strain(6*(in -1) +2)
2250 double_send_buffer(6*(i -1) +3) = strain(6*(in -1) +3)
2251 double_send_buffer(6*(i -1) +4) = strain(6*(in -1) +4)
2252 double_send_buffer(6*(i -1) +5) = strain(6*(in -1) +5)
2253 double_send_buffer(6*(i -1) +6) = strain(6*(in -1) +6)
2256 call exchange_double(6*nsend,double_send_buffer,6*nrecv,double_recv_buffer
2257 mpi_np,double_send_length,double_recv_length
2258 mpi_comm,mpi_stat,mpi_ierr,mpi_id)
2262 strain(6*(in -1) +1) = double_recv_buffer(6*(i -1) +1)
2263 strain(6*(in -1) +2) = double_recv_buffer(6*(i -1) +2)
2264 strain(6*(in -1) +3) = double_recv_buffer(6*(i -1) +3)
2265 strain(6*(in -1) +4) = double_recv_buffer(6*(i -1) +4)
2266 strain(6*(in -1) +5) = double_recv_buffer(6*(i -1) +5)
2267 strain(6*(in -1) +6) = double_recv_buffer(6*(i -1) +6)
2271 deallocate(double_send_buffer,double_recv_buffer)
2275 if(opt_out_var(6) .eq. 1)
then
2279 send_buffer(3*(i -1) +1) = omega(3*(in -1) +1)
2280 send_buffer(3*(i -1) +2) = omega(3*(in -1) +2)
2281 send_buffer(3*(i -1) +3) = omega(3*(in -1) +3)
2285 mpi_np,send_length,recv_length,&
2286 mpi_comm,mpi_stat,mpi_ierr,mpi_id)
2290 omega(3*(in -1) +1) = recv_buffer(3*(i -1) +1)
2291 omega(3*(in -1) +2) = recv_buffer(3*(i -1) +2)
2292 omega(3*(in -1) +3) = recv_buffer(3*(i -1) +3)
2303 if (damping_type .eq. 2)
then
2306 strain_visc, strain, deltat)
2313 if (nmonitors_lst .ge. 1)
then
2315 if (mod(its,ndt_mon_lst) .eq. 0 .and. count_monitor .gt. 0 )
then
2319 call write_output(nmonitors_lst, mpi_id, el_monitor_lst, local_el_num
2320 con_spx_loc, con_nnz_loc, sdeg_mat, nmat,
2321 u2, u1, u0, v1, nnod_loc, &
2322 stress, strain, omega, &
2323 xr_monitor_lst, yr_monitor_lst, zr_monitor_lst
2324 tt1, deltat, deltat2, &
2325 opt_out_var, count_monitor, monitor_file,debug
2326 mu_nle, gamma_nle, b_instabilitycontrol, instability_maxval
2350 con_spx_loc, con_nnz_loc, sdeg_mat, nmat,
2352 xr_system_lst, yr_system_lst, zr_system_lst
2361 !------------------------------------------------------------------
2362 ! exchange ground motion of sdof
system
2363 !------------------------------------------------------------------
2368 call mpi_barrier(mpi_comm, mpi_ierr)
2393 !------------------------------------------------------------------
2394 ! compute output of sdof/mdof
system(distribute this calculations
2395 !------------------------------------------------------------------
2398 if(
n_bld .gt. 0)
then
2412 if(
sys(i)%SFS.eq.0)
then
2416 elseif (
sys(i)%SFS.eq.1)
then
2429 if(mod(its,ndt_mon_lst) .eq. 0)
then
2434 !------------------------------------------------------------------
2435 ! exchange force output of sdof/mdof
system
2436 !------------------------------------------------------------------
2442 call mpi_barrier(mpi_comm, mpi_ierr)
2450 if (b_instabilitycontrol)
then
2451 if (b_instability_abort)
then
2452 write(*,*)
'Worker ', mpi_id,
': instability detected. Signalling to other workers.'
2456 call mpi_allgather(b_instability_abort, 1, mpi_logical, b_instability_abort_all
2459 if (any(b_instability_abort_all))
then
2460 if (mpi_id .eq. 0)
then
2461 write(*,*)
'Instability detected, aborting.'
2464 final_time = mpi_wtime()
2465 call mpi_finalize(mpi_ierr)
2467 if (mpi_id .eq. 0)
then
2468 write(*,*)
'Jobs aborted. '
2469 write(*,*)
'Elapsed wall clock time: ', final_time - start_time
' seconds'
2470 write(*,*)
'Instability detected at iteration = ', its,
', TIME ='
2472 call exit(exit_instab)
2498 if (rk_scheme .eq.
'RUNGEKUTTA')
then
2502 v1 = (u2-u0)/(2.0d0*deltat)
2507 if (its .le. 200)
then
2508 call mpi_barrier(mpi_comm, mpi_ierr)
2509 final_time = mpi_wtime()
2510 if (mpi_id .eq. 0)
write(*,*)
'Time for a single step', final_time
2519 if(restart .eq. 1 .and. (dabs(tt2 - trestart*deltat*isnap) .le. 1.e-
then
2524 if (mpi_id.eq.0)
write(*,*)
'Writing Backup files at TIME : '
2528 xx_spx_loc,yy_spx_loc,zz_spx_loc
2529 local_node_num,tstart)
2532 xx_spx_loc,yy_spx_loc,zz_spx_loc
2533 local_node_num,tstart)
2536 xx_spx_loc,yy_spx_loc,zz_spx_loc
2537 local_node_num,tstart)
2539 if (damping_type .eq. 2)
then
2542 xx_spx_loc,yy_spx_loc,zz_spx_loc
2543 local_node_num,tstart)
2583 if (itime .le. ntime_err)
then
2585 if (testmode .eq. 1 .and. abs(time_error(itime)-tt1) .le. deltat)
then
2588 nmat, prop_mat, sdeg_mat, tag_mat, &
2589 local_node_num, local_el_num, nelem_dg,&
2590 alfa11,alfa12,alfa13,&
2591 alfa21,alfa22,alfa23,&
2592 alfa31,alfa32,alfa33,&
2593 beta11,beta12,beta13,&
2594 beta21,beta22,beta23,&
2595 beta31,beta32,beta33,&
2596 gamma1,gamma2,gamma3,&
2597 delta1,delta2,delta3,&
2598 xx_spx_loc, yy_spx_loc, zz_spx_loc, mpi_id
2600 nsend_jump,node_send_jump, &
2601 nrecv_jump,node_recv_jump, &
2602 send_length_jump, recv_length_jump, &
2604 con_nnz_dg, con_spx_dg)
2612 tt0 = tt0 + deltat; tt1 = tt1 + deltat; tt2 = tt2 + deltat;
2620 if(mpi_id .eq. 0)
then
2621 finish = mpi_wtime(); time_in_seconds = finish - start
2624 if (mpi_id.eq.0)
then
2626 write(*,
'(A,F20.3,A)')
'Time loop completed in ',time_in_seconds
' s'
2627 write(*,
'(A)')
'-------------------------------------------------------'
2635 if (nmonitors_pgm.ge.1)
then
2637 if(mpi_id.eq.0)
then
2639 write(*,
'(A)')
'--------------Writing Peak Ground Maps-----------------'
2644 call write_fileout_pg(monitor_file,filepg,mpi_id,nmonitors_pgm,max_u
2646 call write_fileout_pg(monitor_file,filepg,mpi_id,nmonitors_pgm,max_v
2648 call write_fileout_pg(monitor_file,filepg,mpi_id,nmonitors_pgm,max_a
2650 call write_fileout_pg(monitor_file,filepg,mpi_id,nmonitors_pgm,max_o
2658 if (debug .eq. 1)
deallocate(mu_nle,gamma_nle)
2659 if (damping_type .eq. 2)
deallocate(strain_visc)
2660 if (damping_type .eq. 3)
deallocate(damp_term)
2663 deallocate(func_value, u1, u2, v1, fe, fk, mv, jump,send_buffer,recv_buffer
2664 if (rk_scheme .ne.
'RUNGEKUTTA')
deallocate(u0)
2666 if (nelem_dg_glo .gt. 0)
deallocate(send_buffer_jump, recv_buffer_jump
2667 if (opt_out_var(4) .eq. 1 .or. opt_out_var(5) .eq. 1 .or. opt_out_var
then
2668 deallocate(node_counter)
2670 if (rk_scheme .eq.
'RUNGEKUTTA')
deallocate(v2, a,b,c)
2671 if (nmonitors_pgm .ge. 1)
deallocate(max_u, max_v, max_a, max_o)
2672 if (nmat_nle.gt.0)
deallocate(con_spx_loc_nle,depth_nle_el,node_nle_4_mpi
2674 if(nload_traz_el .gt. 0)
deallocate(node_tra, dist_tra)
2685 deallocate(
ug1,
ug2,
ug3, sdofrecv_temp)
2693 end subroutine time_loop
subroutine check_mpi(n, v, ind, tt, pos)
Checks if a an element is present on a vector and give its position.
subroutine compute_energy_error(nnod_loc, u1, v1, time, ne_loc, cs_loc, cs_nnz_loc, nm, prop_mat, sdeg_mat, tag_mat, loc_n_num, local_el_num, nelem_dg_local, alfa11, alfa12, alfa13, alfa21, alfa22, alfa23, alfa31, alfa32, alfa33, beta11, beta12, beta13, beta21, beta22, beta23, beta31, beta32, beta33, gamma1, gamma2, gamma3, delta1, delta2, delta3, xs_loc, ys_loc, zs_loc, mpi_id, el_new, nelem_dg_global, nsd_jump, node_sd_jump, nrv_jump, node_rv_jump, send_length_jump, recv_length_jump, mpi_np, mpi_comm, cs_nnz_dg, cs_dg)
Computes norms of error in test mode case.
subroutine exchange_double(nsend, buff_send, nrecv, buff_recv, nproc, proc_send, proc_recv, comm, status, ierr, myid)
Exchanges double between MPI processes.
subroutine exchange_integer(nsend, buff_send, nrecv, buff_recv, nproc, proc_send, proc_recv, comm, status, ierr, myid)
Exchanges integers between MPI processes.
subroutine find_pos(n, vec, tar, ind)
Find element position on a vector.
real *8 function get_func_value(nb_fnc, type_fnc, ind_fnc, data_fnc, nb_data_fnc, id_fnc, time
Computes time evolution function.
subroutine get_indloc_from_indglo(local_el, nel_loc, ie, ic)
Returns local id from global id.
subroutine get_initial_conditions(nnod_loc, u0, u1, v1, ne_loc, cs_loc, cs_nnz_loc, nm, prop_mat, sdeg_mat, loc_n_num, xs_loc, ys_loc, zs_loc, mpi_id, dt)
Set initial conditions.
subroutine get_mech_prop_nh_enhanced(ie, nn, nn_loc, cs_nnz_loc, cs_loc, rho_nhe, lambda_nhe, mu_nhe, qs_nh, fmax, rho_el, lambda_el, mu_el, gamma_el)
...Not-Honoring Enhanced (NHE) Implementation
subroutine make_abc_force(nn, xq, wq, dd, rho, lambda, mu, aa11, aa12, aa13, aa21, aa22, aa23, aa31, aa32, aa33, bb11, bb12, bb13, bb21, bb22, bb23, bb31, bb32, bb33, gg1, gg2, gg3, dd1, dd2, dd3, ia, ib, ja, jb, ka, kb, ux, uy, uz, vx, vy, vz, fx, f
Computes ABC's.
subroutine make_anelastic_coefficients_nh(nn, n_sls, lambda_el, mu
Compute anelastic coefficients for Standard Linear Solid model, when the not-honoring strategy is app...
subroutine make_butcherarray(order, stages, a_low, b_low, c)
Makes Butcher array for Runge-Kutta scheme.
subroutine make_damping_matrix(nn, ct, ww, dd, rho, gamma, a11, a12, a13, a21, a22, a23, a31, a32, a33, b11, b12, b13, b21, b22, b23, b31, b32, b33, gg1, gg2, gg3, dd1, dd2, dd3, mc_el, mck_el)
Make damping matrices.
subroutine make_damping_matrix_nle(nn, ct, ww, dd, rho, gamma0, alfa11, alfa12, alfa13, alfa21, alfa22, alfa23, alfa31, alfa32, alfa33, beta11, beta12, beta13, beta21, beta22, beta23, beta31, beta32, beta33, gamma1, gamma2, gamma3, delta1, delta2, delta3, mc_el, mck_el, cs_nnz, cs, ielem, vcase, r_el, fpeak, func_type, func_indx, func_data, nfdata, nf, t_str
Make damping matrices for non-linear elastic materials.
subroutine make_eltensor_for_cases(tcase, vcase, nn, rho_el, lambda_el, mu_el, gamma_el, nn_loc, zs_elev, zs_all, vs_nodes, thic
Assignes material properties node by node.
subroutine make_eltensor_for_cases_nle(vcase, r_el, nn, rho_el, lambda_el, mu_el, gamma_el, cs_nnz, cs, ielem, func_type, func_indx, func_data, nfdata, nf, t_stress, tag_func, yon, tcase, nnod_loc, vs_tria)
Assignes material properties node by node for non linear elasticity.
subroutine make_expl_source(nn, ct, ww, dd, sxx, syy, szz, syz, szx, sxy, nl_expl, check_ne, check_dist_ne, length_cne, ielem, facsexpl, func_type, func_indx, func_data, nfdata, nf, t
Computes the explosive moment tensor.
subroutine make_internal_force(nn, xq, wq, dd, aa11, aa12, aa13, aa21, aa22, aa23, aa31, aa32, aa33, bb11, bb12, bb13, bb21, bb22, bb23, bb31, bb32, bb33, gg1, gg2, gg3, dd1, dd2, dd3, sxx, syy, szz, syz, szx, sxy, fx, fy, fz)
Makes internal forces.
subroutine make_invariants_and_main_strain(nn, duxdx, duydx, duzdx, duxdy, duydy, duzdy, duxdz, duydz, duzdz, r, yon)
Makes invariants for the strain tensor and computes the main strain.
subroutine make_lgl_nw(nb_pnt, xq, wq, dd)
Makes Gauss-Legendre-Lobatto nodes, weigths and spectral derivatives.
subroutine make_mass_matrix(nn, xq, wq, dd, rho, aa11, aa12, aa13, aa21, aa22, aa23, aa31, aa32, aa33, bb11, bb12, bb13, bb21, bb22, bb23, bb31, bb32, bb33, gg1, gg2, gg3, dd1, dd2, dd3, mass)
Makes mass matrix.
subroutine make_rayleigh_damping_matrix(nn, ct, ww, dd, rho, a11, a12, a13, a21, a22, a23, a31, a32, a33, b11, b12, b13, b21, b22, b23, b31, b32, b33, gg1, gg2, gg3, dd1, dd2, dd3, mc_el)
Compute the Rayleigh damping matrix C = A0 M + A1 K, M = mass matrix, K= stiffness matrix.
subroutine make_sdof_output_files
Creates files to store oscillator motion.
subroutine make_seismic_moment(nn, ct, ww, dd, sxx, syy, szz, syz, szx, sxy, nl_sism, check_ns, check_dist_ns, length_cns, ielem, facsmom, tausmom, func_type, func_indx, func_data, nfdata, nf, t
Creates the seismic moment tensor.
subroutine make_strain_tensor(nn, ct, ww, dd, alfa11, alfa12, alfa13, alfa21, alfa22, alfa23
Computes spatial derivatives of displacement.
subroutine make_stress_tensor(nn, lambda, mu, duxdx, duydx, duzdx, duxdy, duydy, duzdy, duxdz, duydz, duzdz, sxx, syy, szz, syz, szx, sxy)
Computes the stress tensor.
subroutine make_stress_tensor_damped(nn, lambda, mu, duxdx, duydx, duzdx, duxdy, duydy, duzdy, duxdz, duydz, duzdz, strain_visc_xx, strain_visc_xy, strain_vi
Computes the stress tensor.
subroutine matmul_sparse(as, nnz, jsp, isp, vet_out, n, vet_in,
Matrix-vector multiplication for sparse matrices (RCS format).
subroutine read_dime_filepg(filec, num_nodes)
Reads dimension of monitor files.
subroutine read_fileout(filename, counter, procs, nb_vec, vec)
Reads files *.out for the restart of the simulation.
subroutine read_fileout_vs(filename, counter, procs, nb_vec, ncol, vec)
Reads files *.out for the restart of the simulation.
subroutine read_file_trav_point(filec, nmonitors_pgm, n_monitor_pgm, dist_monitor_pgm)
Reads files such as MLST.input, MLST.position or MPGM.input.
subroutine sdof_sfs_model(sid, gr_acc, direction)
Response computation for 4DOF model.
subroutine sdof_shear_model(sid, ndof, gr_acc, direction)
Computation for SDOF shear model.
subroutine update_damping_tensor(nnod_loc, n_sls, frequency_range,
Update the damping tensor with the Heun method.
subroutine write_fileout_grid(file_name, file_xyz, count, proc, nv, vec
Writes output results for Restart.
subroutine write_fileout_grid_sv(file_name, file_xyz, count, proc, n
Writes output results for Restart.
subroutine write_output(nmonitlst, mpi_id, elem_mlst, local_el_num, ne_loc, cs_loc, cs_nnz_loc, sdeg_mat, nmat, u2, u1, u0, v1, nnod_loc, stress, strain, omega, xr_mlst, yr_mlst, zr_mlst, tt1, dt, dt2, option_out_var, count_mon, monitor_file, dbg, mu, gamma, b_instabilitycontrol, instability_maxval, b_instability_abort)
Writes output results.
subroutine write_sdof_output_files(tt1tmp)
Write system output files.
Contains structure for jump matrices.
Contains parameters for MDOF.
real *8, dimension(:), allocatable ug1
real *8, dimension(:), allocatable sdofforceinputbuffer
real *8, dimension(:), allocatable sdofinputd
real *8, dimension(:), allocatable gr_acc_rot
real *8, dimension(:), allocatable gr_intf
real *8, dimension(:), allocatable ug2
real *8, dimension(:), allocatable sdofforceinput
real *8, dimension(:), allocatable ug3
real *8, dimension(:), allocatable rot_sin
real *8, dimension(:,:), allocatable sdofgd
real *8, dimension(:), allocatable sdofinput
real *8, dimension(:,:), allocatable sdofag
real *8, dimension(:), allocatable rot_cos
type(system), dimension(:), allocatable sys
SDOF system.
real *8, dimension(:), allocatable sdofinputbuffer
Contains a subset of SPEED paramters (used in TIME_LOOP)