[cig-commits] r20773 - seismo/3D/FAULT_SOURCE/branches/new_fault_db/src
ampuero at geodynamics.org
ampuero at geodynamics.org
Mon Sep 24 12:01:14 PDT 2012
Author: ampuero
Date: 2012-09-24 12:01:14 -0700 (Mon, 24 Sep 2012)
New Revision: 20773
Modified:
seismo/3D/FAULT_SOURCE/branches/new_fault_db/src/fault_solver.f90
Log:
added test for dataXZ
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-09-24 18:35:28 UTC (rev 20772)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/src/fault_solver.f90 2012-09-24 19:01:14 UTC (rev 20773)
@@ -40,7 +40,7 @@
! outputs on selected fault nodes at every time step:
! slip, slip velocity, fault stresses
type dataT_type
- integer :: npoin,npoin_local
+ integer :: npoin=0,npoin_local=0
integer, dimension(:), pointer :: iglob=>null() ! on-fault global index of output nodes
integer, dimension(:,:), pointer :: iglob_all=>null()
integer, dimension(:), pointer :: islice=>null(),glob_indx=>null()
@@ -61,7 +61,7 @@
real(kind=CUSTOM_REAL), dimension(:), pointer :: stg=>null(), sta=>null(), d1=>null(), d2=>null(), v1=>null(), v2=>null(), &
t1=>null(), t2=>null(), t3=>null(), tRUP=>null(), tPZ=>null()
real(kind=CUSTOM_REAL), dimension(:), pointer :: xcoord=>null(), ycoord=>null(), zcoord=>null()
- integer :: npoin
+ integer :: npoin=0
end type dataXZ_type
type swf_type
@@ -224,9 +224,10 @@
!---------------------------------------------------------------------
subroutine init_one_fault(bc,IIN_BIN,IIN_PAR,Minv,dt_tmp,NT,iflt,accel)
+
use specfem_par
+
real(kind=CUSTOM_REAL) :: accel(:,:)
-
type(bc_dynflt_type), intent(inout) :: bc
real(kind=CUSTOM_REAL), intent(in) :: Minv(:)
integer, intent(in) :: IIN_BIN,IIN_PAR,NT,iflt
@@ -622,6 +623,15 @@
! call init_dataT(bc%dataT,bc%coord,bc%nglob,NT,iflt)
call init_dataXZ(bc%dataXZ,bc)
+!JPA for debugging: test write_dataXZ by printing a snapshot at it=0 with processor id in place of d1
+ if (PARALLEL_FAULT) then
+ if(bc%nglob > 0) bc%dataXZ%d1 = myrank
+ call gather_dataXZ(bc)
+ if (myrank==0) call write_dataXZ(bc%dataXZ_all,0,iflt)
+ if(bc%nglob > 0) bc%dataXZ%d1 = 0.e0_CUSTOM_REAL
+ endif
+
+
end subroutine init_one_fault
!---------------------------------------------------------------------
@@ -1486,10 +1496,10 @@
endif
allocate(bc%npoin_perproc(NPROC))
- allocate(bc%poin_offset(NPROC))
bc%npoin_perproc=0
call gather_all_i(DataXZ%npoin,1,bc%npoin_perproc,1,NPROC)
+ allocate(bc%poin_offset(NPROC))
bc%poin_offset(1)=0
do iproc=2,NPROC
bc%poin_offset(iproc) = sum(bc%npoin_perproc(1:iproc-1))
More information about the CIG-COMMITS
mailing list