[cig-commits] commit: Fixed double deletion of densitySwarmVariables in the _Destroy function.

Mercurial hg at geodynamics.org
Mon Feb 1 15:30:36 PST 2010


changeset:   313:de1e9fae44d9
branch:      pcu_rejig
user:        JericoRevote
date:        Tue Nov 17 17:24:43 2009 +1100
files:       Utils/src/BuoyancyForceTermThermoChem.c Utils/src/BuoyancyForceTermThermoChem.h
description:
Fixed double deletion of densitySwarmVariables in the _Destroy function.


diff -r 5dba221bb043 -r de1e9fae44d9 Utils/src/BuoyancyForceTermThermoChem.c
--- a/Utils/src/BuoyancyForceTermThermoChem.c	Tue Nov 17 14:48:42 2009 +1100
+++ b/Utils/src/BuoyancyForceTermThermoChem.c	Tue Nov 17 17:24:43 2009 +1100
@@ -238,7 +238,7 @@ void _BuoyancyForceTermThermoChem_Build(
 		name = Stg_Object_AppendSuffix( materialSwarms[materialSwarm_I], "Density" );
 		self->densitySwarmVariables[materialSwarm_I] = MaterialSwarmVariable_New( 
 				name,
-				self->context,
+				(AbstractContext*) self->context,
 				materialSwarms[materialSwarm_I], 
 				1, 
 				self->materials_Register, 
@@ -278,7 +278,6 @@ void _BuoyancyForceTermThermoChem_Destro
 	for ( i = 0; i < self->materialSwarmCount; ++i ) {
 		Stg_Class_Delete( self->densitySwarmVariables[i] );
 	}
-	Stg_Class_Delete( self->densitySwarmVariables );
 
 	_ForceTerm_Destroy( self, data );
 }
diff -r 5dba221bb043 -r de1e9fae44d9 Utils/src/BuoyancyForceTermThermoChem.h
--- a/Utils/src/BuoyancyForceTermThermoChem.h	Tue Nov 17 14:48:42 2009 +1100
+++ b/Utils/src/BuoyancyForceTermThermoChem.h	Tue Nov 17 17:24:43 2009 +1100
@@ -109,9 +109,17 @@
 		Stg_Component_ExecuteFunction*                      _execute,
 		Stg_Component_DestroyFunction*                      _destroy,
 		ForceTerm_AssembleElementFunction*                  _assembleElement,		
-		BuoyancyForceTermThermoChem_CalcRaTFunction*              _calcRaT,
-		BuoyancyForceTermThermoChem_CalcRaCFunction*              _calcRaC,
+		BuoyancyForceTermThermoChem_CalcRaTFunction*			_calcRaT,
+		BuoyancyForceTermThermoChem_CalcRaCFunction*			_calcRaC,
 		Name                                                name );
+
+	void _BuoyancyForceTermThermoChem_Init(
+		BuoyancyForceTermThermoChem*  self, 
+		FeVariable*                   temperatureField,
+		double                        RaT,
+		double                        RaC,
+		Bool                          adjust,
+		Materials_Register*           materials_Register );
 	
 	void _BuoyancyForceTermThermoChem_Delete( void* forceTerm );
 



More information about the CIG-COMMITS mailing list