Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions src/meshfem2D/determine_acoustic_surface.f90
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

subroutine determine_acoustic_surface()

use constants, only: ANISOTROPIC_MATERIAL,TINYVAL,IMAIN,myrank
use constants, only: ANISOTROPIC_MATERIAL,TINYVAL,IMAIN,myrank,POROELASTIC_MATERIAL,ELECTROMAGNETIC_MATERIAL

use part_unstruct_par, only: nelem_acoustic_surface,acoustic_surface, &
nxread,nzread,elmnts
Expand Down Expand Up @@ -61,7 +61,8 @@ subroutine determine_acoustic_surface()
j = nzread
do i = 1,nxread
imaterial_number = num_material((j-1)*nxread+i)
if (icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL .and. phi_read(imaterial_number) >= 1.d0) then
if ((icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL) .and. (phi_read(imaterial_number) >= 1.d0) .and. &
(icodemat(imaterial_number) /= ELECTROMAGNETIC_MATERIAL) .and. (icodemat(imaterial_number) /= POROELASTIC_MATERIAL)) then
nelem_acoustic_surface = nelem_acoustic_surface + 1
endif
enddo
Expand All @@ -70,7 +71,8 @@ subroutine determine_acoustic_surface()
j = 1
do i = 1,nxread
imaterial_number = num_material((j-1)*nxread+i)
if (icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL .and. phi_read(imaterial_number) >= 1.d0) then
if ((icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL) .and. (phi_read(imaterial_number) >= 1.d0) .and. &
(icodemat(imaterial_number) /= ELECTROMAGNETIC_MATERIAL) .and. (icodemat(imaterial_number) /= POROELASTIC_MATERIAL)) then
nelem_acoustic_surface = nelem_acoustic_surface + 1
endif
enddo
Expand All @@ -80,7 +82,8 @@ subroutine determine_acoustic_surface()
i = 1
do j = 1,nzread
imaterial_number = num_material((j-1)*nxread+i)
if (icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL .and. phi_read(imaterial_number) >= 1.d0) then
if ((icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL) .and. (phi_read(imaterial_number) >= 1.d0) .and. &
(icodemat(imaterial_number) /= ELECTROMAGNETIC_MATERIAL) .and. (icodemat(imaterial_number) /= POROELASTIC_MATERIAL)) then
nelem_acoustic_surface = nelem_acoustic_surface + 1
endif
enddo
Expand All @@ -89,7 +92,8 @@ subroutine determine_acoustic_surface()
i = nxread
do j = 1,nzread
imaterial_number = num_material((j-1)*nxread+i)
if (icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL .and. phi_read(imaterial_number) >= 1.d0) then
if ((icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL) .and. (phi_read(imaterial_number) >= 1.d0) .and. &
(icodemat(imaterial_number) /= ELECTROMAGNETIC_MATERIAL) .and. (icodemat(imaterial_number) /= POROELASTIC_MATERIAL)) then
nelem_acoustic_surface = nelem_acoustic_surface + 1
endif
enddo
Expand All @@ -111,7 +115,8 @@ subroutine determine_acoustic_surface()
j = nzread
do i = 1,nxread
imaterial_number = num_material((j-1)*nxread+i)
if (icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL .and. phi_read(imaterial_number) >= 1.d0) then
if ((icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL) .and. (phi_read(imaterial_number) >= 1.d0) .and. &
(icodemat(imaterial_number) /= ELECTROMAGNETIC_MATERIAL) .and. (icodemat(imaterial_number) /= POROELASTIC_MATERIAL)) then
nelem_acoustic_surface = nelem_acoustic_surface + 1
acoustic_surface(1,nelem_acoustic_surface) = (j-1)*nxread + (i-1)
acoustic_surface(2,nelem_acoustic_surface) = 2
Expand All @@ -124,7 +129,8 @@ subroutine determine_acoustic_surface()
j = 1
do i = 1,nxread
imaterial_number = num_material((j-1)*nxread+i)
if (icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL .and. phi_read(imaterial_number) >= 1.d0) then
if ((icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL) .and. (phi_read(imaterial_number) >= 1.d0) .and. &
(icodemat(imaterial_number) /= ELECTROMAGNETIC_MATERIAL) .and. (icodemat(imaterial_number) /= POROELASTIC_MATERIAL)) then
nelem_acoustic_surface = nelem_acoustic_surface + 1
acoustic_surface(1,nelem_acoustic_surface) = (j-1)*nxread + (i-1)
acoustic_surface(2,nelem_acoustic_surface) = 2
Expand All @@ -138,7 +144,8 @@ subroutine determine_acoustic_surface()
i = 1
do j = 1,nzread
imaterial_number = num_material((j-1)*nxread+i)
if (icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL .and. phi_read(imaterial_number) >= 1.d0) then
if ((icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL) .and. (phi_read(imaterial_number) >= 1.d0) .and. &
(icodemat(imaterial_number) /= ELECTROMAGNETIC_MATERIAL) .and. (icodemat(imaterial_number) /= POROELASTIC_MATERIAL)) then
nelem_acoustic_surface = nelem_acoustic_surface + 1
acoustic_surface(1,nelem_acoustic_surface) = (j-1)*nxread + (i-1)
acoustic_surface(2,nelem_acoustic_surface) = 2
Expand All @@ -151,7 +158,8 @@ subroutine determine_acoustic_surface()
i = nxread
do j = 1,nzread
imaterial_number = num_material((j-1)*nxread+i)
if (icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL .and. phi_read(imaterial_number) >= 1.d0) then
if ((icodemat(imaterial_number) /= ANISOTROPIC_MATERIAL) .and. (phi_read(imaterial_number) >= 1.d0) .and. &
(icodemat(imaterial_number) /= ELECTROMAGNETIC_MATERIAL) .and. (icodemat(imaterial_number) /= POROELASTIC_MATERIAL)) then
nelem_acoustic_surface = nelem_acoustic_surface + 1
acoustic_surface(1,nelem_acoustic_surface) = (j-1)*nxread + (i-1)
acoustic_surface(2,nelem_acoustic_surface) = 2
Expand Down