[cig-commits] r5045 - in long/3D/Gale/trunk/src/Underworld: . plugins/EulerDeform

walter at geodynamics.org walter at geodynamics.org
Sun Oct 15 01:24:25 PDT 2006


Author: walter
Date: 2006-10-15 01:24:25 -0700 (Sun, 15 Oct 2006)
New Revision: 5045

Modified:
   long/3D/Gale/trunk/src/Underworld/
   long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c
Log:
 r677 at earth:  boo | 2006-10-15 01:24:02 -0700
  r676 at earth (orig r357):  LukeHodkinson | 2006-10-14 20:20:27 -0700
  Fixed a bug in EulerDeform causing static boundaries
  to fail.
  
 



Property changes on: long/3D/Gale/trunk/src/Underworld
___________________________________________________________________
Name: svk:merge
   - 9570c393-cf10-0410-b476-9a651db1e55a:/cig:665
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:356
   + 9570c393-cf10-0410-b476-9a651db1e55a:/cig:677
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:357

Modified: long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c	2006-10-15 07:29:02 UTC (rev 5044)
+++ long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c	2006-10-15 08:24:25 UTC (rev 5045)
@@ -259,28 +259,54 @@
 		EulerDeform_System*	sys = edCtx->systems + sys_i;
 
 		if( sys->staticSides ) {
-			IndexSet	*sideSet, *tmpSet;
+			IndexSet	*tmpIndSet;
+			RangeSet	*sideSet, *tmpSet;
 			unsigned	nInds, *inds;
 			unsigned	ind_i;
 
 			/* Collect indices of all sides except top surface. */
-			sideSet = RegularMeshUtils_CreateGlobalLeftSet( sys->mesh );
-			tmpSet = RegularMeshUtils_CreateGlobalRightSet( sys->mesh );
-			IndexSet_Merge_AND( sideSet, tmpSet );
-			FreeObject( tmpSet );
-			tmpSet = RegularMeshUtils_CreateGlobalBottomSet( sys->mesh );
-			IndexSet_Merge_AND( sideSet, tmpSet );
-			FreeObject( tmpSet );
+			sideSet = RangeSet_New();
+			tmpSet = RangeSet_New();
+
+			tmpIndSet = RegularMeshUtils_CreateGlobalLeftSet( sys->mesh );
+			IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+			RangeSet_SetIndices( sideSet, nInds, inds );
+			FreeArray( inds );
+			FreeObject( tmpIndSet );
+
+			tmpIndSet = RegularMeshUtils_CreateGlobalRightSet( sys->mesh );
+			IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+			RangeSet_SetIndices( tmpSet, nInds, inds );
+			RangeSet_Union( sideSet, tmpSet );
+			FreeArray( inds );
+			FreeObject( tmpIndSet );
+
+			tmpIndSet = RegularMeshUtils_CreateGlobalBottomSet( sys->mesh );
+			IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+			RangeSet_SetIndices( tmpSet, nInds, inds );
+			RangeSet_Union( sideSet, tmpSet );
+			FreeArray( inds );
+			FreeObject( tmpIndSet );
+
 			if( sys->mesh->topo->nDims == 3 ) {
-				tmpSet = RegularMeshUtils_CreateGlobalFrontSet( sys->mesh );
-				IndexSet_Merge_AND( sideSet, tmpSet );
-				FreeObject( tmpSet );
-				tmpSet = RegularMeshUtils_CreateGlobalBackSet( sys->mesh );
-				IndexSet_Merge_AND( sideSet, tmpSet );
-				FreeObject( tmpSet );
+				tmpIndSet = RegularMeshUtils_CreateGlobalBottomSet( sys->mesh );
+				IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+				RangeSet_SetIndices( tmpSet, nInds, inds );
+				RangeSet_Union( sideSet, tmpSet );
+				FreeArray( inds );
+				FreeObject( tmpIndSet );
+
+				tmpIndSet = RegularMeshUtils_CreateGlobalBottomSet( sys->mesh );
+				IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+				RangeSet_SetIndices( tmpSet, nInds, inds );
+				RangeSet_Union( sideSet, tmpSet );
+				FreeArray( inds );
+				FreeObject( tmpIndSet );
 			}
-			IndexSet_GetMembers( sideSet, &nInds, &inds );
+
+			RangeSet_GetIndices( sideSet, &nInds, &inds );
 			FreeObject( sideSet );
+			FreeObject( tmpSet );
 
 			/* Copy coords to temporary array. */
 			sys->sideCoords = Memory_Alloc_Array_Unnamed( Coord, nInds );
@@ -330,28 +356,54 @@
 
 		/* Revert side coordinates if required. */
 		if( sys->staticSides ) {
-			IndexSet	*sideSet, *tmpSet;
+			IndexSet	*tmpIndSet;
+			RangeSet	*sideSet, *tmpSet;
 			unsigned	nInds, *inds;
 			unsigned	ind_i;
 
 			/* Collect indices of all sides except top surface. */
-			sideSet = RegularMeshUtils_CreateGlobalLeftSet( sys->mesh );
-			tmpSet = RegularMeshUtils_CreateGlobalRightSet( sys->mesh );
-			IndexSet_Merge_AND( sideSet, tmpSet );
-			FreeObject( tmpSet );
-			tmpSet = RegularMeshUtils_CreateGlobalBottomSet( sys->mesh );
-			IndexSet_Merge_AND( sideSet, tmpSet );
-			FreeObject( tmpSet );
+			sideSet = RangeSet_New();
+			tmpSet = RangeSet_New();
+
+			tmpIndSet = RegularMeshUtils_CreateGlobalLeftSet( sys->mesh );
+			IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+			RangeSet_SetIndices( sideSet, nInds, inds );
+			FreeArray( inds );
+			FreeObject( tmpIndSet );
+
+			tmpIndSet = RegularMeshUtils_CreateGlobalRightSet( sys->mesh );
+			IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+			RangeSet_SetIndices( tmpSet, nInds, inds );
+			RangeSet_Union( sideSet, tmpSet );
+			FreeArray( inds );
+			FreeObject( tmpIndSet );
+
+			tmpIndSet = RegularMeshUtils_CreateGlobalBottomSet( sys->mesh );
+			IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+			RangeSet_SetIndices( tmpSet, nInds, inds );
+			RangeSet_Union( sideSet, tmpSet );
+			FreeArray( inds );
+			FreeObject( tmpIndSet );
+
 			if( sys->mesh->topo->nDims == 3 ) {
-				tmpSet = RegularMeshUtils_CreateGlobalFrontSet( sys->mesh );
-				IndexSet_Merge_AND( sideSet, tmpSet );
-				FreeObject( tmpSet );
-				tmpSet = RegularMeshUtils_CreateGlobalBackSet( sys->mesh );
-				IndexSet_Merge_AND( sideSet, tmpSet );
-				FreeObject( tmpSet );
+				tmpIndSet = RegularMeshUtils_CreateGlobalBottomSet( sys->mesh );
+				IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+				RangeSet_SetIndices( tmpSet, nInds, inds );
+				RangeSet_Union( sideSet, tmpSet );
+				FreeArray( inds );
+				FreeObject( tmpIndSet );
+
+				tmpIndSet = RegularMeshUtils_CreateGlobalBottomSet( sys->mesh );
+				IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+				RangeSet_SetIndices( tmpSet, nInds, inds );
+				RangeSet_Union( sideSet, tmpSet );
+				FreeArray( inds );
+				FreeObject( tmpIndSet );
 			}
-			IndexSet_GetMembers( sideSet, &nInds, &inds );
+
+			RangeSet_GetIndices( sideSet, &nInds, &inds );
 			FreeObject( sideSet );
+			FreeObject( tmpSet );
 
 			/* Copy back coords. */
 			for( ind_i = 0; ind_i < nInds; ind_i++ )



More information about the cig-commits mailing list