[cig-commits] r19320 - seismo/2D/SPECFEM2D/trunk/src/specfem2D
dkomati1 at geodynamics.org
dkomati1 at geodynamics.org
Tue Dec 27 16:15:51 PST 2011
Author: dkomati1
Date: 2011-12-27 16:15:50 -0800 (Tue, 27 Dec 2011)
New Revision: 19320
Modified:
seismo/2D/SPECFEM2D/trunk/src/specfem2D/checkgrid.F90
Log:
fixed the bug in the mesh sampling histogram when the maximum was equal to the minimum (for a regular mesh in a homogeneous medium)
Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/checkgrid.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/checkgrid.F90 2011-12-27 23:41:44 UTC (rev 19319)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/checkgrid.F90 2011-12-28 00:15:50 UTC (rev 19320)
@@ -540,6 +540,13 @@
max_nb_of_points_per_wavelength = lambdaPmax_histo
endif
+! when the grid is regular and the medium is homogeneous, the minimum and the maximum are equal
+! and thus we cannot create an histogram; in such a case, let us artificially create a non-empty range
+ if(abs(max_nb_of_points_per_wavelength - min_nb_of_points_per_wavelength) < 1.d-10) then
+ min_nb_of_points_per_wavelength = min_nb_of_points_per_wavelength * 0.99d0
+ max_nb_of_points_per_wavelength = max_nb_of_points_per_wavelength * 1.01d0
+ endif
+
! erase histogram of wavelength
classes_wavelength(:) = 0
More information about the CIG-COMMITS
mailing list