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

walter at geodynamics.org walter at geodynamics.org
Tue Dec 5 02:01:12 PST 2006


Author: walter
Date: 2006-12-05 02:01:09 -0800 (Tue, 05 Dec 2006)
New Revision: 5455

Modified:
   long/3D/Gale/trunk/
   long/3D/Gale/trunk/fountain.xml
   long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/Context.h
   long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c
Log:
 r1133 at earth:  boo | 2006-12-05 02:00:05 -0800
 Make EulerDeform able to set each side static individually



Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
   - 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:1128
   + 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:1133

Modified: long/3D/Gale/trunk/fountain.xml
===================================================================
--- long/3D/Gale/trunk/fountain.xml	2006-12-05 07:09:01 UTC (rev 5454)
+++ long/3D/Gale/trunk/fountain.xml	2006-12-05 10:01:09 UTC (rev 5455)
@@ -476,7 +476,7 @@
         <param name="remesher">velocityRemesher</param>
         <param name="velocityField">VelocityField</param>
         <param name="wrapTop">True</param>
-        <param name="staticSides">True</param>
+        <param name="staticBottom">True</param>
         <list name="fields">
           <struct>
             <param name="field">VelocityField</param>

Modified: long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/Context.h
===================================================================
--- long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/Context.h	2006-12-05 07:09:01 UTC (rev 5454)
+++ long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/Context.h	2006-12-05 10:01:09 UTC (rev 5455)
@@ -42,6 +42,12 @@
 		Bool		wrapBottom;
 		Bool		wrapLeft;
 
+		Bool		staticTop;
+		Bool		staticBottom;
+		Bool		staticLeft;
+		Bool		staticRight;
+		Bool		staticFront;
+		Bool		staticBack;
 		Bool		staticSides;
 		Coord*		sideCoords;
 	};

Modified: long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c	2006-12-05 07:09:01 UTC (rev 5454)
+++ long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c	2006-12-05 10:01:09 UTC (rev 5455)
@@ -144,7 +144,14 @@
 			sys->mesh = Stg_ComponentFactory_ConstructByName( cf, meshName, Mesh, True, data );
 			sys->velField = Stg_ComponentFactory_ConstructByName( cf, velFieldName, FieldVariable, True, data );
 
-			sys->staticSides = Dictionary_GetBool_WithDefault( sysDict, "staticSides", False );
+			sys->staticTop = Dictionary_GetBool_WithDefault( sysDict, "staticTop", False );
+			sys->staticBottom = Dictionary_GetBool_WithDefault( sysDict, "staticBottom", False );
+			sys->staticLeft = Dictionary_GetBool_WithDefault( sysDict, "staticLeft", False );
+			sys->staticRight = Dictionary_GetBool_WithDefault( sysDict, "staticRight", False );
+			sys->staticFront = Dictionary_GetBool_WithDefault( sysDict, "staticFront", False );
+			sys->staticBack = Dictionary_GetBool_WithDefault( sysDict, "staticBack", False );
+			sys->staticSides = sys->staticTop || sys->staticBottom
+                          || sys->staticRight || sys->staticLeft || sys->staticFront || sys->staticBack;
 
 			/* Read the list of variables to interpolate. */
 			varLst = Dictionary_Entry_Value_GetMember( Dictionary_Entry_Value_GetElement( sysLst, sys_i ), "fields" );
@@ -268,40 +275,62 @@
 			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 );
+                        if(sys->staticLeft)
+                          {
+                            tmpIndSet = RegularMeshUtils_CreateGlobalLeftSet( sys->mesh );
+                            IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+                            RangeSet_SetIndices( sideSet, nInds, inds );
+                            FreeArray( inds );
+                            FreeObject( tmpIndSet );
+                          }
+                        if(sys->staticRight)
+                          {
+                            tmpIndSet = RegularMeshUtils_CreateGlobalRightSet( sys->mesh );
+                            IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+                            RangeSet_SetIndices( tmpSet, nInds, inds );
+                            RangeSet_Union( sideSet, tmpSet );
+                            FreeArray( inds );
+                            FreeObject( tmpIndSet );
+                          }
+                        if(sys->staticBottom)
+                          {
+                            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->staticTop)
+                          {
+                            tmpIndSet = RegularMeshUtils_CreateGlobalTopSet( sys->mesh );
+                            IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+                            RangeSet_SetIndices( tmpSet, nInds, inds );
+                            RangeSet_Union( sideSet, tmpSet );
+                            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 ) {
-				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 );
+                          if(sys->staticFront)
+                            {
+                              tmpIndSet = RegularMeshUtils_CreateGlobalFrontSet( sys->mesh );
+                              IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+                              RangeSet_SetIndices( tmpSet, nInds, inds );
+                              RangeSet_Union( sideSet, tmpSet );
+                              FreeArray( inds );
+                              FreeObject( tmpIndSet );
+                            }
+                          
+                          if(sys->staticBack)
+                            {
+                              tmpIndSet = RegularMeshUtils_CreateGlobalBackSet( sys->mesh );
+                              IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+                              RangeSet_SetIndices( tmpSet, nInds, inds );
+                              RangeSet_Union( sideSet, tmpSet );
+                              FreeArray( inds );
+                              FreeObject( tmpIndSet );
+                            }
 			}
 
 			RangeSet_GetIndices( sideSet, &nInds, &inds );
@@ -365,42 +394,64 @@
 			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 );
+                        if(sys->staticLeft)
+                          {
+                            tmpIndSet = RegularMeshUtils_CreateGlobalLeftSet( sys->mesh );
+                            IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+                            RangeSet_SetIndices( sideSet, nInds, inds );
+                            FreeArray( inds );
+                            FreeObject( tmpIndSet );
+                          }
+                        if(sys->staticRight)
+                          {
+                            tmpIndSet = RegularMeshUtils_CreateGlobalRightSet( sys->mesh );
+                            IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+                            RangeSet_SetIndices( tmpSet, nInds, inds );
+                            RangeSet_Union( sideSet, tmpSet );
+                            FreeArray( inds );
+                            FreeObject( tmpIndSet );
+                          }
+                        if(sys->staticBottom)
+                          {
+                            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->staticTop)
+                          {
+                            tmpIndSet = RegularMeshUtils_CreateGlobalTopSet( sys->mesh );
+                            IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+                            RangeSet_SetIndices( tmpSet, nInds, inds );
+                            RangeSet_Union( sideSet, tmpSet );
+                            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 ) {
-				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->staticFront)
+                            {
+                              tmpIndSet = RegularMeshUtils_CreateGlobalFrontSet( sys->mesh );
+                              IndexSet_GetMembers( tmpIndSet, &nInds, &inds );
+                              RangeSet_SetIndices( tmpSet, nInds, inds );
+                              RangeSet_Union( sideSet, tmpSet );
+                              FreeArray( inds );
+                              FreeObject( tmpIndSet );
+                            }
+                          
+                          if(sys->staticBack)
+                            {
+                              tmpIndSet = RegularMeshUtils_CreateGlobalBackSet( 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 );
-			}
-
 			RangeSet_GetIndices( sideSet, &nInds, &inds );
 			FreeObject( sideSet );
 			FreeObject( tmpSet );



More information about the cig-commits mailing list