[cig-commits] [commit] devel: avoid an edge effect if the PML color number is too high for the display (7b5d519)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Feb 26 08:29:36 PST 2014


Repository : ssh://geoshell/specfem2d

On branch  : devel
Link       : https://github.com/geodynamics/specfem2d/compare/3601a7a6d29d2397e321103ab62c680e8d97805b...199590f8262c7bd4b7e73c846e7f02cb25d79107

>---------------------------------------------------------------

commit 7b5d519ad128536f7b266bf5e8cb9830f2901bb0
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date:   Wed Feb 26 17:28:19 2014 +0100

    avoid an edge effect if the PML color number is too high for the display


>---------------------------------------------------------------

7b5d519ad128536f7b266bf5e8cb9830f2901bb0
 src/specfem2D/plotpost.F90 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/specfem2D/plotpost.F90 b/src/specfem2D/plotpost.F90
index 44444d0..5b15418 100644
--- a/src/specfem2D/plotpost.F90
+++ b/src/specfem2D/plotpost.F90
@@ -2023,7 +2023,11 @@ coorg_recv_ps_vector_field
   icol = mod(imat - 1,NUM_COLORS) + 1
 
 ! display all the PML layers in a different (constant) color if needed
-  if(DISPLAY_PML_IN_DIFFERENT_COLOR .and. is_PML(ispec)) icol = ICOLOR_FOR_PML_DISPLAY
+  if(DISPLAY_PML_IN_DIFFERENT_COLOR .and. is_PML(ispec)) then
+    icol = ICOLOR_FOR_PML_DISPLAY
+    ! make sure that number exists
+    if(icol > NUM_COLORS) icol = NUM_COLORS
+  endif
 
   if (  myrank == 0 ) then
     if(meshvect) then



More information about the CIG-COMMITS mailing list