@@ -40,8 +40,8 @@ module meshes_io
4040 public :: dump_wavefields_mesh_1d
4141 public :: dump_glob_grid_midpoint
4242 public :: dump_xdmf_grid
43- public :: dump_solid_grid
44- public :: dump_fluid_grid
43+ ! public :: dump_solid_grid
44+ ! public :: dump_fluid_grid
4545 public :: prepare_mesh_memoryvar_vtk
4646 public :: build_kwf_grid
4747 public :: dump_kwf_midpoint_xdmf
@@ -788,14 +788,21 @@ subroutine dump_kwf_grid()
788788
789789 points_mp = 0 .
790790
791+ ct = 1
791792 do iel= 1 , nel_solid
792- points_mp(iel,1 ) = scoord(npol/ 2 ,npol/ 2 ,ielsolid(iel))
793- points_mp(iel,2 ) = zcoord(npol/ 2 ,npol/ 2 ,ielsolid(iel))
793+ if (kwf_mask(npol/ 2 ,jpol/ 2 ,iel)) then
794+ points_mp(ct,1 ) = scoord(npol/ 2 ,npol/ 2 ,ielsolid(iel))
795+ points_mp(ct,2 ) = zcoord(npol/ 2 ,npol/ 2 ,ielsolid(iel))
796+ ct = ct + 1
797+ endif
794798 enddo
795799
796800 do iel= 1 , nel_fluid
797- points_mp(iel + nel_solid,1 ) = scoord(npol/ 2 ,npol/ 2 ,ielfluid(iel))
798- points_mp(iel + nel_solid,2 ) = zcoord(npol/ 2 ,npol/ 2 ,ielfluid(iel))
801+ if (kwf_mask(npol/ 2 ,jpol/ 2 ,iel + nel_solid)) then
802+ points_mp(ct,1 ) = scoord(npol/ 2 ,npol/ 2 ,ielfluid(iel))
803+ points_mp(ct,2 ) = zcoord(npol/ 2 ,npol/ 2 ,ielfluid(iel))
804+ ct = ct + 1
805+ endif
799806 enddo
800807
801808 if (use_netcdf) then
@@ -1012,25 +1019,25 @@ subroutine dump_kwf_sem_xdmf(filename, npoints, nelem)
10121019! > Dumps the mesh (s,z) [m] in ASCII format as needed to visualize snapshots
10131020! ! in the solid region only.
10141021! ! Convention for order in the file: First the fluid, then the solid domain.
1015- subroutine dump_solid_grid (ibeg ,iend ,jbeg ,jend )
1016-
1017-
1018- integer , intent (in ) :: ibeg,iend,jbeg,jend
1019- integer :: iel, ipol,jpol
1020-
1021- open (unit= 2500 + mynum,file= datapath(1 :lfdata)// ' /solid_grid_' &
1022- // appmynum// ' .dat' )
1023- do iel= 1 ,nel_solid
1024- do jpol= jbeg,jend
1025- do ipol= ibeg,iend
1026- write (2500 + mynum,* )scoord(ipol,jpol,ielsolid(iel)), &
1027- zcoord(ipol,jpol,ielsolid(iel))
1028- enddo
1029- enddo
1030- enddo
1031- close (2500 + mynum)
1032-
1033- end subroutine dump_solid_grid
1022+ ! subroutine dump_solid_grid(ibeg,iend,jbeg,jend)
1023+ !
1024+ !
1025+ ! integer, intent(in) :: ibeg,iend,jbeg,jend
1026+ ! integer :: iel, ipol,jpol
1027+ !
1028+ ! open(unit=2500+mynum,file=datapath(1:lfdata)//'/solid_grid_'&
1029+ ! //appmynum//'.dat')
1030+ ! do iel=1,nel_solid
1031+ ! do jpol=jbeg,jend
1032+ ! do ipol=ibeg,iend
1033+ ! write(2500+mynum,*)scoord(ipol,jpol,ielsolid(iel)), &
1034+ ! zcoord(ipol,jpol,ielsolid(iel))
1035+ ! enddo
1036+ ! enddo
1037+ ! enddo
1038+ ! close(2500+mynum)
1039+ !
1040+ ! end subroutine dump_solid_grid
10341041!- ----------------------------------------------------------------------------------------
10351042
10361043!- ----------------------------------------------------------------------------------------
@@ -1040,43 +1047,43 @@ end subroutine dump_solid_grid
10401047! ! When reading the fluid wavefield, one therefore needs to multiply all
10411048! ! components with inv_rho_fluid and the phi component with one/scoord!
10421049! ! Convention for order in the file: First the fluid, then the solid domain.
1043- subroutine dump_fluid_grid (ibeg ,iend ,jbeg ,jend )
1044-
1045- use data_pointwise, only : inv_rho_fluid
1046-
1047-
1048- integer , intent (in ) :: ibeg,iend,jbeg,jend
1049- integer :: iel, ipol,jpol
1050-
1051- ! When reading the fluid wavefield, one needs to multiply all components
1052- ! with inv_rho_fluid and the phi component with one/scoord!!
1053-
1054- open (unit= 2500 + mynum,file= datapath(1 :lfdata)// &
1055- ' /fluid_grid_' // appmynum// ' .dat' )
1056- open (unit= 2600 + mynum,file= datapath(1 :lfdata)// &
1057- ' /inv_rho_scoord_fluid_flusnaps_' &
1058- // appmynum// ' .dat' , STATUS= " REPLACE" )
1059- do iel= 1 ,nel_fluid
1060- do jpol= jbeg,jend
1061- do ipol= ibeg,iend
1062- write (2500 + mynum,* )scoord(ipol,jpol,ielfluid(iel)), &
1063- zcoord(ipol,jpol,ielfluid(iel))
1064- if ( axis_fluid(iel) .and. ipol== 0 ) then
1065- ! Axis s=0! write 1 instead of 1/s and then multiply
1066- ! with the correct factor dsdchi, obtained by L'Hospital's rule
1067- ! (see routine fluid_snapshot below).
1068- write (2600 + mynum,* )inv_rho_fluid(ipol,jpol,iel),one
1069- else
1070- write (2600 + mynum,* )inv_rho_fluid(ipol,jpol,iel), &
1071- one/ scoord(ipol,jpol,ielfluid(iel))
1072- endif
1073- enddo
1074- enddo
1075- enddo
1076- close (2500 + mynum)
1077- close (2600 + mynum)
1078-
1079- end subroutine dump_fluid_grid
1050+ ! subroutine dump_fluid_grid(ibeg,iend,jbeg,jend)
1051+ !
1052+ ! use data_pointwise, only : inv_rho_fluid
1053+ !
1054+ !
1055+ ! integer, intent(in) :: ibeg,iend,jbeg,jend
1056+ ! integer :: iel, ipol,jpol
1057+ !
1058+ ! ! When reading the fluid wavefield, one needs to multiply all components
1059+ ! ! with inv_rho_fluid and the phi component with one/scoord!!
1060+ !
1061+ ! open(unit=2500+mynum,file=datapath(1:lfdata)//&
1062+ ! '/fluid_grid_'//appmynum//'.dat')
1063+ ! open(unit=2600+mynum,file=datapath(1:lfdata)//&
1064+ ! '/inv_rho_scoord_fluid_flusnaps_'&
1065+ ! //appmynum//'.dat', STATUS="REPLACE")
1066+ ! do iel=1,nel_fluid
1067+ ! do jpol=jbeg,jend
1068+ ! do ipol=ibeg,iend
1069+ ! write(2500+mynum,*)scoord(ipol,jpol,ielfluid(iel)), &
1070+ ! zcoord(ipol,jpol,ielfluid(iel))
1071+ ! if ( axis_fluid(iel) .and. ipol==0 ) then
1072+ ! ! Axis s=0! write 1 instead of 1/s and then multiply
1073+ ! ! with the correct factor dsdchi, obtained by L'Hospital's rule
1074+ ! ! (see routine fluid_snapshot below).
1075+ ! write(2600+mynum,*)inv_rho_fluid(ipol,jpol,iel),one
1076+ ! else
1077+ ! write(2600+mynum,*)inv_rho_fluid(ipol,jpol,iel), &
1078+ ! one/scoord(ipol,jpol,ielfluid(iel))
1079+ ! endif
1080+ ! enddo
1081+ ! enddo
1082+ ! enddo
1083+ ! close(2500+mynum)
1084+ ! close(2600+mynum)
1085+ !
1086+ ! end subroutine dump_fluid_grid
10801087!- ----------------------------------------------------------------------------------------
10811088
10821089!- ----------------------------------------------------------------------------------------
0 commit comments