[cig-commits] r20903 - seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Wed Oct 24 08:48:52 PDT 2012


Author: dkomati1
Date: 2012-10-24 08:48:52 -0700 (Wed, 24 Oct 2012)
New Revision: 20903

Modified:
   seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/decompose_mesh_SCOTCH.f90
   seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/part_decompose_mesh_SCOTCH.f90
Log:
added decimal (non integer) value support for element weights, using a trick to use integer values only anyway in the domain decomposition package


Modified: seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/decompose_mesh_SCOTCH.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/decompose_mesh_SCOTCH.f90	2012-10-24 14:09:25 UTC (rev 20902)
+++ seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/decompose_mesh_SCOTCH.f90	2012-10-24 15:48:52 UTC (rev 20903)
@@ -678,9 +678,6 @@
     allocate(elmnts_load(1:nspec),stat=ier)
     if( ier /= 0 ) stop 'error allocating array elmnts_load'
 
-    ! uniform load
-    elmnts_load(:) = 1
-
     ! gets materials id associations
     allocate(num_material(1:nspec),stat=ier)
     if( ier /= 0 ) stop 'error allocating array num_material'
@@ -688,8 +685,10 @@
     !       (which are counted then as elastic elements)
     num_material(:) = mat(1,:)
 
+    ! uniform load by default, and then
     ! in case of acoustic/elastic/poro simulation, assign different weights to elements accordingly
 !! DK DK Oct 2012: this should include CPML weights as well in the future
+    elmnts_load(:) = 1
     call acoustic_elastic_poro_load(elmnts_load,nspec,count_def_mat,count_undef_mat, &
                                   num_material,mat_prop,undef_mat_prop)
 

Modified: seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/part_decompose_mesh_SCOTCH.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/part_decompose_mesh_SCOTCH.f90	2012-10-24 14:09:25 UTC (rev 20902)
+++ seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/part_decompose_mesh_SCOTCH.f90	2012-10-24 15:48:52 UTC (rev 20903)
@@ -39,9 +39,12 @@
 ! acoustic-elastic-poroelastic load balancing:
 ! assumes that elastic at least ~4 times more expensive than acoustic
 ! assumes that poroelastic at least ~8 times more expensive than acoustic
-  integer, parameter :: ACOUSTIC_LOAD = 1
-  integer, parameter :: ELASTIC_LOAD = 4
-  integer, parameter :: POROELASTIC_LOAD = 8
+!! DK DK since loads can only be integer numbers in domain decomposition packages
+!! DK DK for internal reasons (integer arithmetic produces no roundoff), to take
+!! DK DK into account decimal values here we multiply all values by 10, since only ratios between loads matter
+  integer, parameter :: ACOUSTIC_LOAD = 10     ! is in reality 1.0
+  integer, parameter :: ELASTIC_LOAD = 41      ! is in reality 4.1
+  integer, parameter :: POROELASTIC_LOAD = 81  ! is in reality 8.1
 
 contains
 



More information about the CIG-COMMITS mailing list