[cig-commits] r6199 - in long/3D/Gale/trunk/src/StgFEM: . Assembly/src Assembly/tests/plugins Discretisation/tests Discretisation/tests/output SLE/ProvidedSystems/AdvectionDiffusion/tests SLE/ProvidedSystems/AdvectionDiffusion/tests/output SLE/ProvidedSystems/StokesFlow/src SLE/SystemSetup/src SLE/SystemSetup/tests libStG_FEM/src libStG_FEM/tests libStG_FEM/tests/expected plugins/Output/FrequentOutput/tests/output plugins/StandardConditionFunctions

walter at geodynamics.org walter at geodynamics.org
Thu Mar 8 11:53:12 PST 2007


Author: walter
Date: 2007-03-08 11:43:06 -0800 (Thu, 08 Mar 2007)
New Revision: 6199

Removed:
   long/3D/Gale/trunk/src/StgFEM/Discretisation/tests/testFeEquationNumber-LinkedDofs.xml
Modified:
   long/3D/Gale/trunk/src/StgFEM/
   long/3D/Gale/trunk/src/StgFEM/Assembly/src/GradientStiffnessMatrixTerm.c
   long/3D/Gale/trunk/src/StgFEM/Assembly/src/GradientStiffnessMatrixTerm.h
   long/3D/Gale/trunk/src/StgFEM/Assembly/src/IsoviscousStressTensorTerm.c
   long/3D/Gale/trunk/src/StgFEM/Assembly/src/IsoviscousStressTensorTerm.h
   long/3D/Gale/trunk/src/StgFEM/Assembly/src/LaplacianStiffnessMatrixTerm.c
   long/3D/Gale/trunk/src/StgFEM/Assembly/src/LaplacianStiffnessMatrixTerm.h
   long/3D/Gale/trunk/src/StgFEM/Assembly/tests/plugins/testStressTensor.c
   long/3D/Gale/trunk/src/StgFEM/Discretisation/tests/output/
   long/3D/Gale/trunk/src/StgFEM/Discretisation/tests/testFeEquationNumber-LinkedDofs.c
   long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/AdvectionDiffusion/tests/output/
   long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/AdvectionDiffusion/tests/testLumpedMassMatrix.c
   long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UzawaPreconditionerTerm.c
   long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UzawaPreconditionerTerm.h
   long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/Context.c
   long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/EntryPoint.c
   long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/EntryPoint.h
   long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/PETScShellMatrix.c
   long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/SolutionVector.c
   long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrix.c
   long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrix.h
   long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrixTerm.c
   long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrixTerm.h
   long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/SystemLinearEquations.c
   long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/tests/testStiffnessMatrix.c
   long/3D/Gale/trunk/src/StgFEM/libStG_FEM/src/Init.c
   long/3D/Gale/trunk/src/StgFEM/libStG_FEM/tests/expected/testLibStgFEM.0of1.expected
   long/3D/Gale/trunk/src/StgFEM/libStG_FEM/tests/testLibStgFEM.c
   long/3D/Gale/trunk/src/StgFEM/plugins/Output/FrequentOutput/tests/output/
   long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c
   long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.h
Log:
 r1038 at earth (orig r771):  LukeHodkinson | 2007-03-06 14:28:06 -0800
 Keeping the branch up to date with the trunk.
 
 



Property changes on: long/3D/Gale/trunk/src/StgFEM
___________________________________________________________________
Name: svk:merge
   - 38867592-cf10-0410-9e16-a142ea72ac34:/cig:880
db209038-57f2-0310-97fa-b160e0ae9d04:/branches/decomp3d:767
db209038-57f2-0310-97fa-b160e0ae9d04:/trunk:669
   + 38867592-cf10-0410-9e16-a142ea72ac34:/cig:880
db209038-57f2-0310-97fa-b160e0ae9d04:/branches/decomp3d:771
db209038-57f2-0310-97fa-b160e0ae9d04:/trunk:669

Modified: long/3D/Gale/trunk/src/StgFEM/Assembly/src/GradientStiffnessMatrixTerm.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/Assembly/src/GradientStiffnessMatrixTerm.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/Assembly/src/GradientStiffnessMatrixTerm.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -191,6 +191,7 @@
 		StiffnessMatrix*                                   stiffnessMatrix, 
 		Element_LocalIndex                                 lElement_I, 
 		SystemLinearEquations*                             sle,
+		FiniteElementContext*                              context,
 		double**                                           elStiffMat ) 
 {
 	GradientStiffnessMatrixTerm*        self         = Stg_CheckType( matrixTerm, GradientStiffnessMatrixTerm );

Modified: long/3D/Gale/trunk/src/StgFEM/Assembly/src/GradientStiffnessMatrixTerm.h
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/Assembly/src/GradientStiffnessMatrixTerm.h	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/Assembly/src/GradientStiffnessMatrixTerm.h	2007-03-08 19:43:06 UTC (rev 6199)
@@ -95,6 +95,7 @@
 		StiffnessMatrix*                                   stiffnessMatrix, 
 		Element_LocalIndex                                 lElement_I, 
 		SystemLinearEquations*                             sle,
+		FiniteElementContext*                              context,
 		double**                                           elStiffMat ) ;
 
 #endif

Modified: long/3D/Gale/trunk/src/StgFEM/Assembly/src/IsoviscousStressTensorTerm.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/Assembly/src/IsoviscousStressTensorTerm.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/Assembly/src/IsoviscousStressTensorTerm.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -197,6 +197,7 @@
 		StiffnessMatrix*                                   stiffnessMatrix, 
 		Element_LocalIndex                                 lElement_I, 
 		SystemLinearEquations*                             sle,
+		FiniteElementContext*                              context,
 		double**                                           elStiffMat ) 
 {
 	IsoviscousStressTensorTerm*         self         = Stg_CheckType( matrixTerm, IsoviscousStressTensorTerm );

Modified: long/3D/Gale/trunk/src/StgFEM/Assembly/src/IsoviscousStressTensorTerm.h
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/Assembly/src/IsoviscousStressTensorTerm.h	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/Assembly/src/IsoviscousStressTensorTerm.h	2007-03-08 19:43:06 UTC (rev 6199)
@@ -98,6 +98,7 @@
 		StiffnessMatrix*                                   stiffnessMatrix, 
 		Element_LocalIndex                                 lElement_I, 
 		SystemLinearEquations*                             sle,
+		FiniteElementContext*                              context,
 		double**                                           elStiffMat ) ;
 
 #endif

Modified: long/3D/Gale/trunk/src/StgFEM/Assembly/src/LaplacianStiffnessMatrixTerm.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/Assembly/src/LaplacianStiffnessMatrixTerm.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/Assembly/src/LaplacianStiffnessMatrixTerm.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -191,6 +191,7 @@
 		StiffnessMatrix*                                   stiffnessMatrix, 
 		Element_LocalIndex                                 lElement_I, 
 		SystemLinearEquations*                             sle,
+		FiniteElementContext*                              context,
 		double**                                           elStiffMat ) 
 {
 	LaplacianStiffnessMatrixTerm*       self         = Stg_CheckType( matrixTerm, LaplacianStiffnessMatrixTerm );

Modified: long/3D/Gale/trunk/src/StgFEM/Assembly/src/LaplacianStiffnessMatrixTerm.h
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/Assembly/src/LaplacianStiffnessMatrixTerm.h	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/Assembly/src/LaplacianStiffnessMatrixTerm.h	2007-03-08 19:43:06 UTC (rev 6199)
@@ -95,6 +95,7 @@
 		StiffnessMatrix*                                   stiffnessMatrix, 
 		Element_LocalIndex                                 lElement_I, 
 		SystemLinearEquations*                             sle,
+		FiniteElementContext*                              context,
 		double**                                           elStiffMat ) ;
 
 #endif

Modified: long/3D/Gale/trunk/src/StgFEM/Assembly/tests/plugins/testStressTensor.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/Assembly/tests/plugins/testStressTensor.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/Assembly/tests/plugins/testStressTensor.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -57,7 +57,7 @@
 	kMatrix = (StiffnessMatrix*) LiveComponentRegister_Get( context->CF->LCRegister, "k_matrix" );
 	assert( kMatrix );
 
-	StiffnessMatrix_Assemble( kMatrix, False, NULL );
+	StiffnessMatrix_Assemble( kMatrix, False, NULL, context );
 }
 
 void _testStressTensor_Construct( void* component, Stg_ComponentFactory* cf, void* data ) {


Property changes on: long/3D/Gale/trunk/src/StgFEM/Discretisation/tests/output
___________________________________________________________________
Name: svn:ignore
   - velocity.*.dat

   + *.xml
velocity.*.dat


Modified: long/3D/Gale/trunk/src/StgFEM/Discretisation/tests/testFeEquationNumber-LinkedDofs.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/Discretisation/tests/testFeEquationNumber-LinkedDofs.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/Discretisation/tests/testFeEquationNumber-LinkedDofs.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -111,8 +111,9 @@
 
 	/* Read input */
 	dictionary = Dictionary_New();
+	Dictionary_Add( dictionary, "outputPath", Dictionary_Entry_Value_FromString( "./output" ) );
 	io_Handler = XML_IO_Handler_New();
-	IO_Handler_ReadAllFromFile( io_Handler, "testFeEquationNumber-LinkedDofs.xml", dictionary );
+	IO_Handler_ReadAllFromFile( io_Handler, "./data/testFeEquationNumber-LinkedDofs.xml", dictionary );
 
 	Dictionary_Add( dictionary, "meshSizeI", Dictionary_Entry_Value_FromUnsignedInt( 0 ) );
 	Dictionary_Add( dictionary, "meshSizeJ", Dictionary_Entry_Value_FromUnsignedInt( 0 ) );

Deleted: long/3D/Gale/trunk/src/StgFEM/Discretisation/tests/testFeEquationNumber-LinkedDofs.xml
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/Discretisation/tests/testFeEquationNumber-LinkedDofs.xml	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/Discretisation/tests/testFeEquationNumber-LinkedDofs.xml	2007-03-08 19:43:06 UTC (rev 6199)
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE StGermainData SYSTEM "stgermain.dtd">
-<!-- A StGermain input file -->
-<!-- DTD to validate against -->
-<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
-
-	<param name="dim"> 3 </param>
-	<param name="minX"> 0.0f </param>
-	<param name="minY"> 0.0f </param>
-	<param name="minZ"> 0.0f </param>
-	<param name="maxX"> 1.0f </param>
-	<param name="maxY"> 1.0f </param>
-	<param name="maxZ"> 1.0f </param>
-	<param name="allowPartitionOnElement"> False </param>
-	<param name="allowUnbalancing"> True </param>
-	<param name="buildElementNodeTbl"> True </param>
-
-	<struct name="wallBC">
-		<param name="type"> WallVC </param>
-		<param name="wall"> left </param>
-		<list name="variables">
-			<struct>
-				<param name="name"> x </param>
-				<param name="type"> double </param>
-				<param name="value"> -1.0f </param>
-			</struct>
-		</list>
-	</struct>	
-	
-	<struct name="components">
-		<struct name="testShape">
-			<param name="Type">Sphere</param>
-			<param name="CentreX">0.5</param>
-			<param name="CentreY">0.5</param>
-			<param name="CentreZ">0</param>
-			<param name="radius">0.25</param>
-		</struct>
-	</struct>
-
-	<list name="linkSpecifications">	
-		<struct>
-			<param name="dofSet">0</param>
-			<param name="wall">bottom</param>
-			<param name="dof">1</param>
-		</struct>
-		<struct>
-			<param name="dofSet">1</param>
-			<param name="wall">left</param>
-			<param name="dof">2</param>
-		</struct>
-		<struct>
-			<param name="dofSet">1</param>
-			<param name="wall">right</param>
-			<param name="dof">2</param>
-		</struct>
-		<struct>
-			<param name="dofSet">2</param>
-			<param name="shape">testShape</param>
-			<param name="dof">1</param>
-		</struct>
-	</list>	
-
-</StGermainData>


Property changes on: long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/AdvectionDiffusion/tests/output
___________________________________________________________________
Name: svn:ignore
   - output.dat

   + *


Modified: long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/AdvectionDiffusion/tests/testLumpedMassMatrix.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/AdvectionDiffusion/tests/testLumpedMassMatrix.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/AdvectionDiffusion/tests/testLumpedMassMatrix.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -159,6 +159,7 @@
 	
 	/* Read input */
 	dictionary = Dictionary_New();
+	Dictionary_Add( dictionary, "outputPath", Dictionary_Entry_Value_FromString( "./output" ) );
 	Dictionary_Add( dictionary, "rank", Dictionary_Entry_Value_FromUnsignedInt( rank ) );
 	Dictionary_Add( dictionary, "numProcessors", Dictionary_Entry_Value_FromUnsignedInt( numProcessors ) );
 	Dictionary_Add( dictionary, "gaussParticlesX", Dictionary_Entry_Value_FromUnsignedInt( 2 ) );

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UzawaPreconditionerTerm.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UzawaPreconditionerTerm.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UzawaPreconditionerTerm.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -193,6 +193,7 @@
 		StiffnessMatrix*                                   stiffnessMatrix, 
 		Element_LocalIndex                                 lElement_I, 
 		SystemLinearEquations*                             _sle,
+		FiniteElementContext*                              context,
 		double**                                           elPreconditioner ) 
 {
 	Stokes_SLE*            sle              = Stg_DCheckType( _sle, Stokes_SLE );
@@ -227,10 +228,10 @@
 	kInverseG      = Memory_Alloc_2DArray( double, velocityDofCount, pressureDofCount, "[ diag(K) ]^-1 G" );
 
 	/* Assemble Element G */
-	StiffnessMatrix_AssembleElement( gMatrix, lElement_I, _sle, gElementMatrix );
+	StiffnessMatrix_AssembleElement( gMatrix, lElement_I, _sle, context, gElementMatrix );
 
 	/* Assemble Element K */
-	StiffnessMatrix_AssembleElement( kMatrix, lElement_I, _sle, kElementMatrix );
+	StiffnessMatrix_AssembleElement( kMatrix, lElement_I, _sle, context, kElementMatrix );
 
 	/* Assemble [ diag(K) ]^-1 G */
 	for ( row_I = 0 ; row_I < velocityDofCount ; row_I++ ) {
@@ -260,7 +261,7 @@
 		mElementMatrix = Memory_Alloc_2DArray( double, pressureDofCount, pressureDofCount, "m element matrix" );
 		memset( mElementMatrix[0], 0, sizeof(double) * pressureDofCount * pressureDofCount );
 
-		StiffnessMatrix_AssembleElement( cMatrix, lElement_I, _sle, mElementMatrix );
+		StiffnessMatrix_AssembleElement( cMatrix, lElement_I, _sle, context, mElementMatrix );
 
 		for ( row_I = 0 ; row_I < pressureDofCount ; row_I++ ) {
 			for ( col_I = 0 ; col_I < pressureDofCount ; col_I++ ) {

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UzawaPreconditionerTerm.h
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UzawaPreconditionerTerm.h	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UzawaPreconditionerTerm.h	2007-03-08 19:43:06 UTC (rev 6199)
@@ -95,6 +95,7 @@
 		StiffnessMatrix*                                   stiffnessMatrix, 
 		Element_LocalIndex                                 lElement_I, 
 		SystemLinearEquations*                             sle,
+		FiniteElementContext*                              context,
 		double**                                           elStiffMat ) ;
 
 #endif

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/Context.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/Context.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/Context.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -176,7 +176,7 @@
 	/* Set up stream preferences */
 	Journal_Enable_NamedStream( InfoStream_Type, "StgFEM_VerboseConfig", False );
 
-	PluginsManager_AddDirectory( self->plugins, "StgFEM", LIB_DIR );
+
 		
 
 	/* register this current stream (the context) as a child of the FE stream */

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/EntryPoint.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/EntryPoint.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/EntryPoint.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -153,7 +153,8 @@
 		void* feEntryPoint, 
 		void* stiffnessMatrix, 
 		Bool bcRemoveQuery,
-		void* data )
+		void* _sle,
+		void* _context )
 {
 	FeEntryPoint* self = (FeEntryPoint*)feEntryPoint;
 	Hook_Index hookIndex;
@@ -166,7 +167,8 @@
 		((FeEntryPoint_AssembleStiffnessMatrix_Function*)((Hook*)self->hooks->data[hookIndex])->funcPtr) (
 			stiffnessMatrix,
 			bcRemoveQuery,
-			data );
+			_sle,
+			_context );
 	}
 
 	#ifdef USE_PROFILE

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/EntryPoint.h
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/EntryPoint.h	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/EntryPoint.h	2007-03-08 19:43:06 UTC (rev 6199)
@@ -55,12 +55,16 @@
 	typedef void		(FeEntryPoint_AssembleStiffnessMatrix_Function)	( 
 					void* stiffnessMatrix, 
 					Bool bcRemoveQuery,
-					void* data );
+					void* _sle,
+					void* _context
+					);
 	typedef void		(FeEntryPoint_AssembleStiffnessMatrix_CallFunction)	( 
 					void* feEntryPoint, 
 					void* stiffnessMatrix, 
 					Bool bcRemoveQuery,
-					void* data);
+					void* _sle,
+					void* _context
+					);
 
 	typedef void		(FeEntryPoint_AssembleForceVector_Function)	( 
 					void* forceVector );
@@ -118,7 +122,9 @@
 		void* feEntryPoint, 
 		void* stiffnessMatrix, 
 		Bool bcRemoveQuery,
-		void* data );
+		void* _sle,
+		void* _context
+		);
 
 	void _FeEntryPoint_Run_AssembleForceVector( 
 		void* feEntryPoint, 

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/PETScShellMatrix.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/PETScShellMatrix.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/PETScShellMatrix.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -299,7 +299,7 @@
 	elStiffMat = AllocArray2D( double, nRowDofs, nColDofs );
 
 	memset( elStiffMat[0], 0, nDofs * sizeof(double) );
-	StiffnessMatrix_AssembleElement( stiffMat, 0, sle, elStiffMat );
+	StiffnessMatrix_AssembleElement( stiffMat, 0, sle, NULL, elStiffMat );
 
 	elStiffMatTrans = AllocArray2D( double, nColDofs, nRowDofs );
 	for( dof_i = 0; dof_i < nRowDofs; dof_i++ ) {

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/SolutionVector.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/SolutionVector.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/SolutionVector.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -293,7 +293,6 @@
 
 void _SolutionVector_Initialise( void* solutionVector, void* data ) {
 	SolutionVector*          self = (SolutionVector *)solutionVector;
-	DiscretisationContext*   context = (DiscretisationContext*)data;
 	
 	Journal_DPrintf( self->debug, "In %s - for \"%s\"\n", __func__, self->name );
 	Stream_IndentBranch( StgFEM_Debug );

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrix.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrix.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrix.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -766,7 +766,7 @@
 }
 
 
-void StiffnessMatrix_Assemble( void* stiffnessMatrix, Bool bcRemoveQuery, void* data ) {
+void StiffnessMatrix_Assemble( void* stiffnessMatrix, Bool bcRemoveQuery, void* _sle, void* _context ) {
 	StiffnessMatrix* self = (StiffnessMatrix*)stiffnessMatrix;
 
 	StiffnessMatrix_RefreshMatrix( self );
@@ -779,14 +779,16 @@
 		self->assembleStiffnessMatrix,
 		self,
 		bcRemoveQuery,
-		data );
+		_sle,
+		_context );
 }
 
 
-void StiffnessMatrix_GlobalAssembly_General( void* stiffnessMatrix, Bool bcRemoveQuery, void* data )
+void StiffnessMatrix_GlobalAssembly_General( void* stiffnessMatrix, Bool bcRemoveQuery, void* _sle, void* _context )
 {
 	StiffnessMatrix*        self = (StiffnessMatrix*)stiffnessMatrix;
-	SystemLinearEquations*  sle  = (SystemLinearEquations*) data;
+	SystemLinearEquations*  sle  = (SystemLinearEquations*)_sle;
+	FiniteElementContext*   context  = (FiniteElementContext*)_context;
 	
 	FeVariable*             feVars[MAX_FE_VARS]; /* Set later */
 	Index                   numFeVars = 2;
@@ -936,7 +938,7 @@
 
 		/* Assemble this element's element stiffness matrix: call the entry point */
 		elStiffMatBuildStart = MPI_Wtime();
-		StiffnessMatrix_AssembleElement( self, element_lI, sle, elStiffMatToAdd );
+		StiffnessMatrix_AssembleElement( self, element_lI, sle, context, elStiffMatToAdd );
 		elStiffMatBuildTime += MPI_Wtime() - elStiffMatBuildStart;
 		if ( False == self->allowZeroElementContributions ) {
 			StiffnessMatrix_CheckElementAssembly( self, element_lI, elStiffMatToAdd, *totalDofsThisElement[ROW_VAR],
@@ -1589,7 +1591,14 @@
 	}
 }
 
-void StiffnessMatrix_AssembleElement( void* stiffnessMatrix, Element_LocalIndex element_lI, SystemLinearEquations* sle, double** elStiffMatToAdd ) {
+void StiffnessMatrix_AssembleElement(
+		void* stiffnessMatrix,
+		Element_LocalIndex element_lI,
+		SystemLinearEquations* sle,
+		FiniteElementContext* context,
+		double** elStiffMatToAdd
+		)
+{
 	StiffnessMatrix*        self                      = (StiffnessMatrix*) stiffnessMatrix;
 	Index                   stiffnessMatrixTermCount  = Stg_ObjectList_Count( self->stiffnessMatrixTermList );
 	Index                   stiffnessMatrixTerm_I;
@@ -1599,7 +1608,7 @@
 		stiffnessMatrixTerm = (StiffnessMatrixTerm*)
 			Stg_ObjectList_At( self->stiffnessMatrixTermList, stiffnessMatrixTerm_I );
 
-		StiffnessMatrixTerm_AssembleElement( stiffnessMatrixTerm, self, element_lI, sle, elStiffMatToAdd );
+		StiffnessMatrixTerm_AssembleElement( stiffnessMatrixTerm, self, element_lI, sle, context, elStiffMatToAdd );
 	}
 }
 
@@ -1640,7 +1649,7 @@
 void StiffnessMatrix_AddStiffnessMatrixTerm( void* stiffnessMatrix, StiffnessMatrixTerm* stiffnessMatrixTerm ) {
 	StiffnessMatrix*        self                 = (StiffnessMatrix*) stiffnessMatrix;
 
-	Stg_CheckType( stiffnessMatrixTerm, StiffnessMatrixTerm );
+	stiffnessMatrixTerm = Stg_CheckType( stiffnessMatrixTerm, StiffnessMatrixTerm );
 	Stg_ObjectList_Append( self->stiffnessMatrixTermList, stiffnessMatrixTerm );
 }
 

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrix.h
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrix.h	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrix.h	2007-03-08 19:43:06 UTC (rev 6199)
@@ -189,7 +189,7 @@
 	
 	/** Interface to Build stiffness matrix. Calls an entry point, allowing user to specialise exactly what
 	should be assembled at run-time. */
-	void StiffnessMatrix_Assemble( void* stiffnessMatrix, Bool bcRemoveQuery, void* data );
+	void StiffnessMatrix_Assemble( void* stiffnessMatrix, Bool bcRemoveQuery, void* _sle, void* _context );
 
 	/* +++ Public Functions +++ */
 
@@ -201,7 +201,7 @@
 	with Dave May when he returns, as Snark seems to have decoupled matrix assembly from
 	RHS vector updating for BCs. Main.PatrickSunter - 24 Feb 2005.
 	*/
-	void StiffnessMatrix_GlobalAssembly_General( void* stiffnessMatrix, Bool bcRemoveQuery, void* data );
+	void StiffnessMatrix_GlobalAssembly_General( void* stiffnessMatrix, Bool bcRemoveQuery, void* _sle, void* _context );
 
 	void StiffnessMatrix_ShellAssembly( void* stiffnessMatrix, Bool removeBCs, void* data );
 
@@ -254,7 +254,12 @@
 	#define StiffnessMatrix_SetToNonLinear( stiffnessMatrix ) \
 		((stiffnessMatrix)->isNonLinear = True)
 
-	void StiffnessMatrix_AssembleElement(void* stiffnessMatrix, Element_LocalIndex element_lI, SystemLinearEquations* sle, double** elStiffMatVecToAdd);
+	void StiffnessMatrix_AssembleElement(
+		void* stiffnessMatrix,
+		Element_LocalIndex element_lI,
+		SystemLinearEquations* sle,
+		FiniteElementContext* context,
+		double** elStiffMatVecToAdd);
 
 
 	/** Utility function to check that the element assembly just completeed has worked ok */

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrixTerm.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrixTerm.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrixTerm.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -265,11 +265,12 @@
 			StiffnessMatrix*                  stiffnessMatrix, 
 			Element_LocalIndex                lElement_I,
 			SystemLinearEquations*            sle,
+			FiniteElementContext*             context,
 			double**                          elStiffMatToAdd ) 
 {
 	StiffnessMatrixTerm* self = (StiffnessMatrixTerm*)stiffnessMatrixTerm;
 
-	self->_assembleElement( self, stiffnessMatrix, lElement_I, sle, elStiffMatToAdd );
+	self->_assembleElement( self, stiffnessMatrix, lElement_I, sle, context, elStiffMatToAdd );
 }
 	
 void _StiffnessMatrixTerm_AssembleElement( 
@@ -277,6 +278,7 @@
 			StiffnessMatrix*                  stiffnessMatrix, 
 			Element_LocalIndex                lElement_I,
 			SystemLinearEquations*            sle,
+			FiniteElementContext*             context,
 			double**                          elStiffMatToAdd ) 
 {
 	StiffnessMatrixTerm* self        = (StiffnessMatrixTerm*)stiffnessMatrixTerm;

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrixTerm.h
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrixTerm.h	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/StiffnessMatrixTerm.h	2007-03-08 19:43:06 UTC (rev 6199)
@@ -55,6 +55,7 @@
 			StiffnessMatrix*                  stiffnessMatrix, 
 			Element_LocalIndex                lElement_I,
 			SystemLinearEquations*            sle,
+			FiniteElementContext*             context,
 			double**                          elStiffMatToAdd );
 	
 	
@@ -127,6 +128,7 @@
 			StiffnessMatrix*                  stiffnessMatrix, 
 			Element_LocalIndex                lElement_I,
 			SystemLinearEquations*            sle,
+			FiniteElementContext*             context,
 			double**                          elStiffMatToAdd );
 
 	void _StiffnessMatrixTerm_AssembleElement( 
@@ -134,6 +136,7 @@
 			StiffnessMatrix*                  stiffnessMatrix, 
 			Element_LocalIndex                lElement_I,
 			SystemLinearEquations*            sle,
+			FiniteElementContext*             context,
 			double**                          elStiffMatToAdd ) ;
 
 	void StiffnessMatrixTerm_SetAssembleElementFunction( void* stiffnessMatrixTerm, StiffnessMatrixTerm_AssembleElementFunction* assembleElementFunction ) ;

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/SystemLinearEquations.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/SystemLinearEquations.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/SystemLinearEquations.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -393,7 +393,7 @@
 }
 
 /* Build */
-void _SystemLinearEquations_Build( void* sle, void* data ) {
+void _SystemLinearEquations_Build( void* sle, void* _context ) {
 	SystemLinearEquations*		self = (SystemLinearEquations*)sle;
 	Index				index;
 	
@@ -403,19 +403,19 @@
 	/* build the matrices */
 	for ( index = 0; index < self->stiffnessMatrices->count; index++ ) {
 		/* Update rowSize and colSize if boundary conditions have been applied */		
-		Build( self->stiffnessMatrices->data[index], data, False );
+		Build( self->stiffnessMatrices->data[index], _context, False );
 	}	
 	
 	/* and the vectors */
 	for ( index = 0; index < self->forceVectors->count; index++ ) {
 		/* Build the force vectors - includes updateing matrix size based on Dofs */
-		Build( self->forceVectors->data[index], data, False );
+		Build( self->forceVectors->data[index], _context, False );
 	}
 	
 	/* and the solutions */
 	for ( index = 0; index < self->solutionVectors->count; index++ ) {
 		/* Build the force vectors - includes updateing matrix size based on Dofs */
-		Build( self->solutionVectors->data[index], data, False );
+		Build( self->solutionVectors->data[index], _context, False );
 	}
 	
 	/* lastly, the solver */
@@ -425,7 +425,7 @@
 }
 
 
-void _SystemLinearEquations_Initialise( void* sle, void* data ) {
+void _SystemLinearEquations_Initialise( void* sle, void* _context ) {
 	SystemLinearEquations*					self = (SystemLinearEquations*)sle;
 	Index						index;
 	
@@ -435,26 +435,26 @@
 	/* initialise the matrices */
 	for ( index = 0; index < self->stiffnessMatrices->count; index++ ) {
 		/* Update rowSize and colSize if boundary conditions have been applied */		
-		Initialise( self->stiffnessMatrices->data[index], data, False );
+		Initialise( self->stiffnessMatrices->data[index], _context, False );
 	}	
 	
 	/* and the vectors */
 	for ( index = 0; index < self->forceVectors->count; index++ ) {
 		/* Initialise the force vectors - includes updateing matrix size based on Dofs */
-		Initialise( self->forceVectors->data[index], data, False );
+		Initialise( self->forceVectors->data[index], _context, False );
 	}
 	
 	/* and the solutions */
 	for ( index = 0; index < self->solutionVectors->count; index++ ) {
 		/* Initialise the force vectors - includes updateing matrix size based on Dofs */
-		Initialise( self->solutionVectors->data[index], data, False );
+		Initialise( self->solutionVectors->data[index], _context, False );
 	}
 
 	/* Check to see if any of the components need to make the SLE non-linear */
 	SystemLinearEquations_CheckIfNonLinear( self );
 	
 	/* Setup Location Matrix */
-	SystemLinearEquations_LM_Setup( self, data );
+	SystemLinearEquations_LM_Setup( self, _context );
 
 	/* lastly, the solver */
 	Initialise( self->solver, self, False );
@@ -462,19 +462,19 @@
 }
 
 
-void _SystemLinearEquations_Execute( void* sle, void* data ) {
+void _SystemLinearEquations_Execute( void* sle, void* _context ) {
 	SystemLinearEquations*	self = (SystemLinearEquations*)sle;
 	
 	Journal_DPrintf( self->debug, "In %s\n", __func__ );
 	Stream_IndentBranch( StgFEM_Debug );
 
-	_EntryPoint_Run_2VoidPtr( self->executeEP, sle, data );
+	_EntryPoint_Run_2VoidPtr( self->executeEP, sle, _context );
 	
 	Stream_UnIndentBranch( StgFEM_Debug );
 }
 
 
-void SystemLinearEquations_ExecuteSolver( void* sle, void* data ) {
+void SystemLinearEquations_ExecuteSolver( void* sle, void* _context ) {
 	SystemLinearEquations*	self = (SystemLinearEquations*)sle;
 	double wallTime;
 	/* Actually run the solver to get the new values into the SolutionVectors */
@@ -488,37 +488,37 @@
 		
 }
 
-void _SystemLinearEquations_Destroy( void* sle, void* data ) {
+void _SystemLinearEquations_Destroy( void* sle, void* _context ) {
 	SystemLinearEquations*	self = (SystemLinearEquations*)sle;
 	
 	/* Free the the MG handles. */
 	FreeArray( self->mgHandles );
 }
 
-void SystemLinearEquations_BC_Setup( void* sle, void* data ) {
+void SystemLinearEquations_BC_Setup( void* sle, void* _context ) {
 	SystemLinearEquations*				self = (SystemLinearEquations*)sle;
 	Index						index;
 	
 	Journal_DPrintf( self->debug, "In %s\n", __func__ );
 	for ( index = 0; index < self->solutionVectors->count; index++ ) {
-		SolutionVector_ApplyBCsToVariables( self->solutionVectors->data[index], data );
+		SolutionVector_ApplyBCsToVariables( self->solutionVectors->data[index], _context );
 	}
 }
 
 
-void SystemLinearEquations_LM_Setup( void* sle, void* data ) {
+void SystemLinearEquations_LM_Setup( void* sle, void* _context ) {
 	SystemLinearEquations*					self = (SystemLinearEquations*)sle;
 	
-	self->_LM_Setup( self, data );
+	self->_LM_Setup( self, _context );
 }
 
-void SystemLinearEquations_IntegrationSetup( void* sle, void* data ) {
+void SystemLinearEquations_IntegrationSetup( void* sle, void* _context ) {
 	SystemLinearEquations*					self = (SystemLinearEquations*)sle;
 	
-	_EntryPoint_Run_Class_VoidPtr( self->integrationSetupEP, data );
+	_EntryPoint_Run_Class_VoidPtr( self->integrationSetupEP, _context );
 }
 
-void _SystemLinearEquations_LM_Setup( void* sle, void* data ) {
+void _SystemLinearEquations_LM_Setup( void* sle, void* _context ) {
 	SystemLinearEquations*					self = (SystemLinearEquations*)sle;
 	Index						index;
 
@@ -534,32 +534,33 @@
 	Stream_UnIndentBranch( StgFEM_Debug );
 }
 
-void SystemLinearEquations_MatrixSetup( void* sle, void* data ) {
+void SystemLinearEquations_MatrixSetup( void* sle, void* _context ) {
 	SystemLinearEquations*					self = (SystemLinearEquations*)sle;
 	
-	self->_matrixSetup( self, data );
+	self->_matrixSetup( self, _context );
 }
 
-void _SystemLinearEquations_MatrixSetup( void* sle, void* data ) {
-	SystemLinearEquations*					self = (SystemLinearEquations*)sle;
+void _SystemLinearEquations_MatrixSetup( void* sle, void* _context ) {
+	SystemLinearEquations*				self = (SystemLinearEquations*)sle;
+	FiniteElementContext*				context = (FiniteElementContext*)_context;
 	Index						index;
 	
 	Journal_DPrintf( self->debug, "In %s\n", __func__ );
 	Stream_IndentBranch( StgFEM_Debug );
 	for ( index = 0; index < self->stiffnessMatrices->count; index++ ) {
-		StiffnessMatrix_Assemble( self->stiffnessMatrices->data[index], self->bcRemoveQuery, self );
+		StiffnessMatrix_Assemble( self->stiffnessMatrices->data[index], self->bcRemoveQuery, self, context );
 	}
 	Stream_UnIndentBranch( StgFEM_Debug );
 }
 
 
-void SystemLinearEquations_VectorSetup( void* sle, void* data ) {
+void SystemLinearEquations_VectorSetup( void* sle, void* _context ) {
 	SystemLinearEquations*				self = (SystemLinearEquations*)sle;
 	
-	self->_vectorSetup( self, data );
+	self->_vectorSetup( self, _context );
 }
 
-void _SystemLinearEquations_VectorSetup( void* sle, void* data ) {
+void _SystemLinearEquations_VectorSetup( void* sle, void* _context ) {
 	SystemLinearEquations*				self = (SystemLinearEquations*)sle;
 	Index						index;
 	
@@ -609,13 +610,13 @@
 	return SystemLinearEquations_GetSolutionVector( self, solutionVectorName );
 }
 
-void SystemLinearEquations_UpdateSolutionOntoNodes( void* sle, void* data ) {
+void SystemLinearEquations_UpdateSolutionOntoNodes( void* sle, void* _context ) {
 	SystemLinearEquations*	self = (SystemLinearEquations*)sle;
 
-	self->_updateSolutionOntoNodes( self, data );
+	self->_updateSolutionOntoNodes( self, _context );
 }
 
-void _SystemLinearEquations_UpdateSolutionOntoNodes( void* sle, void* data ) {
+void _SystemLinearEquations_UpdateSolutionOntoNodes( void* sle, void* _context ) {
 	SystemLinearEquations*	self = (SystemLinearEquations*)sle;
 	SolutionVector_Index	solnVec_I;
 	SolutionVector*		currentSolnVec;
@@ -626,7 +627,7 @@
 	}	
 }
 
-void SystemLinearEquations_ZeroAllVectors( void* sle, void* data ) {
+void SystemLinearEquations_ZeroAllVectors( void* sle, void* _context ) {
 	SystemLinearEquations*      self = (SystemLinearEquations*)sle;
 	Index                       index;
 	ForceVector*                forceVector;
@@ -640,7 +641,7 @@
 }
 
 
-void SystemLinearEquations_NonLinearExecute( void* sle, void* data ) {
+void SystemLinearEquations_NonLinearExecute( void* sle, void* _context ) {
 	SystemLinearEquations*	self            = (SystemLinearEquations*) sle;
 	Vector*                 previousVector;
 	Vector*                 currentVector;
@@ -661,7 +662,7 @@
 	self->nonLinearIteration_I = 0;
 	Journal_Printf(self->info,"\nNon linear solver - iteration %d\n", self->nonLinearIteration_I);
 	
-	self->linearExecute( self, data );
+	self->linearExecute( self, _context );
 	self->hasExecuted = True;
 
 	/* TODO - Give option which solution vector to test */
@@ -674,7 +675,7 @@
 	
 		Journal_Printf(self->info,"Non linear solver - iteration %d\n", self->nonLinearIteration_I);
 			
-		self->linearExecute( self, data );
+		self->linearExecute( self, _context );
 
 		/* Calculate Residual */
 		Vector_AddScaled( previousVector, -1.0, currentVector );

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/tests/testStiffnessMatrix.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/tests/testStiffnessMatrix.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/tests/testStiffnessMatrix.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -212,7 +212,7 @@
 	StiffnessMatrix*	stiffMat;
 
 	stiffMat = buildStiffMat( nProcs );
-	StiffnessMatrix_Assemble( stiffMat, True, NULL );
+	StiffnessMatrix_Assemble( stiffMat, True, NULL, NULL );
 
 	if( rank == watch ) {
 	}

Modified: long/3D/Gale/trunk/src/StgFEM/libStG_FEM/src/Init.c
===================================================================

Modified: long/3D/Gale/trunk/src/StgFEM/libStG_FEM/tests/expected/testLibStgFEM.0of1.expected
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/libStG_FEM/tests/expected/testLibStgFEM.0of1.expected	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/libStG_FEM/tests/expected/testLibStgFEM.0of1.expected	2007-03-08 19:43:06 UTC (rev 6199)
@@ -1,8 +1,10 @@
-StGermain Framework. Copyright (C) 2003-2005 VPAC.
-StGermain Discretisation Library. Copyright (C) 2003-2005 VPAC.
-StGermain Finite Element Framework. Copyright (C) 2003-2005 VPAC.
-StGermain FEM Discretisation Framework. Copyright (C) 2003-2005 VPAC.
-StGermain SLE Library. Copyright (C) 2003-2005 VPAC.
-StGermain PETSc-LinearAlgebra Interface. Copyright (C) 2003-2005 VPAC.
-StGermain FEM Assembly Library. Copyright (C) 2003-2005 VPAC.
+StGermain Framework revision 4012. Copyright (C) 2003-2005 VPAC.
+StGermain Discretisation Library revision 4012. Copyright (C) 2003-2005 VPAC.
+StGermain Finite Element Framework revision 747. Copyright (C) 2003-2005 VPAC.
+StGermain FEM Discretisation Framework revision 747. Copyright (C) 2003-2005 VPAC.
+StGermain SLE Library revision 747. Copyright (C) 2003-2005 VPAC.
+StGermain PETSc-LinearAlgebra Interface revision 747. Copyright (C) 2003-2005 VPAC.
+StGermain FEM Assembly Library revision 747. Copyright (C) 2003-2005 VPAC.
 Watching rank: 0
+StGermain XML library Path found.
+StgFEM XML library Path found.

Modified: long/3D/Gale/trunk/src/StgFEM/libStG_FEM/tests/testLibStgFEM.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/libStG_FEM/tests/testLibStgFEM.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/libStG_FEM/tests/testLibStgFEM.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -45,8 +45,8 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
-
 int main( int argc, char* argv[] ) {
 	MPI_Comm		CommWorld;
 	int			rank;
@@ -73,8 +73,34 @@
 	else {
 		procToWatch = 0;
 	}
-	if( rank == procToWatch ) printf( "Watching rank: %i\n", rank );
+	if( rank == procToWatch ) {
+		Stg_Object* testDirectory;
+		printf( "Watching rank: %i\n", rank );
+		/* Testing entries in xmlDictionary */
+		testDirectory = Stg_ObjectList_Get( xmlSearchPaths,"StGermain" );
+		if (testDirectory != NULL) {
+			printf("StGermain XML library Path found.\n");
+		}
+		else {
+			printf("StGermain XML library Path not found.\n"); 
+		}
+		/* For build in the same build directory */
+		if (strcmp((char*)LIB_DIR, (char*)testDirectory)) {
+			printf("StgFEM XML library Path found.\n");
+		}
+		/* For build in separate directories */
+		else{
+			testDirectory = Stg_ObjectList_Get( xmlSearchPaths,"StgFEM" );
+			if (testDirectory != NULL) {
+				printf("StgFEM XML library Path found.\n");
+			}
+			else {
+				printf("StgFEM XML library Path not found.\n"); 
+			}
+		}
 	
+	}
+	 
 	StgFEM_Finalise();
 	StGermain_Finalise();
 	


Property changes on: long/3D/Gale/trunk/src/StgFEM/plugins/Output/FrequentOutput/tests/output
___________________________________________________________________
Name: svn:ignore
   - input.xml

   + *


Modified: long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c	2007-03-08 19:43:06 UTC (rev 6199)
@@ -98,6 +98,9 @@
 	condFunc = ConditionFunction_New( StgFEM_StandardConditionFunctions_LinearWithSinusoidalPerturbation, "LinearWithSinusoidalPerturbation" );
 	ConditionFunction_Register_Add( context->condFunc_Register, condFunc );
 
+	condFunc = ConditionFunction_New( StgFEM_StandardConditionFunctions_EdgeDriveConvectionIC, "EdgeDriveConvectionIC" );
+	ConditionFunction_Register_Add( context->condFunc_Register, condFunc );
+	
 	condFunc = ConditionFunction_New( StgFEM_StandardConditionFunctions_AnalyticalTemperatureIC, "AnalyticalTemperatureIC" );
 	ConditionFunction_Register_Add( context->condFunc_Register, condFunc );
 	condFunc = ConditionFunction_New( Stg_FEM_VelicTemperatureIC, "VelicTemperatureIC");
@@ -125,6 +128,9 @@
 
 	condFunc = ConditionFunction_New( StG_FEM_StandardConditionFunctions_Gaussian, "Gaussian");
 	ConditionFunction_Register_Add( context->condFunc_Register, condFunc );
+
+	condFunc = ConditionFunction_New( StgFEM_StandardConditionFunctions_ConstantVelocity, "ConstantVelocity");
+	ConditionFunction_Register_Add( context->condFunc_Register, condFunc );
 }
 
 void* _StgFEM_StandardConditionFunctions_DefaultNew( Name name ) {
@@ -240,14 +246,13 @@
 
 	/* Find vector from centre to node */
 	StGermain_VectorSubtraction( vector, coord, centre, 2 );
+
 	
 	if ((vector[ I_AXIS ]*vector[ I_AXIS ]+vector[ J_AXIS ]*vector[ J_AXIS ])<=size*size)
 		*result =  omega * vector[ I_AXIS ];
 	else 
 		*result = 0.0;
 }
-
-
 void StgFEM_StandardConditionFunctions_TaperedRotationX( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) {
 	DiscretisationContext*	context            = (DiscretisationContext*)_context;
 	Dictionary*             dictionary         = context->dictionary;
@@ -708,7 +713,7 @@
 	double*                 coord;
 	double                  u0, v0, Q;
 	double                  x, y;
-	double                  Ra;
+	double                  RaT;
 	double                  lambda, height, width;
 	double                  Tu, Tl, Tr, Ts;
 	double			min[3], max[3];
@@ -732,13 +737,13 @@
 	y = coord[ J_AXIS ] - min[ J_AXIS ];
 	
 	/* Get thermal Rayleigh Number from Dictionary */
-	Ra = Dictionary_GetDouble( dictionary, "Ra" );
+	RaT = Dictionary_GetDouble( dictionary, "RaT" );
 	
 	/* Horizontal fluid velocity at upper boundary & lower boundary - Equation A3 */
-	u0 = pow( lambda , 7.0/3.0 )/ pow(1 + lambda*lambda*lambda*lambda, 2.0/3.0) * pow(0.5*Ra/sqrt(M_PI) , 2.0/3.0);
+	u0 = pow( lambda , 7.0/3.0 )/ pow(1 + lambda*lambda*lambda*lambda, 2.0/3.0) * pow(0.5*RaT/sqrt(M_PI) , 2.0/3.0);
 
 	/* Vertical velocity of the upwelling and downwellings - Modified from Van Keken to match Turcotte and Shubert */
-	v0 = u0/lambda;
+	v0 = u0; //lambda;
 	
 	/* Total rate of heat flow out of the top of the cell per unit distance along the axis of the roll - Equation A3 */
 	Q = 2.0 * sqrt(M_1_PI * lambda/u0);
@@ -755,9 +760,31 @@
 		*result = 1.0;
 	else if ( *result < 0.0 ) 
 		*result = 0.0;
-#endif
+	
 }
 
+void StgFEM_StandardConditionFunctions_EdgeDriveConvectionIC( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) 
+{        
+	DiscretisationContext*  context = (DiscretisationContext*)_context;        
+	Dictionary*             dictionary         = context->dictionary;        
+	FeVariable*             feVariable = NULL;        
+	FeMesh*			mesh = NULL;        
+	double*                 result = (double*) _result;        
+	double                  perturbationAmplitude;        
+	double                  thermalAnomalyOffset;        
+	double*                 coord;        
+	
+	feVariable = (FeVariable*)FieldVariable_Register_GetByName( context->fieldVariable_Register, "TemperatureField" );        
+	mesh       = feVariable->feMesh;        
+	perturbationAmplitude = Dictionary_GetDouble_WithDefault( dictionary, "SinusoidalTempIC_PerturbationAmplitude", 0.1 );        
+	thermalAnomalyOffset = Dictionary_GetDouble_WithDefault( dictionary, "thermalAnomalyOffset", 0.0 );        
+	coord = Mesh_GetVertex( mesh, node_lI );
+	
+	/* eqn 1 from S.D.King & D.L. Anderson, "Edge-drive convection", EPSL 160 (1998) 289-296 */        
+	
+	*result = 1.0 + perturbationAmplitude * sin( M_PI * coord[ J_AXIS ] ) * cos( 0.5 * M_PI * ( coord[ I_AXIS ] + thermalAnomalyOffset ) );
+}
+
 void StgFEM_StandardConditionFunctions_SinusoidalExtension( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) {
 	FiniteElementContext *	context            = (FiniteElementContext*)_context;
 	Dictionary*             dictionary         = context->dictionary;
@@ -819,7 +846,6 @@
 	}
 }
 
-
 void StG_FEM_StandardConditionFunctions_StepFunctionProduct1( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) {
 	FiniteElementContext *	context            = (FiniteElementContext*)_context;
 	FeVariable*             feVariable         = NULL;
@@ -994,11 +1020,3 @@
 
 	*result = ( 1 - y ) + ( cos( M_PI * x ) * sin( M_PI * y ) ) / 100 ;
 }
-
-
-Bool StgFEM_StandardConditionFunctions_Init( int* argc, char** argv[] ) {
-  Stg_ComponentRegister* componentsRegister = Stg_ComponentRegister_Get_ComponentRegister();
-  Stg_ComponentRegister_Add(componentsRegister,
-                            StgFEM_StandardConditionFunctions_Type, "0",
-                            _StgFEM_StandardConditionFunctions_DefaultNew );
-}

Modified: long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.h
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.h	2007-03-08 19:38:37 UTC (rev 6198)
+++ long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.h	2007-03-08 19:43:06 UTC (rev 6199)
@@ -80,7 +80,7 @@
 void Stg_FEM_VelicTemperatureIC_SolB( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) ;
 void StgFEM_StandardConditionFunctions_AnalyticalTemperatureIC( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) ;
 void StgFEM_StandardConditionFunctions_SinusoidalExtension( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) ;
-
+void StgFEM_StandardConditionFunctions_EdgeDriveConvectionIC( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result );
 void StgFEM_StandardConditionFunctions_StepFunction( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) ;
 void StG_FEM_StandardConditionFunctions_StepFunctionProduct1( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) ;
 void StG_FEM_StandardConditionFunctions_StepFunctionProduct2( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) ;
@@ -89,6 +89,6 @@
 void StG_FEM_StandardConditionFunctions_Gaussian( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) ;
 
 void StgFEM_StandardConditionFunctions_ConvectionBenchmark( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) ;
+void StgFEM_StandardConditionFunctions_ConstantVelocity( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result );
 
-
 #endif	



More information about the cig-commits mailing list