[cig-commits] r5523 - in long/3D/Gale/trunk/src/StgFEM: . Discretisation/src

walter at geodynamics.org walter at geodynamics.org
Thu Dec 7 14:16:12 PST 2006


Author: walter
Date: 2006-12-07 14:16:12 -0800 (Thu, 07 Dec 2006)
New Revision: 5523

Modified:
   long/3D/Gale/trunk/src/StgFEM/
   long/3D/Gale/trunk/src/StgFEM/Discretisation/src/AnalyticSolution.c
   long/3D/Gale/trunk/src/StgFEM/Discretisation/src/AnalyticSolution.h
Log:
 r878 at earth:  boo | 2006-12-07 14:15:27 -0800
  r875 at earth (orig r667):  JulianGiordani | 2006-11-16 16:57:47 -0800
  
  Adding 4 function pointers onto this class which will be used to grap the analytic variables (velocity, pressure, stress strain-rate) off of the analytic solution.
  Previously we had to do a VelicS_GetVelocity(...) - kind of hard coded.
  Now the analytic Solution ( eg VelicS ) put's its VelicS_GetVelocity on the new function pointer _getAnalyticVelocity.
  
  So less hardcoding in the usage of analyticSolution, basically it is more general and coder friendly now( if you like function pointers ).
  
  
 



Property changes on: long/3D/Gale/trunk/src/StgFEM
___________________________________________________________________
Name: svk:merge
   - 38867592-cf10-0410-9e16-a142ea72ac34:/cig:872
db209038-57f2-0310-97fa-b160e0ae9d04:/trunk:665
   + 38867592-cf10-0410-9e16-a142ea72ac34:/cig:878
db209038-57f2-0310-97fa-b160e0ae9d04:/trunk:667

Modified: long/3D/Gale/trunk/src/StgFEM/Discretisation/src/AnalyticSolution.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/Discretisation/src/AnalyticSolution.c	2006-12-07 22:15:26 UTC (rev 5522)
+++ long/3D/Gale/trunk/src/StgFEM/Discretisation/src/AnalyticSolution.c	2006-12-07 22:16:12 UTC (rev 5523)
@@ -113,6 +113,12 @@
 	self->integrationSwarm = integrationSwarm;
 	self->context = context;
 
+	/* Initialise AnalyticFunctions */
+	self->_getAnalyticVelocity = NULL;
+	self->_getAnalyticPressure = NULL;
+	self->_getAnalyticTotalStress = NULL;
+	self->_getAnalyticStrainRate = NULL;
+
 	/* Create Lists */
 	self->feVariableList             = Stg_ObjectList_New();
 	self->analyticFeVariableList     = Stg_ObjectList_New();

Modified: long/3D/Gale/trunk/src/StgFEM/Discretisation/src/AnalyticSolution.h
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/Discretisation/src/AnalyticSolution.h	2006-12-07 22:15:26 UTC (rev 5522)
+++ long/3D/Gale/trunk/src/StgFEM/Discretisation/src/AnalyticSolution.h	2006-12-07 22:16:12 UTC (rev 5523)
@@ -51,6 +51,10 @@
 #define __StgFEM_Discretisation_AnalyticSolution_h__
 	
 	typedef void (AnalyticSolution_FeVariableSolutionFunction) (void* analyticSolution, FeVariable* analyticFeVariable, double* coord, double* value );
+	typedef void (AnalyticSolution_GetVelocity) (void* analyticSolution, FeVariable* analyticFeVariable, double* coord, double* value );
+	typedef void (AnalyticSolution_GetPressure) (void* analyticSolution, FeVariable* analyticFeVariable, double* coord, double* value );
+	typedef void (AnalyticSolution_GetTotalStress) (void* analyticSolution, FeVariable* analyticFeVariable, double* coord, double* value );
+	typedef void (AnalyticSolution_GetStrainRate) (void* analyticSolution, FeVariable* analyticFeVariable, double* coord, double* value );
 
 	/** Textual name of this class */
 	extern const Type AnalyticSolution_Type;
@@ -71,6 +75,10 @@
 		Swarm*                 integrationSwarm;           \
 		LiveComponentRegister* LC_Register;                \
 		AbstractContext*       context;                    \
+		AnalyticSolution_GetVelocity* _getAnalyticVelocity; \
+		AnalyticSolution_GetPressure* _getAnalyticPressure; \
+		AnalyticSolution_GetTotalStress* _getAnalyticTotalStress; \
+		AnalyticSolution_GetStrainRate* _getAnalyticStrainRate; \
 		
 	/** Brings together and manages the life-cycle of a a mesh and all the 
 	info relevant to it for the Finite Element Method. See Mesh.h for more. */



More information about the cig-commits mailing list