[cig-commits] [commit] devel: Alexis Bottero added a stop statement for some unsupported PML cases in the axisymmetric case (2fc1616)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Tue Apr 8 03:02:42 PDT 2014
Repository : ssh://geoshell/specfem2d
On branch : devel
Link : https://github.com/geodynamics/specfem2d/compare/e4fa9d03bf2b0fc1837c42aa51eeb63f360575fe...fc67e6fd7ad890705b2b72b4b3c509accb22249e
>---------------------------------------------------------------
commit 2fc1616996e10474fe193217ae655e27c6e21852
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date: Mon Mar 24 15:35:58 2014 +0100
Alexis Bottero added a stop statement for some unsupported PML cases in the axisymmetric case
>---------------------------------------------------------------
2fc1616996e10474fe193217ae655e27c6e21852
src/meshfem2D/meshfem2D.F90 | 2 +-
src/meshfem2D/part_unstruct.F90 | 11 ++++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/meshfem2D/meshfem2D.F90 b/src/meshfem2D/meshfem2D.F90
index d8587c1..a9b9c46 100644
--- a/src/meshfem2D/meshfem2D.F90
+++ b/src/meshfem2D/meshfem2D.F90
@@ -453,7 +453,7 @@ program meshfem2D
if ( read_external_mesh ) then
call read_mat(materials_file, num_material)
if(PML_BOUNDARY_CONDITIONS)then
- call read_pml_element(CPML_element_file, region_pml_external_mesh, nspec_cpml)
+ call read_pml_element(CPML_element_file, region_pml_external_mesh, nspec_cpml, AXISYM)
endif
else
call read_regions(nbregion,nb_materials,icodemat,cp,cs, &
diff --git a/src/meshfem2D/part_unstruct.F90 b/src/meshfem2D/part_unstruct.F90
index 35cd64c..e89fcbc 100644
--- a/src/meshfem2D/part_unstruct.F90
+++ b/src/meshfem2D/part_unstruct.F90
@@ -249,12 +249,13 @@ contains
!-----------------------------------------------
! Read the PML elements, storing them in array 'region_pml_external_mesh'
!-----------------------------------------------
- subroutine read_pml_element(filename, region_pml_external_mesh, nspec_cpml)
+ subroutine read_pml_element(filename, region_pml_external_mesh, nspec_cpml, AXISYM)
implicit none
include "constants.h"
+ logical :: AXISYM
character(len=256), intent(in) :: filename
integer, dimension(1:nelmnts), intent(out) :: region_pml_external_mesh
integer, intent(out) :: nspec_cpml
@@ -285,6 +286,12 @@ contains
#endif
if(pml_flag /= CPML_X_ONLY .and. pml_flag /= CPML_Z_ONLY .and. pml_flag /= CPML_XZ_ONLY) &
stop 'error: incorrect CPML element flag found, should be CPML_X_ONLY or CPML_Z_ONLY or CPML_XZ_ONLY only'
+
+ if(AXISYM) then
+ if((pml_flag == CPML_X_ONLY) .or. (pml_flag == CPML_XZ_ONLY)) &
+ stop 'error: For the moment only the bottom PML works with axisymmetry' !axisym TODO
+ endif
+
region_pml_external_mesh(ispec) = pml_flag
enddo
@@ -406,6 +413,8 @@ contains
read(994,*) nelem_on_the_axis
#endif
+ print *,"Number of elements on the axis: ", nelem_on_the_axis
+
allocate(ispec_of_axial_elements(nelem_on_the_axis))
do i = 1, nelem_on_the_axis
More information about the CIG-COMMITS
mailing list