@@ -57,7 +57,8 @@ subroutine plot_post()
5757 fluid_solid_acoustic_ispec,fluid_solid_acoustic_iedge,num_fluid_solid_edges, &
5858 fluid_poro_acoustic_ispec,fluid_poro_acoustic_iedge,num_fluid_poro_edges, &
5959 solid_poro_poroelastic_ispec,solid_poro_poroelastic_iedge,num_solid_poro_edges, &
60- myrank,NPROC
60+ myrank,NPROC, &
61+ P_SV
6162
6263 use shared_parameters, only: subsamp_postscript,imagetype_postscript,interpol, &
6364 meshvect,modelvect, &
@@ -192,7 +193,12 @@ subroutine plot_post()
192193 ratio_page = min (rpercentz* sizez/ (zmax- zmin),rpercentx* sizex/ (xmax- xmin)) / 100.d0
193194
194195 ! compute the maximum of the norm of the vector
195- dispmax = maxval (sqrt (vector_field_display(1 ,:)** 2 + vector_field_display(2 ,:)** 2 ))
196+ if (P_SV) then
197+ dispmax = maxval (sqrt (vector_field_display(1 ,:)** 2 + vector_field_display(2 ,:)** 2 ))
198+ else
199+ ! SH (membrane) waves, plot y-component
200+ dispmax = maxval (abs (vector_field_display(1 ,:)))
201+ endif
196202
197203 call max_all_all_dp(dispmax, dispmax_glob)
198204 dispmax = dispmax_glob
@@ -1516,22 +1522,39 @@ subroutine plot_post()
15161522 Uxinterp(i,j) = 0.d0
15171523 Uzinterp(i,j) = 0.d0
15181524
1519- do k = 1 ,NGLLX
1520- do l= 1 ,NGLLX
1521- if (AXISYM) then
1522- if (is_on_the_axis(ispec)) then
1523- Uxinterp(i,j) = Uxinterp(i,j) + vector_field_display(1 ,ibool(k,l,ispec))* flagrange_GLJ(k,i)* flagrange_GLJ(l,j)
1524- Uzinterp(i,j) = Uzinterp(i,j) + vector_field_display(2 ,ibool(k,l,ispec))* flagrange_GLJ(k,i)* flagrange_GLJ(l,j)
1525+ if (P_SV) then
1526+ do k = 1 ,NGLLX
1527+ do l= 1 ,NGLLX
1528+ if (AXISYM) then
1529+ if (is_on_the_axis(ispec)) then
1530+ Uxinterp(i,j) = Uxinterp(i,j) + vector_field_display(1 ,ibool(k,l,ispec))* flagrange_GLJ(k,i)* flagrange_GLJ(l,j)
1531+ Uzinterp(i,j) = Uzinterp(i,j) + vector_field_display(2 ,ibool(k,l,ispec))* flagrange_GLJ(k,i)* flagrange_GLJ(l,j)
1532+ else
1533+ Uxinterp(i,j) = Uxinterp(i,j) + vector_field_display(1 ,ibool(k,l,ispec))* flagrange(k,i)* flagrange(l,j)
1534+ Uzinterp(i,j) = Uzinterp(i,j) + vector_field_display(2 ,ibool(k,l,ispec))* flagrange(k,i)* flagrange(l,j)
1535+ endif
15251536 else
15261537 Uxinterp(i,j) = Uxinterp(i,j) + vector_field_display(1 ,ibool(k,l,ispec))* flagrange(k,i)* flagrange(l,j)
15271538 Uzinterp(i,j) = Uzinterp(i,j) + vector_field_display(2 ,ibool(k,l,ispec))* flagrange(k,i)* flagrange(l,j)
15281539 endif
1529- else
1530- Uxinterp(i,j) = Uxinterp(i,j) + vector_field_display(1 ,ibool(k,l,ispec))* flagrange(k,i)* flagrange(l,j)
1531- Uzinterp(i,j) = Uzinterp(i,j) + vector_field_display(2 ,ibool(k,l,ispec))* flagrange(k,i)* flagrange(l,j)
1532- endif
1540+ enddo
15331541 enddo
1534- enddo
1542+ else
1543+ ! SH (membrane) waves, plot y-component
1544+ do k = 1 ,NGLLX
1545+ do l= 1 ,NGLLX
1546+ if (AXISYM) then
1547+ if (is_on_the_axis(ispec)) then
1548+ Uxinterp(i,j) = Uxinterp(i,j) + vector_field_display(1 ,ibool(k,l,ispec))* flagrange_GLJ(k,i)* flagrange_GLJ(l,j)
1549+ else
1550+ Uxinterp(i,j) = Uxinterp(i,j) + vector_field_display(1 ,ibool(k,l,ispec))* flagrange(k,i)* flagrange(l,j)
1551+ endif
1552+ else
1553+ Uxinterp(i,j) = Uxinterp(i,j) + vector_field_display(1 ,ibool(k,l,ispec))* flagrange(k,i)* flagrange(l,j)
1554+ endif
1555+ enddo
1556+ enddo
1557+ endif
15351558
15361559 x1 = (xinterp(i,j)- xmin)* ratio_page
15371560 z1 = (zinterp(i,j)- zmin)* ratio_page
@@ -1672,8 +1695,14 @@ subroutine plot_post()
16721695 z1 = (coord(2 ,ipoin)- zmin)* ratio_page
16731696
16741697 if (dispmax > 0.d0 ) then
1675- x2 = vector_field_display(1 ,ipoin)* sizemax_arrows/ dispmax
1676- z2 = vector_field_display(2 ,ipoin)* sizemax_arrows/ dispmax
1698+ if (P_SV) then
1699+ x2 = vector_field_display(1 ,ipoin)* sizemax_arrows/ dispmax
1700+ z2 = vector_field_display(2 ,ipoin)* sizemax_arrows/ dispmax
1701+ else
1702+ ! SH (membrane) waves, plot y-component
1703+ x2 = vector_field_display(1 ,ipoin)* sizemax_arrows/ dispmax
1704+ z2 = 0.d0
1705+ endif
16771706 else
16781707 x2 = 0.d0
16791708 z2 = 0.d0
0 commit comments