[cig-commits] r13022 - seismo/3D/SPECFEM3D/branches/update_temporary
nlegoff at geodynamics.org
nlegoff at geodynamics.org
Tue Oct 14 03:07:34 PDT 2008
Author: nlegoff
Date: 2008-10-14 03:07:33 -0700 (Tue, 14 Oct 2008)
New Revision: 13022
Modified:
seismo/3D/SPECFEM3D/branches/update_temporary/locate_receivers.f90
seismo/3D/SPECFEM3D/branches/update_temporary/locate_source.f90
Log:
fixed a bug in source and receivers detection.
Modified: seismo/3D/SPECFEM3D/branches/update_temporary/locate_receivers.f90
===================================================================
--- seismo/3D/SPECFEM3D/branches/update_temporary/locate_receivers.f90 2008-10-14 00:42:01 UTC (rev 13021)
+++ seismo/3D/SPECFEM3D/branches/update_temporary/locate_receivers.f90 2008-10-14 10:07:33 UTC (rev 13022)
@@ -289,6 +289,8 @@
! examine top of the elements only (receivers always at the surface)
! k = NGLLZ
+ ispec_selected_rec(irec) = 0
+
do ispec=1,NSPEC_AB
! define the interval in which we look for points
@@ -359,8 +361,13 @@
! end of loop on all the spectral elements in current slice
enddo
+ if (ispec_selected_rec(irec) == 0) then
+ final_distance(irec) = HUGEVAL
+ endif
+
! get normal to the face of the hexaedra if receiver is on the surface
- if (USE_EXTERNAL_MESH .and. (.not. RECVS_CAN_BE_BURIED_EXT_MESH)) then
+ if (USE_EXTERNAL_MESH .and. (.not. RECVS_CAN_BE_BURIED_EXT_MESH) .and. &
+ .not. (ispec_selected_rec(irec) == 0)) then
pt0_ix = -1
pt0_iy = -1
pt0_iz = -1
Modified: seismo/3D/SPECFEM3D/branches/update_temporary/locate_source.f90
===================================================================
--- seismo/3D/SPECFEM3D/branches/update_temporary/locate_source.f90 2008-10-14 00:42:01 UTC (rev 13021)
+++ seismo/3D/SPECFEM3D/branches/update_temporary/locate_source.f90 2008-10-14 10:07:33 UTC (rev 13022)
@@ -272,6 +272,8 @@
! set distance to huge initial value
distmin = HUGEVAL
+ ispec_selected_source(isource) = 0
+
do ispec=1,NSPEC_AB
@@ -343,8 +345,13 @@
! end of loop on all the elements in current slice
enddo
+ if (ispec_selected_source(isource) == 0) then
+ final_distance_source(isource) = HUGEVAL
+ endif
+
! get normal to the face of the hexaedra if receiver is on the surface
- if (USE_EXTERNAL_MESH .and. (.not. SOURCES_CAN_BE_BURIED_EXT_MESH)) then
+ if (USE_EXTERNAL_MESH .and. (.not. SOURCES_CAN_BE_BURIED_EXT_MESH) .and. &
+ .not. (ispec_selected_source(isource) == 0)) then
pt0_ix = -1
pt0_iy = -1
pt0_iz = -1
More information about the cig-commits
mailing list