[cig-commits] r5671 - in long/3D/Gale/trunk/src/StGermain: . Discretisation/Mesh/src

walter at geodynamics.org walter at geodynamics.org
Fri Jan 5 11:36:39 PST 2007


Author: walter
Date: 2007-01-05 11:36:38 -0800 (Fri, 05 Jan 2007)
New Revision: 5671

Modified:
   long/3D/Gale/trunk/src/StGermain/
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_Algorithms.c
Log:
 r3242 at earth (orig r3944):  LukeHodkinson | 2007-01-04 20:18:49 -0800
 Simplified one of the 'point-in-element' routines;
 the old version was breaking under certain conditions.
 
 



Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
   - 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:3196
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/branches/decomp3d/StGermain:3938
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3899
   + 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:3196
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/branches/decomp3d/StGermain:3944
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3899

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_Algorithms.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_Algorithms.c	2007-01-05 19:36:36 UTC (rev 5670)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_Algorithms.c	2007-01-05 19:36:38 UTC (rev 5671)
@@ -220,36 +220,14 @@
 
 			nLocalEls = Mesh_GetLocalSize( mesh, nDims );
 			Mesh_GetIncidence( mesh, dim, ind, nDims, &nInc, &inc );
-
-			lowest = (unsigned)-1;
-			if( ind < Mesh_GetLocalSize( mesh, dim ) ) {
-				/* Find the local element with lowest global index. */
-				for( inc_i = 0; inc_i < nInc; inc_i++ ) {
-					if( inc[inc_i] < nLocalEls ) {
-						global = Mesh_DomainToGlobal( mesh, nDims, inc[inc_i] );
-						if( global < lowest )
-							lowest = global;
-					}
-				}
+			assert( nInc );
+			lowest = Mesh_DomainToGlobal( mesh, nDims, inc[0] );
+			for( inc_i = 1; inc_i < nInc; inc_i++ ) {
+				global = Mesh_DomainToGlobal( mesh, nDims, inc[inc_i] );
+				if( global < lowest )
+					lowest = global;
 			}
-			else {
-				unsigned	owner;
 
-				owner = Mesh_GetOwner( mesh, dim, ind - Mesh_GetLocalSize( mesh, dim ) );
-
-				/* Find a shadow element owned by the other owner. */
-				for( inc_i = 0; inc_i < nInc; inc_i++ ) {
-					if( inc[inc_i] >= nLocalEls && 
-					    Mesh_GetOwner( mesh, nDims, inc[inc_i] - nLocalEls ) == owner )
-					{
-						global = Mesh_DomainToGlobal( mesh, nDims, inc[inc_i] );
-						if( global < lowest )
-							lowest = global;
-					}
-				}
-			}
-
-			assert( lowest != (unsigned)-1 );
 			insist( Mesh_GlobalToDomain( mesh, nDims, lowest, elInd) );
 		}
 		else



More information about the cig-commits mailing list