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

walter at geodynamics.org walter at geodynamics.org
Wed Oct 11 13:54:35 PDT 2006


Author: walter
Date: 2006-10-11 13:54:35 -0700 (Wed, 11 Oct 2006)
New Revision: 4942

Modified:
   long/3D/Gale/trunk/src/Underworld/
   long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c
Log:
 r602 at earth:  boo | 2006-10-11 13:52:11 -0700
  r564 at earth (orig r341):  LukeHodkinson | 2006-10-04 17:46:25 -0700
  Remapped the order of indices in some barycenter 
  calculations.
  
 



Property changes on: long/3D/Gale/trunk/src/Underworld
___________________________________________________________________
Name: svk:merge
   - 9570c393-cf10-0410-b476-9a651db1e55a:/cig:601
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:340
   + 9570c393-cf10-0410-b476-9a651db1e55a:/cig:602
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:341

Modified: long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c	2006-10-11 20:54:32 UTC (rev 4941)
+++ long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c	2006-10-11 20:54:35 UTC (rev 4942)
@@ -307,6 +307,36 @@
 		for( var_i = 0; var_i < sys->nFields; var_i++ ) {
 			FeVariable_SyncShadowValues( sys->fields[var_i] );
 		}
+
+		/*
+		** HACK: Dump mesh coordinates.
+		*/
+		{
+			MeshTopology*	topo = sys->mesh->topo;
+			char		fname[100];
+			FILE*		out;
+			unsigned	n_i;
+
+			sprintf( fname, "%s.%d", sys->mesh->name, topo->domains[0]->commTopo->rank );
+			out = fopen( fname, "w" );
+
+			fprintf( out, "%d\n", topo->nDims );
+
+			for( n_i = 0; n_i < sys->mesh->nodeLocalCount; n_i++ ) {
+				unsigned	gInd;
+
+				gInd = Mesh_NodeMapLocalToGlobal( sys->mesh, n_i );
+				fprintf( out, "%d: %lf, %lf", gInd, sys->mesh->nodeCoord[n_i][0], sys->mesh->nodeCoord[n_i][1] );
+				if( topo->nDims > 2 )
+					fprintf( out, ", %lf", sys->mesh->nodeCoord[n_i][2] );
+				fprintf( out, "\n" );
+			}
+
+			fclose( out );
+		}
+		/*
+		** END HACK
+		*/
 	}
 }
 
@@ -625,22 +655,22 @@
 			if( ijk[0] > 0 && ijk[2] > 0 ) {
 				ijk[0]--; ijk[2]--; GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[1], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[0], oldCrds[ind], sizeof(Coord) );
 
 				ijk[0]++; GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[0], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[1], oldCrds[ind], sizeof(Coord) );
 
 				ijk[0]--; ijk[2]++; GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[3], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[2], oldCrds[ind], sizeof(Coord) );
 
 				ijk[0]++; GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[2], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[3], oldCrds[ind], sizeof(Coord) );
 
 				if( _EulerDeform_QuadYInterp( crds, newCrd, &mesh->nodeCoord[centerInd][1] ) ) {
-					mesh->nodeCoord[centerInd][1] -= 1e-15;
+					mesh->nodeCoord[centerInd][1] -= 1e-13;
 					return;
 				}
 			}
@@ -648,23 +678,23 @@
 			if( ijk[0] > 0 && ijk[2] < grm->nNodes[2] - 1 ) {
 				ijk[0]--; GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[1], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[0], oldCrds[ind], sizeof(Coord) );
 
 				ijk[0]++; GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[0], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[1], oldCrds[ind], sizeof(Coord) );
 
 				ijk[0]--; ijk[2]++; GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[3], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[2], oldCrds[ind], sizeof(Coord) );
 
 				ijk[0]++; GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[2], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[3], oldCrds[ind], sizeof(Coord) );
 
 				ijk[2]--;
 				if( _EulerDeform_QuadYInterp( crds, newCrd, &mesh->nodeCoord[centerInd][1] ) ) {
-					mesh->nodeCoord[centerInd][1] -= 1e-15;
+					mesh->nodeCoord[centerInd][1] -= 1e-13;
 					return;
 				}
 			}
@@ -672,23 +702,23 @@
 			if( ijk[0] < grm->nNodes[0] - 1 && ijk[2] > 0 ) {
 				ijk[2]--; GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[1], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[0], oldCrds[ind], sizeof(Coord) );
 
 				ijk[0]++; GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[0], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[1], oldCrds[ind], sizeof(Coord) );
 
 				ijk[0]--; ijk[2]++; GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[3], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[2], oldCrds[ind], sizeof(Coord) );
 
 				ijk[0]++; GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[2], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[3], oldCrds[ind], sizeof(Coord) );
 
 				ijk[0]--;
 				if( _EulerDeform_QuadYInterp( crds, newCrd, &mesh->nodeCoord[centerInd][1] ) ) {
-					mesh->nodeCoord[centerInd][1] -= 1e-15;
+					mesh->nodeCoord[centerInd][1] -= 1e-13;
 					return;
 				}
 			}
@@ -696,23 +726,23 @@
 			if( ijk[0] < grm->nNodes[0] - 1 && ijk[2] < grm->nNodes[2] - 1 ) {
 				GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[1], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[0], oldCrds[ind], sizeof(Coord) );
 
 				ijk[0]++; GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[0], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[1], oldCrds[ind], sizeof(Coord) );
 
 				ijk[0]--; ijk[2]++; GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[3], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[2], oldCrds[ind], sizeof(Coord) );
 
 				ijk[0]++; GRM_Project( grm, ijk, &ind );
 				ind = Mesh_NodeMapGlobalToDomain( mesh, ind );
-				memcpy( crds[2], oldCrds[ind], sizeof(Coord) );
+				memcpy( crds[3], oldCrds[ind], sizeof(Coord) );
 
 				ijk[0]--; ijk[2]--;
 				if( _EulerDeform_QuadYInterp( crds, newCrd, &mesh->nodeCoord[centerInd][1] ) ) {
-					mesh->nodeCoord[centerInd][1] -= 1e-15;
+					mesh->nodeCoord[centerInd][1] -= 1e-13;
 					return;
 				}
 			}



More information about the cig-commits mailing list