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

walter at geodynamics.org walter at geodynamics.org
Wed Oct 11 13:47:23 PDT 2006


Author: walter
Date: 2006-10-11 13:47:20 -0700 (Wed, 11 Oct 2006)
New Revision: 4856

Modified:
   long/3D/Gale/trunk/src/StGermain/
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/ElementLayout.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/ElementLayout.h
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/HexaEL.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/HexaEL.h
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/MeshClass.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testHexaEL.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testParallelPipedHexaEL.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testParallelPipedQuadEL.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testQuadEL.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/ElementCellLayout.c
Log:
 r2913 at earth:  boo | 2006-10-11 13:42:40 -0700
  r2829 at earth (orig r3817):  LukeHodkinson | 2006-09-26 23:55:42 -0700
  Modified the 'element with point' routine to improve
  parallel performance.
  
 



Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
   - 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2912
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3816
   + 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2913
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3817

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/ElementLayout.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/ElementLayout.c	2006-10-11 20:47:18 UTC (rev 4855)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/ElementLayout.c	2006-10-11 20:47:20 UTC (rev 4856)
@@ -236,11 +236,11 @@
 	self->edgeAt( self, index, edge );
 }
 
-Element_GlobalIndex ElementLayout_ElementWithPoint( void* elementLayout, void* decomp, Coord point,
+Element_GlobalIndex ElementLayout_ElementWithPoint( void* elementLayout, void* decomp, Coord point, void* mesh, 
 						    PartitionBoundaryStatus boundaryStatus, unsigned nHints, unsigned* hints ) {
 	ElementLayout* self = (ElementLayout*)elementLayout;
 
-	return self->elementWithPoint( self, decomp, point, boundaryStatus, nHints, hints );
+	return self->elementWithPoint( self, decomp, point, mesh, boundaryStatus, nHints, hints );
 }
 
 Bool ElementLayout_GetStaticMinAndMaxLocalCoords( void* elementLayout, Coord min, Coord max ) {

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/ElementLayout.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/ElementLayout.h	2006-10-11 20:47:18 UTC (rev 4855)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/ElementLayout.h	2006-10-11 20:47:20 UTC (rev 4856)
@@ -51,7 +51,7 @@
 	
 	typedef void			(ElementLayout_EdgeAtFunction)				( void* elementLayout, Index index, Edge edge );
 	typedef Element_GlobalIndex     (ElementLayout_ElementWithPointFunction)		( void* elementLayout,
-												  void* meshDecomp, Coord point, PartitionBoundaryStatus boundaryStatus, unsigned nHints, unsigned* hints );
+												  void* meshDecomp, Coord point, void* mesh, PartitionBoundaryStatus boundaryStatus, unsigned nHints, unsigned* hints );
 	typedef Bool			(ElementLayout_GetStaticMinAndMaxLocalCoordsFunction)	( void* elementLayout, Coord min, Coord max );
 	typedef Bool			(ElementLayout_GetStaticMinAndMaxGlobalCoordsFunction)	( void* elementLayout, Coord min, Coord max );
 		
@@ -161,7 +161,7 @@
 	void ElementLayout_BuildCornerElements( void* elementLayout, Index corner, Element_GlobalIndex* elements ) ;
 	void ElementLayout_BuildEdgeIndices( void* elementLayout, Element_GlobalIndex globalIndex, Index* edges ) ;
 	void ElementLayout_EdgeAt( void* elementLayout, Index index, Edge edge ) ;
-	Element_GlobalIndex ElementLayout_ElementWithPoint( void* elementLayout, void* decomp, Coord point,
+	Element_GlobalIndex ElementLayout_ElementWithPoint( void* elementLayout, void* decomp, Coord point, void* mesh, 
 							    PartitionBoundaryStatus boundaryStatus, unsigned nHints, unsigned* hints ) ;
 	Bool ElementLayout_GetStaticMinAndMaxLocalCoords( void* elementLayout, Coord min, Coord max );
 	Bool _ElementLayout_GetStaticMinAndMaxLocalCoords( void* elementLayout, Coord min, Coord max );

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/HexaEL.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/HexaEL.c	2006-10-11 20:47:18 UTC (rev 4855)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/HexaEL.c	2006-10-11 20:47:20 UTC (rev 4856)
@@ -701,14 +701,14 @@
 	}
 }
 
-Element_DomainIndex _HexaEL_ElementWithPoint( void* hexaEL, void* decomp, Coord point,
+Element_DomainIndex _HexaEL_ElementWithPoint( void* hexaEL, void* decomp, Coord point, void* mesh, 
 					      PartitionBoundaryStatus boundaryStatus, unsigned nHints, unsigned* hints )
 {		
 	HexaEL*			self = (HexaEL*)hexaEL;
 
 	self->elementWithPoint = ( self->dim == 2 ? _HexaEL_ElementWithPoint2D : _HexaEL_ElementWithPoint3D );
 
-	return ElementLayout_ElementWithPoint( self, decomp, point, boundaryStatus, nHints, hints );
+	return ElementLayout_ElementWithPoint( self, decomp, point, mesh, boundaryStatus, nHints, hints );
 }
 
 
@@ -865,12 +865,17 @@
 Bool _HexaEL_FindTetBarycenter( const Coord crds[8], const Coord pnt, double* bcs, unsigned* dstInds, 
 				PartitionBoundaryStatus bndStatus, MeshTopology* topo, unsigned gElInd )
 {
-	const unsigned	nTets = 5;
-	const unsigned	inds[5][4] = {{0, 1, 2, 4}, 
-				      {1, 2, 3, 7}, 
-				      {1, 4, 5, 7}, 
-				      {2, 4, 6, 7}, 
-				      {1, 2, 4, 7}};
+	const unsigned	nTets = 10;
+	const unsigned	inds[10][4] = {{0, 1, 2, 4}, 
+				       {1, 2, 3, 7}, 
+				       {1, 4, 5, 7}, 
+				       {2, 4, 6, 7}, 
+				       {1, 2, 4, 7}, 
+				       {0, 1, 3, 5}, 
+				       {0, 4, 5, 6}, 
+				       {0, 2, 3, 6}, 
+				       {3, 5, 6, 7}, 
+				       {0, 3, 5, 6}};
 	Coord		tet[4];
 	int		tet_i;
 
@@ -927,6 +932,26 @@
 								decomp = topo->domains[MT_EDGE]->decomp;
 								telInd = topo->incEls[MT_VOLUME][MT_EDGE][dElInd][3];
 							}
+							else if( tet_i == 4 ) {
+								decomp = topo->domains[MT_FACE]->decomp;
+								telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][1];
+							}
+							else if( tet_i == 5 ) {
+								decomp = topo->domains[MT_FACE]->decomp;
+								telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][5];
+							}
+							else if( tet_i == 6 ) {
+								decomp = topo->domains[MT_FACE]->decomp;
+								telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][1];
+							}
+							else if( tet_i == 7 ) {
+								decomp = topo->domains[MT_FACE]->decomp;
+								telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][3];
+							}
+							else if( tet_i == 8 ) {
+								decomp = topo->domains[MT_EDGE]->decomp;
+								telInd = topo->incEls[MT_VOLUME][MT_EDGE][dElInd][3];
+							}
 							else {
 								decomp = topo->domains[MT_FACE]->decomp;
 								telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][1];
@@ -955,6 +980,26 @@
 								decomp = topo->domains[MT_FACE]->decomp;
 								telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][1];
 							}
+							else if( tet_i == 4 ) {
+								decomp = topo->domains[MT_FACE]->decomp;
+								telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][3];
+							}
+							else if( tet_i == 5 ) {
+								decomp = topo->domains[MT_EDGE]->decomp;
+								telInd = topo->incEls[MT_VOLUME][MT_EDGE][dElInd][9];
+							}
+							else if( tet_i == 6 ) {
+								decomp = topo->domains[MT_EDGE]->decomp;
+								telInd = topo->incEls[MT_VOLUME][MT_EDGE][dElInd][6];
+							}
+							else if( tet_i == 7 ) {
+								decomp = topo->domains[MT_EDGE]->decomp;
+								telInd = topo->incEls[MT_VOLUME][MT_EDGE][dElInd][10];
+							}
+							else if( tet_i == 8 ) {
+								decomp = topo->domains[MT_EDGE]->decomp;
+								telInd = topo->incEls[MT_VOLUME][MT_EDGE][dElInd][7];
+							}
 							else {
 								decomp = topo->domains[MT_FACE]->decomp;
 								telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][3];
@@ -978,10 +1023,30 @@
 							decomp = topo->domains[MT_EDGE]->decomp;
 							telInd = topo->incEls[MT_VOLUME][MT_EDGE][dElInd][6];
 						}
-						else {
+						else if( tet_i == 4 ) {
 							decomp = topo->domains[MT_FACE]->decomp;
 							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][4];
 						}
+						else if( tet_i == 5 ) {
+							decomp = topo->domains[MT_EDGE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_EDGE][dElInd][5];
+						}
+						else if( tet_i == 6 ) {
+							decomp = topo->domains[MT_EDGE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_EDGE][dElInd][2];
+						}
+						else if( tet_i == 7 ) {
+							decomp = topo->domains[MT_EDGE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_EDGE][dElInd][1];
+						}
+						else if( tet_i == 8 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][1];
+						}
+						else {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][5];
+						}
 					}
 					else {
 						if( tet_i == 0 )
@@ -998,6 +1063,24 @@
 							decomp = topo->domains[MT_FACE]->decomp;
 							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][1];
 						}
+						else if( tet_i == 4 )
+							return True;
+						else if( tet_i == 5 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][5];
+						}
+						else if( tet_i == 6 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][1];
+						}
+						else if( tet_i == 7 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][3];
+						}
+						else if( tet_i == 8 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][1];
+						}
 						else
 							return True;
 					}
@@ -1027,10 +1110,30 @@
 								decomp = topo->domains[MT_FACE]->decomp;
 								telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][3];
 							}
-							else {
+							else if( tet_i == 4 ) {
 								decomp = topo->domains[MT_FACE]->decomp;
 								telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][5];
 							}
+							else if( tet_i == 5 ) {
+								decomp = topo->domains[MT_FACE]->decomp;
+								telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][2];
+							}
+							else if( tet_i == 6 ) {
+								decomp = topo->domains[MT_FACE]->decomp;
+								telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][4];
+							}
+							else if( tet_i == 7 ) {
+								decomp = topo->domains[MT_FACE]->decomp;
+								telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][4];
+							}
+							else if( tet_i == 8 ) {
+								decomp = topo->domains[MT_EDGE]->decomp;
+								telInd = topo->incEls[MT_VOLUME][MT_EDGE][dElInd][7];
+							}
+							else {
+								decomp = topo->domains[MT_FACE]->decomp;
+								telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][4];
+							}
 						}
 					}
 					else if( bcs[3] == 0.0 || bcs[3] == -0.0 ) {
@@ -1050,6 +1153,26 @@
 							decomp = topo->domains[MT_EDGE]->decomp;
 							telInd = topo->incEls[MT_VOLUME][MT_EDGE][dElInd][10];
 						}
+						else if( tet_i == 4 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][2];
+						}
+						else if( tet_i == 5 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][0];
+						}
+						else if( tet_i == 6 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][2];
+						}
+						else if( tet_i == 7 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][0];
+						}
+						else if( tet_i == 8 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][3];
+						}
 						else {
 							decomp = topo->domains[MT_FACE]->decomp;
 							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][2];
@@ -1072,6 +1195,18 @@
 							decomp = topo->domains[MT_FACE]->decomp;
 							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][3];
 						}
+						else if( tet_i == 4 )
+							return True;
+						else if( tet_i == 5 )
+							return True;
+						else if( tet_i == 6 )
+							return True;
+						else if( tet_i == 7 )
+							return True;
+						else if( tet_i == 8 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][3];
+						}
 						else
 							return True;
 					}
@@ -1096,6 +1231,26 @@
 							decomp = topo->domains[MT_FACE]->decomp;
 							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][4];
 						}
+						else if( tet_i == 4 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][0];
+						}
+						else if( tet_i == 5 ) {
+							decomp = topo->domains[MT_EDGE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_EDGE][dElInd][0];
+						}
+						else if( tet_i == 6 ) {
+							decomp = topo->domains[MT_EDGE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_EDGE][dElInd][8];
+						}
+						else if( tet_i == 7 ) {
+							decomp = topo->domains[MT_EDGE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_EDGE][dElInd][4];
+						}
+						else if( tet_i == 8 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][5];
+						}
 						else {
 							decomp = topo->domains[MT_FACE]->decomp;
 							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][0];
@@ -1112,6 +1267,24 @@
 							return True;
 						else if( tet_i == 3 )
 							return True;
+						else if( tet_i == 4 )
+							return True;
+						else if( tet_i == 5 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][2];
+						}
+						else if( tet_i == 6 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][4];
+						}
+						else if( tet_i == 7 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][4];
+						}
+						else if( tet_i == 8 ) {
+							decomp = topo->domains[MT_FACE]->decomp;
+							telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][5];
+						}
 						else
 							return True;
 					}
@@ -1135,6 +1308,22 @@
 						decomp = topo->domains[MT_FACE]->decomp;
 						telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][4];
 					}
+					else if( tet_i == 4 )
+						return True;
+					else if( tet_i == 5 ) {
+						decomp = topo->domains[MT_FACE]->decomp;
+						telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][0];
+					}
+					else if( tet_i == 6 ) {
+						decomp = topo->domains[MT_FACE]->decomp;
+						telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][2];
+					}
+					else if( tet_i == 7 ) {
+						decomp = topo->domains[MT_FACE]->decomp;
+						telInd = topo->incEls[MT_VOLUME][MT_FACE][dElInd][0];
+					}
+					else if( tet_i == 8 )
+						return True;
 					else
 						return True;
 
@@ -1150,12 +1339,13 @@
 }
 
 
-Element_DomainIndex _HexaEL_ElementWithPoint2D( void* hexaEL, void* _decomp, Coord point, 
+Element_DomainIndex _HexaEL_ElementWithPoint2D( void* hexaEL, void* _decomp, Coord point, void* _mesh, 
 						PartitionBoundaryStatus boundaryStatus, unsigned nHints, unsigned* hints )
 {
 	HexaEL*		self = (HexaEL*)hexaEL;
 	HexaMD*		decomp = (HexaMD*)_decomp;
 	Geometry*       geometry = self->geometry;
+	Mesh*		mesh = (Mesh*)_mesh;
 	IJK		ij;
 	Coord		crds[4];
 	unsigned	inds[3];
@@ -1171,7 +1361,10 @@
 		}
 
 		/* Convert global point to 2D. */
-		elInd = decomp->elementMapDomainToGlobal( decomp, elInd );
+		if( mesh )
+			elInd = Mesh_ElementMapDomainToGlobal( mesh, elInd );
+		else
+			elInd = decomp->elementMapDomainToGlobal( decomp, elInd );
 		HEL_E_1DTo2D( self, elInd, ij );
 
 		/* Collect points. */
@@ -1198,38 +1391,13 @@
 }
 
 
-#if 0
-Element_DomainIndex _HexaEL_ElementWithPoint2D( void* hexaEL, void* decomp, Coord point,
-						PartitionBoundaryStatus boundaryStatus )
-{
-	HexaEL*			self = (HexaEL*)hexaEL;
-	HexaMD*			hexaDecomp = (HexaMD*) decomp;
-	Element_GlobalIndex     e_I;
-	Stg_Line			lines[4];
-	
-	for( e_I = 0; e_I < hexaDecomp->elementDomainCount; e_I++ ) {
-		Index i;
-		
-		_HexaEL_BuildElementLines( self, e_I, lines );
-		
-		for( i = 0; i < 4; i++ )
-			if( !Stg_Line_PointIsInside( lines[i], point ) )
-				break;
-		
-		if( i == 4 )
-			return e_I;
-	}
-	
-	return hexaDecomp->elementDomainCount;
-}
-#endif
-
-Element_DomainIndex _HexaEL_ElementWithPoint3D( void* hexaEL, void* _decomp, Coord point, 
+Element_DomainIndex _HexaEL_ElementWithPoint3D( void* hexaEL, void* _decomp, Coord point, void* _mesh, 
 						PartitionBoundaryStatus boundaryStatus, unsigned nHints, unsigned* hints )
 {
 	HexaEL*		self = (HexaEL*)hexaEL;
 	HexaMD*		decomp = (HexaMD*)_decomp;
 	Geometry*       geometry = self->geometry;
+	Mesh*		mesh = (Mesh*)_mesh;
 	IJK		ijk;
 	Coord		crds[8];
 	unsigned	inds[4];
@@ -1245,7 +1413,10 @@
 			continue;
 
 		/* Convert global point to 3D. */
-		elInd = decomp->elementMapDomainToGlobal( decomp, elInd );
+		if( mesh )
+			elInd = Mesh_ElementMapDomainToGlobal( mesh, elInd );
+		else
+			elInd = decomp->elementMapDomainToGlobal( decomp, elInd );
 		HEL_E_1DTo3D( self, elInd, ijk );
 
 		/* Collect the coordinates. */

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/HexaEL.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/HexaEL.h	2006-10-11 20:47:18 UTC (rev 4855)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/HexaEL.h	2006-10-11 20:47:20 UTC (rev 4856)
@@ -172,11 +172,11 @@
 	
 	/** TODO: not sure how these functions handle points on the upper border. Have to test.
 		PatrickSunter, 7 Mar 2006 */
-	Element_GlobalIndex _HexaEL_ElementWithPoint( void* hexaEL, void* decomp, Coord point, 
+	Element_GlobalIndex _HexaEL_ElementWithPoint( void* hexaEL, void* decomp, Coord point, void* mesh, 
 						      PartitionBoundaryStatus boundaryStatus, unsigned nHints, unsigned* hints );
-	Element_DomainIndex _HexaEL_ElementWithPoint2D( void* hexaEL, void* decomp, Coord point,
+	Element_DomainIndex _HexaEL_ElementWithPoint2D( void* hexaEL, void* decomp, Coord point, void* mesh, 
 							PartitionBoundaryStatus boundaryStatus, unsigned nHints, unsigned* hints );
-	Element_DomainIndex _HexaEL_ElementWithPoint3D( void* hexaEL, void* decomp, Coord point,
+	Element_DomainIndex _HexaEL_ElementWithPoint3D( void* hexaEL, void* decomp, Coord point, void* mesh, 
 							PartitionBoundaryStatus boundaryStatus, unsigned nHints, unsigned* hints );
 	
 	

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/MeshClass.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/MeshClass.c	2006-10-11 20:47:18 UTC (rev 4855)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/MeshClass.c	2006-10-11 20:47:20 UTC (rev 4856)
@@ -1731,22 +1731,22 @@
 
 	/* If using ParallelPipedHexaEL, just run it as it's bloody quick. */
 	if( eLyt->type == ParallelPipedHexaEL_Type )
-		return eLyt->elementWithPoint( eLyt, self->layout->decomp, pnt, bndStat, 0, NULL );
+		return eLyt->elementWithPoint( eLyt, self->layout->decomp, pnt, self, bndStat, 0, NULL );
 	else if( self->nodeNeighbourTbl ) {
 		unsigned	closeNode;
 		unsigned	elInd;
 
 		/* If node neighbour table is built, use it to speed things up. */
 		closeNode = Mesh_ClosestNode( self, pnt );
-		elInd = eLyt->elementWithPoint( eLyt, self->layout->decomp, pnt, bndStat, 
+		elInd = eLyt->elementWithPoint( eLyt, self->layout->decomp, pnt, self, bndStat, 
 						self->nodeElementCountTbl[closeNode], self->nodeElementTbl[closeNode] );
 		if( elInd >= self->elementDomainCount )
-			elInd = eLyt->elementWithPoint( eLyt, self->layout->decomp, pnt, bndStat, 0, NULL );
+			elInd = eLyt->elementWithPoint( eLyt, self->layout->decomp, pnt, self, bndStat, 0, NULL );
 
 		return elInd;
 	}
 	else
-		return eLyt->elementWithPoint( eLyt, self->layout->decomp, pnt, bndStat, 0, NULL );
+		return eLyt->elementWithPoint( eLyt, self->layout->decomp, pnt, self, bndStat, 0, NULL );
 }
 
 

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testHexaEL.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testHexaEL.c	2006-10-11 20:47:18 UTC (rev 4855)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testHexaEL.c	2006-10-11 20:47:20 UTC (rev 4856)
@@ -114,7 +114,7 @@
 		point[1] += 0.1;
 		point[2] += 0.1;
 		
-		printf( "\tPoint %u : %u\n", i, eLayout->elementWithPoint( eLayout, meshDecomp, point,
+		printf( "\tPoint %u : %u\n", i, eLayout->elementWithPoint( eLayout, meshDecomp, point, NULL, 
 									   EXCLUSIVE_UPPER_BOUNDARY, 0, NULL ) );
 	}
 	printf( "\n" );

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testParallelPipedHexaEL.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testParallelPipedHexaEL.c	2006-10-11 20:47:18 UTC (rev 4855)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testParallelPipedHexaEL.c	2006-10-11 20:47:20 UTC (rev 4856)
@@ -96,9 +96,9 @@
 
 		if (rank == procToWatch) {
 			printf( "\tNode %u (%0.2f,%0.2f,%0.2f):\n", i, point[0], point[1], point[2] );
-			excEl = eLayout->elementWithPoint( eLayout, meshDecomp, point,
+			excEl = eLayout->elementWithPoint( eLayout, meshDecomp, point, NULL, 
 							   EXCLUSIVE_UPPER_BOUNDARY, 0, NULL );
-			incEl = eLayout->elementWithPoint( eLayout, meshDecomp, point,
+			incEl = eLayout->elementWithPoint( eLayout, meshDecomp, point, NULL, 
 							   INCLUSIVE_UPPER_BOUNDARY, 0, NULL );
 			printf( "\t\tIncl %4u, Excl %4u\n", incEl, excEl );		
 		}
@@ -109,9 +109,9 @@
 		
 		if (rank == procToWatch) {
 			printf( "\tTest point %u (%0.2f,%0.2f,%0.2f):\n", i, point[0], point[1], point[2] );
-			excEl = eLayout->elementWithPoint( eLayout, meshDecomp, point,
+			excEl = eLayout->elementWithPoint( eLayout, meshDecomp, point, NULL, 
 							   EXCLUSIVE_UPPER_BOUNDARY, 0, NULL );
-			incEl = eLayout->elementWithPoint( eLayout, meshDecomp, point,
+			incEl = eLayout->elementWithPoint( eLayout, meshDecomp, point, NULL, 
 							   INCLUSIVE_UPPER_BOUNDARY, 0, NULL );
 			printf( "\t\tIncl %4u, Excl %4u\n", incEl, excEl );		
 		}

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testParallelPipedQuadEL.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testParallelPipedQuadEL.c	2006-10-11 20:47:18 UTC (rev 4855)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testParallelPipedQuadEL.c	2006-10-11 20:47:20 UTC (rev 4856)
@@ -95,9 +95,9 @@
 
 		if (rank == procToWatch) {
 			printf( "\tNode %u (%0.2f,%0.2f):\n", i, point[0], point[1] );
-			excEl = eLayout->elementWithPoint( eLayout, meshDecomp, point,
+			excEl = eLayout->elementWithPoint( eLayout, meshDecomp, point, NULL, 
 							   EXCLUSIVE_UPPER_BOUNDARY, 0, NULL );
-			incEl = eLayout->elementWithPoint( eLayout, meshDecomp, point,
+			incEl = eLayout->elementWithPoint( eLayout, meshDecomp, point, NULL, 
 							   INCLUSIVE_UPPER_BOUNDARY, 0, NULL );
 			printf( "\t\tIncl %4u, Excl %4u\n", incEl, excEl );
 		}
@@ -108,9 +108,9 @@
 		
 		if (rank == procToWatch) {
 			printf( "\tTest Point %u (%0.2f,%0.2f):\n", i, point[0], point[1] );
-			excEl = eLayout->elementWithPoint( eLayout, meshDecomp, point,
+			excEl = eLayout->elementWithPoint( eLayout, meshDecomp, point, NULL, 
 							   EXCLUSIVE_UPPER_BOUNDARY, 0, NULL );
-			incEl = eLayout->elementWithPoint( eLayout, meshDecomp, point,
+			incEl = eLayout->elementWithPoint( eLayout, meshDecomp, point, NULL, 
 							   INCLUSIVE_UPPER_BOUNDARY, 0, NULL );
 			printf( "\t\tIncl %4u, Excl %4u\n", incEl, excEl );
 		}

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testQuadEL.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testQuadEL.c	2006-10-11 20:47:18 UTC (rev 4855)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/tests/testQuadEL.c	2006-10-11 20:47:20 UTC (rev 4856)
@@ -114,7 +114,7 @@
 		point[1] += 0.1;
 		point[2] += 0.1;
 		
-		printf( "\tPoint %u : %u\n", i, eLayout->elementWithPoint( eLayout, meshDecomp, point,
+		printf( "\tPoint %u : %u\n", i, eLayout->elementWithPoint( eLayout, meshDecomp, point, NULL, 
 									   EXCLUSIVE_UPPER_BOUNDARY, 0, NULL ) );
 	}
 	printf( "\n" );

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/ElementCellLayout.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/ElementCellLayout.c	2006-10-11 20:47:18 UTC (rev 4855)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/ElementCellLayout.c	2006-10-11 20:47:20 UTC (rev 4856)
@@ -335,14 +335,15 @@
 		unsigned	elInd = particle->owningCell;
 
 		/* Check current cell. */
-		element_I = eLayout->elementWithPoint( eLayout, self->mesh->layout->decomp, particle->coord,
+		element_I = eLayout->elementWithPoint( eLayout, self->mesh->layout->decomp, particle->coord, self->mesh, 
 						       EXCLUSIVE_UPPER_BOUNDARY, 
 						       1, &elInd );
 
 		if( element_I >= mesh->layout->decomp->elementDomainCount ) {
 			/* Check neighbours. */
 			if( mesh->elementNeighbourCountTbl && mesh->elementNeighbourTbl ) {
-				element_I = eLayout->elementWithPoint( eLayout, self->mesh->layout->decomp, particle->coord,
+				element_I = eLayout->elementWithPoint( eLayout, self->mesh->layout->decomp, particle->coord, 
+								       self->mesh, 
 								       EXCLUSIVE_UPPER_BOUNDARY, 
 								       mesh->elementNeighbourCountTbl[elInd], 
 								       mesh->elementNeighbourTbl[elInd] );
@@ -378,7 +379,7 @@
 		unsigned	elInd = particle->owningCell;
 
 		/* Check current cell. */
-		element_I = eLayout->elementWithPoint( eLayout, self->mesh->layout->decomp, particle->coord,
+		element_I = eLayout->elementWithPoint( eLayout, self->mesh->layout->decomp, particle->coord, self->mesh, 
 						       EXCLUSIVE_UPPER_BOUNDARY, 
 						       1, &elInd );
 
@@ -386,6 +387,7 @@
 			/* Check neighbours. */
 			if( mesh->elementNeighbourCountTbl && mesh->elementNeighbourTbl ) {
 				element_I = eLayout->elementWithPoint( eLayout, self->mesh->layout->decomp, particle->coord,
+								       self->mesh, 
 								       EXCLUSIVE_UPPER_BOUNDARY, 
 								       mesh->elementNeighbourCountTbl[elInd], 
 								       mesh->elementNeighbourTbl[elInd] );



More information about the cig-commits mailing list