[cig-commits] commit: rejign
Mercurial
hg at geodynamics.org
Mon Feb 1 15:31:23 PST 2010
changeset: 354:46dfb08a8288
branch: pcu_rejig
user: John Mansour <john.mansour at maths.monash.edu.au>
date: Tue Dec 08 13:19:01 2009 +1100
files: Utils/src/BuoyancyForceTermThermoChem.c Utils/src/DiffusionSMT.c Utils/src/PCDVC.c Utils/src/PCDVC.h
description:
rejign
diff -r 9764d5156201 -r 46dfb08a8288 Utils/src/BuoyancyForceTermThermoChem.c
--- a/Utils/src/BuoyancyForceTermThermoChem.c Mon Dec 07 11:53:49 2009 +1100
+++ b/Utils/src/BuoyancyForceTermThermoChem.c Tue Dec 08 13:19:01 2009 +1100
@@ -143,6 +143,8 @@ void _BuoyancyForceTermThermoChem_Delete
void _BuoyancyForceTermThermoChem_Delete( void* forceTerm ) {
BuoyancyForceTermThermoChem* self = (BuoyancyForceTermThermoChem*)forceTerm;
+ Memory_Free( self->densitySwarmVariables );
+
_ForceTerm_Delete( self );
}
@@ -256,9 +258,11 @@ void _BuoyancyForceTermThermoChem_Destro
Index i;
for ( i = 0; i < self->materialSwarmCount; ++i ) {
- _Stg_Component_Delete( self->densitySwarmVariables[i] );
+ Stg_Component_Destroy( self->densitySwarmVariables[i], data, False );
}
- Memory_Free( self->densitySwarmVariables );
+
+ if ( self->temperatureField )
+ Stg_Component_Destroy( self->temperatureField, data, False );
_ForceTerm_Destroy( self, data );
}
diff -r 9764d5156201 -r 46dfb08a8288 Utils/src/DiffusionSMT.c
--- a/Utils/src/DiffusionSMT.c Mon Dec 07 11:53:49 2009 +1100
+++ b/Utils/src/DiffusionSMT.c Tue Dec 08 13:19:01 2009 +1100
@@ -221,7 +221,11 @@ void _DiffusionSMT_Execute( void* matrix
}
void _DiffusionSMT_Destroy( void* matrixTerm, void* data ) {
+ DiffusionSMT* self = (DiffusionSMT*)matrixTerm;
+ int ii;
_StiffnessMatrixTerm_Destroy( matrixTerm, data );
+ for ( ii = 0; ii < self->materialSwarmCount; ++ii )
+ Stg_Component_Destroy( self->diffusionSwarmVariables[ii], data, False );
}
diff -r 9764d5156201 -r 46dfb08a8288 Utils/src/PCDVC.c
--- a/Utils/src/PCDVC.c Mon Dec 07 11:53:49 2009 +1100
+++ b/Utils/src/PCDVC.c Tue Dec 08 13:19:01 2009 +1100
@@ -212,7 +212,7 @@ void* _PCDVC_DefaultNew( Name name ) {
Stg_Component_BuildFunction* _build = _PCDVC_Build;
Stg_Component_InitialiseFunction* _initialise = _PCDVC_Initialise;
Stg_Component_ExecuteFunction* _execute = _PCDVC_Execute;
- Stg_Component_DestroyFunction* _destroy = NULL;
+ Stg_Component_DestroyFunction* _destroy = _PCDVC_Destroy;
AllocationType nameAllocationType = NON_GLOBAL;
WeightsCalculator_CalculateFunction* _calculate = _PCDVC_Calculate;
@@ -268,6 +268,12 @@ void _PCDVC_Build( void* pcdvc, void* da
void _PCDVC_Build( void* pcdvc, void* data ) {
PCDVC* self = (PCDVC*)pcdvc;
_DVCWeights_Build( self, data );
+ Stg_Component_Build( self->materialPointsSwarm, data, False );
+}
+void _PCDVC_Destroy( void* pcdvc, void* data ) {
+ PCDVC* self = (PCDVC*)pcdvc;
+ _DVCWeights_Destroy( self, data );
+ Stg_Component_Destroy( self->materialPointsSwarm, data, False );
}
void _PCDVC_Initialise( void* pcdvc, void* data ) {
PCDVC* self = (PCDVC*)pcdvc;
@@ -282,7 +288,7 @@ void _PCDVC_Initialise( void* pcdvc, voi
self->splitInInterfaceCells = True;
self->deleteInInterfaceCells = True;
}
-
+ Stg_Component_Initialise( self->materialPointsSwarm, data, False );
_DVCWeights_Initialise( self, data );
}
void _PCDVC_Execute( void* pcdvc, void* data ) {
diff -r 9764d5156201 -r 46dfb08a8288 Utils/src/PCDVC.h
--- a/Utils/src/PCDVC.h Mon Dec 07 11:53:49 2009 +1100
+++ b/Utils/src/PCDVC.h Tue Dec 08 13:19:01 2009 +1100
@@ -157,6 +157,7 @@ void _PCDVC_AssignFromXML( void* pcdvc,
void _PCDVC_Build( void* pcdvc, void* data ) ;
void _PCDVC_Initialise( void* pcdvc, void* data ) ;
+void _PCDVC_Destroy( void* pcdvc, void* data ) ;
void _PCDVC_Execute( void* pcdvc, void* data );
MaterialPointRef* getIntParticleMaterialRef_PointingToMaterialParticle( IntegrationPointsSwarm* intSwarm, Particle_Index matLastParticle_IndexOnCPU );
void splitIntParticleByIndexWithinCell( IntegrationPointsSwarm* intSwarm, MaterialPointsSwarm* matSwarm, Cell_LocalIndex lCell_I, Particle_Index intParticleToSplit_IndexOnCPU, Coord xi );
More information about the CIG-COMMITS
mailing list