[cig-commits] r5534 - in long/3D/Gale/trunk/src/PICellerator: . Apps Apps/BuoyancyBenchmark Apps/LidDrivenPIC Apps/PIC_Components Apps/RayleighTaylor Apps/ThermoChem MaterialPoints/src PopulationControl/src Utils/src Voronoi/src Weights/src Weights/tests/plugins

walter at geodynamics.org walter at geodynamics.org
Thu Dec 7 15:33:13 PST 2006


Author: walter
Date: 2006-12-07 15:33:13 -0800 (Thu, 07 Dec 2006)
New Revision: 5534

Modified:
   long/3D/Gale/trunk/src/PICellerator/
   long/3D/Gale/trunk/src/PICellerator/Apps/
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/BuoyancyExample.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/LidDrivenPIC/LidDrivenPIC.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/MaterialPointSwarm.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/PopulationControl.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/ThermoChem/ThermoChem.xml
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/CoincidentMapper.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.h
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Material.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialFeVariable.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.h
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/ParticleFeVariable.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/PeriodicBoundariesManager.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/PeriodicBoundariesManager.h
   long/3D/Gale/trunk/src/PICellerator/PopulationControl/src/ReseedSplitting.c
   long/3D/Gale/trunk/src/PICellerator/Utils/src/BuoyancyForceTerm.c
   long/3D/Gale/trunk/src/PICellerator/Voronoi/src/CellularAutomataVoronoi.c
   long/3D/Gale/trunk/src/PICellerator/Voronoi/src/CellularAutomataVoronoi.h
   long/3D/Gale/trunk/src/PICellerator/Weights/src/DiscreteVoronoiWeights.c
   long/3D/Gale/trunk/src/PICellerator/Weights/src/VolumeWeights.c
   long/3D/Gale/trunk/src/PICellerator/Weights/src/VolumeWeights.h
   long/3D/Gale/trunk/src/PICellerator/Weights/tests/plugins/testElementIntegral.c
Log:
Merge in parallel changes from Luke


Property changes on: long/3D/Gale/trunk/src/PICellerator
___________________________________________________________________
Name: svk:merge
   - 00de75e2-39f1-0310-8538-9683d00a49cc:/trunk:381
aee11096-cf10-0410-a191-eea5772ba81f:/cig:524
   + 00de75e2-39f1-0310-8538-9683d00a49cc:/branches/decomp3d:384
00de75e2-39f1-0310-8538-9683d00a49cc:/trunk:381
aee11096-cf10-0410-a191-eea5772ba81f:/cig:524

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/BuoyancyExample.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/BuoyancyExample.xml	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/BuoyancyExample.xml	2006-12-07 23:33:13 UTC (rev 5534)
@@ -11,7 +11,6 @@
 	<!--param name="extensionReferenceHeight">maxY</param-->
 
 	<!-- Component Stuff -->
-	<include>../StgFEM_Components/ElementLayout.xml        </include>
 	<include>../StgFEM_Components/ConstantMesh.xml           </include>
 	<include>../StgFEM_Components/LinearMesh.xml             </include>
 	<include>../StgFEM_Components/VelocityField.xml          </include>

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/LidDrivenPIC/LidDrivenPIC.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/LidDrivenPIC/LidDrivenPIC.xml	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/LidDrivenPIC/LidDrivenPIC.xml	2006-12-07 23:33:13 UTC (rev 5534)
@@ -3,7 +3,6 @@
 <!-- DTD to validate against -->
 <StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
 
-	<include>../StgFEM_Components/ElementLayout.xml          </include>
 	<include>../StgFEM_Components/ConstantMesh.xml           </include>
 	<include>../StgFEM_Components/LinearMesh.xml             </include>
 	<include>../StgFEM_Components/VelocityField.xml          </include>
@@ -44,11 +43,11 @@
 	<param name="journal-level-branch.debug.StgFEM"> 1 </param>
 
 	<!-- Geometry & mesh setup -->
-	<param name="dim"> 2 </param>
+	<param name="dim"> 3 </param>
 	<!-- Remember in StGermain these currently refer to _node_ counts rather than elements... -->
 	<param name="elementResI"> 7 </param>
 	<param name="elementResJ"> 7 </param>
-	<param name="elementResK"> 1 </param>
+	<param name="elementResK"> 3 </param>
 	<param name="shadowDepth"> 1 </param>
 	<param name="minX"> 0.0 </param>
 	<param name="minY"> 0.0 </param>

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/MaterialPointSwarm.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/MaterialPointSwarm.xml	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/MaterialPointSwarm.xml	2006-12-07 23:33:13 UTC (rev 5534)
@@ -9,29 +9,25 @@
 			<param name="Type">ElementCellLayout</param>
 			<param name="Mesh">mesh-linear</param>
 		</struct>
-		<!--struct name="discreteVoronoi">
+		<struct name="discreteVoronoi">
 			<param name="Type">CellularAutomataVoronoi</param>
 			<param name="resolution">10</param>
 			<param name="diagonalNeighbours">true</param>
-		</struct-->		
-		<!--
-		<struct name="weights">
-			<param name="Type">ConstantWeights</param>
-		</struct>
-		-->
+		</struct>		
 		<!--struct name="weights">
-			<param name="Type">DiscreteVoronoiWeights</param>
-			<param name="DiscreteVoronoi">discreteVoronoi</param>
+			<param name="Type">ConstantWeights</param>
 		</struct-->
-		<!--
 		<struct name="weights">
+			<param name="Type">DiscreteVoronoiWeights</param>
+			<param name="DiscreteVoronoi">discreteVoronoi</param>
+		</struct>
+		<!--struct name="weights">
 			<param name="Type">ConstantWeights</param>
-		</struct>	
-		-->
-		<struct name="weights">
+		</struct-->	
+		<!--struct name="weights">
   			<param name="Type">DVCWeights</param>
  			 <param name="resolution">10</param>
-		</struct>
+		</struct-->
 		
 		<struct name="localLayout">
 			<param name="Type">MappedParticleLayout</param>
@@ -40,7 +36,7 @@
 			<param name="Type">IntegrationPointsSwarm</param>
 			<param name="CellLayout">elementCellLayout</param>
 			<param name="ParticleLayout">localLayout</param>
-			<param name="FiniteElement_Mesh">mesh-linear</param>
+			<param name="FeMesh">mesh-linear</param>
 			<param name="WeightsCalculator">weights</param>
 			<param name="TimeIntegrator">timeIntegrator</param>
 			<param name="IntegrationPointMapper">mapper</param>
@@ -58,7 +54,7 @@
 			<param name="Type">MaterialPointsSwarm</param>
 			<param name="CellLayout">elementCellLayout</param>
 			<param name="ParticleLayout">materialSwarmParticleLayout</param>
-			<param name="FiniteElement_Mesh">mesh-linear</param>
+			<param name="FeMesh">mesh-linear</param>
 
 			<!-- These guys may or may not be created -->
 			<param name="SplittingRoutine">splittingRoutine</param>

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/PopulationControl.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/PopulationControl.xml	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/PopulationControl.xml	2006-12-07 23:33:13 UTC (rev 5534)
@@ -14,7 +14,7 @@
 			<param name="Type">ReseedSplitting</param>
 			<param name="idealParticleCount">particlesPerCell</param> 
 			<param name="DiscreteVoronoi">discreteVoronoi</param> 
-		</struct>	
+		</struct>
 	</struct>
 
 </StGermainData>

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example.xml	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example.xml	2006-12-07 23:33:13 UTC (rev 5534)
@@ -3,7 +3,6 @@
 <!-- DTD to validate against -->
 <StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
 
-	<include>../StgFEM_Components/ElementLayout.xml          </include>
 	<include>../StgFEM_Components/ConstantMesh.xml           </include>
 	<include>../StgFEM_Components/LinearMesh.xml             </include>
 	<include>../StgFEM_Components/VelocityField.xml          </include>

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/ThermoChem/ThermoChem.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/ThermoChem/ThermoChem.xml	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/ThermoChem/ThermoChem.xml	2006-12-07 23:33:13 UTC (rev 5534)
@@ -4,7 +4,6 @@
 <StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
  
 	<!-- Component Stuff -->
-	<include>../StgFEM_Components/ElementLayout.xml          </include>
 	<include>../StgFEM_Components/ConstantMesh.xml           </include>
 	<include>../StgFEM_Components/LinearMesh.xml             </include>
 	<include>../StgFEM_Components/VelocityField.xml          </include>

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/CoincidentMapper.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/CoincidentMapper.c	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/CoincidentMapper.c	2006-12-07 23:33:13 UTC (rev 5534)
@@ -177,8 +177,7 @@
 	MaterialPoint*          materialPoint;
 	MaterialPointRef*       ref;
 
-	FiniteElement_Mesh*     mesh                   = materialSwarm->mesh;
-	ElementLayout*          layout                 = mesh->layout->elementLayout;
+	FeMesh*     mesh                   = materialSwarm->mesh;
 
 	Particle_Index          particle_lI;
 	Cell_Index              cell_dI;
@@ -233,9 +232,9 @@
 
 		/* Convert global to local coordinates */
 		ElementType_ConvertGlobalCoordToElLocal(
-				FiniteElement_Mesh_ElementTypeAt( mesh, cell_dI ),
-				layout,
-				(const Coord**)materialSwarm->cellPointTbl[cell_dI],
+				FeMesh_GetElementType( mesh, cell_dI ),
+				mesh, 
+				cell_dI, 
 				materialPoint->coord,
 				integrationPoint->xi );
 

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.c	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.c	2006-12-07 23:33:13 UTC (rev 5534)
@@ -122,7 +122,7 @@
 
 void _IntegrationPointsSwarm_Init( 
 		void*                                 swarm,
-		FiniteElement_Mesh*                   mesh, 
+		FeMesh*                   mesh, 
 		TimeIntegrator*                       timeIntegrator,
 		WeightsCalculator*                    weights,
 		IntegrationPointMapper*               mapper,
@@ -206,7 +206,7 @@
 	
 	newIntegrationPointsSwarm = (IntegrationPointsSwarm*)_Swarm_Copy( self, dest, deep, nameExt, ptrMap );
 
-	newIntegrationPointsSwarm->mesh = (FiniteElement_Mesh*)Stg_Class_Copy(
+	newIntegrationPointsSwarm->mesh = (FeMesh*)Stg_Class_Copy(
 				self->mesh,
 				NULL,
 				deep,
@@ -268,7 +268,7 @@
 
 void _IntegrationPointsSwarm_Construct( void* integrationPoints, Stg_ComponentFactory* cf, void* data ) {
 	IntegrationPointsSwarm*	        self          = (IntegrationPointsSwarm*) integrationPoints;
-	FiniteElement_Mesh*             mesh;
+	FeMesh*             mesh;
 	TimeIntegrator*                 timeIntegrator;
 	WeightsCalculator*              weights;
 	IntegrationPointMapper*         mapper;
@@ -278,7 +278,7 @@
 	/* This will also call _Swarm_Init */
 	_Swarm_Construct( self, cf, data );
 
-	mesh           = Stg_ComponentFactory_ConstructByKey( cf, self->name, "FiniteElement_Mesh", FiniteElement_Mesh, True, data );
+	mesh           = Stg_ComponentFactory_ConstructByKey( cf, self->name, "FeMesh", FeMesh, True, data );
 	timeIntegrator = Stg_ComponentFactory_ConstructByKey( cf, self->name, "TimeIntegrator", TimeIntegrator, True, data );
 	weights        = Stg_ComponentFactory_ConstructByKey( cf, self->name, "WeightsCalculator", WeightsCalculator, False, data );
 	mapper         = Stg_ComponentFactory_ConstructByKey( cf, self->name, "IntegrationPointMapper", IntegrationPointMapper, True, data );

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.h
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.h	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.h	2006-12-07 23:33:13 UTC (rev 5534)
@@ -63,7 +63,7 @@
 	#define __IntegrationPointsSwarm \
 		__Swarm \
 		\
-		FiniteElement_Mesh*                   mesh;                 \
+		FeMesh*                   mesh;                 \
 		TimeIntegrator*                       timeIntegrator;       \
 		WeightsCalculator*                    weights;              \
 		IntegrationPointMapper*               mapper;               \
@@ -104,7 +104,7 @@
 
 	void _IntegrationPointsSwarm_Init(
 		void*                                           swarm,
-		FiniteElement_Mesh*                             mesh, 
+		FeMesh*                             mesh, 
 		TimeIntegrator*                                 timeIntegrator,
 		WeightsCalculator*                              weights,
 		IntegrationPointMapper*                         mapper,

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Material.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Material.c	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Material.c	2006-12-07 23:33:13 UTC (rev 5534)
@@ -224,7 +224,7 @@
 
 double Material_Volume( void* material, IntegrationPointsSwarm* swarm, Coord centroid ) {
 	Material*            self               = (Material*)material;
-	FiniteElement_Mesh*  feMesh             = swarm->mesh;
+	FeMesh*  feMesh             = swarm->mesh;
 	ElementType*         elementType;
 	IntegrationPoint*    particle;
 	Coord                globalCoord;
@@ -245,7 +245,7 @@
 
 	/* Loop over all cells in domain */
 	for ( lCell_I = 0 ; lCell_I < cellLocalCount ; lCell_I++ ) {
-		elementType = FeMesh_ElementTypeAt( feMesh, lCell_I );
+		elementType = FeMesh_GetElementType( feMesh, lCell_I );
 		for( cParticle_I = 0 ; cParticle_I < swarm->cellParticleCountTbl[lCell_I] ; cParticle_I++ ) {
 			lParticle_I = swarm->cellParticleTbl[lCell_I][cParticle_I];
 			particle = (IntegrationPoint*)Swarm_ParticleAt( swarm, lParticle_I );
@@ -261,7 +261,7 @@
 			/* Sum Volume */
 			volume += detJac * particle->weight;
 
-			FiniteElement_Mesh_CalcGlobalCoordFromLocalCoord( feMesh, dim, lCell_I, particle->xi, globalCoord );
+			FeMesh_CoordLocalToGlobal( feMesh, lCell_I, particle->xi, globalCoord );
 				
 			/* Sum centroid */
 			localCentroid[ I_AXIS ] += detJac * particle->weight * globalCoord[ I_AXIS ];
@@ -295,7 +295,7 @@
 		double*                 result ) 
 {
 	Material*            self               = (Material*)material;
-	FiniteElement_Mesh*  feMesh             = swarm->mesh;
+	FeMesh*  feMesh             = swarm->mesh;
 	ElementType*         elementType;
 	IntegrationPoint*    particle;
 	Cell_Index           lCell_I;
@@ -320,7 +320,7 @@
 
 	/* Loop over all cells in domain */
 	for ( lCell_I = 0 ; lCell_I < cellLocalCount ; lCell_I++ ) {
-		elementType = FeMesh_ElementTypeAt( feMesh, lCell_I );
+		elementType = FeMesh_GetElementType( feMesh, lCell_I );
 		for( cParticle_I = 0 ; cParticle_I < swarm->cellParticleCountTbl[lCell_I] ; cParticle_I++ ) {
 			lParticle_I = swarm->cellParticleTbl[lCell_I][cParticle_I];
 			particle = (IntegrationPoint*) Swarm_ParticleAt( swarm, lParticle_I );

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialFeVariable.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialFeVariable.c	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialFeVariable.c	2006-12-07 23:33:13 UTC (rev 5534)
@@ -123,17 +123,17 @@
 		variable_Register = swarm->swarmVariable_Register->variable_Register;
 
 	tmpName = Stg_Object_AppendSuffix( self, "DataVariable" );
-	self->dataVariable = Variable_NewScalar( 	
+	self->dataVariable = Variable_NewScalar( 
 			tmpName,
 			Variable_DataType_Double, 
-			&self->feMesh->nodeDomainCount, 
+			&self->feMesh->topo->domains[MT_VERTEX]->nDomains, 
 			(void**)&self->data, 
 			variable_Register );
 	Memory_Free( tmpName );
 	self->fieldComponentCount = 1;
 	
 	tmpName = Stg_Object_AppendSuffix( self, "DofLayout" );
-	self->dofLayout = DofLayout_New( tmpName, variable_Register, self->feMesh->layout->decomp->nodeDomainCount );
+	self->dofLayout = DofLayout_New( tmpName, variable_Register, self->feMesh->topo->domains[MT_VERTEX]->nDomains, NULL );
 	DofLayout_AddAllFromVariableArray( self->dofLayout, 1, &self->dataVariable );
 	Memory_Free( tmpName );
 	self->eqNum->dofLayout = self->dofLayout;

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.c	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.c	2006-12-07 23:33:13 UTC (rev 5534)
@@ -117,7 +117,7 @@
 
 void _MaterialPointsSwarm_Init( 
 		void*                                 swarm,
-		FiniteElement_Mesh*                   mesh,
+		FeMesh*                   mesh,
 		RemovalRoutine*                       removalRoutine,
 		SplittingRoutine*                     splittingRoutine,
 		EscapedRoutine*                       escapedRoutine, 
@@ -221,7 +221,7 @@
 
 void _MaterialPointsSwarm_Construct( void* swarm, Stg_ComponentFactory* cf, void* data ) {
 	MaterialPointsSwarm*	        self          = (MaterialPointsSwarm*) swarm;
-	FiniteElement_Mesh*             mesh;
+	FeMesh*             mesh;
 	RemovalRoutine*                 removalRoutine;
 	SplittingRoutine*               splittingRoutine;
 	EscapedRoutine*                 escapedRoutine;
@@ -230,7 +230,7 @@
 
 	_Swarm_Construct( self, cf, data );
 
-	mesh             = Stg_ComponentFactory_ConstructByKey( cf, self->name, "FiniteElement_Mesh", FiniteElement_Mesh, True, data );
+	mesh             = Stg_ComponentFactory_ConstructByKey( cf, self->name, "FeMesh", FeMesh, True, data );
 	removalRoutine   = Stg_ComponentFactory_ConstructByKey( cf, self->name, "RemovalRoutine",     RemovalRoutine,     False, data );
 	splittingRoutine = Stg_ComponentFactory_ConstructByKey( cf, self->name, "SplittingRoutine",   SplittingRoutine,   False, data );
 	escapedRoutine   = Stg_ComponentFactory_ConstructByKey( cf, self->name, "EscapedRoutine",     EscapedRoutine,     False, data );
@@ -299,7 +299,7 @@
 
 void _MaterialPointsSwarm_UpdateHook( void* timeIntegrator, void* swarm ) {
 	MaterialPointsSwarm* self               = (MaterialPointsSwarm*)swarm;
-	FiniteElement_Mesh*  mesh               = self->mesh;
+	FeMesh*  mesh               = self->mesh;
 	Index                cell;
 	Index                point_I;
 	MaterialPoint*       materialPoint;
@@ -323,7 +323,7 @@
 			materialPoint = (MaterialPoint*)Swarm_ParticleAt( self, point_I );
 			cell = materialPoint->owningCell;
 			Journal_Firewall(
-				cell < mesh->elementLocalCount,
+					 cell < FeMesh_GetElementLocalSize( mesh ), 
 				Journal_MyStream( Error_Type, self ),
 				"In func %s: MaterialPoint '%d' outside element. Coord = {%g, %g, %g}\n",
 				__func__,

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.h
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.h	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.h	2006-12-07 23:33:13 UTC (rev 5534)
@@ -62,7 +62,7 @@
 	#define __MaterialPointsSwarm \
 		__Swarm \
 		\
-		FiniteElement_Mesh*                   mesh;                 \
+		FeMesh*                   mesh;                 \
 		SwarmAdvector*                        swarmAdvector;        \
 		RemovalRoutine*                       removalRoutine;       \
 		SplittingRoutine*                     splittingRoutine;     \

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/ParticleFeVariable.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/ParticleFeVariable.c	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/ParticleFeVariable.c	2006-12-07 23:33:13 UTC (rev 5534)
@@ -194,11 +194,11 @@
 	ParticleFeVariable*     self            = (ParticleFeVariable*) materialFeVariable;
 	IntegrationPointsSwarm* swarm;
 	FiniteElementContext*   context;
-	FiniteElement_Mesh*     mesh;
+	FeMesh*     mesh;
 
 	swarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Swarm", IntegrationPointsSwarm, True, data );
 	context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", FiniteElementContext, True, data );
-	mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Mesh", FiniteElement_Mesh, True, data );
+	mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Mesh", FeMesh, True, data );
 
 	/* Construct Parent */
 	_FieldVariable_Construct( self, cf, data );
@@ -211,7 +211,7 @@
 	ParticleFeVariable* self = (ParticleFeVariable*) materialFeVariable;
 	
 	Stg_Component_Build( self->feMesh, data, False );
-	self->data = Memory_Alloc_Array( double, self->feMesh->nodeDomainCount * self->fieldComponentCount, "data" );
+	self->data = Memory_Alloc_Array( double, FeMesh_GetNodeDomainSize( self->feMesh ) * 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 */
@@ -279,9 +279,9 @@
 	ForceTerm*                 forceTerm         = (ForceTerm*) _forceTerm;
 	ParticleFeVariable*        self              = Stg_CheckType( forceVector->feVariable, ParticleFeVariable );
 	IntegrationPointsSwarm*    swarm             = (IntegrationPointsSwarm*)forceTerm->integrationSwarm;
-	FiniteElement_Mesh*        mesh              = self->feMesh;
-	Element_NodeIndex          elementNodeCount  = mesh->elementNodeCountTbl[ lElement_I ];
-	ElementType*               elementType       = FeMesh_ElementTypeAt( mesh, lElement_I );
+	FeMesh*        mesh              = self->feMesh;
+	Element_NodeIndex          elementNodeCount  = FeMesh_GetElementNodeSize( mesh, lElement_I );
+	ElementType*               elementType       = FeMesh_GetElementType( mesh, lElement_I );
 	Cell_Index                 cell_I            = CellLayout_MapElementIdToCellId( swarm->cellLayout, lElement_I );
 	Particle_InCellIndex       cellParticleCount;
 	Particle_InCellIndex       cParticle_I;
@@ -315,9 +315,9 @@
 	ForceTerm*                 forceTerm         = (ForceTerm*) _forceTerm;
 	ParticleFeVariable*        self              = Stg_CheckType( forceVector->feVariable, ParticleFeVariable );
 	Swarm*                     swarm             = forceTerm->integrationSwarm;
-	FiniteElement_Mesh*        mesh              = self->feMesh;
-	Element_NodeIndex          elementNodeCount  = mesh->elementNodeCountTbl[ lElement_I ];
-	ElementType*               elementType       = FeMesh_ElementTypeAt( mesh, lElement_I );
+	FeMesh*        mesh              = self->feMesh;
+	Element_NodeIndex          elementNodeCount  = FeMesh_GetElementNodeSize( mesh, lElement_I );
+	ElementType*               elementType       = FeMesh_GetElementType( mesh, lElement_I );
 	Cell_Index                 cell_I            = CellLayout_MapElementIdToCellId( swarm->cellLayout, lElement_I );
 	Particle_InCellIndex       cellParticleCount;
 	Particle_InCellIndex       cParticle_I;

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/PeriodicBoundariesManager.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/PeriodicBoundariesManager.c	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/PeriodicBoundariesManager.c	2006-12-07 23:33:13 UTC (rev 5534)
@@ -82,7 +82,7 @@
 
 PeriodicBoundariesManager* PeriodicBoundariesManager_New( 
 		Name                        name,
-		BlockGeometry*              geometry,
+		Mesh*			    mesh, 
 		Swarm*                      swarm,
 		Dictionary*                 dictionary )
 {
@@ -100,7 +100,7 @@
 		_PeriodicBoundariesManager_Destroy,
 		name,
 		True,
-		geometry,
+		mesh, 
 		swarm,
 		dictionary );
 }	
@@ -120,7 +120,7 @@
 		Stg_Component_DestroyFunction*         _destroy,
 		Name                                   name,
 		Bool                                   initFlag,
-		BlockGeometry*                         geometry,
+		Mesh*				       mesh, 
 		Swarm*                                 swarm,
 		Dictionary*                            dictionary )		
 {
@@ -147,7 +147,7 @@
 	/* Virtual info */
 	
 	if( initFlag ){
-		_PeriodicBoundariesManager_Init( self, geometry, swarm, dictionary );
+		_PeriodicBoundariesManager_Init( self, mesh, swarm, dictionary );
 	}
 	
 	return self;
@@ -156,7 +156,7 @@
 
 void _PeriodicBoundariesManager_Init(
 		void*             periodicBCsManager,
-		BlockGeometry*    geometry,
+		Mesh*		  mesh, 
 		Swarm*            swarm,
 		Dictionary*       dictionary )
 {
@@ -164,7 +164,7 @@
 
 	self->isConstructed = True;
 	self->dictionary = dictionary;
-	self->geometry = geometry;
+	self->mesh = mesh;
 	self->swarm = swarm;
 	self->count = 0;
 	self->delta = 0;
@@ -177,14 +177,14 @@
 void _PeriodicBoundariesManager_Construct( void* periodicBCsManager, Stg_ComponentFactory* cf, void* data ) {
 	PeriodicBoundariesManager*	self = (PeriodicBoundariesManager*)periodicBCsManager;
 	Dictionary*			dictionary = NULL;
-	BlockGeometry*                  geometry = NULL;
+	Mesh*				mesh = NULL;
 	Swarm*                          swarm = NULL;
 
 	dictionary = Dictionary_GetDictionary( cf->componentDict, self->name );
-	geometry =  Stg_ComponentFactory_ConstructByKey(  cf,  self->name,  "Geometry", BlockGeometry,  True, data  ) ;
+	mesh =  Stg_ComponentFactory_ConstructByKey(  cf,  self->name,  "mesh", Mesh,  True, data  ) ;
 	swarm =  Stg_ComponentFactory_ConstructByKey(  cf,  self->name,  "Swarm", Swarm,  True, data  ) ;
 
-	_PeriodicBoundariesManager_Init( self, geometry, swarm, dictionary );
+	_PeriodicBoundariesManager_Init( self, mesh, swarm, dictionary );
 }
 
 
@@ -240,7 +240,7 @@
 
 	if ( deep ) {
 		newPeriodicBCsManager->dictionary = (Dictionary*)Stg_Class_Copy( self->dictionary, NULL, deep, nameExt, map );
-		newPeriodicBCsManager->geometry = (BlockGeometry*)Stg_Class_Copy( self->geometry, NULL, deep, nameExt, map );
+		newPeriodicBCsManager->mesh = (Mesh*)Stg_Class_Copy( self->mesh, NULL, deep, nameExt, map );
 		newPeriodicBCsManager->swarm = (Swarm*)Stg_Class_Copy( self->swarm, NULL, deep, nameExt, map );
 		newPeriodicBCsManager->debug = self->debug;
 		newPeriodicBCsManager->boundaries = Memory_Alloc_Array( PeriodicBoundary, self->size,
@@ -249,7 +249,7 @@
 	}
 	else {
 		newPeriodicBCsManager->dictionary = self->dictionary;
-		newPeriodicBCsManager->geometry = self->geometry;
+		newPeriodicBCsManager->mesh = self->mesh;
 		newPeriodicBCsManager->swarm = self->swarm;
 		newPeriodicBCsManager->boundaries = self->boundaries;
 		newPeriodicBCsManager->debug = self->debug;
@@ -318,6 +318,9 @@
 void PeriodicBoundariesManager_AddPeriodicBoundary( void* periodicBCsManager, Axis axis ) {
 	PeriodicBoundariesManager*	self = (PeriodicBoundariesManager*)periodicBCsManager;	
 	PeriodicBoundary*		newPeriodicBoundary;
+	double				min[3], max[3];
+
+	Mesh_GetGlobalCoordRange( self->mesh, min, max );
 	
 	if ( self->count == self->size ) {
 		self->size += self->delta;
@@ -325,8 +328,8 @@
 	}
 	newPeriodicBoundary = &self->boundaries[self->count];
 	newPeriodicBoundary->axis = axis;
-	newPeriodicBoundary->minWall = self->geometry->min[axis];
-	newPeriodicBoundary->maxWall = self->geometry->max[axis];
+	newPeriodicBoundary->minWall = min[axis];
+	newPeriodicBoundary->maxWall = max[axis];
 	newPeriodicBoundary->particlesUpdatedMinEndCount = 0;	
 	newPeriodicBoundary->particlesUpdatedMaxEndCount = 0;	
 	self->count++;

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/PeriodicBoundariesManager.h
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/PeriodicBoundariesManager.h	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/PeriodicBoundariesManager.h	2006-12-07 23:33:13 UTC (rev 5534)
@@ -69,7 +69,7 @@
 		__Stg_Component \
 		\
 		Dictionary*		dictionary; \
-		BlockGeometry*          geometry; \
+		Mesh*			mesh; \
 		Index			count; \
 		Index			size; \
 		Index			delta; \
@@ -83,7 +83,7 @@
 
 	PeriodicBoundariesManager* PeriodicBoundariesManager_New( 
 		Name                    			name,
-		BlockGeometry*                                  geometry,
+		Mesh*						mesh, 
 		Swarm*                                          swarm,
 		Dictionary*					dictionary );
 
@@ -101,13 +101,13 @@
 		Stg_Component_DestroyFunction*         _destroy,
 		Name                                   name,
 		Bool                                   initFlag,
-		BlockGeometry*                         geometry,
+		Mesh*				       mesh, 
 		Swarm*                                 swarm,
 		Dictionary*                            dictionary );
 
 	void _PeriodicBoundariesManager_Init(
 		void*             periodicBCsManager,
-		BlockGeometry*    geometry,
+		Mesh*		  mesh, 
 		Swarm*            swarm,
 		Dictionary*       dictionary );
 		

Modified: long/3D/Gale/trunk/src/PICellerator/PopulationControl/src/ReseedSplitting.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/PopulationControl/src/ReseedSplitting.c	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/PopulationControl/src/ReseedSplitting.c	2006-12-07 23:33:13 UTC (rev 5534)
@@ -172,8 +172,7 @@
 	Dimension_Index         dim_I;
 	Dimension_Index         dim               = self->dim;
 	double                  regionLength;
-	FiniteElement_Mesh*     mesh              = (FiniteElement_Mesh*)((ElementCellLayout*)swarm->cellLayout)->mesh;
-	ElementLayout*          elementLayout     = mesh->layout->elementLayout;
+	FeMesh*     mesh              = (FeMesh*)((ElementCellLayout*)swarm->cellLayout)->mesh;
 
 	/* Initialise all Bools to false */
 	memset( self->regionContainsParticleTbl, 0, self->regionCount * sizeof(Bool) );
@@ -188,9 +187,9 @@
 		
 		/* Calculate local coordinates */
 		ElementType_ConvertGlobalCoordToElLocal(
-				FiniteElement_Mesh_ElementTypeAt( mesh, lCell_I ),
-				elementLayout,
-				(const Coord**) swarm->cellPointTbl[lCell_I],
+				FeMesh_GetElementType( mesh, lCell_I ),
+				mesh, 
+				lCell_I, 
 				particle->coord,
 				xi );
 
@@ -216,7 +215,7 @@
 		}
 
 		/* Convert Local Coordinate to Global Coordinate */
-		FiniteElement_Mesh_CalcGlobalCoordFromLocalCoord( mesh, dim, lCell_I, xi, newCoord );
+		FeMesh_CoordLocalToGlobal( mesh, lCell_I, xi, newCoord );
 			
 		/* Work out particle to split by finding closest particle in this cell */
 		cParticle_I = Swarm_FindClosestParticleInCell( swarm, lCell_I, dim, newCoord, NULL );

Modified: long/3D/Gale/trunk/src/PICellerator/Utils/src/BuoyancyForceTerm.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Utils/src/BuoyancyForceTerm.c	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/Utils/src/BuoyancyForceTerm.c	2006-12-07 23:33:13 UTC (rev 5534)
@@ -313,7 +313,7 @@
 	Element_NodeIndex                elementNodeCount;
 	Dimension_Index                  dim                = forceVector->dim;
 	IntegrationPointsSwarm*          swarm              = (IntegrationPointsSwarm*)self->integrationSwarm;
-	FiniteElement_Mesh*              mesh               = forceVector->feVariable->feMesh;
+	FeMesh*              mesh               = forceVector->feVariable->feMesh;
 	Node_ElementLocalIndex           eNode_I;
 	Cell_Index                       cell_I;
 	ElementType*                     elementType;
@@ -331,7 +331,7 @@
 	double totalWeight = 0.0;
 	double adjustFactor = 0.0;
 
-	elementType       = FeMesh_ElementTypeAt( mesh, lElement_I );
+	elementType       = FeMesh_GetElementType( mesh, lElement_I );
 	elementNodeCount  = elementType->nodeCount;
 	nodeDofCount      = dim;
 	cell_I            = CellLayout_MapElementIdToCellId( swarm->cellLayout, lElement_I );

Modified: long/3D/Gale/trunk/src/PICellerator/Voronoi/src/CellularAutomataVoronoi.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Voronoi/src/CellularAutomataVoronoi.c	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/Voronoi/src/CellularAutomataVoronoi.c	2006-12-07 23:33:13 UTC (rev 5534)
@@ -430,7 +430,7 @@
 	Cell_LocalIndex           lCell_I;
 	Particle_InCellIndex*     battlePair;
 
-	FiniteElement_Mesh*       mesh;
+	FeMesh*       mesh;
 
 	/* Check if battle has already been fought */
 	for ( battle_I = 0 ; battle_I < battleCount ; battle_I++ ) {
@@ -445,7 +445,7 @@
 	cellCentroid        = cell->centroid;
 	champion            = Swarm_ParticleInCellAt( swarm, lCell_I, champion_I );
 	contender           = Swarm_ParticleInCellAt( swarm, lCell_I, contender_I );
-	mesh                = (FiniteElement_Mesh*)(((ElementCellLayout*)swarm->cellLayout)->mesh); /* Assume ElementCellLayout */
+	mesh                = (FeMesh*)(((ElementCellLayout*)swarm->cellLayout)->mesh); /* Assume ElementCellLayout */
 	
 	if ( swarm->particleLayout->coordSystem == GlobalCoordSystem ) {
 		memcpy( championCoord, ((GlobalParticle*)champion)->coord, sizeof(Coord) );
@@ -453,18 +453,8 @@
 	}
 	else {
 		/* LocalCoordSystem need to convert to global */
-		FiniteElement_Mesh_CalcGlobalCoordFromLocalCoord(
-			mesh,
-			swarm->dim,
-			lCell_I,
-			((LocalParticle*)champion)->xi,
-			championCoord );
-		FiniteElement_Mesh_CalcGlobalCoordFromLocalCoord(
-			mesh,
-			swarm->dim,
-			lCell_I,
-			((LocalParticle*)contender)->xi,
-			contenderCoord );
+		FeMesh_CoordLocalToGlobal( mesh, lCell_I, ((LocalParticle*)champion)->xi, championCoord );
+		FeMesh_CoordLocalToGlobal( mesh, lCell_I, ((LocalParticle*)contender)->xi, contenderCoord );
 	}
 						
 
@@ -576,10 +566,10 @@
 	Dimension_Index                      dim               = self->dim;
 	Dimension_Index                      dim_I;
 	Index*                               resolution        = self->resolution;
-	FiniteElement_Mesh*                  mesh;
+	FeMesh*                  mesh;
 	Coord                                localCoord;
 
-	mesh                = (FiniteElement_Mesh*)(((ElementCellLayout*)swarm->cellLayout)->mesh); /* Assume ElementCellLayout */
+	mesh                = (FeMesh*)(((ElementCellLayout*)swarm->cellLayout)->mesh); /* Assume ElementCellLayout */
 
 	/* Loop over all the particles in the cell - assigning it to the a voronoi cell it is in */
 	for ( cParticle_I = 0 ; cParticle_I < cellParticleCount ; cParticle_I++ ) {
@@ -587,10 +577,7 @@
 
 		if ( swarm->particleLayout->coordSystem == GlobalCoordSystem ) {
 			/* Must convert global to local. */
-			FiniteElement_Mesh_CalcLocalCoordFromGlobalCoord( mesh, 
-									  lCell_I, 
-									  ((GlobalParticle*)particle)->coord, 
-									  localCoord );
+			FeMesh_CoordGlobalToLocal( mesh, lCell_I, ((GlobalParticle*)particle)->coord, localCoord );
 		}
 		else {
 			/* Now we need to coordinate in locals. */
@@ -713,7 +700,7 @@
 }
 
 void CellularAutomataVoronoi_CalcSubCells2D( CellularAutomataVoronoi* self, Swarm* swarm, unsigned cellInd ) {
-	FiniteElement_Mesh*	mesh;
+	FeMesh*	mesh;
 	unsigned		nSubCells;
 	unsigned*		res;
 	double**		gCrds;
@@ -727,7 +714,7 @@
 	/* Shortcuts. */
 	nSubCells = self->claimedCellCount;
 	res = self->resolution;
-	mesh = (FiniteElement_Mesh*)(((ElementCellLayout*)swarm->cellLayout)->mesh);
+	mesh = (FeMesh*)(((ElementCellLayout*)swarm->cellLayout)->mesh);
 
 	/* NOTE: It is assumed in an earlier function that the cell layout is based on the
 	   mesh's elements; I continue that assumption here. */
@@ -753,13 +740,8 @@
 			lCrds[3][0] = (double)(d_i + 1) * self->dx[0] - 1.0;
 
 			/* Map the local coordinates back to globals. */
-			for( c_i = 0; c_i < 4; c_i++ ) {
-				FiniteElement_Mesh_CalcGlobalCoordFromLocalCoord( mesh, 
-										  self->dim, 
-										  cellInd, 
-										  lCrds[c_i], 
-										  gCrds[c_i] );
-			}
+			for( c_i = 0; c_i < 4; c_i++ )
+				FeMesh_CoordLocalToGlobal( mesh, cellInd, lCrds[c_i], gCrds[c_i] );
 
 			/* Calculate the volume. */
 			self->cellVolumes[subCellInd] = CellularAutomataVoronoi_QuadArea( self, gCrds );
@@ -779,12 +761,11 @@
 	const double		sign[3][8] = {{-1, 1, -1, 1, -1, 1, -1, 1}, 
 					      {-1, -1, 1, 1, -1, -1, 1, 1}, 
 					      {-1, -1, -1, -1, 1, 1, 1, 1}};
-	FiniteElement_Mesh*	mesh;
+	FeMesh*	mesh;
 	unsigned		nSubCells;
 	unsigned*		res;
 	double**		gCrds;
 	double**		lCrds;
-	Coord*			gCrdPtrs[8];
 	ElementType*		elType;
 	unsigned		d_i, d_j, d_k;
 
@@ -795,8 +776,8 @@
 	/* Shortcuts. */
 	nSubCells = self->claimedCellCount;
 	res = self->resolution;
-	mesh = (FiniteElement_Mesh*)(((ElementCellLayout*)swarm->cellLayout)->mesh);
-	elType = FiniteElement_Mesh_ElementTypeAt( mesh, cellInd );
+	mesh = (FeMesh*)(((ElementCellLayout*)swarm->cellLayout)->mesh);
+	elType = FeMesh_GetElementType( mesh, cellInd );
 
 	/* NOTE: It is assumed in an earlier function that the cell layout is based on the
 	   mesh's elements; I continue that assumption here. */
@@ -844,15 +825,8 @@
 
 				/* Map the local coordinates back to globals. */
 				for( c_i = 0; c_i < 8; c_i++ ) {
-					/* Build a list of global coordinate pointers. */
-					gCrdPtrs[c_i] = (Coord*)(gCrds + c_i);
-
 					/* Convert to local coordinates. */
-					FiniteElement_Mesh_CalcGlobalCoordFromLocalCoord( mesh, 
-											  self->dim, 
-											  cellInd, 
-											  lCrds[c_i], 
-											  gCrds[c_i] );
+					FeMesh_CoordLocalToGlobal( mesh, cellInd, lCrds[c_i], gCrds[c_i] );
 
 					/* Calculate the jacobian. */
 					jac[0][0] += 0.125 * sign[0][c_i] * gCrds[c_i][0];
@@ -907,7 +881,7 @@
 	return area;
 }
 
-void CellularAutomataVoronoi_QuadCentroid( CellularAutomataVoronoi* self, double** gCrds, Coord centroid ) {
+void CellularAutomataVoronoi_QuadCentroid( CellularAutomataVoronoi* self, double** gCrds, double* centroid ) {
 	unsigned	c_i;
 
 	/* Sanity check. */
@@ -925,7 +899,7 @@
 	centroid[1] *= 0.25;
 }
 
-void CellularAutomataVoronoi_HexCentroid( CellularAutomataVoronoi* self, double** gCrds, Coord centroid ) {
+void CellularAutomataVoronoi_HexCentroid( CellularAutomataVoronoi* self, double** gCrds, double* centroid ) {
 	unsigned	c_i;
 
 	/* Sanity check. */

Modified: long/3D/Gale/trunk/src/PICellerator/Voronoi/src/CellularAutomataVoronoi.h
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Voronoi/src/CellularAutomataVoronoi.h	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/Voronoi/src/CellularAutomataVoronoi.h	2006-12-07 23:33:13 UTC (rev 5534)
@@ -168,7 +168,7 @@
 	void CellularAutomataVoronoi_CalcSubCells2D( CellularAutomataVoronoi* self, Swarm* swarm, unsigned cellInd );
 	void CellularAutomataVoronoi_CalcSubCells3D( CellularAutomataVoronoi* self, Swarm* swarm, unsigned cellInd );
 	double CellularAutomataVoronoi_QuadArea( CellularAutomataVoronoi* self, double** gCrds );
-	void CellularAutomataVoronoi_QuadCentroid( CellularAutomataVoronoi* self, double** gCrds, Coord centroid );
-	void CellularAutomataVoronoi_HexCentroid( CellularAutomataVoronoi* self, double** gCrds, Coord centroid );
+	void CellularAutomataVoronoi_QuadCentroid( CellularAutomataVoronoi* self, double** gCrds, double* centroid );
+	void CellularAutomataVoronoi_HexCentroid( CellularAutomataVoronoi* self, double** gCrds, double* centroid );
 	
 #endif 

Modified: long/3D/Gale/trunk/src/PICellerator/Weights/src/DiscreteVoronoiWeights.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Weights/src/DiscreteVoronoiWeights.c	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/Weights/src/DiscreteVoronoiWeights.c	2006-12-07 23:33:13 UTC (rev 5534)
@@ -165,7 +165,7 @@
 void _DiscreteVoronoiWeights_Calculate( void* discreteVoronoiWeights, void* _swarm, Cell_LocalIndex lCell_I ) {
 	DiscreteVoronoiWeights*     self            = (DiscreteVoronoiWeights*)  discreteVoronoiWeights;
 	Swarm*                      swarm           = (Swarm*) _swarm;
-	FiniteElement_Mesh*         feMesh          = (FiniteElement_Mesh*)((ElementCellLayout*)swarm->cellLayout)->mesh;
+	FeMesh*         feMesh          = (FeMesh*)((ElementCellLayout*)swarm->cellLayout)->mesh;
 	Voronoi_CellIndex           claimedVoronoiCellsCount;
 	Voronoi_CellIndex           voronoiCell_I;
 	ElementType*                elementType;
@@ -184,7 +184,7 @@
 	}
 
 	WeightsCalculator_ZeroWeightsInCell( self, swarm, lCell_I );
-	elementType    = FeMesh_ElementTypeAt( feMesh, lCell_I );
+	elementType    = FeMesh_GetElementType( feMesh, lCell_I );
 
 	/* Do Discrete Voronoi for this Cell */
 	DiscreteVoronoi_CalculateForCell( self->discreteVoronoi, swarm, lCell_I );

Modified: long/3D/Gale/trunk/src/PICellerator/Weights/src/VolumeWeights.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Weights/src/VolumeWeights.c	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/Weights/src/VolumeWeights.c	2006-12-07 23:33:13 UTC (rev 5534)
@@ -41,7 +41,7 @@
 /*----------------------------------------------------------------------------------------------------------------------------------
 ** Constructors
 */
-VolumeWeights* VolumeWeights_New( Name name, Dimension_Index dim, Stg_Shape* shape, FiniteElement_Mesh* mesh ) {
+VolumeWeights* VolumeWeights_New( Name name, Dimension_Index dim, Stg_Shape* shape, FeMesh* mesh ) {
 	VolumeWeights* self = (VolumeWeights*) _VolumeWeights_DefaultNew( name );
 
 	VolumeWeights_InitAll( self, dim, shape, mesh );
@@ -91,7 +91,7 @@
 	return self;
 }
 
-void _VolumeWeights_Init( void* weights, Stg_Shape* shape, FiniteElement_Mesh* mesh ) {
+void _VolumeWeights_Init( void* weights, Stg_Shape* shape, FeMesh* mesh ) {
 	VolumeWeights* self = (VolumeWeights*)weights;
 	
 	self->isConstructed = True;
@@ -100,7 +100,7 @@
 	self->mesh  = mesh;
 
 }
-void VolumeWeights_InitAll( void* weights, Dimension_Index dim, Stg_Shape* shape, FiniteElement_Mesh* mesh ) {
+void VolumeWeights_InitAll( void* weights, Dimension_Index dim, Stg_Shape* shape, FeMesh* mesh ) {
 	VolumeWeights* self = (VolumeWeights*)weights;
 
 	WeightsCalculator_InitAll( self, dim );
@@ -158,12 +158,12 @@
 void _VolumeWeights_Construct( void* weights, Stg_ComponentFactory* cf, void* data ) {
 	VolumeWeights*	     self          = (VolumeWeights*) weights;
 	Stg_Shape*           shape;
-	FiniteElement_Mesh*  mesh;
+	FeMesh*  mesh;
 
 	_WeightsCalculator_Construct( self, cf, data );
 
 	shape = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Shape", Stg_Shape, True, data );
-	mesh  = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Mesh", FiniteElement_Mesh, True, data );
+	mesh  = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Mesh", FeMesh, True, data );
 /*
 	Journal_Firewall(
 			Stg_Class_IsInstance( shape, Sphere_Type ),
@@ -208,7 +208,7 @@
 	double                       dy;
 	double                       dz;
 	double                       weight;
-	IJK                          size; /* mesh resolution */
+	Grid*				vertGrid;
 	
 	MPI_Allreduce( 
 		&(swarm->particleLocalCount),
@@ -220,12 +220,16 @@
 
 	volume = Stg_Shape_CalculateVolume( shape );
 
-	memcpy(&size, &(((IJKTopology*)self->mesh->layout->nodeLayout->topology)->size), sizeof(IJK) );
+	/*
+	** NOTE: Big assumption that the mesh is regular.
+	*/
+	vertGrid = *(Grid**)ExtensionManager_Get( self->mesh->info, self->mesh, 
+						  ExtensionManager_GetHandle( self->mesh->info, "vertexGrid" ) );
 	
-	dx = 1.0 / (double)(size[0] - 1); /* size of an element */
-	dy = 1.0 / (double)(size[1] - 1);
+	dx = 1.0 / (double)(vertGrid->sizes[0] - 1); /* size of an element */
+	dy = 1.0 / (double)(vertGrid->sizes[1] - 1);
 	if ( self->dim > 2 ) {
-		dz = 1.0 / (double)(size[2] - 1);
+		dz = 1.0 / (double)(vertGrid->sizes[2] - 1);
 	}
 	else {
 		dz = 1.0;

Modified: long/3D/Gale/trunk/src/PICellerator/Weights/src/VolumeWeights.h
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Weights/src/VolumeWeights.h	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/Weights/src/VolumeWeights.h	2006-12-07 23:33:13 UTC (rev 5534)
@@ -39,7 +39,7 @@
 	#define __VolumeWeights \
 		__WeightsCalculator \
 		Stg_Shape*              shape; \
-		FiniteElement_Mesh*     mesh; 
+		FeMesh*     mesh; 
 
 	struct VolumeWeights { __VolumeWeights };
 	
@@ -47,7 +47,7 @@
 	/*---------------------------------------------------------------------------------------------------------------------
 	** Constructors
 	*/
-	VolumeWeights* VolumeWeights_New( Name name, Dimension_Index dim, Stg_Shape* shape, FiniteElement_Mesh* mesh );
+	VolumeWeights* VolumeWeights_New( Name name, Dimension_Index dim, Stg_Shape* shape, FeMesh* mesh );
 	VolumeWeights* _VolumeWeights_New(
 		SizeT                                 _sizeOfSelf, 
 		Type                                  type,
@@ -63,8 +63,8 @@
 		WeightsCalculator_CalculateFunction*  _calculate,
 		Name                                  name );
 
-	void _VolumeWeights_Init( void* weights, Stg_Shape* shape, FiniteElement_Mesh* mesh ) ;
-	void VolumeWeights_InitAll( void* weights, Dimension_Index dim, Stg_Shape* shape, FiniteElement_Mesh* mesh ) ;
+	void _VolumeWeights_Init( void* weights, Stg_Shape* shape, FeMesh* mesh ) ;
+	void VolumeWeights_InitAll( void* weights, Dimension_Index dim, Stg_Shape* shape, FeMesh* mesh ) ;
 
 
 	/* Stg_Class_Delete VolumeWeights implementation */

Modified: long/3D/Gale/trunk/src/PICellerator/Weights/tests/plugins/testElementIntegral.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Weights/tests/plugins/testElementIntegral.c	2006-12-07 23:29:43 UTC (rev 5533)
+++ long/3D/Gale/trunk/src/PICellerator/Weights/tests/plugins/testElementIntegral.c	2006-12-07 23:33:13 UTC (rev 5534)
@@ -106,7 +106,7 @@
 void PICellerator_testElementIntegral( DiscretisationContext* context ) {
 	Swarm*              integrationSwarm = (Swarm*)LiveComponentRegister_Get( context->CF->LCRegister, "swarm" );
 	Swarm*              materialSwarm    = (Swarm*)LiveComponentRegister_Get( context->CF->LCRegister, "picIntegrationPoints" );
-	FiniteElement_Mesh* mesh             = (FiniteElement_Mesh*) LiveComponentRegister_Get( context->CF->LCRegister, "mesh-linear" );
+	FeMesh* mesh             = (FeMesh*) LiveComponentRegister_Get( context->CF->LCRegister, "mesh-linear" );
 	WeightsCalculator*  weights          = (WeightsCalculator*) LiveComponentRegister_Get( context->CF->LCRegister, "weights" );
 	FeVariable*         feVariable;
 	Element_LocalIndex  lElement_I       = 0;



More information about the cig-commits mailing list