[cig-commits] r6246 - in long/3D/Gale/trunk/src/PICellerator: . Utils/src

walter at geodynamics.org walter at geodynamics.org
Tue Mar 13 11:14:03 PDT 2007


Author: walter
Date: 2007-03-13 11:14:03 -0700 (Tue, 13 Mar 2007)
New Revision: 6246

Modified:
   long/3D/Gale/trunk/src/PICellerator/
   long/3D/Gale/trunk/src/PICellerator/Utils/src/BuoyancyForceTerm.c
Log:
 r573 at earth (orig r440):  LukeHodkinson | 2007-03-13 00:21:36 -0700
 Fixed a problem causing a NULL dictionary entry handle
 to be read from.
 



Property changes on: long/3D/Gale/trunk/src/PICellerator
___________________________________________________________________
Name: svk:merge
   - 00de75e2-39f1-0310-8538-9683d00a49cc:/branches/decomp3d:439
00de75e2-39f1-0310-8538-9683d00a49cc:/trunk:381
aee11096-cf10-0410-a191-eea5772ba81f:/cig:524
   + 00de75e2-39f1-0310-8538-9683d00a49cc:/branches/decomp3d:440
00de75e2-39f1-0310-8538-9683d00a49cc:/trunk:381
aee11096-cf10-0410-a191-eea5772ba81f:/cig:524

Modified: long/3D/Gale/trunk/src/PICellerator/Utils/src/BuoyancyForceTerm.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Utils/src/BuoyancyForceTerm.c	2007-03-13 18:13:20 UTC (rev 6245)
+++ long/3D/Gale/trunk/src/PICellerator/Utils/src/BuoyancyForceTerm.c	2007-03-13 18:14:03 UTC (rev 6246)
@@ -221,8 +221,8 @@
 	adjust           = Stg_ComponentFactory_GetBool( cf, self->name, "adjust", False );
 
 	direcList = Dictionary_Get( dict, "gravityDirection" );
-	nDims = Dictionary_Entry_Value_GetCount( direcList );
 	if( direcList ) {
+		nDims = Dictionary_Entry_Value_GetCount( direcList );
 		direc = AllocArray( double, nDims );
 		for( d_i = 0; d_i < nDims; d_i++ ) {
 			tmp = Dictionary_Entry_Value_GetElement( direcList, d_i );
@@ -231,13 +231,13 @@
 				tmp = Dictionary_Get( cf->rootDict, rootKey );
 			direc[d_i] = Dictionary_Entry_Value_AsDouble( tmp );
 		}
+		if( nDims == 2 )
+			Vec_Norm2D( direc, direc );
+		else
+			Vec_Norm3D( direc, direc );
 	}
 	else
 		direc = NULL;
-	if( nDims == 2 )
-		Vec_Norm2D( direc, direc );
-	else
-		Vec_Norm3D( direc, direc );
 	self->gHat = direc;
 
 	materials_Register = Stg_ObjectList_Get( cf->registerRegister, "Materials_Register" );



More information about the cig-commits mailing list