[cig-commits] commit:
Mercurial
hg at geodynamics.org
Mon Nov 24 11:58:12 PST 2008
changeset: 11:70e7515704d2
user: LukeHodkinson
date: Mon Dec 03 02:52:45 2007 +0000
files: Mesh/src/CartesianGenerator.c Mesh/src/Mesh_Algorithms.c Mesh/src/Mesh_Algorithms.h
description:
I made a bad commit recently; committing a set of
fixes to clear up the problems.
diff -r 9884b868d94d -r 70e7515704d2 Mesh/src/CartesianGenerator.c
--- a/Mesh/src/CartesianGenerator.c Fri Nov 30 01:32:43 2007 +0000
+++ b/Mesh/src/CartesianGenerator.c Mon Dec 03 02:52:45 2007 +0000
@@ -128,7 +128,7 @@ void _CartesianGenerator_Init( Cartesian
Stream_SetPrintingRank( stream, 0 );
self->comm = NULL;
- self->regular = True;
+ self->regular = False;
self->maxDecompDims = 0;
self->minDecomp = NULL;
self->maxDecomp = NULL;
diff -r 9884b868d94d -r 70e7515704d2 Mesh/src/Mesh_Algorithms.c
--- a/Mesh/src/Mesh_Algorithms.c Fri Nov 30 01:32:43 2007 +0000
+++ b/Mesh/src/Mesh_Algorithms.c Mon Dec 03 02:52:45 2007 +0000
@@ -157,9 +157,11 @@ void _Mesh_Algorithms_SetMesh( void* alg
void _Mesh_Algorithms_Update( void* algorithms ) {
Mesh_Algorithms* self = (Mesh_Algorithms*)algorithms;
-
- assert( self );
-
+ int nDims, d_i;
+
+ assert( self );
+
+#if 0
if( !self->mesh ) {
if( self->tree )
SpatialTree_Clear( self->tree );
@@ -171,6 +173,7 @@ void _Mesh_Algorithms_Update( void* algo
SpatialTree_SetMesh( self->tree, self->mesh );
SpatialTree_Rebuild( self->tree );
self->search = Mesh_Algorithms_SearchWithTree;
+#endif
if( !Class_IsSuper( self->mesh->topo, IGraph ) ||
Mesh_HasIncidence( self->mesh, MT_VERTEX, MT_VERTEX ) )
@@ -180,7 +183,6 @@ 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 ) &&
@@ -195,7 +197,6 @@ 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 ) {
@@ -662,18 +663,20 @@ Bool Mesh_Algorithms_SearchGeneral( void
return False;
}
-Bool Mesh_Algorithms_SearchWithTree( void* _self, double* pnt, unsigned* el ) {
+Bool Mesh_Algorithms_SearchWithTree( void* _self, double* pnt, unsigned* dim, unsigned* el ) {
Mesh_Algorithms* self = (Mesh_Algorithms*)_self;
int nEls, *els;
int curDim, curRank, curEl;
int nLocals, owner;
int ii;
+ *dim = Mesh_GetDimSize( self->mesh );
curRank = self->rank;
- nLocals = Mesh_GetLocalSize( self->mesh, Mesh_GetDimSize( self->mesh ) );
+ nLocals = Mesh_GetLocalSize( self->mesh, *dim );
if( !SpatialTree_Search( self->tree, pnt, &nEls, &els ) )
return False;
+ *el = nLocals;
for( ii = 0; ii < nEls; ii++ ) {
if( Mesh_ElementHasPoint( self->mesh, els[ii], pnt, &curDim, &curEl ) ) {
if( curEl >= nLocals ) {
diff -r 9884b868d94d -r 70e7515704d2 Mesh/src/Mesh_Algorithms.h
--- a/Mesh/src/Mesh_Algorithms.h Fri Nov 30 01:32:43 2007 +0000
+++ b/Mesh/src/Mesh_Algorithms.h Mon Dec 03 02:52:45 2007 +0000
@@ -185,7 +185,7 @@
Bool Mesh_Algorithms_SearchGeneral( void* algorithms, double* point,
MeshTopology_Dim* dim, unsigned* ind );
- Bool Mesh_Algorithms_SearchWithTree( void* self, double* pnt, unsigned* el );
+Bool Mesh_Algorithms_SearchWithTree( void* self, double* pnt, unsigned* dim, unsigned* el );
/*--------------------------------------------------------------------------------------------------------------------------
** Private Member functions
More information about the CIG-COMMITS
mailing list