Skip to content

Commit 917e4e0

Browse files
committed
updates source locations w/ coupling
1 parent 80ed4cc commit 917e4e0

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/specfem3D/locate_source.F90

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,14 @@ subroutine locate_source()
288288

289289
enddo ! end of loop on all the sources
290290

291+
! coupling
292+
if (COUPLE_WITH_INJECTION_TECHNIQUE) then
293+
! no sources needed as wavefield will be injected
294+
! set ficticious sources locations to first element in slice 0 (to avoid indexing issues later on)
295+
islice_selected_source(:) = 0
296+
ispec_selected_source(:) = 1
297+
endif
298+
291299
! bcast from main process
292300
call bcast_all_i(islice_selected_source,NSOURCES)
293301
call bcast_all_i(idomain,NSOURCES)
@@ -316,6 +324,7 @@ subroutine locate_source()
316324
endif
317325
! sets flag if source element in PML
318326
is_CPML_source(:) = .false.
327+
is_CPML_source_all(:) = .false.
319328
do isource = 1,NSOURCES
320329
if (islice_selected_source(isource) == myrank) then
321330
ispec = ispec_selected_source(isource)

src/specfem3D/setup_sources_receivers.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,8 @@ subroutine setup_stf_constants()
432432
! checks if CMT source time function is a Heaviside
433433
! (high-frequency oscillations don't look good in movies)
434434
if (.not. USE_FORCE_POINT_SOURCE .and. &
435-
.not. USE_EXTERNAL_SOURCE_FILE) then
435+
.not. USE_EXTERNAL_SOURCE_FILE .and. &
436+
.not. COUPLE_WITH_INJECTION_TECHNIQUE) then
436437
if (minval(hdur(:)) < TINYVAL) &
437438
stop 'Error hdur too small for movie creation, movies do not make sense for Heaviside source'
438439
endif

0 commit comments

Comments
 (0)