[cig-commits] [commit] devel: added a quick hack to remove the PMLs from JPEG images if needed: set the vector or pressure field to zero there (73695ba)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Tue Apr 29 12:31:01 PDT 2014


Repository : ssh://geoshell/specfem2d

On branch  : devel
Link       : https://github.com/geodynamics/specfem2d/compare/8668abf7720ec23647000f43414eba230c57ba65...26c0b0453ce67013c0f65f601fd12930adfced6f

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

commit 73695baed3cd355fda3cede4ab3dd9daaeaf1f17
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date:   Tue Apr 29 21:29:10 2014 +0200

    added a quick hack to remove the PMLs from JPEG images if needed: set the vector or pressure field to zero there


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

73695baed3cd355fda3cede4ab3dd9daaeaf1f17
 setup/constants.h.in        |  3 +++
 src/specfem2D/specfem2D.F90 | 17 +++++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/setup/constants.h.in b/setup/constants.h.in
index f43c7d1..e4f17d5 100644
--- a/setup/constants.h.in
+++ b/setup/constants.h.in
@@ -24,6 +24,9 @@
 
 !----------- parameters that can be changed by the user -----------
 
+!! DK DK quick hack to remove the PMLs from JPEG images if needed: set the vector field to zero there
+  logical, parameter :: REMOVE_PMLS_FROM_JPEG_IMAGES = .true.
+
 ! number of Gauss-Lobatto-Legendre (GLL) points (i.e., polynomial degree + 1)
   integer, parameter :: NGLLX = 5
 ! number of Gauss-Lobatto-Jacobi (GLJ) points in the axial elements (i.e., polynomial degree + 1) !axisym
diff --git a/src/specfem2D/specfem2D.F90 b/src/specfem2D/specfem2D.F90
index 0bc611a..66cf259 100644
--- a/src/specfem2D/specfem2D.F90
+++ b/src/specfem2D/specfem2D.F90
@@ -9476,6 +9476,23 @@ if(coupled_elastic_poro) then
           call exit_MPI('wrong type for JPEG snapshots')
         endif
 
+!! DK DK quick hack to remove the PMLs from JPEG images if needed: set the vector field to zero there
+        if(PML_BOUNDARY_CONDITIONS .and. REMOVE_PMLS_FROM_JPEG_IMAGES) then
+          do ispec = 1,nspec
+            if(is_PML(ispec)) then
+              do j = 1,NGLLZ
+                do i = 1,NGLLX
+                  iglob = ibool(i,j,ispec)
+                  vector_field_display(1,iglob) = 0.d0
+                  vector_field_display(2,iglob) = 0.d0
+                  vector_field_display(3,iglob) = 0.d0
+                enddo
+              enddo
+            endif
+          enddo
+        endif
+!! DK DK quick hack to remove the PMLs from JPEG images if needed
+
         image_color_data(:,:) = 0.d0
 
         do k = 1, nb_pixel_loc



More information about the CIG-COMMITS mailing list