[cig-commits] commit: Merging.

Mercurial hg at geodynamics.org
Mon Feb 1 15:31:04 PST 2010


changeset:   338:7793c0c646c9
branch:      pcu_rejig
parent:      336:d71e205639b6
parent:      337:c30dec974d34
user:        JericoRevote
date:        Mon Nov 30 15:47:43 2009 +1100
files:       Utils/src/BuoyancyForceTerm.c Utils/src/BuoyancyForceTermThermoChem.c
description:
Merging.


diff -r d71e205639b6 -r 7793c0c646c9 Utils/src/BuoyancyForceTerm.c
--- a/Utils/src/BuoyancyForceTerm.c	Mon Nov 30 02:03:06 2009 +1100
+++ b/Utils/src/BuoyancyForceTerm.c	Mon Nov 30 15:47:43 2009 +1100
@@ -174,16 +174,19 @@ void _BuoyancyForceTerm_AssignFromXML( v
 
 	dict = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( cf->componentDict, self->name ) );
 	temperatureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, "TemperatureField", FeVariable, False, data ) ;
-	gravity          = Stg_ComponentFactory_GetDouble( cf, self->name, "gravity", 0.0 );
-	adjust           = Stg_ComponentFactory_GetBool( cf, self->name, "adjust", False );
+	gravity = Stg_ComponentFactory_GetDouble( cf, self->name, "gravity", 0.0 );
+	adjust = Stg_ComponentFactory_GetBool( cf, self->name, "adjust", False );
 
 	direcList = Dictionary_Get( dict, "gravityDirection" );
+
 	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 );
 			rootKey = Dictionary_Entry_Value_AsString( tmp );
+
 			if( !Stg_StringIsNumeric( rootKey ) )
 				tmp = Dictionary_Get( cf->rootDict, rootKey );
 			direc[d_i] = Dictionary_Entry_Value_AsDouble( tmp );
@@ -288,7 +291,9 @@ void _BuoyancyForceTerm_Initialise( void
 }
 
 void _BuoyancyForceTerm_Execute( void* forceTerm, void* data ) {
-	_ForceTerm_Execute( forceTerm, data );
+	BuoyancyForceTerm* self = (BuoyancyForceTerm*)forceTerm;
+
+	_ForceTerm_Execute( self, data );
 }
 
 void _BuoyancyForceTerm_Destroy( void* forceTerm, void* data ) {
@@ -296,18 +301,17 @@ void _BuoyancyForceTerm_Destroy( void* f
 	Index i;
 
 	for ( i = 0; i < self->materialSwarmCount; ++i ) {
-		Stg_Class_Delete( self->densitySwarmVariables[i] );
-		Stg_Class_Delete( self->alphaSwarmVariables[i] );
+		_Stg_Component_Delete( self->densitySwarmVariables[i] );
+		_Stg_Component_Delete( self->alphaSwarmVariables[i] );
 	}
 
 	FreeArray( self->gHat );
 
-	MemFree( self->densitySwarmVariables );
-	MemFree( self->alphaSwarmVariables );
+	Memory_Free( self->densitySwarmVariables );
+	Memory_Free( self->alphaSwarmVariables );
 
 	_ForceTerm_Destroy( forceTerm, data );
 }
-
 
 void _BuoyancyForceTerm_AssembleElement( void* forceTerm, ForceVector* forceVector, Element_LocalIndex lElement_I, double* elForceVec ) {
 	BuoyancyForceTerm*               self               = (BuoyancyForceTerm*) forceTerm;
diff -r d71e205639b6 -r 7793c0c646c9 Utils/src/BuoyancyForceTermThermoChem.c
--- a/Utils/src/BuoyancyForceTermThermoChem.c	Mon Nov 30 02:03:06 2009 +1100
+++ b/Utils/src/BuoyancyForceTermThermoChem.c	Mon Nov 30 15:47:43 2009 +1100
@@ -158,21 +158,21 @@ void _BuoyancyForceTermThermoChem_Print(
 }
 
 void _BuoyancyForceTermThermoChem_AssignFromXML( void* forceTerm, Stg_ComponentFactory* cf, void* data ) {
-	BuoyancyForceTermThermoChem*          self             = (BuoyancyForceTermThermoChem*)forceTerm;
-	FeVariable*                 temperatureField;
-	double                      RaT;
-	double                      RaC;
-	Bool                        adjust;
-	Materials_Register*         materials_Register;
-	PICelleratorContext*	    context;
+	BuoyancyForceTermThermoChem*	self = (BuoyancyForceTermThermoChem*)forceTerm;
+	FeVariable*							temperatureField;
+	double								RaT;
+	double								RaC;
+	Bool									adjust;
+	Materials_Register*				materials_Register;
+	PICelleratorContext*				context;
 
 	/* Construct Parent */
 	_ForceTerm_AssignFromXML( self, cf, data );
 
 	temperatureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, "TemperatureField", FeVariable, False, data ) ;
-	RaT              = Stg_ComponentFactory_GetDouble( cf, self->name, "RaT", 0.0 );
-	RaC              = Stg_ComponentFactory_GetDouble( cf, self->name, "RaC", 0.0 );
-	adjust           = Stg_ComponentFactory_GetBool( cf, self->name, "adjust", False );
+	RaT = Stg_ComponentFactory_GetDouble( cf, self->name, "RaT", 0.0 );
+	RaC = Stg_ComponentFactory_GetDouble( cf, self->name, "RaC", 0.0 );
+	adjust = Stg_ComponentFactory_GetBool( cf, self->name, "adjust", False );
 
 	context = (PICelleratorContext*)self->context;
 	assert( Stg_CheckType( context, PICelleratorContext ) );
@@ -256,8 +256,9 @@ void _BuoyancyForceTermThermoChem_Destro
 	Index i;
 
 	for ( i = 0; i < self->materialSwarmCount; ++i ) {
-		Stg_Class_Delete( self->densitySwarmVariables[i] );
+		_Stg_Component_Delete( self->densitySwarmVariables[i] );
 	}
+	Memory_Free( self->densitySwarmVariables );
 
 	_ForceTerm_Destroy( self, data );
 }



More information about the CIG-COMMITS mailing list