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

walter at geodynamics.org walter at geodynamics.org
Tue Aug 1 01:53:54 PDT 2006


Author: walter
Date: 2006-08-01 01:53:54 -0700 (Tue, 01 Aug 2006)
New Revision: 4152

Modified:
   long/3D/Gale/trunk/src/PICellerator/
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/ParticleFeVariable.c
Log:
 r465 at earth:  boo | 2006-08-01 01:52:05 -0700
  r460 at earth (orig r363):  PatrickSunter | 2006-07-25 20:25:13 -0700
  Checkpoint-related fix to ParticleFeVariable that fixes problems Bec and Wendy encountered:
     * ParticleFeVariable now calls Variable_Update() on the new field variable it creates,
     before it calls the _FieldVariable_Initialise() function.
     * This is necessary since _FieldVariable_Initialise() may immediately load a checkpointed
     value, and thus the dataVariable has to be ready to be used immediately.
  
 



Property changes on: long/3D/Gale/trunk/src/PICellerator
___________________________________________________________________
Name: svk:merge
   - 00de75e2-39f1-0310-8538-9683d00a49cc:/trunk:362
aee11096-cf10-0410-a191-eea5772ba81f:/cig:464
   + 00de75e2-39f1-0310-8538-9683d00a49cc:/trunk:363
aee11096-cf10-0410-a191-eea5772ba81f:/cig:465

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/ParticleFeVariable.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/ParticleFeVariable.c	2006-08-01 08:53:54 UTC (rev 4151)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/ParticleFeVariable.c	2006-08-01 08:53:54 UTC (rev 4152)
@@ -212,26 +212,39 @@
 	Stg_Component_Build( self->feMesh, data, False );
 	self->data = Memory_Alloc_Array( double, self->feMesh->nodeDomainCount * self->fieldComponentCount, "data" );
 
+	/* Do a Variable_Update() first as well as last, since if we are loading from checkpoint we need
+	to make sure the variable exists to put ICs onto - and we only just allocated it */
+	Stg_Component_Build( self->dataVariable, data, False );
+	Variable_Update( self->dataVariable );
+
 	_FeVariable_Build( self, data );
 
 	Stg_Component_Build( self->assemblyVector, data, False );
 	Stg_Component_Build( self->massMatrix, data, False );
-	Stg_Component_Build( self->dataVariable, data, False );
+
+	Variable_Update( self->dataVariable );
 }
+
 void _ParticleFeVariable_Initialise( void* materialFeVariable, void* data ) {
 	ParticleFeVariable* self = (ParticleFeVariable*) materialFeVariable;
 
+	/* Do a Variable_Update() first as well as last, since if we are loading from checkpoint we need
+	to make sure the variable exists to put ICs onto */
+	Stg_Component_Initialise( self->dataVariable, data, False );
+	Variable_Update( self->dataVariable );
+
 	_FeVariable_Initialise( self, data );
 
-	Stg_Component_Initialise( self->dataVariable, data, False );
 	Variable_Update( self->dataVariable );
 	ParticleFeVariable_Update( self );
 }
+
 void _ParticleFeVariable_Execute( void* materialFeVariable, void* data ) {
 	ParticleFeVariable* self = (ParticleFeVariable*) materialFeVariable;
 
 	_FeVariable_Execute( self, data );
 }
+
 void _ParticleFeVariable_Destroy( void* materialFeVariable, void* data ) {
 	ParticleFeVariable* self = (ParticleFeVariable*) materialFeVariable;
 



More information about the cig-commits mailing list