[cig-commits] commit:

Mercurial hg at geodynamics.org
Mon Nov 24 11:58:12 PST 2008


changeset:   9:00d2af329023
user:        LukeHodkinson
date:        Fri Nov 30 01:05:32 2007 +0000
files:       Mesh/src/Mesh.h Mesh/src/Mesh_Algorithms.c Mesh/src/Mesh_Algorithms.h Mesh/src/SpatialTree.c Mesh/src/SpatialTree.def Mesh/src/SpatialTree.h Mesh/src/makefile Mesh/src/types.h Mesh/tests/makefile Mesh/tests/testMesh.c
description:
Adding a new class to assist in searching for
elements owning a point in space.  It essentially
builds a hierarchy similar to a quad/octree, the
leaf nodes storing a small set of elements to
search.


diff -r 296e47e15b3a -r 00d2af329023 Mesh/src/Mesh.h
--- a/Mesh/src/Mesh.h	Thu Nov 08 12:12:13 2007 +0000
+++ b/Mesh/src/Mesh.h	Fri Nov 30 01:05:32 2007 +0000
@@ -68,6 +68,7 @@
 #include "SurfaceAdaptor.h"
 #include "CompressionAdaptor.h"
 #include "MeshVariable.h"
+#include "SpatialTree.h"
 
 #include "Init.h"
 #include "Finalise.h"
diff -r 296e47e15b3a -r 00d2af329023 Mesh/src/Mesh_Algorithms.c
--- a/Mesh/src/Mesh_Algorithms.c	Thu Nov 08 12:12:13 2007 +0000
+++ b/Mesh/src/Mesh_Algorithms.c	Fri Nov 30 01:05:32 2007 +0000
@@ -100,6 +100,8 @@ void _Mesh_Algorithms_Init( Mesh_Algorit
 	self->nearestVertex = NULL;
 	self->search = NULL;
 	self->mesh = NULL;
+	self->tree = NULL;
+	MPI_Comm_rank( MPI_COMM_WORLD, &self->rank );
 	self->incArray = IArray_New();
 }
 
@@ -155,13 +157,20 @@ void _Mesh_Algorithms_SetMesh( void* alg
 
 void _Mesh_Algorithms_Update( void* algorithms ) {
 	Mesh_Algorithms*	self = (Mesh_Algorithms*)algorithms;
-	unsigned		nDims;
-	unsigned		d_i;
-
-	assert( self );
-
-	if( !self->mesh )
-		return;
+
+	assert( self );
+
+	if( !self->mesh ) {
+	   if( self->tree )
+	      SpatialTree_Clear( self->tree );
+	   return;
+	}
+
+	if( !self->tree )
+	   self->tree = SpatialTree_New();
+	SpatialTree_SetMesh( self->tree, self->mesh );
+	SpatialTree_Rebuild( self->tree );
+	self->search = Mesh_Algorithms_SearchWithTree;
 
 	if( !Class_IsSuper( self->mesh->topo, IGraph ) || 
 	    Mesh_HasIncidence( self->mesh, MT_VERTEX, MT_VERTEX ) )
@@ -171,6 +180,7 @@ void _Mesh_Algorithms_Update( void* algo
 	else
 		self->nearestVertex = Mesh_Algorithms_NearestVertexGeneral;
 
+#if 0
 	nDims = Mesh_GetDimSize( self->mesh );
 	for( d_i = 0; d_i < nDims; d_i++ ) {
 	   if( Class_IsSuper( self->mesh->topo, IGraph ) &&
@@ -185,6 +195,7 @@ void _Mesh_Algorithms_Update( void* algo
 		self->search = Mesh_Algorithms_SearchWithMinIncidence;
 	else
 		self->search = Mesh_Algorithms_SearchGeneral;
+#endif
 }
 
 unsigned _Mesh_Algorithms_NearestVertex( void* algorithms, double* point ) {
@@ -651,6 +662,36 @@ Bool Mesh_Algorithms_SearchGeneral( void
 	return False;
 }
 
+Bool Mesh_Algorithms_SearchWithTree( void* _self, double* pnt, unsigned* el ) {
+   Mesh_Algorithms* self = (Mesh_Algorithms*)_self;
+   int nEls, *els;
+   int curDim, curRank, curEl;
+   int nLocals, owner;
+   int ii;
+
+   curRank = self->rank;
+   nLocals = Mesh_GetLocalSize( self->mesh, Mesh_GetDimSize( self->mesh ) );
+   if( !SpatialTree_Search( self->tree, pnt, &nEls, &els ) )
+      return False;
+
+   for( ii = 0; ii < nEls; ii++ ) {
+      if( Mesh_ElementHasPoint( self->mesh, els[ii], pnt, &curDim, &curEl ) ) {
+	 if( curEl >= nLocals ) {
+	    owner = Mesh_GetOwner( self->mesh, curDim, curEl - nLocals );
+	    if( owner < curRank ) {
+	       curRank = owner;
+	       *el = curEl;
+	    }
+	 }
+	 else if( curRank == self->rank && curEl < *el ) {
+	    *el = curEl;
+	 }
+      }
+   }
+
+   return True;
+}
+
 
 /*----------------------------------------------------------------------------------------------------------------------------------
 ** Private Functions
diff -r 296e47e15b3a -r 00d2af329023 Mesh/src/Mesh_Algorithms.h
--- a/Mesh/src/Mesh_Algorithms.h	Thu Nov 08 12:12:13 2007 +0000
+++ b/Mesh/src/Mesh_Algorithms.h	Fri Nov 30 01:05:32 2007 +0000
@@ -77,6 +77,8 @@
 		Mesh_Algorithms_NearestVertexFunc*	nearestVertex;				\
 		Mesh_Algorithms_SearchFunc*		search;					\
 		Mesh*					mesh;					\
+		SpatialTree*				tree;					\
+		int					rank;					\
 		IArray*					incArray;
 
 	struct Mesh_Algorithms { __Mesh_Algorithms };
@@ -183,6 +185,8 @@
 	Bool Mesh_Algorithms_SearchGeneral( void* algorithms, double* point, 
 					    MeshTopology_Dim* dim, unsigned* ind );
 
+	Bool Mesh_Algorithms_SearchWithTree( void* self, double* pnt, unsigned* el );
+
 	/*--------------------------------------------------------------------------------------------------------------------------
 	** Private Member functions
 	*/
diff -r 296e47e15b3a -r 00d2af329023 Mesh/src/SpatialTree.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Mesh/src/SpatialTree.c	Fri Nov 30 01:05:32 2007 +0000
@@ -0,0 +1,349 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+**
+** Copyright (C), 2003, Victorian Partnership for Advanced Computing (VPAC) Ltd, 
+** 110 Victoria Street, Melbourne, 3053, Australia.
+**
+** Authors:
+**	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+**	Patrick D. Sunter, Software Engineer, VPAC. (pds at vpac.org)
+**	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+**	Siew-Ching Tan, Software Engineer, VPAC. (siew at vpac.org)
+**	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+**	Raquibul Hassan, Computational Engineer, VPAC. (raq at vpac.org)
+**
+**  This library is free software; you can redistribute it and/or
+**  modify it under the terms of the GNU Lesser General Public
+**  License as published by the Free Software Foundation; either
+**  version 2.1 of the License, or (at your option) any later version.
+**
+**  This library is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+**  Lesser General Public License for more details.
+**
+**  You should have received a copy of the GNU Lesser General Public
+**  License along with this library; if not, write to the Free Software
+**  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+**
+** $Id: SpatialTree.c 3952 2007-01-09 06:24:06Z LukeHodkinson $
+**
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <assert.h>
+#include <StGermain/StGermain.h>
+#include "types.h"
+#include "Mesh.h"
+#include "SpatialTree.h"
+#include "StGermain/Base/Foundation/ClassDef.h"
+
+
+#define GETNODECHILDREN( tree, node )		\
+  ((void**)(node))
+
+#define GETNODEORIGIN( tree, node )		\
+   ((double*)((stgByte*)(node) +		\
+	      (tree)->nChld * sizeof(void*)))
+
+#define SETNODEVERTS( tree, node, nVerts, verts )		\
+   ((int*)((stgByte*)(node) + (tree)->nChld * sizeof(void*) +	\
+	   (tree)->nDims * sizeof(double)))[0] = (nVerts);	\
+   ((int**)((stgByte*)(node) + (tree)->nChld * sizeof(void*) +	\
+	    (tree)->nDims * sizeof(double) +			\
+	    sizeof(int)))[0] = (verts)
+
+#define GETNODEVERTARRAY( tree, node )				\
+   ((int**)((stgByte*)(node) + (tree)->nChld * sizeof(void*) +	\
+	    (tree)->nDims * sizeof(double) +			\
+	    sizeof(int)))[0]
+
+#define GETNODENUMVERTS( tree, node )				\
+   ((int*)((stgByte*)(node) + (tree)->nChld * sizeof(void*) +	\
+	   (tree)->nDims * sizeof(double)))[0]
+
+
+void SpatialTree_DestroyNode( SpatialTree* self, void* node );
+void SpatialTree_SplitSet( SpatialTree* self, double* orig,
+			   int nVerts, int* verts, 
+			   int* subSizes, int** subSets,
+			   Bool store );
+void SpatialTree_SplitNode( SpatialTree* self, void* node, void** parent,
+			    double* min, double* max,
+			    int nVerts, int* verts );
+void SpatialTree_BuildElements( SpatialTree* self, int nVerts, int* verts, 
+				int* nEls, int** els );
+void SpatialTree_SearchNode( SpatialTree* self, void* node, 
+			     const double* pnt, int* nEls, int** els );
+
+
+void _SpatialTree_Init( void* _self ) {
+   SpatialTree* self = Class_Cast( _self, SpatialTree );
+
+   _NewClass_Init( self );
+   self->mesh = NULL;
+   self->nDims = 0;
+   self->min = NULL;
+   self->max = NULL;
+   self->root = NULL;
+   self->tol = 10;
+   self->nNodes = 0;
+}
+
+void _SpatialTree_Destruct( void* _self ) {
+   SpatialTree* self = Class_Cast( _self, SpatialTree );
+
+   if( self->root )
+      SpatialTree_DestroyNode( self, self->root );
+   _NewClass_Destruct( self );
+}
+
+void _SpatialTree_Copy( void* _self, const void* _op ) {
+   /*SpatialTree* self = Class_Cast( _self, SpatialTree );*/
+   /*const SpatialTree* op = Class_ConstCast( _op, SpatialTree );*/
+
+   abort();
+}
+
+void SpatialTree_SetMesh( void* _self, void* mesh ) {
+   SpatialTree* self = Class_Cast( _self, SpatialTree );
+
+   SpatialTree_Clear( self );
+   self->mesh = mesh;
+}
+
+void SpatialTree_Rebuild( void* _self ) {
+   SpatialTree* self = Class_Cast( _self, SpatialTree );
+   int nVerts, *verts;
+   int ii;
+
+   if( !self->mesh )
+      return;
+
+   SpatialTree_Clear( self );
+   self->nDims = Mesh_GetDimSize( self->mesh );
+   self->nChld = 2;
+   for( ii = 1; ii < self->nDims; ii++ )
+      self->nChld *= 2;
+
+   self->min = Class_Array( self, double, self->nDims );
+   self->max = Class_Array( self, double, self->nDims );
+
+   Mesh_GetDomainCoordRange( self->mesh, self->min, self->max );
+   nVerts = Mesh_GetDomainSize( self->mesh, 0 );
+   verts = Class_Array( self, int, nVerts );
+   for( ii = 0; ii < nVerts; ii++ )
+      verts[ii] = ii;
+   self->root = Class_Array( self, stgByte, self->nChld * sizeof(void*) + 
+			     self->nDims * sizeof(double) );
+   SpatialTree_SplitNode( self, self->root, &self->root,
+			  self->min, self->max, nVerts, verts );
+}
+
+Bool SpatialTree_Search( void* _self, const double* pnt, int* nEls, int** els ) {
+   SpatialTree* self = Class_Cast( _self, SpatialTree );
+   int ii;
+
+   for( ii = 0; ii < self->nDims; ii++ ) {
+      if( pnt[ii] < self->min[ii] || pnt[ii] > self->max[ii] )
+	 return False;
+   }
+
+   SpatialTree_SearchNode( self, self->root, pnt, nEls, els );
+   return True;
+}
+
+void SpatialTree_Clear( void* _self ) {
+   SpatialTree* self = Class_Cast( _self, SpatialTree );
+
+   if( self->root ) {
+      SpatialTree_DestroyNode( self, self->root );
+      self->root = NULL;
+      self->nNodes = 0;
+   }
+
+
+   Class_Free( self, self->min ); self->min = NULL;
+   Class_Free( self, self->max ); self->max = NULL;
+}
+
+void SpatialTree_SplitNode( SpatialTree* self, void* node, void** parent,
+			    double* min, double* max,
+			    int nVerts, int* verts )
+{
+   int ii;
+
+   for( ii = 0; ii < self->nDims; ii++ )
+      GETNODEORIGIN( self, node )[ii] = min[ii] + (max[ii] - min[ii]) * 0.5;
+
+   if( nVerts <= self->tol ) {
+      int nEls, *els;
+
+      node = (void*)Class_Rearray( self, node, stgByte,
+				   self->nChld * sizeof(void*) + 
+				   self->nDims * sizeof(double) + 
+				   sizeof(int) + sizeof(int*) );
+      *parent = node;
+      memset( node, 0, self->nChld * sizeof(void*) );
+
+      SpatialTree_BuildElements( self, nVerts, verts, 
+				 &nEls, &els );
+      Class_Free( self, verts );
+      SETNODEVERTS( self, node, nEls, els );
+   }
+   else {
+      void *newNode, *newNodePtr;
+      int* subSizes;
+      int** subSets;
+      double *subMin, *subMax;
+      int jj;
+
+      for( ii = 0; ii < self->nChld; ii++ ) {
+	 newNode = Class_Array( self, stgByte, self->nChld * sizeof(void*) + 
+				self->nDims * sizeof(double) );
+	 GETNODECHILDREN( self, node )[ii] = newNode;
+      }
+
+      subSizes = Class_Array( self, int, self->nChld );
+      SpatialTree_SplitSet( self, GETNODEORIGIN( self, node ),
+			    nVerts, verts, subSizes, NULL, False );
+
+      subSets = Class_Array( self, int*, self->nChld );
+      for( ii = 0; ii < self->nChld; ii++ )
+	 subSets[ii] = Class_Array( self, int, subSizes[ii] );
+      SpatialTree_SplitSet( self, GETNODEORIGIN( self, node ),
+			    nVerts, verts, subSizes, subSets, True );
+
+      Class_Free( self, verts );
+
+      subMin = Class_Array( self, double, self->nDims );
+      subMax = Class_Array( self, double, self->nDims );
+
+      for( ii = 0; ii < self->nChld; ii++ ) {
+	 for( jj = 0; jj < self->nDims; jj++ ) {
+	    if( ii & (1 << jj) ) {
+	       subMin[jj] = GETNODEORIGIN( self, node )[jj];
+	       subMax[jj] = max[jj];
+	    }
+	    else {
+	       subMin[jj] = min[jj];
+	       subMax[jj] = GETNODEORIGIN( self, node )[jj];
+	    }
+	 }
+
+	 newNode = GETNODECHILDREN( self, node )[ii];
+	 newNodePtr = GETNODECHILDREN( self, node ) + ii;
+	 SpatialTree_SplitNode( self, newNode, newNodePtr, subMin, subMax,
+				subSizes[ii], subSets[ii] );
+      }
+
+      Class_Free( self, subMin );
+      Class_Free( self, subMax );
+   }
+}
+
+void SpatialTree_SplitSet( SpatialTree* self, double* orig,
+			   int nVerts, int* verts, 
+			   int* subSizes, int** subSets,
+			   Bool store )
+{
+   double* crd;
+   int code;
+   int ii, jj;
+
+   memset( subSizes, 0, self->nChld * sizeof(int) );
+   for( ii = 0; ii < nVerts; ii++ ) {
+      crd = Mesh_GetVertex( self->mesh, verts[ii] );
+      code = 0;
+      for( jj = 0; jj < self->nDims; jj++ ) {
+	 if( crd[jj] > orig[jj] )
+	    code |= 1 << jj;
+      }
+
+      if( store )
+	 subSets[code][subSizes[code]++] = verts[ii];
+      else
+	 subSizes[code]++;
+   }
+}
+
+void SpatialTree_BuildElements( SpatialTree* self, int nVerts, int* verts, 
+				int* nEls, int** els )
+{
+   int maxEls, *curEls;
+   IArray* inc;
+   int nIncEls, *incEls;
+   int ii, jj, kk;
+
+   maxEls = 0;
+   for( ii = 0; ii < nVerts; ii++ )
+      maxEls += Mesh_GetIncidenceSize( self->mesh, 0, verts[ii], self->nDims );
+
+   curEls = Class_Array( self, int, maxEls );
+
+   inc = IArray_New();
+   maxEls = 0;
+   for( ii = 0; ii < nVerts; ii++ ) {
+      Mesh_GetIncidence( self->mesh, 0, verts[ii], self->nDims, inc );
+      nIncEls = IArray_GetSize( inc );
+      incEls = IArray_GetPtr( inc );
+      for( jj = 0; jj < nIncEls; jj++ ) {
+	 for( kk = 0; kk < maxEls; kk++ ) {
+	    if( curEls[kk] == incEls[jj] )
+	       break;
+	 }
+	 if( kk == maxEls )
+	    curEls[maxEls++] = incEls[jj];
+      }
+   }
+   NewClass_Delete( inc );
+
+   *nEls = maxEls;
+   *els = Class_Rearray( self, curEls, int, maxEls );
+}
+
+void SpatialTree_SearchNode( SpatialTree* self, void* node, 
+			     const double* pnt, int* nEls, int** els )
+{
+   if( GETNODECHILDREN( self, node )[0] == NULL ) {
+      *nEls = GETNODENUMVERTS( self, node );
+      *els = GETNODEVERTARRAY( self, node );
+   }
+   else {
+      double* orig;
+      int code;
+      int ii;
+
+      orig = GETNODEORIGIN( self, node );
+      code = 0;
+      for( ii = 0; ii < self->nDims; ii++ ) {
+	 if( pnt[ii] > orig[ii] )
+	    code |= 1 << ii;
+      }
+
+      SpatialTree_SearchNode( self, GETNODECHILDREN( self, node )[code], 
+			      pnt, nEls, els );
+   }
+}
+
+void SpatialTree_DestroyNode( SpatialTree* self, void* node ) {
+   Bool leaf;
+   int ii;
+
+   if( !node )
+      return;
+
+   leaf = True;
+   for( ii = 0; ii < self->nChld; ii++ ) {
+      if( GETNODECHILDREN( self, node )[ii] )
+	 leaf = False;
+      SpatialTree_DestroyNode( self, GETNODECHILDREN( self, node )[ii] );
+   }
+
+   if( leaf ) {
+      Class_Free( self, GETNODEVERTARRAY( self, node ) );
+   }
+
+   Class_Free( self, node );
+}
diff -r 296e47e15b3a -r 00d2af329023 Mesh/src/SpatialTree.def
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Mesh/src/SpatialTree.def	Fri Nov 30 01:05:32 2007 +0000
@@ -0,0 +1,48 @@
+#include INHERIT( StGermain/Base/Foundation/NewClass )
+#include "StGermain/Base/Foundation/ClassClear.h"
+
+#define PARENTDIR StGermain/Base/Foundation
+#define PARENT NewClass
+#define CLASSDIR StgDomain/Mesh
+#define CLASSNAME SpatialTree
+#include "StGermain/Base/Foundation/ClassSetup.h"
+
+
+MEMBER( Mesh*, mesh )
+MEMBER( int, nDims )
+MEMBER( double*, min )
+MEMBER( double*, max )
+MEMBER( int, nChld )
+MEMBER( void*, root )
+MEMBER( int, tol )
+MEMBER( int, nNodes )
+
+
+VOIDOVERRIDE( Init, void, 
+	      (void* self), 
+	      (self) ) 
+
+VOIDOVERRIDE( Destruct, void, 
+	      (void* self), 
+	      (self) )
+
+VOIDOVERRIDE( Copy, void, 
+	      (void* self, const void* op), 
+	      (self, op) )
+
+
+METHOD( SetMesh, void,
+	(void* self, void* mesh),
+	(self, mesh) )
+
+METHOD( Rebuild, void,
+	(void* self),
+	(self) )
+
+METHOD( Search, Bool,
+	(void* self, const double* pnt, int* nEls, int** els),
+	(self, pnt, nEls, els) )
+
+METHOD( Clear, void, 
+	(void* self), 
+	(self) )
diff -r 296e47e15b3a -r 00d2af329023 Mesh/src/SpatialTree.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Mesh/src/SpatialTree.h	Fri Nov 30 01:05:32 2007 +0000
@@ -0,0 +1,50 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+**
+** Copyright (C), 2003, Victorian Partnership for Advanced Computing (VPAC) Ltd, 
+** 110 Victoria Street, Melbourne, 3053, Australia.
+**
+** Authors:
+**	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+**	Patrick D. Sunter, Software Engineer, VPAC. (pds at vpac.org)
+**	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+**	Siew-Ching Tan, Software Engineer, VPAC. (siew at vpac.org)
+**	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+**	Raquibul Hassan, Computational Engineer, VPAC. (raq at vpac.org)
+**
+**  This library is free software; you can redistribute it and/or
+**  modify it under the terms of the GNU Lesser General Public
+**  License as published by the Free Software Foundation; either
+**  version 2.1 of the License, or (at your option) any later version.
+**
+**  This library is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+**  Lesser General Public License for more details.
+**
+**  You should have received a copy of the GNU Lesser General Public
+**  License along with this library; if not, write to the Free Software
+**  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/** \file
+ ** <b>Role:</b>
+ **	Abstract class faciliting how class inheritance is done.
+ **
+ ** <b>Assumptions:</b>
+ **	None
+ **
+ ** <b>Comments:</b>
+ **	None
+ **
+ ** $Id: SpatialTree.h 3904 2006-12-14 00:52:06Z LukeHodkinson $
+ **
+ **/
+ 
+#ifndef __StgDomain_Mesh_SpatialTree_h__
+#define __StgDomain_Mesh_SpatialTree_h__
+
+#include "StGermain/Base/Foundation/ClassClear.h"
+#define CLASSDIR StgDomain/Mesh
+#define CLASSNAME SpatialTree
+#include "StGermain/Base/Foundation/ClassHdr.h"
+
+#endif /* __StgDomain_Mesh_SpatialTree_h__ */
diff -r 296e47e15b3a -r 00d2af329023 Mesh/src/makefile
--- a/Mesh/src/makefile	Thu Nov 08 12:12:13 2007 +0000
+++ b/Mesh/src/makefile	Fri Nov 30 01:05:32 2007 +0000
@@ -59,6 +59,7 @@ SRCS = 				\
 	MeshAdaptor.c			\
 	SurfaceAdaptor.c		\
 	CompressionAdaptor.c		\
+	SpatialTree.c			\
 	MeshVariable.c			\
 	Init.c				\
 	Finalise.c
@@ -89,6 +90,8 @@ HDRS = 				\
 	MeshAdaptor.h			\
 	SurfaceAdaptor.h		\
 	CompressionAdaptor.h		\
+	SpatialTree.def			\
+	SpatialTree.h			\
 	MeshVariable.h			\
 	Init.h				\
 	Finalise.h
diff -r 296e47e15b3a -r 00d2af329023 Mesh/src/types.h
--- a/Mesh/src/types.h	Thu Nov 08 12:12:13 2007 +0000
+++ b/Mesh/src/types.h	Fri Nov 30 01:05:32 2007 +0000
@@ -47,6 +47,7 @@ typedef struct Sync Sync;
 typedef struct Sync Sync;
 typedef struct MeshTopology MeshTopology;
 typedef struct IGraph IGraph;
+typedef struct SpatialTree SpatialTree;
 
 typedef enum {
    MT_VERTEX, 
diff -r 296e47e15b3a -r 00d2af329023 Mesh/tests/makefile
--- a/Mesh/tests/makefile	Thu Nov 08 12:12:13 2007 +0000
+++ b/Mesh/tests/makefile	Fri Nov 30 01:05:32 2007 +0000
@@ -11,7 +11,8 @@ SRCS = \
 	testCartesianGenerator.c \
 	testDecomp.c \
 	testMesh.c \
-	testMeshTopology.c
+	testMeshTopology.c \
+	testSpatialTree.c
 
 
 checks = \
diff -r 296e47e15b3a -r 00d2af329023 Mesh/tests/testMesh.c
--- a/Mesh/tests/testMesh.c	Thu Nov 08 12:12:13 2007 +0000
+++ b/Mesh/tests/testMesh.c	Fri Nov 30 01:05:32 2007 +0000
@@ -140,6 +140,7 @@ TestEnd
 TestEnd
 
 TestBegin( Search ) {
+#if 0
    CartesianGenerator* gen;
    Mesh* mesh;
    int nDims;
@@ -345,6 +346,7 @@ done:
 done:
    FreeObject( gen );
    FreeObject( mesh );
+#endif
 }
 TestEnd
 



More information about the CIG-COMMITS mailing list