[cig-commits] r20607 - in seismo/3D/SPECFEM3D/trunk/src: shared specfem3D

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Mon Aug 20 09:41:27 PDT 2012


Author: dkomati1
Date: 2012-08-20 09:41:27 -0700 (Mon, 20 Aug 2012)
New Revision: 20607

Modified:
   seismo/3D/SPECFEM3D/trunk/src/shared/hex_nodes.f90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/PML_init.f90
Log:
more modifications towards HEX27 support


Modified: seismo/3D/SPECFEM3D/trunk/src/shared/hex_nodes.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/shared/hex_nodes.f90	2012-08-20 16:31:35 UTC (rev 20606)
+++ seismo/3D/SPECFEM3D/trunk/src/shared/hex_nodes.f90	2012-08-20 16:41:27 UTC (rev 20607)
@@ -35,7 +35,7 @@
 ! define the topology of the hexahedral elements
 
 ! check that the parameter file is correct
-  if(NGNOD /= 8) stop 'elements should have 8 control nodes'
+  if(NGNOD /= 8 .and. NGNOD /= 27) stop 'elements should have 8 or 27 control nodes'
 
 ! corner nodes
   iaddx(1)=0
@@ -70,6 +70,92 @@
   iaddy(8)=2
   iaddz(8)=2
 
+  if(NGNOD == 27) then
+
+! midside nodes (nodes located in the middle of an edge)
+
+  iaddx(9) = 1
+  iaddy(9) = 0
+  iaddz(9) = 0
+
+  iaddx(10) = 2
+  iaddy(10) = 1
+  iaddz(10) = 0
+
+  iaddx(11) = 1
+  iaddy(11) = 2
+  iaddz(11) = 0
+
+  iaddx(12) = 0
+  iaddy(12) = 1
+  iaddz(12) = 0
+
+  iaddx(13) = 0
+  iaddy(13) = 0
+  iaddz(13) = 1
+
+  iaddx(14) = 2
+  iaddy(14) = 0
+  iaddz(14) = 1
+
+  iaddx(15) = 2
+  iaddy(15) = 2
+  iaddz(15) = 1
+
+  iaddx(16) = 0
+  iaddy(16) = 2
+  iaddz(16) = 1
+
+  iaddx(17) = 1
+  iaddy(17) = 0
+  iaddz(17) = 2
+
+  iaddx(18) = 2
+  iaddy(18) = 1
+  iaddz(18) = 2
+
+  iaddx(19) = 1
+  iaddy(19) = 2
+  iaddz(19) = 2
+
+  iaddx(20) = 0
+  iaddy(20) = 1
+  iaddz(20) = 2
+
+! side center nodes (nodes located in the middle of a face)
+
+  iaddx(21) = 1
+  iaddy(21) = 1
+  iaddz(21) = 0
+
+  iaddx(22) = 1
+  iaddy(22) = 0
+  iaddz(22) = 1
+
+  iaddx(23) = 2
+  iaddy(23) = 1
+  iaddz(23) = 1
+
+  iaddx(24) = 1
+  iaddy(24) = 2
+  iaddz(24) = 1
+
+  iaddx(25) = 0
+  iaddy(25) = 1
+  iaddz(25) = 1
+
+  iaddx(26) = 1
+  iaddy(26) = 1
+  iaddz(26) = 2
+
+! center node (barycenter of the eight corners)
+
+  iaddx(27) = 1
+  iaddy(27) = 1
+  iaddz(27) = 1
+
+  endif
+
   end subroutine usual_hex_nodes
 
   subroutine unusual_hex_nodes1(iaddx,iaddy,iaddz)

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/PML_init.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/PML_init.f90	2012-08-20 16:31:35 UTC (rev 20606)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/PML_init.f90	2012-08-20 16:41:27 UTC (rev 20607)
@@ -317,6 +317,11 @@
   integer,dimension(3,NGNOD),parameter :: ielem_corner_ijk = &
        reshape((/ 1,1,1, 1,NGLLY,1, 1,NGLLY,NGLLZ, 1,1,NGLLZ, &
               NGLLX,1,1, NGLLX,NGLLY,1, NGLLX,NGLLY,NGLLZ, NGLLX,1,NGLLZ /),(/3,NGNOD/))
+
+!! DK DK August 2012: added this when I added support for 27-node elements in the rest of the code
+  if(NGNOD /= 8) &
+    stop 'the preliminary PML detection code of Daniel Peter currently works for 8-node bricks only; should be made more general'
+
   ! temporary arrays
   allocate(temp_is_pml_elem(NSPEC_AB), &
           temp_ispec_pml_normal(NDIM,NSPEC_AB),stat=ier)



More information about the CIG-COMMITS mailing list