[cig-commits] r20845 - in seismo/3D/FAULT_SOURCE: . branches/new_fault_db/decompose_mesh_SCOTCH branches/new_fault_db/src

ampuero at geodynamics.org ampuero at geodynamics.org
Wed Oct 17 10:36:39 PDT 2012


Author: ampuero
Date: 2012-10-17 10:36:38 -0700 (Wed, 17 Oct 2012)
New Revision: 20845

Modified:
   seismo/3D/FAULT_SOURCE/TO_DO
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/decompose_mesh_SCOTCH/decompose_mesh_SCOTCH.f90
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/decompose_mesh_SCOTCH/fault_scotch.f90
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/src/fault_solver.f90
Log:
minor cleanup

Modified: seismo/3D/FAULT_SOURCE/TO_DO
===================================================================
--- seismo/3D/FAULT_SOURCE/TO_DO	2012-10-17 17:17:03 UTC (rev 20844)
+++ seismo/3D/FAULT_SOURCE/TO_DO	2012-10-17 17:36:38 UTC (rev 20845)
@@ -4,9 +4,17 @@
 + parallelized fault:
 	- debug the issue with nodes shared by three processors
 	- in fault_solver.f90: parallelize dataT outputs
+	- once tested, set it as default
+
 + rate-and-state friction:
-	- debug
-	- option for several versions of the friction law
+	- make it a user-friendly option (currently a flag in fault_solver)
+
++ cubit interface:
+	- merge the common operations into a single function call (and modfiy the examples accordingly)
+	- consolidate save_fault_nodes_elements.py and functions.py
+
++ factor common subroutines of dynamic and kinematic fault solvers into a lower level module
+
 + verify consistency of fault edge nodes in kinematic solver: 
   currently, these nodes are not split but they are included in the fault database
 
@@ -14,14 +22,9 @@
  	- eliminate fault edge nodes? 
           Currently fault edge nodes must be defined as closed and non-split in CUBIT,
           SESAME asigns a single ibulk, but it adds it to the fault databse.
-	- split nodes in Scotch/SESAME instead of in CUBIT ?
 	- develop a recipe for mesh coarsening in CUBIT
 
-+ cubit interface:
-	- consolidate save_fault_nodes_elements.py and functions.py
-
 + add snapshot outputs to kinematic solver (e.g. to export fault stresses)
-+ factor common subroutines of fault solvers into a lower level module
 
 + improve documentation (add a chapter to the manual)
 + write methodological paper

Modified: seismo/3D/FAULT_SOURCE/branches/new_fault_db/decompose_mesh_SCOTCH/decompose_mesh_SCOTCH.f90
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/decompose_mesh_SCOTCH/decompose_mesh_SCOTCH.f90	2012-10-17 17:17:03 UTC (rev 20844)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/decompose_mesh_SCOTCH/decompose_mesh_SCOTCH.f90	2012-10-17 17:36:38 UTC (rev 20845)
@@ -529,12 +529,9 @@
   !                   count_def_mat, mat(1,:) , mat_prop, &
   !                   sup_neighbour, nsize, &
   !                   nparts, part, nfaces_coupled, faces_coupled)
-    if (PARALLEL_FAULT) then 
-      call fault_repartition_parallel (nspec,part,nodes_coords,nnodes)
-    else
-     ! move all fault elements to the same partition (proc=0)
-      call fault_repartition (nspec, nnodes, elmnts, nsize, nparts, part, esize)
-    endif
+
+  ! re-partitioning transfers two coupled elements on fault side 1 and side 2 to the same partition
+    if (ANY_FAULT) call fault_repartition (nspec, nnodes, elmnts, nsize, nparts, part, esize, nodes_coords)
      
   ! re-partitioning puts moho-surface coupled elements into same partition
     call moho_surface_repartitioning (nspec, nnodes, elmnts, &

Modified: seismo/3D/FAULT_SOURCE/branches/new_fault_db/decompose_mesh_SCOTCH/fault_scotch.f90
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/decompose_mesh_SCOTCH/fault_scotch.f90	2012-10-17 17:17:03 UTC (rev 20844)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/decompose_mesh_SCOTCH/fault_scotch.f90	2012-10-17 17:36:38 UTC (rev 20845)
@@ -22,8 +22,8 @@
                               ! must be larger than the fault offset in the mesh, 
                               ! but smaller than the smallest element size
 
-  public :: read_fault_files, fault_repartition, fault_repartition_parallel, close_faults, write_fault_database, &
-            save_nodes_coords, nodes_coords_open, ANY_FAULT, PARALLEL_FAULT
+  public :: read_fault_files, fault_repartition, close_faults, write_fault_database, &
+            save_nodes_coords, nodes_coords_open, ANY_FAULT
 
 CONTAINS 
 !==========================================================================================
@@ -336,26 +336,41 @@
 
 !===================================================================================================
   !--------------------------------------------------
-  ! Repartitioning : two coupled faultside1/side2 elements are transfered to the same partition
+  ! Repartitioning : two coupled elements on fault side1/side2 are transfered to the same partition
   !--------------------------------------------------
 
-  subroutine fault_repartition (nelmnts, nnodes, elmnts, nsize, &
-                        nproc, part, esize)
+  subroutine fault_repartition (nelmnts, nnodes, elmnts, nsize, nproc, part, esize, nodes_coords)
 
+  integer(long), intent(in) :: nelmnts,nsize
+  integer, intent(in) :: nnodes, nproc, esize 
+  integer, dimension(0:esize*nelmnts-1), intent(in) :: elmnts
+  integer, dimension(0:nelmnts-1), intent(inout)    :: part
+  double precision, dimension(3,nnodes), intent(in) :: nodes_coords
+
+  if (PARALLEL_FAULT) then 
+    call fault_repartition_parallel (nelmnts,part,nodes_coords,nnodes)
+  else
+    ! move all fault elements to the same partition (proc=0)
+    call fault_repartition_not_parallel (nelmnts, nnodes, elmnts, nsize, nparts, part, esize)
+  endif
+
+  end subroutine fault_repartition
+
+!---------------------------------------------------------------------------------------------------
+
 !     part(e) = index of the processor to which element #e is assigned.
 !               Fault elements and neighbors are assigned to the same processor.
 !               Part, once modified, will be input for write_partition_database.
 
-!INPUTS
+  subroutine fault_repartition_not_parallel (nelmnts, nnodes, elmnts, nsize, nproc, part, esize)
+
   integer(long), intent(in) :: nelmnts,nsize
-  integer, intent(in)  :: nnodes, nproc, esize 
+  integer, intent(in) :: nnodes, nproc, esize 
   integer, dimension(0:esize*nelmnts-1), intent(in) :: elmnts
-!OUTPUTS :
   integer, dimension(0:nelmnts-1), intent(inout)    :: part
 
-  integer, dimension(0:nnodes-1)                 :: nnodes_elmnts
-  integer, dimension(0:nsize*nnodes-1)           :: nodes_elmnts
-
+  integer, dimension(0:nnodes-1) :: nnodes_elmnts
+  integer, dimension(0:nsize*nnodes-1) :: nodes_elmnts
   integer  :: i,j, ipart,nproc_null,nproc_null_final
   integer  :: k1, k2, k,e,iflt,inode
   integer, dimension(:), allocatable :: elem_proc_null
@@ -426,7 +441,7 @@
   nproc_null_final = count( part == 0 )
   print *, nproc_null_final 
 
-  end subroutine fault_repartition
+  end subroutine fault_repartition_not_parallel
 
 ! ---------------------------------------------------------------------------------------------------
   subroutine fault_repartition_parallel (nelmnts, part, nodes_coords,nnodes)
@@ -434,7 +449,7 @@
   integer(long), intent(in) :: nelmnts
   integer, dimension(0:nelmnts-1), intent(inout) :: part
   integer, intent(in) :: nnodes
-  double precision,dimension(3,nnodes), intent(in) :: nodes_coords
+  double precision, dimension(3,nnodes), intent(in) :: nodes_coords
 
   integer  :: i,iflt,e,e1,e2,proc1,proc2
 

Modified: seismo/3D/FAULT_SOURCE/branches/new_fault_db/src/fault_solver.f90
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/src/fault_solver.f90	2012-10-17 17:17:03 UTC (rev 20844)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/src/fault_solver.f90	2012-10-17 17:36:38 UTC (rev 20845)
@@ -1261,8 +1261,8 @@
     DataT%dist(k) = distkeep !Surendra : for parallel fault
   enddo
 
- !Surendra : for Parallel fault
-  if(PARALLEL_FAULT) then
+ !Surendra : for parallel fault
+  if (PARALLEL_FAULT) then
     allocate(DataT%islice(DataT%npoin)) 
     allocate(DataT%iglob_all(DataT%npoin,0:NPROC-1))
     allocate(DataT%dist_all(DataT%npoin,0:NPROC-1))



More information about the CIG-COMMITS mailing list