[cig-commits] r19727 - seismo/2D/SPECFEM2D/trunk/src/shared
dkomati1 at geodynamics.org
dkomati1 at geodynamics.org
Mon Mar 5 14:39:07 PST 2012
Author: dkomati1
Date: 2012-03-05 14:39:06 -0800 (Mon, 05 Mar 2012)
New Revision: 19727
Modified:
seismo/2D/SPECFEM2D/trunk/src/shared/check_quality_external_mesh.f90
Log:
fixed a small bug when calling the routine to compute the shape functions
Modified: seismo/2D/SPECFEM2D/trunk/src/shared/check_quality_external_mesh.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/shared/check_quality_external_mesh.f90 2012-03-05 19:57:55 UTC (rev 19726)
+++ seismo/2D/SPECFEM2D/trunk/src/shared/check_quality_external_mesh.f90 2012-03-05 22:39:06 UTC (rev 19727)
@@ -221,9 +221,6 @@
print *,'start checking if any element with a negative Jacobian is found'
-! create the 2D shape functions and the Jacobian
- call define_shape_functions(shape2D,dershape2D,xi,gamma,ngnod)
-
do i = 1,NSPEC
! compute jacobian matrix
@@ -236,6 +233,25 @@
xelm = x(ibool(ia,i))
zelm = y(ibool(ia,i))
+! create the 2D shape functions
+ if(ia == 1) then
+ xi = -1.d0
+ gamma = -1.d0
+ else if(ia == 2) then
+ xi = +1.d0
+ gamma = -1.d0
+ else if(ia == 3) then
+ xi = +1.d0
+ gamma = +1.d0
+ else if(ia == 4) then
+ xi = -1.d0
+ gamma = +1.d0
+ else
+ stop 'ia must be between 1 and NGNOD = 4'
+ endif
+
+ call define_shape_functions(shape2D,dershape2D,xi,gamma,ngnod)
+
xxi = xxi + dershape2D(1,ia)*xelm
zxi = zxi + dershape2D(1,ia)*zelm
xgamma = xgamma + dershape2D(2,ia)*xelm
More information about the CIG-COMMITS
mailing list