[cig-commits] r21758 - seismo/3D/SPECFEM3D/trunk/utils/Visualization/opendx_AVS

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Sun Apr 7 19:01:29 PDT 2013


Author: dkomati1
Date: 2013-04-07 19:01:29 -0700 (Sun, 07 Apr 2013)
New Revision: 21758

Modified:
   seismo/3D/SPECFEM3D/trunk/utils/Visualization/opendx_AVS/convert_CUBIT_SPECFEM_mesh_to_OpenDX.f90
   seismo/3D/SPECFEM3D/trunk/utils/Visualization/opendx_AVS/visualize_mesh_DX_new.cfg
   seismo/3D/SPECFEM3D/trunk/utils/Visualization/opendx_AVS/visualize_mesh_DX_new.net
Log:
added option to use CPML flags to color the mesh


Modified: seismo/3D/SPECFEM3D/trunk/utils/Visualization/opendx_AVS/convert_CUBIT_SPECFEM_mesh_to_OpenDX.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/utils/Visualization/opendx_AVS/convert_CUBIT_SPECFEM_mesh_to_OpenDX.f90	2013-04-08 01:11:14 UTC (rev 21757)
+++ seismo/3D/SPECFEM3D/trunk/utils/Visualization/opendx_AVS/convert_CUBIT_SPECFEM_mesh_to_OpenDX.f90	2013-04-08 02:01:29 UTC (rev 21758)
@@ -13,7 +13,7 @@
 
   integer :: nspec,npoin
   integer :: ispec,ipoin
-  integer :: ipoin_read,ispec_read,imat_read
+  integer :: ipoin_read,ispec_read,imat_read,nspec_CPML,iflag
   integer :: i1,i2,i3,i4,i5,i6,i7,i8
 
   real, dimension(:), allocatable :: x,y,z
@@ -25,6 +25,13 @@
   real :: xread,yread,zread
   real :: val_color
 
+  print *,' 1 = use material file to color the mesh elements'
+  print *,' 2 = use CPML flag file to color the mesh elements'
+  print *,' 3 = exit'
+  read(*,*) iflag
+  if(iflag /= 1 .and. iflag /= 2) stop 'exiting...'
+  print *
+
 ! open SPECFEM3D_Cartesian mesh file to read the points
     open(unit=23,file='nodes_coords_file',status='old',action='read')
     read(23,*) npoin
@@ -89,13 +96,26 @@
     write(11,*) 'object 3 class array type float rank 0 items ',nspec,' data follows'
 
 ! read local elements in this slice and output global DX elements
-  open(unit=23,file='materials_file',status='old',action='read')
-  do ispec=1,nspec
+  if(iflag == 1) then
+    open(unit=23,file='materials_file',status='old',action='read')
+    do ispec=1,nspec
 ! beware: elements may not be listed in increasing order, they can appear in any order
-    read(23,*) ispec_read,imat_read
-    imat(ispec_read) = imat_read
-  enddo
-  close(23)
+      read(23,*) ispec_read,imat_read
+      imat(ispec_read) = imat_read
+    enddo
+    close(23)
+  else
+    imat(:) = 0
+    open(unit=23,file='absorbing_cpml_file',status='old',action='read')
+    read(23,*) nspec_CPML
+    if(nspec_CPML < 1 .or. nspec_CPML > nspec) stop 'incorrect value of nspec_CPML read'
+    do ispec=1,nspec_CPML
+! beware: elements may not be listed in increasing order, they can appear in any order
+      read(23,*) ispec_read,imat_read
+      imat(ispec_read) = imat_read
+    enddo
+    close(23)
+  endif
 
   do ispec=1,nspec
     val_color = imat(ispec) ! use material property read to color the elements

Modified: seismo/3D/SPECFEM3D/trunk/utils/Visualization/opendx_AVS/visualize_mesh_DX_new.cfg
===================================================================
--- seismo/3D/SPECFEM3D/trunk/utils/Visualization/opendx_AVS/visualize_mesh_DX_new.cfg	2013-04-08 01:11:14 UTC (rev 21757)
+++ seismo/3D/SPECFEM3D/trunk/utils/Visualization/opendx_AVS/visualize_mesh_DX_new.cfg	2013-04-08 02:01:29 UTC (rev 21758)
@@ -1,5 +1,5 @@
 //
-// time: Mon Apr  8 02:25:28 2013
+// time: Mon Apr  8 03:59:30 2013
 //
 // version: 3.2.0 (format), 4.4.4 (DX)
 //
@@ -21,13 +21,13 @@
 // window: position = (0.0000,0.1630), size = 0.5661x0.6343
 // input[1]: defaulting = 0, value = "Image_2"
 // input[4]: defaulting = 0, value = 1
-// input[5]: defaulting = 0, value = [67000 67000 -30000]
-// input[6]: defaulting = 0, value = [430621 -380714 207366]
-// input[7]: defaulting = 0, value = 334244.0
+// input[5]: defaulting = 0, value = [61302.4 66055.3 -23053.7]
+// input[6]: defaulting = 0, value = [424923 -381659 214312]
+// input[7]: defaulting = 0, value = 265713.0
 // input[8]: defaulting = 0, value = 1073
 // input[9]: defaulting = 0, value = 0.600652
 // input[10]: defaulting = 0, value = [-0.103508 0.398975 0.911101]
-// input[11]: defaulting = 1, value = 30.0
+// input[11]: defaulting = 1, value = 24.0498
 // input[12]: defaulting = 0, value = 0
 // input[14]: defaulting = 0, value = 1
 // input[15]: defaulting = 0, value = "none"
@@ -36,8 +36,8 @@
 // input[18]: defaulting = 0, value = 1
 // input[19]: defaulting = 0, value = 1
 // input[22]: defaulting = 0, value = "black"
-// input[25]: defaulting = 0, value = "/home/latychev/boo"
-// input[26]: defaulting = 0, value = "eps gray dpi=86 orient=portrait"
+// input[25]: defaulting = 0, value = "mesh_CPML_OK.tiff"
+// input[26]: defaulting = 0, value = "tiff"
 // input[29]: defaulting = 0, value = 0
 // input[33]: defaulting = 0, value = 1
 // input[36]: defaulting = 0, value = 1

Modified: seismo/3D/SPECFEM3D/trunk/utils/Visualization/opendx_AVS/visualize_mesh_DX_new.net
===================================================================
--- seismo/3D/SPECFEM3D/trunk/utils/Visualization/opendx_AVS/visualize_mesh_DX_new.net	2013-04-08 01:11:14 UTC (rev 21757)
+++ seismo/3D/SPECFEM3D/trunk/utils/Visualization/opendx_AVS/visualize_mesh_DX_new.net	2013-04-08 02:01:29 UTC (rev 21758)
@@ -1,5 +1,5 @@
 //
-// time: Mon Apr  8 02:25:28 2013
+// time: Mon Apr  8 03:59:30 2013
 //
 // version: 3.2.0 (format), 4.4.4 (DX)
 //
@@ -101,13 +101,13 @@
     // node Image[2]: x = 192, y = 540, inputs = 49, label = Image
     // input[1]: defaulting = 0, visible = 0, type = 67108863, value = "Image_2"
     // input[4]: defaulting = 0, visible = 0, type = 1, value = 1
-    // input[5]: defaulting = 0, visible = 0, type = 8, value = [67000 67000 -30000]
-    // input[6]: defaulting = 0, visible = 0, type = 8, value = [430621 -380714 207366]
-    // input[7]: defaulting = 0, visible = 0, type = 5, value = 334244.0
+    // input[5]: defaulting = 0, visible = 0, type = 8, value = [61302.4 66055.3 -23053.7]
+    // input[6]: defaulting = 0, visible = 0, type = 8, value = [424923 -381659 214312]
+    // input[7]: defaulting = 0, visible = 0, type = 5, value = 265713.0
     // input[8]: defaulting = 0, visible = 0, type = 1, value = 1073
     // input[9]: defaulting = 0, visible = 0, type = 5, value = 0.600652
     // input[10]: defaulting = 0, visible = 0, type = 8, value = [-0.103508 0.398975 0.911101]
-    // input[11]: defaulting = 1, visible = 0, type = 5, value = 30.0
+    // input[11]: defaulting = 1, visible = 0, type = 5, value = 24.0498
     // input[12]: defaulting = 0, visible = 0, type = 1, value = 0
     // input[14]: defaulting = 0, visible = 0, type = 1, value = 1
     // input[15]: defaulting = 0, visible = 0, type = 32, value = "none"
@@ -116,8 +116,8 @@
     // input[18]: defaulting = 0, visible = 0, type = 1, value = 1
     // input[19]: defaulting = 0, visible = 0, type = 1, value = 1
     // input[22]: defaulting = 0, visible = 0, type = 32, value = "black"
-    // input[25]: defaulting = 0, visible = 0, type = 32, value = "/home/latychev/boo"
-    // input[26]: defaulting = 0, visible = 0, type = 32, value = "eps gray dpi=86 orient=portrait"
+    // input[25]: defaulting = 0, visible = 0, type = 32, value = "mesh_CPML_OK.tiff"
+    // input[26]: defaulting = 0, visible = 0, type = 32, value = "tiff"
     // input[29]: defaulting = 0, visible = 0, type = 3, value = 0
     // input[33]: defaulting = 0, visible = 0, type = 3, value = 1
     // input[36]: defaulting = 0, visible = 0, type = 3, value = 1
@@ -536,9 +536,9 @@
 main_Image_2_in_1 = "Image_2";
 main_Image_2_in_3 = "X24,,";
 main_Image_2_in_4 = 1;
-main_Image_2_in_5 = [67000 67000 -30000];
-main_Image_2_in_6 = [430621 -380714 207366];
-main_Image_2_in_7 = 334244.0;
+main_Image_2_in_5 = [61302.4 66055.3 -23053.7];
+main_Image_2_in_6 = [424923 -381659 214312];
+main_Image_2_in_7 = 265713.0;
 main_Image_2_in_8 = 1073;
 main_Image_2_in_9 = 0.600652;
 main_Image_2_in_10 = [-0.103508 0.398975 0.911101];
@@ -555,8 +555,8 @@
 main_Image_2_in_21 = NULL;
 main_Image_2_in_22 = "black";
 main_Image_2_in_23 = NULL;
-main_Image_2_in_25 = "/home/latychev/boo";
-main_Image_2_in_26 = "eps gray dpi=86 orient=portrait";
+main_Image_2_in_25 = "mesh_CPML_OK.tiff";
+main_Image_2_in_26 = "tiff";
 main_Image_2_in_27 = NULL;
 main_Image_2_in_28 = NULL;
 main_Image_2_in_29 = 0;



More information about the CIG-COMMITS mailing list