[cig-commits] r14296 - long/3D/SNAC/trunk/Snac/plugins/remesher
echoi at geodynamics.org
echoi at geodynamics.org
Wed Mar 11 13:27:45 PDT 2009
Author: echoi
Date: 2009-03-11 13:27:45 -0700 (Wed, 11 Mar 2009)
New Revision: 14296
Modified:
long/3D/SNAC/trunk/Snac/plugins/remesher/RemeshElements.c
Log:
* minTetInd was being set to a wrong value although the cloases tet was found correctly.
- Modified such that TetInd is updated everytime findClosestTet() is called and minTetInd is updated only when minTetDist < minDist.
Modified: long/3D/SNAC/trunk/Snac/plugins/remesher/RemeshElements.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/remesher/RemeshElements.c 2009-03-11 19:09:36 UTC (rev 14295)
+++ long/3D/SNAC/trunk/Snac/plugins/remesher/RemeshElements.c 2009-03-11 20:27:45 UTC (rev 14296)
@@ -123,8 +123,9 @@
unsigned nElements;
Element_DomainIndex* elements;
unsigned elt_i;
- double minTetDist, minDist;
- unsigned minTetInd, minEltInd;
+ double minTetDist=1.0e+32;
+ double minDist=1.0e+32;
+ unsigned TetInd, minTetInd, minEltInd;
/* Extract the tetrahedron's coordinates. */
Vector_Set( tetCrds[0], meshExt->newNodeCoords[eltNodes[TetraToNode[tet_i][0]]] );
@@ -159,17 +160,18 @@
elements[elt_i] = Mesh_ElementMapGlobalToDomain( mesh, elements[elt_i] );
}
- minDist = 1.0e+21;
for( elt_i = 0; elt_i < nElements; elt_i++ ) {
if( elements[elt_i] >= context->mesh->elementDomainCount )
continue;
- findClosestTet( context, newElt_i, tet_i, bc, elements[elt_i], &minTetInd, &minTetDist );
+ findClosestTet( context, newElt_i, tet_i, bc, elements[elt_i], &TetInd, &minTetDist );
if( minTetDist < minDist ) {
minDist = minTetDist;
minEltInd = elements[elt_i];
+ minTetInd = TetInd;
}
}
+
/* Interpolate the element's tetrahedra. */
SnacRemesher_InterpolateElement( context, contextExt,
newElt_i, tet_i,
More information about the CIG-COMMITS
mailing list