[cig-commits] commit: Forcing the swarm variables to be put on the LiveComponent_Register. This means they'll have the same life cycle as standard components
Mercurial
hg at geodynamics.org
Mon Feb 1 15:31:26 PST 2010
changeset: 356:0a59d0ad7ed2
branch: pcu_rejig
user: JulianGiordani
date: Wed Dec 09 14:21:33 2009 +1100
files: MaterialPoints/src/IntegrationPointsSwarm.c MaterialPoints/src/MaterialPointsSwarm.c
description:
Forcing the swarm variables to be put on the LiveComponent_Register. This means they'll have the same life cycle as standard components
diff -r 2ea33e98952c -r 0a59d0ad7ed2 MaterialPoints/src/IntegrationPointsSwarm.c
--- a/MaterialPoints/src/IntegrationPointsSwarm.c Tue Dec 08 16:37:05 2009 +1100
+++ b/MaterialPoints/src/IntegrationPointsSwarm.c Wed Dec 09 14:21:33 2009 +1100
@@ -238,6 +238,9 @@ void _IntegrationPointsSwarm_Init(
GetOffsetOfMember( particle , weight ),
Variable_DataType_Double );
+ LiveComponentRegister_Add( LiveComponentRegister_GetLiveComponentRegister(), (Stg_Component*)self->weightVariable );
+ LiveComponentRegister_Add( LiveComponentRegister_GetLiveComponentRegister(), (Stg_Component*)self->weightVariable->variable );
+
self->localCoordVariable = Swarm_NewVectorVariable(
self,
"LocalElCoord",
@@ -247,6 +250,8 @@ void _IntegrationPointsSwarm_Init(
"Xi",
"Eta",
"Zeta" );
+ LiveComponentRegister_Add( LiveComponentRegister_GetLiveComponentRegister(), (Stg_Component*)self->localCoordVariable );
+ LiveComponentRegister_Add( LiveComponentRegister_GetLiveComponentRegister(), (Stg_Component*)self->localCoordVariable->variable );
if ( timeIntegrator ) {
/* Assuming this is called from _IntegrationPointsSwarm_AssignFromXML, it would have always called construct
diff -r 2ea33e98952c -r 0a59d0ad7ed2 MaterialPoints/src/MaterialPointsSwarm.c
--- a/MaterialPoints/src/MaterialPointsSwarm.c Tue Dec 08 16:37:05 2009 +1100
+++ b/MaterialPoints/src/MaterialPointsSwarm.c Wed Dec 09 14:21:33 2009 +1100
@@ -166,8 +166,12 @@ void _MaterialPointsSwarm_Init(
"PositionX",
"PositionY",
"PositionZ" );
+ LiveComponentRegister_Add( LiveComponentRegister_GetLiveComponentRegister(), (Stg_Component*)self->particleCoordVariable->variable );
+ LiveComponentRegister_Add( LiveComponentRegister_GetLiveComponentRegister(), (Stg_Component*)self->particleCoordVariable );
self->materialIndexVariable = Swarm_NewScalarVariable( self, "MaterialIndex", GetOffsetOfMember( particle , materialIndex ), Variable_DataType_Int ); /* Should be unsigned int */
+ LiveComponentRegister_Add( LiveComponentRegister_GetLiveComponentRegister(), (Stg_Component*)self->materialIndexVariable->variable );
+ LiveComponentRegister_Add( LiveComponentRegister_GetLiveComponentRegister(), (Stg_Component*)self->materialIndexVariable );
/* If we have an escaped routine, clear the defensive flag. */
#if 0
More information about the CIG-COMMITS
mailing list