[cig-commits] commit: Merge.....

Mercurial hg at geodynamics.org
Tue Mar 23 10:34:24 PDT 2010


changeset:   397:18e6824ba05a
branch:      1.4.x
parent:      396:6e39a0ce6024
parent:      394:aa90af8b3cb3
user:        MirkoVelic
date:        Tue Feb 02 16:35:26 2010 +1100
files:       Utils/src/PCDVC.c
description:
Merge.....


diff -r 6e39a0ce6024 -r 18e6824ba05a MaterialPoints/src/MaterialFeVariable.c
--- a/MaterialPoints/src/MaterialFeVariable.c	Tue Feb 02 16:33:48 2010 +1100
+++ b/MaterialPoints/src/MaterialFeVariable.c	Tue Feb 02 16:35:26 2010 +1100
@@ -163,15 +163,8 @@ void _MaterialFeVariable_Build( void* ma
 
 	tmpName = Stg_Object_AppendSuffix( self, (Name)"DataVariable"  );
 	assert( Class_IsSuper( self->feMesh->topo, IGraph ) );
-	self->dataVariable = Variable_NewScalar( 
-		tmpName,
-		(AbstractContext*)self->context,
-		Variable_DataType_Double, 
-		&((IGraph*)self->feMesh->topo)->remotes[MT_VERTEX]->nDomains, 
-		NULL,
-		(void**)&self->data, 
-		variable_Register );
-	Memory_Free( tmpName );
+	self->dataVariable = Variable_NewScalar( tmpName, (AbstractContext*)self->context, Variable_DataType_Double, (Index*)&((IGraph*)self->feMesh->topo)->remotes[MT_VERTEX]->nDomains, NULL, (void**)&self->data, variable_Register );
+	Memory_Free( tmpName  );
 	self->fieldComponentCount = 1;
 	
 	tmpName = Stg_Object_AppendSuffix( self, (Name)"DofLayout"  );
diff -r 6e39a0ce6024 -r 18e6824ba05a MaterialPoints/src/MaterialPointsSwarm.c
--- a/MaterialPoints/src/MaterialPointsSwarm.c	Tue Feb 02 16:33:48 2010 +1100
+++ b/MaterialPoints/src/MaterialPointsSwarm.c	Tue Feb 02 16:35:26 2010 +1100
@@ -314,7 +314,7 @@ void _MaterialPointsSwarm_Initialise( vo
 	}
 
 	/* Now setup the material properties */
-   if(  False == context->loadFromCheckPoint ) {
+   if(  False == context->loadSwarmsFromCheckpoint ) {
 
       /* Beforehand, set each particle to have UNDEFINED_MATERIAL */
       for ( lParticle_I = 0; lParticle_I < self->particleLocalCount; lParticle_I++ ) {
@@ -336,7 +336,7 @@ void _MaterialPointsSwarm_Initialise( vo
 
 	/** if loading from checkpoint, particle materials etc have already been loaded in Swarm_Build() - */ 
 	/** possibly need to check for empty cells (and populate) if performing a interpolation restart */
-   if ( True == context->loadFromCheckPoint ){
+   if ( True == context->loadSwarmsFromCheckpoint ){
       if ( (True == self->isSwarmTypeToCheckPointAndReload) && (True == context->interpolateRestart) ) {	   
          Particle_InCellIndex cParticle_I         = 0;
          Particle_InCellIndex particle_I          = 0;
diff -r 6e39a0ce6024 -r 18e6824ba05a MaterialPoints/src/ParticleFeVariable.c
--- a/MaterialPoints/src/ParticleFeVariable.c	Tue Feb 02 16:33:48 2010 +1100
+++ b/MaterialPoints/src/ParticleFeVariable.c	Tue Feb 02 16:35:26 2010 +1100
@@ -199,9 +199,8 @@ void _ParticleFeVariable_Initialise( voi
 	Variable_Update( self->dataVariable );
 	/* If loading from CP, _don't_ recalculate the field as we've already just loaded it!
 		-- PatrickSunter 22 Nov 2006 */
-	if ( !(context && (True == context->loadFromCheckPoint)  ) ) {
+	if ( context && (False == context->loadFromCheckPoint) )
 		ParticleFeVariable_Update( self );
-	}
 }
 
 void _ParticleFeVariable_Execute( void* materialFeVariable, void* _ctx ) {
diff -r 6e39a0ce6024 -r 18e6824ba05a MaterialPoints/src/SwarmAdvector.c
--- a/MaterialPoints/src/SwarmAdvector.c	Tue Feb 02 16:33:48 2010 +1100
+++ b/MaterialPoints/src/SwarmAdvector.c	Tue Feb 02 16:35:26 2010 +1100
@@ -239,7 +239,8 @@ void _SwarmAdvector_Initialise( void* sw
    Stg_Component_Initialise( self->swarm, data, False );
 	if ( self->periodicBCsManager )
 		Stg_Component_Initialise( self->periodicBCsManager, data, False );
-	_TimeIntegrand_Initialise( self, data );
+   if ( self->context->loadSwarmsFromCheckpoint == False )
+      _TimeIntegrand_Initialise( self, data );
 }
 
 void _SwarmAdvector_Execute( void* swarmAdvector, void* data ) {
diff -r 6e39a0ce6024 -r 18e6824ba05a MaterialPoints/src/SwarmVariableField.c
--- a/MaterialPoints/src/SwarmVariableField.c	Tue Feb 02 16:33:48 2010 +1100
+++ b/MaterialPoints/src/SwarmVariableField.c	Tue Feb 02 16:35:26 2010 +1100
@@ -135,9 +135,9 @@ void _SwarmVariableField_AssignFromXML( 
 	variable_Register = self->context->variable_Register; 
 
 	// TODO: just get the textual name here - see gLucifer's SwarmPlotter DrawignObject 
-	swarmVarName = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"swarmVariable", ""  );
+	swarmVarName = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"swarmVariable", "" );
 
-	materialSwarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"MaterialSwarm", MaterialPointsSwarm, True, data  );
+	materialSwarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"MaterialSwarm", MaterialPointsSwarm, True, data );
 	integrationSwarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Swarm", IntegrationPointsSwarm, True, NULL );
 	assert( integrationSwarm  );
 
@@ -156,13 +156,7 @@ void _SwarmVariableField_Build( void* sw
 	 * as other components are not necessarily built yet... dave. 03.10.07 */
 	assert( Class_IsSuper( self->feMesh->topo, IGraph ) );
 	tmpName = Stg_Object_AppendSuffix( self, (Name)"DataVariable"  );
-	self->dataVariable = Variable_NewScalar( tmpName,
-		(AbstractContext*)self->context,
-		Variable_DataType_Double,
-		&nDomainVerts,
-		NULL,
-		(void**)&self->data,
-		self->variable_Register );
+	self->dataVariable = Variable_NewScalar( tmpName, (AbstractContext*)self->context, Variable_DataType_Double, (Index*)&nDomainVerts, NULL, (void**)&self->data, self->variable_Register );
 	Memory_Free( tmpName );
 	self->fieldComponentCount = 1;
 
diff -r 6e39a0ce6024 -r 18e6824ba05a Utils/src/DiffusionSMT.c
--- a/Utils/src/DiffusionSMT.c	Tue Feb 02 16:33:48 2010 +1100
+++ b/Utils/src/DiffusionSMT.c	Tue Feb 02 16:35:26 2010 +1100
@@ -133,10 +133,11 @@ void* _DiffusionSMT_DefaultNew( Name nam
 
 void _DiffusionSMT_AssignFromXML( void* matrixTerm, Stg_ComponentFactory* cf, void* data ) {
     DiffusionSMT*            self             = (DiffusionSMT*)matrixTerm;
-    PICelleratorContext*     context	      = (PICelleratorContext*)self->context;
+    PICelleratorContext*     context;
 
     /* Construct Parent */
     _StiffnessMatrixTerm_AssignFromXML( self, cf, data );
+    context = (PICelleratorContext*)self->context;
 
     _DiffusionSMT_Init( self );
 
@@ -159,10 +160,8 @@ void _DiffusionSMT_Build( void* matrixTe
     _StiffnessMatrixTerm_Build( self, data );
 
     /* Get Component Factory if we can */
-    if ( Stg_Class_IsInstance( data, AbstractContext_Type ) ) {
-	context = (AbstractContext*) data;
-	cf = context->CF;
-    }
+    context = self->context;
+    cf = context->CF;
 
     /* Sort out material extension stuff */
     self->materialExtHandle = Materials_Register_AddMaterialExtension(
diff -r 6e39a0ce6024 -r 18e6824ba05a Utils/src/PCDVC.c
--- a/Utils/src/PCDVC.c	Tue Feb 02 16:33:48 2010 +1100
+++ b/Utils/src/PCDVC.c	Tue Feb 02 16:35:26 2010 +1100
@@ -290,7 +290,7 @@ void _PCDVC_Initialise( void* pcdvc, voi
     /** for interpolation restart, we need to set these values high to ensure correct population of */
     /** integration point swarms                                                                    */
     /** these parameters will be reset to correct values after first timestep                       */
-    if ( (True == self->context->loadFromCheckPoint) && (True == self->context->interpolateRestart) ){
+    if ( (True == self->context->loadSwarmsFromCheckpoint) && (True == self->context->interpolateRestart) ){
         self->maxDeletions           = 999999;
         self->maxSplits              = 999999;
         self->Inflow                 = True;



More information about the CIG-COMMITS mailing list