Skip to content

Commit c5d29e9

Browse files
committed
adds absorbing boundary VTK output
1 parent 8f3db84 commit c5d29e9

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

src/generate_databases/save_arrays_solver.F90

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ subroutine save_arrays_solver_mesh()
414414
call save_arrays_solver_injection_boundary()
415415
endif
416416

417-
!! setup wavefield discontinuity interface
417+
! setup wavefield discontinuity interface
418418
if (IS_WAVEFIELD_DISCONTINUITY) then
419419
call save_arrays_solver_mesh_wavefield_discontinuity()
420420
endif
@@ -768,6 +768,32 @@ subroutine save_arrays_solver_files()
768768
deallocate(iglob_tmp)
769769
endif
770770

771+
! saves absorbing surface points
772+
if (num_abs_boundary_faces > 0) then
773+
! saves free surface interface points
774+
allocate(iglob_tmp(NGLLSQUARE*num_abs_boundary_faces),stat=ier)
775+
if (ier /= 0) call exit_MPI_without_rank('error allocating array 652b')
776+
if (ier /= 0) stop 'error allocating array iglob_tmp'
777+
inum = 0
778+
iglob_tmp(:) = 0
779+
do i = 1,num_abs_boundary_faces
780+
do j = 1,NGLLSQUARE
781+
inum = inum+1
782+
iglob_tmp(inum) = ibool(abs_boundary_ijk(1,j,i), &
783+
abs_boundary_ijk(2,j,i), &
784+
abs_boundary_ijk(3,j,i), &
785+
abs_boundary_ispec(i) )
786+
enddo
787+
enddo
788+
filename = prname(1:len_trim(prname))//'abs_boundary'
789+
call write_VTK_data_points(nglob_unique, &
790+
xstore_unique,ystore_unique,zstore_unique, &
791+
iglob_tmp,NGLLSQUARE*num_abs_boundary_faces, &
792+
filename)
793+
794+
deallocate(iglob_tmp)
795+
endif
796+
771797
! acoustic-elastic domains
772798
if (ACOUSTIC_SIMULATION .and. ELASTIC_SIMULATION) then
773799
! saves points on acoustic-elastic coupling interface

src/meshfem3D/save_databases.F90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,9 @@ subroutine save_databases(nspec,nglob, &
601601
deallocate(material_index)
602602

603603
! setting up wavefield discontinuity interface
604-
if (IS_WAVEFIELD_DISCONTINUITY) &
604+
if (IS_WAVEFIELD_DISCONTINUITY) then
605605
call write_wavefield_discontinuity_database()
606+
endif
606607

607608
! user output
608609
if (myrank == 0) then

0 commit comments

Comments
 (0)