[cig-commits] commit: Merge in Underworld 1.4.1

Mercurial hg at geodynamics.org
Tue Mar 23 10:35:46 PDT 2010


changeset:   763:3c1e89b5ca8e
tag:         tip
parent:      751:db1efb7de63f
parent:      762:81e64776ac15
user:        Walter Landry <wlandry at caltech.edu>
date:        Tue Mar 23 08:16:33 2010 -0700
files:       Discretisation/src/FeVariable.c SLE/ProvidedSystems/AdvectionDiffusion/src/AdvectionDiffusionSLE.meta SLE/ProvidedSystems/AdvectionDiffusion/src/Multicorrector.meta plugins/StandardConditionFunctions/StandardConditionFunctions.c
description:
Merge in Underworld 1.4.1


diff -r db1efb7de63f -r 3c1e89b5ca8e .hgtags
--- a/.hgtags	Wed Mar 10 13:03:39 2010 -0800
+++ b/.hgtags	Tue Mar 23 08:16:33 2010 -0700
@@ -1,1 +1,7 @@ b4bef4d5490affd6a7e6532bb09f86a4b650b652
 b4bef4d5490affd6a7e6532bb09f86a4b650b652 v1.2.0
+89788c35ec9e89bc1ebc86fba3d51853f16d83b3 1.4.0
+3f7bf37e73dd83c68b2f3a693232846f9f9ee114 1.4.1
+3f7bf37e73dd83c68b2f3a693232846f9f9ee114 1.4.1
+0000000000000000000000000000000000000000 1.4.1
+0000000000000000000000000000000000000000 1.4.1
+5468b73a8d97dd9049a610627a46f7ffc7c17efe 1.4.1
diff -r db1efb7de63f -r 3c1e89b5ca8e Discretisation/src/FeVariable.c
--- a/Discretisation/src/FeVariable.c	Wed Mar 10 13:03:39 2010 -0800
+++ b/Discretisation/src/FeVariable.c	Tue Mar 23 08:16:33 2010 -0700
@@ -402,21 +402,20 @@ void _FeVariable_Build( void* variable, 
 
 		/** build the BCs */
 		Stg_Component_Build( self->feMesh, data, False );
-		Stg_Component_Build( self->dofLayout, data, False );
-		if ( self->bcs ){
-			Stg_Component_Build( self->bcs, data, False );
-		}
+		if ( self->dofLayout ) Stg_Component_Build( self->dofLayout, data, False );
+		if ( self->bcs       ) Stg_Component_Build( self->bcs,       data, False );
+		
 		/** only bother building the ics specified via XML/construct if we are not in restart mode
 		  - otherwise, we will use the checkpointed values anyway */
 		if ( self->ics && !(context && (True == context->loadFromCheckPoint) ) ) {
 			Stg_Component_Build( self->ics, data, False );
 		}
-		if ( self->linkedDofInfo ) {
-			Stg_Component_Build( self->linkedDofInfo, data, False );
-		}
+
+		if ( self->linkedDofInfo )	Stg_Component_Build( self->linkedDofInfo, data, False );
+
 
 		/** Extract component count. */
-		self->fieldComponentCount = self->dofLayout->_totalVarCount;
+		if ( self->dofLayout ) self->fieldComponentCount = self->dofLayout->_totalVarCount;
 
 		dim = Mesh_GetDimSize(self->feMesh);
 		/** allocate GNx here */
diff -r db1efb7de63f -r 3c1e89b5ca8e Discretisation/src/OperatorFeVariable.c
--- a/Discretisation/src/OperatorFeVariable.c	Wed Mar 10 13:03:39 2010 -0800
+++ b/Discretisation/src/OperatorFeVariable.c	Tue Mar 23 08:16:33 2010 -0700
@@ -182,7 +182,7 @@ OperatorFeVariable* OperatorFeVariable_N
 
 	self->isConstructed = True;
 	_FieldVariable_Init( (FieldVariable*)self, context, feVariableCount, dim, isCheckpointedAndReloaded, communicator, fieldVariable_Register );                                                                                                          
-   _FeVariable_Init( (FeVariable*)self, feMesh, geometryMesh, dofLayout, bcs, ics, linkedDofInfo, templateFeVariable, False, False );
+   _FeVariable_Init( (FeVariable*)self, feMesh, geometryMesh, dofLayout, bcs, ics, linkedDofInfo, templateFeVariable, True, False );
 	_OperatorFeVariable_Init( self, operatorName, feVariableCount, feVariableList, ownOperator );
 
 	return self;
@@ -321,7 +321,7 @@ void _OperatorFeVariable_AssignFromXML( 
 		Stg_ComponentFactory_ConstructByName( cf, (Name)feVariableName, FeVariable, True, data ); 
 	}
 
-	_FeVariable_Init( (FeVariable* ) self, feVariableList[0]->feMesh, feVariableList[0]->geometryMesh, feVariableList[0]->dofLayout, NULL, NULL, NULL, NULL, False, False );
+	_FeVariable_Init( (FeVariable* ) self, feVariableList[0]->feMesh, feVariableList[0]->geometryMesh, feVariableList[0]->dofLayout, NULL, NULL, NULL, NULL, True, False );
 	_OperatorFeVariable_Init( self, operatorName, feVariableCount, feVariableList, NULL );
 
 	Memory_Free( feVariableList );
@@ -332,7 +332,7 @@ void _OperatorFeVariable_Build( void* fe
 	Index						feVariable_I;
 	Stream*					errorStream = Journal_Register( Error_Type, (Name)self->type  );
 
-   _FieldVariable_Build( self, data );
+   _FeVariable_Build( self, data );
    
 	for ( feVariable_I = 0 ; feVariable_I < self->feVariableCount ; feVariable_I++ ) 
 		Stg_Component_Build( self->feVariableList[ feVariable_I ] , data, False );
diff -r db1efb7de63f -r 3c1e89b5ca8e SLE/ProvidedSystems/AdvectionDiffusion/src/AdvectionDiffusionSLE.meta
--- a/SLE/ProvidedSystems/AdvectionDiffusion/src/AdvectionDiffusionSLE.meta	Wed Mar 10 13:03:39 2010 -0800
+++ b/SLE/ProvidedSystems/AdvectionDiffusion/src/AdvectionDiffusionSLE.meta	Tue Mar 23 08:16:33 2010 -0700
@@ -36,7 +36,7 @@
 			<param name="Essential">True</param>
 			<param name="Name">PhiField</param>
 			<param name="Type">FeVariable</param>
-			<param name="Description">The field, refered to as $\\phi$, to which the advection and diffusion is taking place.</param>
+			<param name="Description">The field, refered to as $\phi$, to which the advection and diffusion is taking place.</param>
 		</struct>
 		<struct>
 			<param name="Essential">True</param>
diff -r db1efb7de63f -r 3c1e89b5ca8e SLE/ProvidedSystems/AdvectionDiffusion/src/Multicorrector.meta
--- a/SLE/ProvidedSystems/AdvectionDiffusion/src/Multicorrector.meta	Wed Mar 10 13:03:39 2010 -0800
+++ b/SLE/ProvidedSystems/AdvectionDiffusion/src/Multicorrector.meta	Tue Mar 23 08:16:33 2010 -0700
@@ -22,7 +22,7 @@
 			<param name="Name">gamma</param>
 			<param name="Type">Double</param>
 			<param name="Default">0.5</param>
-			<param name="Description">Factor used to calculate generalised mass matrix. If $\\gamma$ is 1/2, this is the trapezoidal rule.</param>
+			<param name="Description">Factor used to calculate generalised mass matrix. If $\gamma$ is 1/2, this is the trapezoidal rule.</param>
 		</struct>
 		<struct>
 			<param name="Name">multiCorrectorIterations</param>
diff -r db1efb7de63f -r 3c1e89b5ca8e SysTest/PerformanceTests/testAll.py
--- a/SysTest/PerformanceTests/testAll.py	Wed Mar 10 13:03:39 2010 -0800
+++ b/SysTest/PerformanceTests/testAll.py	Tue Mar 23 08:16:33 2010 -0700
@@ -35,13 +35,21 @@ def runTests():
     message = ''
     message += "--------------------------------------------------------\n" + \
           "[SYS] StgFEM Convergence Tests:\n" + \
-          "[SYS]      Total Passes: (" + str(passed) + "/" + str(len( commands )) + ")\n" \
-          "[SYS]      Failed Commands:\n"
-    for command in failed_commands:
-        message += "[SYS]            " + command + "\n"
+          "[SYS]      Total Passes: (" + str(passed) + "/" + str(len( commands )) + ")\n" 
+
+    if( len(failed_commands) > 0 ):
+        message += "[SYS]      Failed Commands:\n"
+        for command in failed_commands:
+            message += "[SYS]            " + command + "\n"
+
     message += "--------------------------------------------------------\n"
     FILE.write( message )
     print message
     FILE.close()
 
+    if failed > 0:
+        sys.exit(1)
+    else:
+        sys.exit(0)
+
 runTests()
diff -r db1efb7de63f -r 3c1e89b5ca8e SysTest/RegressionTests/testAll.py
--- a/SysTest/RegressionTests/testAll.py	Wed Mar 10 13:03:39 2010 -0800
+++ b/SysTest/RegressionTests/testAll.py	Tue Mar 23 08:16:33 2010 -0700
@@ -63,13 +63,21 @@ def runTests():
     message = ''
     message += "--------------------------------------------------------\n" + \
           "[SYS] StgFEM Normal-Res Integration Tests:\n" + \
-          "[SYS]      Total Passes: (" + str(passed) + "/" + str(len( commands )) + ")\n" \
-          "[SYS]      Failed Commands:\n"
-    for command in failed_commands:
-        message += "[SYS]            " + command + "\n"
+          "[SYS]      Total Passes: (" + str(passed) + "/" + str(len( commands )) + ")\n"
+
+    if( len(failed_commands) > 0 ):
+        message += "[SYS]      Failed Commands:\n"
+        for command in failed_commands:
+            message += "[SYS]            " + command + "\n"
+
     message += "--------------------------------------------------------\n"
     FILE.write( message )
     print message
     FILE.close()
 
+    if failed > 0:
+        sys.exit(1)
+    else:
+        sys.exit(0)
+
 runTests()
diff -r db1efb7de63f -r 3c1e89b5ca8e libStgFEM/src/Init.c
--- a/libStgFEM/src/Init.c	Wed Mar 10 13:03:39 2010 -0800
+++ b/libStgFEM/src/Init.c	Tue Mar 23 08:16:33 2010 -0700
@@ -80,7 +80,6 @@ Bool StgFEM_Init( int* argc, char** argv
 		/* Add the plugin path to the global plugin list */
 		ModulesManager_AddDirectory( "StgFEM", LIB_DIR );
 
-		ToolboxesManager_SetInitialised( stgToolboxesManager, "StgFEM" );
 		return True;
 	}
 	return False;
diff -r db1efb7de63f -r 3c1e89b5ca8e plugins/StandardConditionFunctions/StandardConditionFunctions.c
--- a/plugins/StandardConditionFunctions/StandardConditionFunctions.c	Wed Mar 10 13:03:39 2010 -0800
+++ b/plugins/StandardConditionFunctions/StandardConditionFunctions.c	Tue Mar 23 08:16:33 2010 -0700
@@ -216,6 +216,26 @@ void _StgFEM_StandardConditionFunctions_
         ConditionFunction_Register_Add( condFunc_Register, condFunc );
 }
 
+void _StgFEM_StandardConditionFunctions_Destroy( void* _self, void* data ) {
+   /* This function will totally clean the condFunc_Register
+    *
+    * This could be trouble some if other code adds or deletes condition functions on this register
+    */
+
+   unsigned *refCount = &(condFunc_Register->count);
+
+   /* first check if there are things still on the condFunc_Register, if so .... */
+   if( *refCount != 0 ) {
+      while( *refCount != 0 ) {
+
+         _ConditionFunction_Delete( condFunc_Register->_cf[ *refCount-1 ] );
+         condFunc_Register->_cf[ *refCount-1 ] = NULL;
+
+         *refCount = *refCount - 1;
+      }
+   }
+   _Codelet_Destroy( _self, data );
+}
 void* _StgFEM_StandardConditionFunctions_DefaultNew( Name name ) {
 	return Codelet_New(
 		StgFEM_StandardConditionFunctions_Type,
@@ -224,7 +244,7 @@ void* _StgFEM_StandardConditionFunctions
 		_Codelet_Build,
 		_Codelet_Initialise,
 		_Codelet_Execute,
-		_Codelet_Destroy,
+		_StgFEM_StandardConditionFunctions_Destroy,
 		name );
 }
 
@@ -1555,7 +1575,8 @@ void StgFEM_StandardConditionFunctions_M
    double* result = (double*)_result;
    double* coord, offsetLower, offsetUpper, left, right;
    double *wallCrd, pos;
-   int dim, wallDepth, ijk[3];
+   int dim, wallDepth;
+   unsigned ijk[3];
    char* movingWall;
    Grid* grid;
 
@@ -1584,7 +1605,7 @@ void StgFEM_StandardConditionFunctions_M
    ** from where the offset should be applied. */
    grid = *(Grid**)Mesh_GetExtension( mesh, Grid**, "vertexGrid" );
    assert( grid );
-   memset( ijk, 0, 3 * sizeof(int) );
+   memset( ijk, 0, 3 * sizeof(unsigned) );
    if( !strcmp( movingWall, "lower" ) ) {
       ijk[dim] = wallDepth;
       wallCrd = Mesh_GetVertex( mesh, Grid_Project( grid, ijk ) );



More information about the CIG-COMMITS mailing list