[cig-commits] r14294 - long/3D/SNAC/trunk/Snac/plugins/remesher

echoi at geodynamics.org echoi at geodynamics.org
Wed Mar 11 08:46:02 PDT 2009


Author: echoi
Date: 2009-03-11 08:46:02 -0700 (Wed, 11 Mar 2009)
New Revision: 14294

Modified:
   long/3D/SNAC/trunk/Snac/plugins/remesher/Utils.c
Log:
* For unknown reasons, Topology_BuildNeighbours() was giving wrong values.
	- Replaced with mesh->nodeNeighbourTbl which returns 
		domain indeces of neighbor nodes for a given node (identified by the domain index, too).
	- As a result, when remesher is used, it is required to have
		<param name="buildNodeNeighbourTbl"> True </param>
	in the "mesh" structure in an input file. It might be better to force it to be on by default.



Modified: long/3D/SNAC/trunk/Snac/plugins/remesher/Utils.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/remesher/Utils.c	2009-03-11 14:25:07 UTC (rev 14293)
+++ long/3D/SNAC/trunk/Snac/plugins/remesher/Utils.c	2009-03-11 15:46:02 UTC (rev 14294)
@@ -73,16 +73,21 @@
 			nNbrs = Topology_NeighbourCount( nodeTopo, gNodeInd );
 			if( nNbrs ) {
 				nbrs = Memory_Alloc_Array( Node_DomainIndex, nNbrs, "SnacRemesher" );
+#if 0
 				Topology_BuildNeighbours( nodeTopo, curNode, nbrs );
+#endif		
 			}
 			else {
 				nbrs = NULL;
 			}
 		}
-		
+
 		/* Convert neighbours to domain indices. */
 		for( nbr_i = 0; nbr_i < nNbrs; nbr_i++ ) {
-			nbrs[nbr_i] = Mesh_NodeMapGlobalToDomain( mesh, nbrs[nbr_i] );
+#if 0
+ 			nbrs[nbr_i] = Mesh_NodeMapGlobalToDomain( mesh, nbrs[nbr_i] ); 
+#endif
+			nbrs[nbr_i] = mesh->nodeNeighbourTbl[curNode][nbr_i];
 		}
 		
 		/* Get the distance to the current node. */



More information about the CIG-COMMITS mailing list