[cig-commits] r20767 - seismo/2D/SPECFEM2D/trunk/src/meshfem2D
xie.zhinan at geodynamics.org
xie.zhinan at geodynamics.org
Sun Sep 23 01:41:13 PDT 2012
Author: xie.zhinan
Date: 2012-09-23 01:41:13 -0700 (Sun, 23 Sep 2012)
New Revision: 20767
Modified:
seismo/2D/SPECFEM2D/trunk/src/meshfem2D/meshfem2D.F90
seismo/2D/SPECFEM2D/trunk/src/meshfem2D/part_unstruct.F90
seismo/2D/SPECFEM2D/trunk/src/meshfem2D/save_databases.f90
Log:
remove some name confusion which caused by using same array name is_pml in both meshfem2D and specfem2D but with different meaning.
Modified: seismo/2D/SPECFEM2D/trunk/src/meshfem2D/meshfem2D.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/meshfem2D/meshfem2D.F90 2012-09-22 20:43:59 UTC (rev 20766)
+++ seismo/2D/SPECFEM2D/trunk/src/meshfem2D/meshfem2D.F90 2012-09-23 08:41:13 UTC (rev 20767)
@@ -374,8 +374,9 @@
! to store density and velocity model
integer, dimension(:), allocatable :: num_material
- ! to store the position of pml element
- integer, dimension(:), allocatable :: is_pml
+ ! to store the position of pml element in array region_pml_external_mesh
+ ! this is only useful when using pml together with external mesh
+ integer, dimension(:), allocatable :: region_pml_external_mesh
integer :: nspec_cpml
! interface data
@@ -445,13 +446,13 @@
allocate(num_material(nelmnts))
num_material(:) = 0
- allocate(is_pml(nelmnts))
- is_pml(:) = 0
+ allocate(region_pml_external_mesh(nelmnts))
+ region_pml_external_mesh(:) = 0
! assigns materials to mesh elements
if ( read_external_mesh ) then
call read_mat(materials_file, num_material)
- call read_pml_element(CPML_element_file, is_pml, nspec_cpml)
+ call read_pml_element(CPML_element_file, region_pml_external_mesh, nspec_cpml)
else
call read_regions(nbregion,nb_materials,icodemat,cp,cs, &
rho_s,QKappa,Qmu,aniso3,aniso4,aniso5,aniso6,aniso7,aniso8, &
@@ -976,7 +977,7 @@
endif
! *** generate the databases for the solver
- call save_databases(nspec,num_material, is_pml, &
+ call save_databases(nspec,num_material, region_pml_external_mesh, &
my_interfaces,my_nb_interfaces, &
nnodes_tangential_curve,nodes_tangential_curve)
Modified: seismo/2D/SPECFEM2D/trunk/src/meshfem2D/part_unstruct.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/meshfem2D/part_unstruct.F90 2012-09-22 20:43:59 UTC (rev 20766)
+++ seismo/2D/SPECFEM2D/trunk/src/meshfem2D/part_unstruct.F90 2012-09-23 08:41:13 UTC (rev 20767)
@@ -202,14 +202,14 @@
end subroutine read_mat
!-----------------------------------------------
- ! Read the position of pml element storing it in array 'is_pml'
+ ! Read the position of pml element storing it in array 'region_pml_external_mesh'
!-----------------------------------------------
- subroutine read_pml_element(filename, is_pml, nspec_cpml)
+ subroutine read_pml_element(filename, region_pml_external_mesh, nspec_cpml)
implicit none
character(len=256), intent(in) :: filename
- integer, dimension(1:nelmnts), intent(out) :: is_pml
+ integer, dimension(1:nelmnts), intent(out) :: region_pml_external_mesh
integer, intent(out) :: nspec_cpml
! integer, dimension(:,:), allocatable :: local_pml
@@ -218,14 +218,14 @@
open(unit=992, file=trim(filename), form='formatted' , status='old', action='read',iostat=ier)
if( ier /= 0 ) then
print*,'error opening file: ',trim(filename)
- stop 'error read external mat file'
+ stop 'error read external CPML_element_file'
endif
read(992,*) nspec_cpml
do i = 1, nspec_cpml
read(992,*) j, k
- is_pml(j) = k
+ region_pml_external_mesh(j) = k
enddo
close(992)
Modified: seismo/2D/SPECFEM2D/trunk/src/meshfem2D/save_databases.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/meshfem2D/save_databases.f90 2012-09-22 20:43:59 UTC (rev 20766)
+++ seismo/2D/SPECFEM2D/trunk/src/meshfem2D/save_databases.f90 2012-09-23 08:41:13 UTC (rev 20767)
@@ -43,7 +43,7 @@
!========================================================================
- subroutine save_databases(nspec,num_material,is_pml, &
+ subroutine save_databases(nspec,num_material,region_pml_external_mesh, &
my_interfaces,my_nb_interfaces, &
nnodes_tangential_curve,nodes_tangential_curve )
@@ -58,7 +58,7 @@
integer :: nspec
integer, dimension(nelmnts) :: num_material
- integer, dimension(nelmnts) :: is_pml
+ integer, dimension(nelmnts) :: region_pml_external_mesh
integer, dimension(0:ninterfaces-1) :: my_interfaces
integer, dimension(0:ninterfaces-1) :: my_nb_interfaces
@@ -99,7 +99,7 @@
! DK DK add support for using pml in mpi mode with external mesh
! call write_partition_database(15, iproc, nspec, num_material, ngnod, 1)
- call write_partition_database(15, iproc, nspec, num_material, is_pml, ngnod, 1)
+ call write_partition_database(15, iproc, nspec, num_material, region_pml_external_mesh, ngnod, 1)
write(15,*) 'npgeo nproc'
@@ -289,7 +289,7 @@
! DK DK add support for using pml in mpi mode with external mesh
! call write_partition_database(15, iproc, nspec, num_material, ngnod, 2)
- call write_partition_database(15, iproc, nspec, num_material, is_pml, ngnod, 2)
+ call write_partition_database(15, iproc, nspec, num_material, region_pml_external_mesh, ngnod, 2)
if ( nproc /= 1 ) then
call write_interfaces_database(15, nproc, iproc, &
More information about the CIG-COMMITS
mailing list