[cig-commits] r3897 - in long/3D/Gale/trunk/src/PICellerator: . Apps Apps/BuoyancyBenchmark Apps/BuoyancyBenchmark/output Apps/BuoyancyBenchmark/tests Apps/BuoyancyBenchmark/tests/AnalyticPressure Apps/BuoyancyBenchmark/tests/expected Apps/BuoyancyBenchmark/tests/output Apps/PIC_Components Apps/RayleighTaylor Apps/RayleighTaylor/tests Apps/RayleighTaylor/tests/expected Apps/ThermoChem MaterialPoints/src MaterialPoints/tests MaterialPoints/tests/expected MaterialPoints/tests/plugins PopulationControl/tests/plugins Utils/src Voronoi/src Weights/src Weights/tests Weights/tests/plugins plugins plugins/Application plugins/Output/MaterialCentroid src

walter at geodynamics.org walter at geodynamics.org
Wed Jun 28 02:56:26 PDT 2006


Author: walter
Date: 2006-06-28 02:56:23 -0700 (Wed, 28 Jun 2006)
New Revision: 3897

Added:
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/BuoyancyExample.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/PressureVP.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/demo.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/makefile
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/output/
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticPressure/
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticPressure/AnalyticPressure.c
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticPressure/makefile
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticPressureVP.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticViewports.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/PressureErrorVP.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/expected/
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/expected/testBuoyancy.0of1.PressureField-ErrorFile.expected
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/log/
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/makefile
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/output/
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/testBuoyancy.0of1.sh
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/testBuoyancy.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/velocityBCs.freeslip.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/window.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/AllowOutflow.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/expected/testRayTaySuperimposedBall2D-invert.0of1.lightMaterialCentroid.dat.expected
   long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/expected/testRayTaySuperimposedBall2D.0of1.denseMaterialCentroid.dat.expected
   long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall-invert.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall2D-invert.0of1.sh
   long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall2D.0of1.sh
   long/3D/Gale/trunk/src/PICellerator/plugins/Application/
   long/3D/Gale/trunk/src/PICellerator/plugins/Application/Application.c
   long/3D/Gale/trunk/src/PICellerator/plugins/Application/Application.h
   long/3D/Gale/trunk/src/PICellerator/plugins/Application/makefile
Removed:
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsClass.meta
Modified:
   long/3D/Gale/trunk/src/PICellerator/
   long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/MaterialPointSwarm-flip1.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/MaterialPointSwarm-test1.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/MaterialPointSwarm.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/StokesFlowUzawa-flip1.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/StokesFlowUzawa-test1.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/StokesFlowUzawa.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example-flip1.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example-test1.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testAnalyticBlock.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testAnalyticColumn.xml
   long/3D/Gale/trunk/src/PICellerator/Apps/ThermoChem/ThermoChem.xml
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/BackgroundParticleLayout.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/BackgroundParticleLayout.meta
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/CoincidentMapper.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/CoincidentMapper.meta
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Context.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Context.h
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/GaussMapper.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/GaussMapper.meta
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointMapper.meta
   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/IntegrationPointsSwarm.meta
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/ManyToOneMapper.meta
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MappedParticleLayout.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MappedParticleLayout.meta
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialFeVariable.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialFeVariable.h
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.meta
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Materials_Register.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/OneToOneMapper.meta
   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/MaterialPoints/src/SwarmAdvector.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/SwarmAdvector.h
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/SwarmAdvectorD.h
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/Viewport.xml
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/expected/testPeriodicBCs.0of1.expected
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/expected/testPeriodicBCs.0of2.expected
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/expected/testPeriodicBCs.1of2.expected
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/plugins/testAdvection.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/plugins/testMaterialFeVariable.c
   long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/testMaterialFeVariable.xml
   long/3D/Gale/trunk/src/PICellerator/PopulationControl/tests/plugins/testParticleCoords.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/WeightsCalculator.c
   long/3D/Gale/trunk/src/PICellerator/Weights/tests/plugins/testElementIntegral.c
   long/3D/Gale/trunk/src/PICellerator/Weights/tests/testElementIntegral.xml
   long/3D/Gale/trunk/src/PICellerator/plugins/Output/MaterialCentroid/MaterialCentroid.c
   long/3D/Gale/trunk/src/PICellerator/src/main.c
Log:
Update to latest from VPAC


Property changes on: long/3D/Gale/trunk/src/PICellerator
___________________________________________________________________
Name: svk:merge
   - 00de75e2-39f1-0310-8538-9683d00a49cc:/trunk:303
aee11096-cf10-0410-a191-eea5772ba81f:/cig:361
   + 00de75e2-39f1-0310-8538-9683d00a49cc:/trunk:342
aee11096-cf10-0410-a191-eea5772ba81f:/cig:403


Property changes on: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark
___________________________________________________________________
Name: svn:ignore
   + PICellerator


Added: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/BuoyancyExample.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/BuoyancyExample.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/BuoyancyExample.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,121 @@
+<?xml version="1.0"?>
+<!DOCTYPE StGermainData SYSTEM "stgermain.dtd">
+
+<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
+	<list name="plugins" mergeType="Replace">
+		<!--param>Underworld_MovingMesh</param-->
+		<param>StG_FEM_StandardConditionFunctions</param>	
+		<!--param>ExperimentalUnderworld_PressureCalibration</param-->	
+	</list>
+
+	<!--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>
+	<include>../StgFEM_Components/PressureField.xml          </include>
+	<include>../StgFEM_Components/GaussSwarm.xml             </include>
+	<include>../StgFEM_Components/TimeIntegrator.xml </include>
+	<include>../PIC_Components/MaterialPointSwarm.xml        </include>
+	<include>../PIC_Components/StokesFlowUzawa.xml </include>
+	<!--include>../Underworld_Components/StokesFlowUzawaCompressible.xml </include-->
+	<!--include> ../PIC_Components/PopulationControl.xml </include-->
+
+	<list name="plugins" mergeType="merge">
+		<!-- Output Plugins -->
+		<param>StG_FEM_FrequentOutput</param>	
+		<param>StG_FEM_CPUTime</param>
+	</list>
+        <param name="gravity">9.81</param>
+
+	<!-- Rheology Components -->
+	<struct name="components" mergeType="merge">
+		<struct name="buoyancyForceTerm">
+			<param name="Type">BuoyancyForceTerm</param>
+			<param name="ForceVector">mom_force</param>
+			<param name="TemperatureField">TemperatureField</param>
+			<param name="Swarm">picIntegrationPoints</param>
+			<param name="gravity">gravity</param>
+		</struct>
+					
+		<!-- Background Material Stuff -->
+		<!--struct name="backgroundShape">
+			<param name="Type">Everywhere</param>
+		</struct>	
+		<struct name="backgroundViscosity">
+			<param name="Type">MaterialViscosity</param>
+			<param name="eta0">1.0</param>
+		</struct>	
+		<struct name="compressible">
+			<param name="Type">Compressible</param>
+			<param name="GeometryMesh">mesh-linear</param>
+			<param name="StiffnessMatrix">c_matrix</param>
+			<param name="Swarm">picIntegrationPoints</param>	
+			<param name="oneOnLambda">10.0</param>
+		</struct>	
+
+		<struct name="background">
+			<param name="Type">RheologyMaterial</param>
+			<param name="Shape">backgroundShape</param>
+			<param name="Compressible">compressible</param>
+			<param name="density">0.0</param>
+			<param name="Rheology">backgroundViscosity</param>
+		</struct-->
+
+		<struct name="layerShape">
+			<param name="Type">Box</param>
+			<param name="startX"> minX </param> <param name="endX"> maxX </param>
+			<param name="startY"> minY </param> <param name="endY"> maxY </param>
+			<param name="startZ"> minZ </param> <param name="endZ"> maxZ </param>
+		</struct>
+
+		<struct name="layer">
+			<param name="Type">Material</param>
+			<param name="Shape">layerShape</param>
+			<param name="density">1.36</param>
+		</struct>
+
+                <struct name="materialSwarmParticleLayout" mergeType="replace">
+		         <param name="Type">GaussParticleLayout</param>
+		</struct>
+										
+	</struct>
+
+	<!-- Simulation control -->
+	<param name="maxTimeSteps"> 1 </param>
+	<param name="outputPath"> ./output </param>
+	<param name="dumpEvery"> 1 </param>	
+
+	<param name="particlesPerCell"> 20 </param>
+
+	<!-- Non-linear stuff -->
+	<param name="nonLinearMaxIterations"> 20 </param>	
+	
+        <!-- Journal Control -->
+	<param name="journal.info.Context-verbose">True</param>
+	<param name="journal-level.info.Stg_ComponentFactory">2</param>
+	<param name="journal.debug">t</param>
+	<param name="journal-enable-branch.debug.StG_FEM">t</param>
+	<param name="journal-level-branch.debug.StG_FEM"> 2 </param>	
+	
+	<!-- Geometry & Mesh setup -->
+	<param name="dim"> 2 </param>
+	<param name="elementResI"> 50</param>
+	<param name="elementResJ"> 50 </param>
+	<param name="elementResK"> 1 </param>
+	<param name="shadowDepth"> 1 </param>
+   	<param name="minX"> 0.0 </param>
+	<param name="minY"> 0.0 </param>
+	<param name="minZ"> 0.0 </param>
+	<param name="maxX"> 1.0 </param>
+	<param name="maxY"> 0.8 </param>
+	<param name="maxZ"> 1 </param>
+	<param name="allowUnbalancing"> True </param>
+
+	<!-- Set up BCs and ICs -->
+        <include>./velocityBCs.freeslip.xml</include>
+	
+</StGermainData>
+

Added: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/PressureVP.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/PressureVP.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/PressureVP.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!DOCTYPE StGermainData SYSTEM "stgermain.dtd">
+
+<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
+
+	<struct name="components" mergeType="merge">
+		<struct name="camera" mergeType="replace">
+			<param name="Type">lucCamera</param>
+			<param name="CentreFieldVariable">PressureField</param>
+			<param name="coordZ">3.5</param>
+		</struct>
+		<struct name="pressureColourMap">
+			<param name="Type">lucColourMap</param>
+			<param name="colours">Black Purple DarkRed Orange Yellow</param>
+			<param name="dynamicRange">true</param>
+		</struct>
+		<!-- Drawing Objects -->
+		<struct name="pressureMap">
+			<param name="Type">lucScalarField</param>
+			<param name="FieldVariable">PressureField</param>
+			<param name="ColourMap">pressureColourMap</param>
+		</struct>
+		<struct name="border" mergeType="replace">
+			<param name="Type">lucFieldVariableBorder</param>
+			<param name="FieldVariable">PressureField</param>
+		</struct>
+		<struct name="pressureColourBar">
+			<param name="Type">lucColourBar</param>
+			<param name="ColourMap">pressureColourMap</param>
+		</struct>
+		<!-- Put these althogether in a viewport -->
+		<struct name="PressureVP">
+			<param name="Type">lucViewport</param>
+			<param name="Camera">camera</param>
+			<list name="DrawingObject">
+				<param>pressureMap</param>
+				<param>border</param>
+				<param>pressureColourBar</param>
+			</list>
+		</struct>
+	</struct>
+</StGermainData>

Added: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/demo.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/demo.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/demo.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!DOCTYPE StGermainData SYSTEM "stgermain.dtd">
+
+<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
+ 	
+	<include>./BuoyancyExample.xml</include>
+	<include>./PressureVP.xml</include>
+	<include>./window.xml</include>
+	<struct name="components" mergeType="merge">
+		<struct name="window" mergeType="merge">
+			<param name="Viewport">PressureVP</param>
+		</struct>
+	</struct>
+	<param name="outputPath">./output</param>
+	
+
+</StGermainData>

Added: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/makefile
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/makefile	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/makefile	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,75 @@
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+##
+## Copyright (C), 2003-2006, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street,
+##	Melbourne, 3053, Australia.
+## Copyright (c) 2005-2006, Monash Cluster Computing, Building 28, Monash University Clayton Campus,
+##	Victoria, 3800, Australia
+##
+## Primary Contributing Organisations:
+##	Victorian Partnership for Advanced Computing Ltd, Computational Software Development - http://csd.vpac.org
+##	Australian Computational Earth Systems Simulator - http://www.access.edu.au
+##	Monash Cluster Computing - http://www.mcc.monash.edu.au
+##
+## Contributors:
+##	Robert Turnbull, Research Assistant, Monash University. (robert.turnbull at sci.monash.edu.au)
+##	Patrick D. Sunter, Software Engineer, VPAC. (patrick at vpac.org)
+##	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+##	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+##	David May, PhD Student, Monash University (david.may at sci.monash.edu.au)
+##	Vincent Lemiale, Postdoctoral Fellow, Monash University. (vincent.lemiale at sci.monash.edu.au)
+##	Julian Giordani, Research Assistant, Monash University. (julian.giordani at sci.monash.edu.au)
+##	Louis Moresi, Associate Professor, Monash University. (louis.moresi at sci.monash.edu.au)
+##	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+##	Raquibul Hassan, Computational Engineer, VPAC. (raq at vpac.org)
+##	David Stegman, Postdoctoral Fellow, Monash University. (david.stegman at sci.monash.edu.au)
+##	Wendy Sharples, PhD Student, Monash University (wendy.sharples at sci.monash.edu.au)
+##
+##  This library is free software; you can redistribute it and/or
+##  modify it under the terms of the GNU Lesser General Public
+##  License as published by the Free Software Foundation; either
+##  version 2.1 of the License, or (at your option) any later version.
+##
+##  This library is distributed in the hope that it will be useful,
+##  but WITHOUT ANY WARRANTY; without even the implied warranty of
+##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+##  Lesser General Public License for more details.
+##
+##  You should have received a copy of the GNU Lesser General Public
+##  License along with this library; if not, write to the Free Software
+##  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+##
+## $Id: makefile 277 2006-04-11 11:28:01Z PatrickSunter $
+##
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+SHELL := $(shell which bash)
+PROJ_ROOT := $(shell until test -r ./Makefile.system ; do cd .. ; done ; echo `pwd`)
+
+include ${PROJ_ROOT}/Makefile.system
+
+subdirs = tests
+
+modName := $(shell basename `pwd` )
+mod = ${PROJECT}_${modName}
+includes = ${PROJECT}/${modName}
+
+SRCS = $(wildcard *.c)
+HDRS = $(wildcard *.h)
+
+PROJ_LIBS = lib${PROJECT}Update.so lib${PROJECT}Materials.so
+EXTERNAL_INCLUDES = ${STG_FEM_INCLUDES} ${STGERMAIN_INCLUDES} ${PETSC_INCLUDES} ${MPI_INCLUDES} ${XML_CFLAGS} 
+EXTERNAL_LIBS = \
+	${STG_FEM_RPATH} ${STG_FEM_LIBS} \
+	${STG_FEM_RPATH} ${STGERMAIN_LIBS} \
+	${PETSC_RPATH} ${PETSC_LIBS} \
+	${MPI_RPATH} ${MPI_LIBS} \
+	${XML_LIBS} 
+
+ifdef HAVE_PYTHON
+	packages += PYTHON
+endif
+
+examples_xml = demo.xml
+
+# obtain defaults for required variables according to system and project location, and then run the build.
+include ${PROJ_ROOT}/Makefile.vmake


Property changes on: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/output
___________________________________________________________________
Name: svn:ignore
   + *



Property changes on: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests
___________________________________________________________________
Name: svn:ignore
   + PICellerator


Added: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticPressure/AnalyticPressure.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticPressure/AnalyticPressure.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticPressure/AnalyticPressure.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,110 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+**
+** Copyright (C), 2003-2006, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street,
+**	Melbourne, 3053, Australia.
+** Copyright (c) 2005-2006, Monash Cluster Computing, Building 28, Monash University Clayton Campus,
+**	Victoria, 3800, Australia
+**
+** Primary Contributing Organisations:
+**	Victorian Partnership for Advanced Computing Ltd, Computational Software Development - http://csd.vpac.org
+**	Australian Computational Earth Systems Simulator - http://www.access.edu.au
+**	Monash Cluster Computing - http://www.mcc.monash.edu.au
+**
+** Contributors:
+**	Robert Turnbull, Research Assistant, Monash University. (robert.turnbull at sci.monash.edu.au)
+**	Patrick D. Sunter, Software Engineer, VPAC. (patrick at vpac.org)
+**	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+**	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+**	David May, PhD Student, Monash University (david.may at sci.monash.edu.au)
+**	Vincent Lemiale, Postdoctoral Fellow, Monash University. (vincent.lemiale at sci.monash.edu.au)
+**	Julian Giordani, Research Assistant, Monash University. (julian.giordani at sci.monash.edu.au)
+**	Louis Moresi, Associate Professor, Monash University. (louis.moresi at sci.monash.edu.au)
+**	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+**	Raquibul Hassan, Computational Engineer, VPAC. (raq at vpac.org)
+**	David Stegman, Postdoctoral Fellow, Monash University. (david.stegman at sci.monash.edu.au)
+**	Wendy Sharples, PhD Student, Monash University (wendy.sharples at sci.monash.edu.au)
+**
+**  This library is free software; you can redistribute it and/or
+**  modify it under the terms of the GNU Lesser General Public
+**  License as published by the Free Software Foundation; either
+**  version 2.1 of the License, or (at your option) any later version.
+**
+**  This library is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+**  Lesser General Public License for more details.
+**
+**  You should have received a copy of the GNU Lesser General Public
+**  License along with this library; if not, write to the Free Software
+**  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+**
+** $Id$
+**
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#include <mpi.h>
+#include <StGermain/StGermain.h>
+#include <StG_FEM/StG_FEM.h>
+#include <PICellerator/PICellerator.h>
+
+#include <assert.h>
+
+const Type AnalyticPressure_Type = "AnalyticPressure";
+
+typedef struct {
+	__AnalyticSolution
+	double                  density;
+	double                  gravity;
+	double                  maxY;
+	double                  minY;
+} AnalyticPressure;
+
+void _AnalyticPressure_PressureFunction( void* analyticSolution, FeVariable* analyticFeVariable, double* coord, double* pressure ) {
+	AnalyticPressure*  self    = (AnalyticPressure*)analyticSolution;
+	double             density = self->density;
+	double             gravity = self->gravity;
+        double             y;
+
+	/* Find coordinate of node */
+	y = -coord[ J_AXIS ] + (self->minY+self->maxY)/2.0;
+
+	*pressure = y * density * gravity;
+}
+
+	
+void _AnalyticPressure_Construct( void* analyticSolution, Stg_ComponentFactory* cf ) {
+	AnalyticPressure*        self           = (AnalyticPressure*)analyticSolution;
+	FeVariable*              pressureField;
+
+	/* Construct Parent */
+	_AnalyticSolution_Construct( self, cf );
+
+	/* Create Analytic Fields */
+	pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True );
+	AnalyticSolution_CreateAnalyticField( self, pressureField, _AnalyticPressure_PressureFunction );
+	
+	self->density  = Stg_ComponentFactory_GetDouble( cf, "layer", "density", 0.0 );
+	self->gravity  = Stg_ComponentFactory_GetRootDictDouble( cf, "gravity", 0 );
+	self->maxY     = Stg_ComponentFactory_GetRootDictDouble( cf, "maxY", 0 );
+	self->minY     = Stg_ComponentFactory_GetRootDictDouble( cf, "minY", 0 );
+}
+
+void* _AnalyticPressure_DefaultNew( Name name ) {
+	return _AnalyticSolution_New(
+			sizeof(AnalyticPressure),
+			AnalyticPressure_Type,
+			_AnalyticSolution_Delete,
+			_AnalyticSolution_Print,
+			_AnalyticSolution_Copy,
+			_AnalyticPressure_DefaultNew,
+			_AnalyticPressure_Construct,
+			_AnalyticSolution_Build,
+			_AnalyticSolution_Initialise,
+			_AnalyticSolution_Execute,
+			_AnalyticSolution_Destroy,
+			name );
+}
+
+Index _PICellerator_AnalyticPressure_Register( PluginsManager* pluginsManager ) {
+	return PluginsManager_Submit( pluginsManager, AnalyticPressure_Type, "0", _AnalyticPressure_DefaultNew );
+}


Property changes on: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticPressure/AnalyticPressure.c
___________________________________________________________________
Name: svn:keywords
   + LastChangedDate Author Id
Name: svn:eol-style
   + native

Added: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticPressure/makefile
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticPressure/makefile	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticPressure/makefile	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,71 @@
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+##
+## Copyright (C), 2003-2006, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street,
+##	Melbourne, 3053, Australia.
+## Copyright (c) 2005-2006, Monash Cluster Computing, Building 28, Monash University Clayton Campus,
+##	Victoria, 3800, Australia
+##
+## Primary Contributing Organisations:
+##	Victorian Partnership for Advanced Computing Ltd, Computational Software Development - http://csd.vpac.org
+##	Australian Computational Earth Systems Simulator - http://www.access.edu.au
+##	Monash Cluster Computing - http://www.mcc.monash.edu.au
+##
+## Contributors:
+##	Robert Turnbull, Research Assistant, Monash University. (robert.turnbull at sci.monash.edu.au)
+##	Patrick D. Sunter, Software Engineer, VPAC. (patrick at vpac.org)
+##	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+##	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+##	David May, PhD Student, Monash University (david.may at sci.monash.edu.au)
+##	Vincent Lemiale, Postdoctoral Fellow, Monash University. (vincent.lemiale at sci.monash.edu.au)
+##	Julian Giordani, Research Assistant, Monash University. (julian.giordani at sci.monash.edu.au)
+##	Louis Moresi, Associate Professor, Monash University. (louis.moresi at sci.monash.edu.au)
+##	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+##	Raquibul Hassan, Computational Engineer, VPAC. (raq at vpac.org)
+##	David Stegman, Postdoctoral Fellow, Monash University. (david.stegman at sci.monash.edu.au)
+##	Wendy Sharples, PhD Student, Monash University (wendy.sharples at sci.monash.edu.au)
+##
+##  This library is free software; you can redistribute it and/or
+##  modify it under the terms of the GNU Lesser General Public
+##  License as published by the Free Software Foundation; either
+##  version 2.1 of the License, or (at your option) any later version.
+##
+##  This library is distributed in the hope that it will be useful,
+##  but WITHOUT ANY WARRANTY; without even the implied warranty of
+##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+##  Lesser General Public License for more details.
+##
+##  You should have received a copy of the GNU Lesser General Public
+##  License along with this library; if not, write to the Free Software
+##  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+##
+## $Id: makefile 277 2006-04-11 11:28:01Z PatrickSunter $
+##
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+#Finds the Absolute path to the Project Root directory
+SHELL := /bin/bash
+PROJ_ROOT := $(shell until test -r ./Makefile.system ; do cd .. ; done ; echo `pwd`)
+include ${PROJ_ROOT}/Makefile.system
+
+# Subdirectories
+subdirs := $(shell find * -type d -prune ! -name .svn ) 
+
+# Source Code and Header files
+SRCS := $(wildcard *.c)
+HDRS := $(wildcard *.h)
+
+# What to call the plugin
+modName := $(shell basename `pwd`)
+mod = ${PROJECT}_${modName}
+
+# Where to put header files
+includes = ${PROJECT}/${modName}
+
+# External Libraries and Headers
+packages = STG_FEM STGERMAIN PETSC MPI XML 
+
+ifdef HAVE_PYTHON
+	packages += PYTHON
+endif
+
+include ${PROJ_ROOT}/Makefile.vmake

Added: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticPressureVP.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticPressureVP.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticPressureVP.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!DOCTYPE StGermainData SYSTEM "stgermain.dtd">
+
+<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
+
+	<struct name="components" mergeType="merge">
+		<struct name="analyticPressureColourMap">
+			<param name="Type">lucColourMap</param>
+			<param name="colours">Black Purple DarkRed Orange Yellow</param>
+			<param name="dynamicRange">true</param>
+		</struct>
+		<!-- Drawing Objects -->
+		<struct name="analyticPressureMap">
+			<param name="Type">lucScalarField</param>
+			<param name="FieldVariable">PressureField-Analytic</param>
+			<param name="ColourMap">analyticPressureColourMap</param>
+		</struct>
+		<struct name="analyticPressureColourBar">
+			<param name="Type">lucColourBar</param>
+			<param name="ColourMap">analyticPressureColourMap</param>
+		</struct>
+		<!-- Put these althogether in a viewport -->
+		<struct name="AnalyticPressureVP">
+			<param name="Type">lucViewport</param>
+			<param name="Camera">camera</param>
+			<list name="DrawingObject">
+				<param>analyticPressureMap</param>
+				<param>border</param>
+				<param>analyticPressureColourBar</param>
+			</list>
+		</struct>
+	</struct>
+</StGermainData>

Added: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticViewports.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticViewports.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/AnalyticViewports.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,18 @@
+<!-- Rayleigh-Taylor app input file -->
+
+<!-- DTD to validate against -->
+<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
+
+	<include>../PressureVP.xml</include>
+	<include>./AnalyticPressureVP.xml</include>
+	<include>./PressureErrorVP.xml</include>
+	<include>../window.xml</include>
+	<struct name="components" mergeType="merge">
+		<struct name="window" mergeType="merge">
+			<list name="Viewport">
+				<param>PressureVP AnalyticPressureVP PressureErrorVP</param>
+			</list>
+		</struct>
+	</struct>
+
+</StGermainData>	

Added: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/PressureErrorVP.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/PressureErrorVP.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/PressureErrorVP.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!DOCTYPE StGermainData SYSTEM "stgermain.dtd">
+
+<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
+
+	<struct name="components" mergeType="merge">
+		<struct name="pressureErrorColourMap">
+			<param name="Type">lucColourMap</param>
+			<param name="colours">Purple Blue Green Yellow Orange Red Black</param>
+			<param name="dynamicRange">true</param>
+		</struct>
+		<!-- Drawing Objects -->
+		<struct name="pressureErrorMap">
+			<param name="Type">lucScalarField</param>
+			<param name="FieldVariable">PressureField-ErrorField</param>
+			<param name="ColourMap">pressureErrorColourMap</param>
+			<param name="resolution">128</param>
+		</struct>
+		<struct name="pressureErrorColourBar">
+			<param name="Type">lucColourBar</param>
+			<param name="ColourMap">pressureErrorColourMap</param>
+		</struct>
+		<!-- Put these althogether in a viewport -->
+		<struct name="PressureErrorVP">
+			<param name="Type">lucViewport</param>
+			<param name="Camera">camera</param>
+			<list name="DrawingObject">
+				<param>pressureErrorMap</param>
+				<param>border</param>
+				<param>pressureErrorColourBar</param>
+			</list>
+		</struct>
+	</struct>
+</StGermainData>

Added: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/expected/testBuoyancy.0of1.PressureField-ErrorFile.expected
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/expected/testBuoyancy.0of1.PressureField-ErrorFile.expected	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/expected/testBuoyancy.0of1.PressureField-ErrorFile.expected	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,2 @@
+Timestep 0: Total integrated value of 'PressureField-ErrorMagnitudeField' is outside a tolerance 1.5e-06.
+Timestep 1: Total integrated value of 'PressureField-ErrorMagnitudeField' is within a tolerance 1.5e-06.

Added: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/makefile
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/makefile	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/makefile	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,59 @@
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+##
+## Copyright (C), 2003-2006, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street,
+##	Melbourne, 3053, Australia.
+## Copyright (c) 2005-2006, Monash Cluster Computing, Building 28, Monash University Clayton Campus,
+##	Victoria, 3800, Australia
+##
+## Primary Contributing Organisations:
+##	Victorian Partnership for Advanced Computing Ltd, Computational Software Development - http://csd.vpac.org
+##	Australian Computational Earth Systems Simulator - http://www.access.edu.au
+##	Monash Cluster Computing - http://www.mcc.monash.edu.au
+##
+## Contributors:
+##	Robert Turnbull, Research Assistant, Monash University. (robert.turnbull at sci.monash.edu.au)
+##	Patrick D. Sunter, Software Engineer, VPAC. (patrick at vpac.org)
+##	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+##	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+##	David May, PhD Student, Monash University (david.may at sci.monash.edu.au)
+##	Vincent Lemiale, Postdoctoral Fellow, Monash University. (vincent.lemiale at sci.monash.edu.au)
+##	Julian Giordani, Research Assistant, Monash University. (julian.giordani at sci.monash.edu.au)
+##	Louis Moresi, Associate Professor, Monash University. (louis.moresi at sci.monash.edu.au)
+##	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+##	Raquibul Hassan, Computational Engineer, VPAC. (raq at vpac.org)
+##	David Stegman, Postdoctoral Fellow, Monash University. (david.stegman at sci.monash.edu.au)
+##	Wendy Sharples, PhD Student, Monash University (wendy.sharples at sci.monash.edu.au)
+##
+##  This library is free software; you can redistribute it and/or
+##  modify it under the terms of the GNU Lesser General Public
+##  License as published by the Free Software Foundation; either
+##  version 2.1 of the License, or (at your option) any later version.
+##
+##  This library is distributed in the hope that it will be useful,
+##  but WITHOUT ANY WARRANTY; without even the implied warranty of
+##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+##  Lesser General Public License for more details.
+##
+##  You should have received a copy of the GNU Lesser General Public
+##  License along with this library; if not, write to the Free Software
+##  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+##
+## $Id: makefile 277 2006-04-11 11:28:01Z PatrickSunter $
+##
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# obtain defaults for required variables according to system and project location, and then run the build.
+SHELL := $(shell which bash)
+PROJ_ROOT := $(shell until test -r ./Makefile.system ; do cd .. ; done ; echo `pwd`)
+
+include ${PROJ_ROOT}/Makefile.system
+
+subdirs = AnalyticPressure
+
+checks = $(wildcard *.sh)
+
+EXTERNAL_INCLUDES = -I${INC_DIR}/${PROJECT} 
+
+packages = STGERMAIN PETSC MPI XML MATH DL HYPRE
+
+include ${PROJ_ROOT}/Makefile.vmake


Property changes on: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/output
___________________________________________________________________
Name: svn:ignore
   + *


Added: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/testBuoyancy.0of1.sh
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/testBuoyancy.0of1.sh	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/testBuoyancy.0of1.sh	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,52 @@
+#!/bin/sh
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+##
+## Copyright (C), 2003-2006, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street,
+##	Melbourne, 3053, Australia.
+## Copyright (c) 2005-2006, Monash Cluster Computing, Building 28, Monash University Clayton Campus,
+##	Victoria, 3800, Australia
+##
+## Primary Contributing Organisations:
+##	Victorian Partnership for Advanced Computing Ltd, Computational Software Development - http://csd.vpac.org
+##	Australian Computational Earth Systems Simulator - http://www.access.edu.au
+##	Monash Cluster Computing - http://www.mcc.monash.edu.au
+##
+## Contributors:
+##	Robert Turnbull, Research Assistant, Monash University. (robert.turnbull at sci.monash.edu.au)
+##	Patrick D. Sunter, Software Engineer, VPAC. (patrick at vpac.org)
+##	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+##	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+##	David May, PhD Student, Monash University (david.may at sci.monash.edu.au)
+##	Vincent Lemiale, Postdoctoral Fellow, Monash University. (vincent.lemiale at sci.monash.edu.au)
+##	Julian Giordani, Research Assistant, Monash University. (julian.giordani at sci.monash.edu.au)
+##	Louis Moresi, Associate Professor, Monash University. (louis.moresi at sci.monash.edu.au)
+##	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+##	Raquibul Hassan, Computational Engineer, VPAC. (raq at vpac.org)
+##	David Stegman, Postdoctoral Fellow, Monash University. (david.stegman at sci.monash.edu.au)
+##	Wendy Sharples, PhD Student, Monash University (wendy.sharples at sci.monash.edu.au)
+##
+##  This library is free software; you can redistribute it and/or
+##  modify it under the terms of the GNU Lesser General Public
+##  License as published by the Free Software Foundation; either
+##  version 2.1 of the License, or (at your option) any later version.
+##
+##  This library is distributed in the hope that it will be useful,
+##  but WITHOUT ANY WARRANTY; without even the implied warranty of
+##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+##  Lesser General Public License for more details.
+##
+##  You should have received a copy of the GNU Lesser General Public
+##  License along with this library; if not, write to the Free Software
+##  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+##
+## $Id$
+##
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+TEST_SCRIPT=./VMake/executableTester.sh
+until test -r ${TEST_SCRIPT} ; do
+        TEST_SCRIPT=../${TEST_SCRIPT}
+done
+. ${TEST_SCRIPT}
+
+runAndHandleSystemTestStdLocations "PICellerator ./testBuoyancy.xml" "$0" "$@"


Property changes on: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/testBuoyancy.0of1.sh
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:keywords
   + LastChangedDate Author Id
Name: svn:eol-style
   + native

Added: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/testBuoyancy.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/testBuoyancy.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/tests/testBuoyancy.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,17 @@
+<!-- DTD to validate against -->
+<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
+
+	<include>../BuoyancyExample.xml</include>
+	
+	<!--
+	<include>./AnalyticViewports.xml</include>
+	-->
+
+	<list name="plugins" mergeType="merge">
+		<param>PICellerator_AnalyticPressure</param>
+	</list>
+	<!-- Making a fairly tight tolerance for Gauss points model
+		given test runs gave value of order 10 ^-6 -->
+	<param name="PressureField-Tolerance">1.5e-6</param>
+
+</StGermainData>	

Added: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/velocityBCs.freeslip.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/velocityBCs.freeslip.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/velocityBCs.freeslip.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,79 @@
+<?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">
+
+	<!-- Velocity BCs -->
+	<struct name="velocityBCs">
+		<param name="type">CompositeVC</param>
+		<list name="vcList">
+			<struct>
+				<param name="type"> WallVC </param>
+				<param name="wall"> bottom </param>
+				<list name="variables">
+					<struct>
+						<param name="name">vy</param>
+						<param name="type">double</param>
+						<param name="value"> 0 </param>
+					</struct>
+				</list>
+			</struct>
+			<struct>
+				<param name="type"> WallVC </param>
+				<param name="wall"> left </param>
+				<list name="variables">
+					<struct>
+						<param name="name">vx</param>
+						<param name="type">double</param>
+						<param name="value"> 0 </param>
+					</struct>
+				</list>
+			</struct>
+			<struct>
+				<param name="type"> WallVC </param>
+				<param name="wall"> right </param>
+				<list name="variables">
+					<struct>
+						<param name="name">vx</param>
+						<param name="type">double</param>
+						<param name="value"> 0 </param>
+					</struct>
+				</list>
+			</struct>
+			<struct>
+				<param name="type"> WallVC </param>
+				<param name="wall"> front </param>
+				<list name="variables">
+					<struct>
+						<param name="name">vz</param>
+						<param name="type">double</param>
+						<param name="value"> 0 </param>
+					</struct>
+				</list>
+			</struct>
+			<struct>
+				<param name="type"> WallVC </param>
+				<param name="wall"> back </param>
+				<list name="variables">
+					<struct>
+						<param name="name">vz</param>
+						<param name="type">double</param>
+						<param name="value"> 0 </param>
+					</struct>
+				</list>
+			</struct>
+			<struct>
+				<param name="type"> WallVC </param>
+				<param name="wall"> top </param>
+				<list name="variables">
+					<struct>
+						<param name="name">vy</param>
+						<param name="type">double</param>
+						<param name="value"> 0 </param>
+					</struct>
+				</list>
+			</struct>
+		</list>
+	</struct>
+</StGermainData>

Added: long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/window.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/window.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/BuoyancyBenchmark/window.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!DOCTYPE StGermainData SYSTEM "stgermain.dtd">
+
+<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
+ 	
+	<list name="plugins" mergeType="merge">
+		<param>lucPlugin</param>
+	</list>
+	<struct name="components" mergeType="merge">
+		<struct name="renderingEngine">
+			<param name="Type">lucRenderingEngineGL</param>
+		</struct>
+		<struct name="imageOutput">
+			<param name="Type">lucOutputPNG</param>
+		</struct>
+		<struct name="window">
+			<param name="Type">lucDefaultWindow</param>
+			<param name="RenderingEngine">renderingEngine</param>
+			<list name="OutputFormat">
+				<param>imageOutput</param>
+			</list>
+			<param name="height">400</param>
+			<param name="width">800</param>
+			<param name="interactive">t</param>
+			<param name="backgroundColour">white</param>
+		</struct>
+		<struct name="movie">
+			<param name="Type">lucEncoderLibfame</param>
+			<param name="Window">window</param>
+		</struct>	
+	</struct>
+
+</StGermainData>

Added: long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/AllowOutflow.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/AllowOutflow.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/AllowOutflow.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,13 @@
+<?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">
+	
+	<struct name="components" mergeType="merge">
+		<struct name="escapedRoutine">
+			<param name="Type">EscapedRoutine</param> 
+		</struct> 
+	</struct>
+
+</StGermainData>

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/MaterialPointSwarm-flip1.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/MaterialPointSwarm-flip1.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/MaterialPointSwarm-flip1.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -26,7 +26,7 @@
 		<struct name="localLayout">
 			<param name="Type">MappedParticleLayout</param>
 		</struct>
-		<struct name="materialPoints">
+		<struct name="picIntegrationPoints">
 			<param name="Type">IntegrationPointsSwarm</param>
 			<param name="CellLayout">elementCellLayout</param>
 			<param name="ParticleLayout">localLayout</param>
@@ -37,10 +37,10 @@
 		</struct>
 		<struct name="mapper">
 			<param name="Type">CoincidentMapper</param>
-			<param name="IntegrationPointsSwarm">materialPoints</param>
+			<param name="IntegrationPointsSwarm">picIntegrationPoints</param>
 			<param name="MaterialPointsSwarm">materialSwarm</param>
 		</struct>
-		<struct name="materialPointsParticleLayout">
+		<struct name="picIntegrationPointsParticleLayout">
 			<param name="Type">WithinShapeParticleLayout</param>
 			<param name="averageInitialParticlesPerCell">particlesPerCell</param>
 			<param name="shape">ball</param>
@@ -48,14 +48,14 @@
 		<struct name="materialSwarm">
 			<param name="Type">MaterialPointsSwarm</param>
 			<param name="CellLayout">elementCellLayout</param>
-			<param name="ParticleLayout">materialPointsParticleLayout</param>
+			<param name="ParticleLayout">picIntegrationPointsParticleLayout</param>
 			<param name="FiniteElement_Mesh">mesh-linear</param>
 
 			<!-- These guys may or may not be created -->
-			<param name="SwarmAdvector">materialPointsAdvector</param>
+			<param name="SwarmAdvector">materialSwarmAdvector</param>
 			<param name="Material">lightMaterial</param>
 		</struct>
-		<struct name="materialPointsAdvector">
+		<struct name="materialSwarmAdvector">
 			<param name="Type">SwarmAdvector</param>
 			<param name="Swarm">materialSwarm</param>
 			<param name="TimeIntegrator">timeIntegrator</param>

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/MaterialPointSwarm-test1.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/MaterialPointSwarm-test1.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/MaterialPointSwarm-test1.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -26,7 +26,7 @@
 		<struct name="localLayout">
 			<param name="Type">MappedParticleLayout</param>
 		</struct>
-		<struct name="materialPoints">
+		<struct name="picIntegrationPoints">
 			<param name="Type">IntegrationPointsSwarm</param>
 			<param name="CellLayout">elementCellLayout</param>
 			<param name="ParticleLayout">localLayout</param>
@@ -38,10 +38,10 @@
 		</struct>
 		<struct name="mapper">
 			<param name="Type">CoincidentMapper</param>
-			<param name="IntegrationPointsSwarm">materialPoints</param>
+			<param name="IntegrationPointsSwarm">picIntegrationPoints</param>
 			<param name="MaterialPointsSwarm">materialSwarm</param>
 		</struct>
-		<struct name="materialPointsParticleLayout">
+		<struct name="picIntegrationPointsParticleLayout">
 			<param name="Type">WithinShapeParticleLayout</param>
 			<param name="averageInitialParticlesPerCell">particlesPerCell</param>
 			<param name="shape">ball</param>
@@ -49,14 +49,14 @@
 		<struct name="materialSwarm">
 			<param name="Type">MaterialPointsSwarm</param>
 			<param name="CellLayout">elementCellLayout</param>
-			<param name="ParticleLayout">materialPointsParticleLayout</param>
+			<param name="ParticleLayout">picIntegrationPointsParticleLayout</param>
 			<param name="FiniteElement_Mesh">mesh-linear</param>
 
 			<!-- These guys may or may not be created -->
-			<param name="SwarmAdvector">materialPointsAdvector</param>
+			<param name="SwarmAdvector">materialSwarmAdvector</param>
 			<param name="Material">denseMaterial</param>
 		</struct>
-		<struct name="materialPointsAdvector">
+		<struct name="materialSwarmAdvector">
 			<param name="Type">SwarmAdvector</param>
 			<param name="Swarm">materialSwarm</param>
 			<param name="TimeIntegrator">timeIntegrator</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-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/MaterialPointSwarm.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -26,7 +26,7 @@
 		<struct name="localLayout">
 			<param name="Type">MappedParticleLayout</param>
 		</struct>
-		<struct name="materialPoints">
+		<struct name="picIntegrationPoints">
 			<param name="Type">IntegrationPointsSwarm</param>
 			<param name="CellLayout">elementCellLayout</param>
 			<param name="ParticleLayout">localLayout</param>
@@ -37,7 +37,7 @@
 		</struct>
 		<struct name="mapper">
 			<param name="Type">CoincidentMapper</param>
-			<param name="IntegrationPointsSwarm">materialPoints</param>
+			<param name="IntegrationPointsSwarm">picIntegrationPoints</param>
 			<param name="MaterialPointsSwarm">materialSwarm</param>
 		</struct>
 		<struct name="materialSwarmParticleLayout">
@@ -53,8 +53,9 @@
 			<!-- These guys may or may not be created -->
 			<param name="SplittingRoutine">splittingRoutine</param>
 			<param name="RemovalRoutine">removalRoutine</param>
+			<param name="EscapedRoutine">escapedRoutine</param>
 		</struct>
-		<struct name="materialPointsAdvector">
+		<struct name="materialSwarmAdvector">
 			<param name="Type">SwarmAdvector</param>
 			<param name="Swarm">materialSwarm</param>
 			<param name="TimeIntegrator">timeIntegrator</param>

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/StokesFlowUzawa-flip1.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/StokesFlowUzawa-flip1.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/StokesFlowUzawa-flip1.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -8,17 +8,29 @@
 
 	<!-- Stokes Flow Stuff -->
 	<struct name="components" mergeType="merge">
+		<!--
+		<struct name="isoviscousStressTensorTerm2" mergeType="replace">
+			<param name="Type">IsoviscousStressTensorTerm</param>
+			<param name="Swarm">picIntegrationPoints</param>
+			<param name="viscosity">1.0</param>
+			<param name="StiffnessMatrix">k_matrix</param>
+		</struct>
+		-->
+		<!--
 		<struct name="isoviscousStressTensorTerm2">
 			<param name="Type">IsoviscousStressTensorTerm</param>
 			<param name="Swarm">backgroundIntegration</param>
 			<param name="viscosity">1.0</param>
 			<param name="StiffnessMatrix">k_matrix</param>
 		</struct>
+		-->
+		<!--
 		<struct name="preconditionerTerm2">
 			<param name="Type">UzawaPreconditionerTerm</param>
 			<param name="Swarm">backgroundIntegration</param>
 			<param name="StiffnessMatrix">preconditioner</param>
 		</struct>
+		-->
 		<struct name="buoyancyForceTerm2">
 			<param name="Type">BuoyancyForceTerm</param>
 			<param name="ForceVector">mom_force</param>

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/StokesFlowUzawa-test1.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/StokesFlowUzawa-test1.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/StokesFlowUzawa-test1.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -8,17 +8,29 @@
 
 	<!-- Stokes Flow Stuff -->
 	<struct name="components" mergeType="merge">
+		<!--
+		<struct name="isoviscousStressTensorTerm2" mergeType="replace">
+			<param name="Type">IsoviscousStressTensorTerm</param>
+			<param name="Swarm">picIntegrationPoints</param>
+			<param name="viscosity">1.0</param>
+			<param name="StiffnessMatrix">k_matrix</param>
+		</struct>
+		-->
+		<!--
 		<struct name="isoviscousStressTensorTerm2">
 			<param name="Type">IsoviscousStressTensorTerm</param>
 			<param name="Swarm">backgroundIntegration</param>
 			<param name="viscosity">1.0</param>
 			<param name="StiffnessMatrix">k_matrix</param>
 		</struct>
+		-->
+		<!--
 		<struct name="preconditionerTerm2">
 			<param name="Type">UzawaPreconditionerTerm</param>
 			<param name="Swarm">backgroundIntegration</param>
 			<param name="StiffnessMatrix">preconditioner</param>
 		</struct>
+		-->
 		<struct name="buoyancyForceTerm2">
 			<param name="Type">BuoyancyForceTerm</param>
 			<param name="ForceVector">mom_force</param>

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/StokesFlowUzawa.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/StokesFlowUzawa.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/PIC_Components/StokesFlowUzawa.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -10,13 +10,13 @@
 	<struct name="components" mergeType="merge">
 		<struct name="isoviscousStressTensorTerm" mergeType="replace">
 			<param name="Type">IsoviscousStressTensorTerm</param>
-			<param name="Swarm">materialPoints</param>
+			<param name="Swarm">picIntegrationPoints</param>
 			<param name="viscosity">1.0</param>
 			<param name="StiffnessMatrix">k_matrix</param>
 		</struct>
 		<struct name="preconditionerTerm" mergeType="replace">
 			<param name="Type">UzawaPreconditionerTerm</param>
-			<param name="Swarm">materialPoints</param>
+			<param name="Swarm">picIntegrationPoints</param>
 			<param name="StiffnessMatrix">preconditioner</param>
 		</struct>		
 	</struct>	

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example-flip1.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example-flip1.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example-flip1.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -23,9 +23,8 @@
 		<struct name="buoyancyForceTerm">
 			<param name="Type">BuoyancyForceTerm</param>
 			<param name="ForceVector">mom_force</param>
-			<param name="Swarm">materialPoints</param>
+			<param name="Swarm">picIntegrationPoints</param>
 			<param name="gravity">gravity</param>
-			<param name="adjust">True</param>
 		</struct>
 		<struct name="everywhere">
 			<param name="Type">Everywhere</param>
@@ -46,7 +45,7 @@
 		<struct name="denseMaterial">
 			<param name="Type">Material</param>
 			<param name="Shape">everywhere</param>
-			<param name="density">1.0</param>
+			<param name="density">2.0</param>
 		</struct>		
 	</struct>
 
@@ -62,9 +61,6 @@
 	<param name="maxTimeSteps"> 50 </param>
 	<param name="dumpEvery"> 5 </param>
 	<param name="outputPath"> ./flip1 </param>
-	<param name="journal-file.info.Context"> ./flip1/stdout.txt</param>
-	<param name="journal-file.info.Stokes_SLE_UzawaSolver"> ./flip1/stdout.txt</param>
-	<param name="journal-file.info.BuoyDebug"> ./flip1/buoy.txt</param>
 	
 
 	<!-- general decomposition parameters -->
@@ -90,7 +86,7 @@
 	<param name="gaussParticlesZ"> 2 </param>
 	
 	<!-- Swarm parameters -->
-	<param name="particlesPerCell"> 20 </param>
+	<param name="particlesPerCell"> 40 </param>
 	<param name="seed"> 13 </param>
 
 	<include>velocityBCs.freeslipSides.xml</include>

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example-test1.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example-test1.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example-test1.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -23,9 +23,8 @@
 		<struct name="buoyancyForceTerm">
 			<param name="Type">BuoyancyForceTerm</param>
 			<param name="ForceVector">mom_force</param>
-			<param name="Swarm">materialPoints</param>
+			<param name="Swarm">picIntegrationPoints</param>
 			<param name="gravity">gravity</param>
-			<param name="adjust">True</param>
 		</struct>
 		<struct name="everywhere">
 			<param name="Type">Everywhere</param>
@@ -40,12 +39,12 @@
 		<struct name="lightMaterial">
 			<param name="Type">Material</param>
 			<param name="Shape">everywhere</param>
-			<param name="density">0.0</param>
+			<param name="density">1.0</param>
 		</struct>		
 		<struct name="denseMaterial">
 			<param name="Type">Material</param>
 			<param name="Shape">ball</param>
-			<param name="density">2.0</param>
+			<param name="density">1.0</param>
 		</struct>		
 	</struct>
 

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/RayTay_Example.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -23,7 +23,7 @@
 		<struct name="buoyancyForceTerm">
 			<param name="Type">BuoyancyForceTerm</param>
 			<param name="ForceVector">mom_force</param>
-			<param name="Swarm">materialPoints</param>
+			<param name="Swarm">picIntegrationPoints</param>
 			<param name="gravity">gravity</param>
 		</struct>
 		<struct name="everywhere">

Added: long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/expected/testRayTaySuperimposedBall2D-invert.0of1.lightMaterialCentroid.dat.expected
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/expected/testRayTaySuperimposedBall2D-invert.0of1.lightMaterialCentroid.dat.expected	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/expected/testRayTaySuperimposedBall2D-invert.0of1.lightMaterialCentroid.dat.expected	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,3 @@
+#       Timestep            Time          Volume       CentroidX       CentroidY       CentroidZ
+               1               0        0.929314        0.500056        0.499954               0
+               2         8.92749        0.929314        0.500049        0.502686               0

Added: long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/expected/testRayTaySuperimposedBall2D.0of1.denseMaterialCentroid.dat.expected
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/expected/testRayTaySuperimposedBall2D.0of1.denseMaterialCentroid.dat.expected	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/expected/testRayTaySuperimposedBall2D.0of1.denseMaterialCentroid.dat.expected	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,3 @@
+#       Timestep            Time          Volume       CentroidX       CentroidY       CentroidZ
+               1               0       0.0706858        0.500122         0.50009               0
+               2         8.90839       0.0706858        0.500163        0.464306               0

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testAnalyticBlock.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testAnalyticBlock.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testAnalyticBlock.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -26,7 +26,7 @@
 		<struct name="buoyancyForceTerm">
 			<param name="Type">BuoyancyForceTerm</param>
 			<param name="ForceVector">mom_force</param>
-			<param name="Swarm">materialPoints</param>
+			<param name="Swarm">picIntegrationPoints</param>
 			<param name="gravity">1.0</param>
 		</struct>
 		<struct name="everywhere">

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testAnalyticColumn.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testAnalyticColumn.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testAnalyticColumn.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -26,7 +26,7 @@
 		<struct name="buoyancyForceTerm">
 			<param name="Type">BuoyancyForceTerm</param>
 			<param name="ForceVector">mom_force</param>
-			<param name="Swarm">materialPoints</param>
+			<param name="Swarm">picIntegrationPoints</param>
 			<param name="gravity">1.0</param>
 		</struct>
 		<struct name="everywhere">

Added: long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall-invert.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall-invert.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall-invert.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,16 @@
+<!-- DTD to validate against -->
+<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
+
+	<include>../RayTay_Example-flip1.xml</include>
+	
+	<list name="plugins" mergeType="merge">
+		<param>PICellerator_MaterialCentroid</param>
+	</list>
+
+	<param name="MaterialCentroid_Swarm">picIntegrationPoints</param>
+	<param name="CentroidMaterial">lightMaterial</param>
+	<param name="maxTimeSteps"> 2 </param>
+
+	<param name="outputPath">./output</param>
+
+</StGermainData>	

Added: long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,15 @@
+<!-- DTD to validate against -->
+<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
+
+	<include>../RayTay_Example-test1.xml</include>
+	
+	<list name="plugins" mergeType="merge">
+		<param>PICellerator_MaterialCentroid</param>
+	</list>
+
+	<param name="CentroidMaterial">denseMaterial</param>
+	<param name="maxTimeSteps"> 2 </param>
+
+	<param name="outputPath">./output</param>
+
+</StGermainData>	

Added: long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall2D-invert.0of1.sh
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall2D-invert.0of1.sh	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall2D-invert.0of1.sh	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,52 @@
+#!/bin/sh
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+##
+## Copyright (C), 2003-2006, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street,
+##	Melbourne, 3053, Australia.
+## Copyright (c) 2005-2006, Monash Cluster Computing, Building 28, Monash University Clayton Campus,
+##	Victoria, 3800, Australia
+##
+## Primary Contributing Organisations:
+##	Victorian Partnership for Advanced Computing Ltd, Computational Software Development - http://csd.vpac.org
+##	Australian Computational Earth Systems Simulator - http://www.access.edu.au
+##	Monash Cluster Computing - http://www.mcc.monash.edu.au
+##
+## Contributors:
+##	Robert Turnbull, Research Assistant, Monash University. (robert.turnbull at sci.monash.edu.au)
+##	Patrick D. Sunter, Software Engineer, VPAC. (patrick at vpac.org)
+##	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+##	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+##	David May, PhD Student, Monash University (david.may at sci.monash.edu.au)
+##	Vincent Lemiale, Postdoctoral Fellow, Monash University. (vincent.lemiale at sci.monash.edu.au)
+##	Julian Giordani, Research Assistant, Monash University. (julian.giordani at sci.monash.edu.au)
+##	Louis Moresi, Associate Professor, Monash University. (louis.moresi at sci.monash.edu.au)
+##	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+##	Raquibul Hassan, Computational Engineer, VPAC. (raq at vpac.org)
+##	David Stegman, Postdoctoral Fellow, Monash University. (david.stegman at sci.monash.edu.au)
+##	Wendy Sharples, PhD Student, Monash University (wendy.sharples at sci.monash.edu.au)
+##
+##  This library is free software; you can redistribute it and/or
+##  modify it under the terms of the GNU Lesser General Public
+##  License as published by the Free Software Foundation; either
+##  version 2.1 of the License, or (at your option) any later version.
+##
+##  This library is distributed in the hope that it will be useful,
+##  but WITHOUT ANY WARRANTY; without even the implied warranty of
+##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+##  Lesser General Public License for more details.
+##
+##  You should have received a copy of the GNU Lesser General Public
+##  License along with this library; if not, write to the Free Software
+##  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+##
+## $Id: testRayTay2D.0of1.sh 279 2006-04-11 12:36:05Z PatrickSunter $
+##
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+TEST_SCRIPT=./VMake/executableTester.sh
+until test -r ${TEST_SCRIPT} ; do
+        TEST_SCRIPT=../${TEST_SCRIPT}
+done
+. ${TEST_SCRIPT}
+
+runAndHandleSystemTestStdLocations "PICellerator ./testRayTaySuperimposedBall-invert.xml" "$0" "$@"


Property changes on: long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall2D-invert.0of1.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall2D.0of1.sh
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall2D.0of1.sh	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall2D.0of1.sh	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,52 @@
+#!/bin/sh
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+##
+## Copyright (C), 2003-2006, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street,
+##	Melbourne, 3053, Australia.
+## Copyright (c) 2005-2006, Monash Cluster Computing, Building 28, Monash University Clayton Campus,
+##	Victoria, 3800, Australia
+##
+## Primary Contributing Organisations:
+##	Victorian Partnership for Advanced Computing Ltd, Computational Software Development - http://csd.vpac.org
+##	Australian Computational Earth Systems Simulator - http://www.access.edu.au
+##	Monash Cluster Computing - http://www.mcc.monash.edu.au
+##
+## Contributors:
+##	Robert Turnbull, Research Assistant, Monash University. (robert.turnbull at sci.monash.edu.au)
+##	Patrick D. Sunter, Software Engineer, VPAC. (patrick at vpac.org)
+##	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+##	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+##	David May, PhD Student, Monash University (david.may at sci.monash.edu.au)
+##	Vincent Lemiale, Postdoctoral Fellow, Monash University. (vincent.lemiale at sci.monash.edu.au)
+##	Julian Giordani, Research Assistant, Monash University. (julian.giordani at sci.monash.edu.au)
+##	Louis Moresi, Associate Professor, Monash University. (louis.moresi at sci.monash.edu.au)
+##	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+##	Raquibul Hassan, Computational Engineer, VPAC. (raq at vpac.org)
+##	David Stegman, Postdoctoral Fellow, Monash University. (david.stegman at sci.monash.edu.au)
+##	Wendy Sharples, PhD Student, Monash University (wendy.sharples at sci.monash.edu.au)
+##
+##  This library is free software; you can redistribute it and/or
+##  modify it under the terms of the GNU Lesser General Public
+##  License as published by the Free Software Foundation; either
+##  version 2.1 of the License, or (at your option) any later version.
+##
+##  This library is distributed in the hope that it will be useful,
+##  but WITHOUT ANY WARRANTY; without even the implied warranty of
+##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+##  Lesser General Public License for more details.
+##
+##  You should have received a copy of the GNU Lesser General Public
+##  License along with this library; if not, write to the Free Software
+##  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+##
+## $Id: testRayTay2D.0of1.sh 279 2006-04-11 12:36:05Z PatrickSunter $
+##
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+TEST_SCRIPT=./VMake/executableTester.sh
+until test -r ${TEST_SCRIPT} ; do
+        TEST_SCRIPT=../${TEST_SCRIPT}
+done
+. ${TEST_SCRIPT}
+
+runAndHandleSystemTestStdLocations "PICellerator ./testRayTaySuperimposedBall.xml" "$0" "$@"


Property changes on: long/3D/Gale/trunk/src/PICellerator/Apps/RayleighTaylor/tests/testRayTaySuperimposedBall2D.0of1.sh
___________________________________________________________________
Name: svn:executable
   + *

Modified: long/3D/Gale/trunk/src/PICellerator/Apps/ThermoChem/ThermoChem.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Apps/ThermoChem/ThermoChem.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Apps/ThermoChem/ThermoChem.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -29,7 +29,7 @@
 			<param name="Type">BuoyancyForceTerm</param>
 			<param name="ForceVector">mom_force</param>
 			<param name="TemperatureField">TemperatureField</param>
-			<param name="Swarm">materialPoints</param>
+			<param name="Swarm">picIntegrationPoints</param>
 			<param name="gravity">gravity</param>
 		</struct>
 		<struct name="everywhere">

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/BackgroundParticleLayout.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/BackgroundParticleLayout.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/BackgroundParticleLayout.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -39,7 +39,8 @@
 #include <PICellerator/PopulationControl/PopulationControl.h>
 #include <PICellerator/Weights/Weights.h>
 
-#include "MaterialPoints.h"
+#include "types.h"
+#include "BackgroundParticleLayout.h"
 
 #include <assert.h>
 #include <string.h>

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/BackgroundParticleLayout.meta
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/BackgroundParticleLayout.meta	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/BackgroundParticleLayout.meta	2006-06-28 09:56:23 UTC (rev 3897)
@@ -10,7 +10,8 @@
 <param name="Copyright">Copyright (C) 2005 VPAC and Monash Cluster Computing.</param>
 <param name="License">https://csd.vpac.org/twiki/bin/view/Stgermain/SoftwareLicense http://www.opensource.org/licenses/bsd-license.php</param>
 <param name="Parent">ParticleLayout</param>
-<param name="Description">...</param>
+<param name="Description">A particle layout which creates only 1 particle, for use in creating backgroud layers where materials are
+"everywhere"</param>
 
 <!--Now the interesting stuff-->
 

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/CoincidentMapper.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/CoincidentMapper.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/CoincidentMapper.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -50,8 +50,15 @@
 #include <PICellerator/PopulationControl/PopulationControl.h>
 #include <PICellerator/Weights/Weights.h>
 
-#include "MaterialPoints.h"
+#include "types.h"
+#include "IntegrationPointMapper.h"
+#include "OneToOneMapper.h"
+#include "CoincidentMapper.h"
 
+#include "MaterialPointsSwarm.h"
+#include "MaterialPoint.h"
+#include "IntegrationPointsSwarm.h"
+
 #include <assert.h>
 #include <string.h>
 #include <math.h>
@@ -173,52 +180,79 @@
 	FiniteElement_Mesh*     mesh                   = materialSwarm->mesh;
 	ElementLayout*          layout                 = mesh->layout->elementLayout;
 
-	Particle_Index          point_I;
-	Cell_Index              cell_I;
+	Particle_Index          particle_lI;
+	Cell_Index              cell_dI;
 
 	#ifdef CAUTIOUS
 	Index			dim_I;
-	#endif
-
-	#ifdef CAUTIOUS
 	Stream*                 errorStream = Journal_Register( Error_Type, self->type );
 	#endif
+	Stream*                 debugStream = Swarm_Debug;
+	
 
-	/* Allocate the points required in memory to match materials */
+	Journal_DPrintfL( debugStream, 1, "In %s(): Re-creating a new set of integration points, exactly\n" 
+		"\tmapping to the current material points & their positions.\n",
+		__func__ ) ;
+	Stream_IndentBranch( debugStream );
+
+	Journal_DPrintfL( debugStream, 2, "Reallocating the integration points array from size of %u points "
+		"to the \n\tcurrent material swarm particle count of %u\n", integrationSwarm->particleLocalCount,
+		materialSwarm->particleLocalCount );
 	integrationSwarm->particleLocalCount = materialSwarm->particleLocalCount;
 	Swarm_Realloc( integrationSwarm );
 
-	/* Reset cell/particle count table */
-	for( cell_I = 0; cell_I < integrationSwarm->cellDomainCount; cell_I++ ) {
-		integrationSwarm->cellParticleCountTbl[cell_I] = 0;
+	Journal_DPrintfL( debugStream, 2, "Clearing all the cell->particle ownership tables, "
+		"ready to add new cell->particle\n\trelationships as new integration points are set up.\n" );
+	for( cell_dI = 0; cell_dI < integrationSwarm->cellDomainCount; cell_dI++ ) {
+		integrationSwarm->cellParticleCountTbl[cell_dI] = 0;
+		integrationSwarm->cellParticleSizeTbl[cell_dI] = 0;
+		if ( integrationSwarm->cellParticleTbl[cell_dI] ) {
+			Memory_Free( integrationSwarm->cellParticleTbl[cell_dI] );
+		}
+		integrationSwarm->cellParticleTbl[cell_dI] = NULL;
 	}
 
+	Journal_DPrintfL( debugStream, 2, "For each material particle, setting up a corresponding integration "
+		"point, and\n\tcalculating its element-local coord based on the material's global coord:\n" );
+	Stream_IndentBranch( debugStream );	
 	/* Map each point */
-	for ( point_I = 0; point_I < materialSwarm->particleLocalCount; point_I++ ) {
-		integrationPoint = (IntegrationPoint*)Swarm_ParticleAt( integrationSwarm, point_I );
-		materialPoint    = (MaterialPoint*)   Swarm_ParticleAt( materialSwarm, point_I );
+	for ( particle_lI = 0; particle_lI < materialSwarm->particleLocalCount; particle_lI++ ) {
+		integrationPoint = (IntegrationPoint*)Swarm_ParticleAt( integrationSwarm, particle_lI );
+		materialPoint    = (MaterialPoint*)   Swarm_ParticleAt( materialSwarm, particle_lI );
 
-		cell_I = materialPoint->owningCell;
-		integrationPoint->owningCell = materialPoint->owningCell;
+		cell_dI = materialPoint->owningCell;
 
+		Journal_DPrintfL( debugStream, 3, "Referring to local material point %u, from material swarm cell %u:\n",
+			particle_lI, cell_dI );
+		Stream_IndentBranch( debugStream );	
+
+		Journal_DPrintfL( debugStream, 3, "Adding new integration point %u to integration swarm cell %u\n",
+			particle_lI, cell_dI );
+
+		Swarm_AddParticleToCell( integrationSwarm, cell_dI, particle_lI );
+
 		/* Convert global to local coordinates */
 		ElementType_ConvertGlobalCoordToElLocal(
-				FiniteElement_Mesh_ElementTypeAt( mesh, cell_I ),
+				FiniteElement_Mesh_ElementTypeAt( mesh, cell_dI ),
 				layout,
-				(const Coord**)materialSwarm->cellPointTbl[cell_I],
+				(const Coord**)materialSwarm->cellPointTbl[cell_dI],
 				materialPoint->coord,
 				integrationPoint->xi );
 
+		Journal_DPrintfL( debugStream, 3, "Based on material point's coord of (%.2f,%.2f,%.2f):\n"
+			"calculated and set new integration point's local coord as (%.2f,%.2f,%.2f)\n",
+			materialPoint->coord[0], materialPoint->coord[1], materialPoint->coord[2],
+			integrationPoint->xi[0], integrationPoint->xi[1], integrationPoint->xi[2] );
 		#ifdef CAUTIOUS
 		/* Check the result is between -1 to 1 in all dimensions : if not, something is stuffed */		
 		for ( dim_I= 0; dim_I < materialSwarm->dim; dim_I++ ) {
 			Journal_Firewall(
-				(integrationPoint->xi[dim_I] >= -1.0001) && (integrationPoint->xi[dim_I] <= 1.0001 ),
+				(integrationPoint->xi[dim_I] >= -1.001) && (integrationPoint->xi[dim_I] <= 1.001 ),
 				errorStream,
 				"Error - in %s(): unable to map material point %d in cell %d of swarm \"%s\" (type %s) "
 				"coord to a valid \"local\" coordinate (xi). Coord was (%.3f,%.3f,%.3f), swarm's "
-				"particle layout type was %s, Xi result was (%.3f,%.3f,%.3f).\n",
-				__func__, point_I, cell_I, materialSwarm->name, materialSwarm->type,
+				"particle layout type was %s, Xi result was (%.4f,%.4f,%.4f).\n",
+				__func__, particle_lI, cell_dI, materialSwarm->name, materialSwarm->type,
 				materialPoint->coord[0], materialPoint->coord[1], materialPoint->coord[2],
 				materialSwarm->particleLayout->type, integrationPoint->xi[0],
 				integrationPoint->xi[1], integrationPoint->xi[2] );
@@ -227,12 +261,15 @@
 
 		ref = OneToOneMapper_GetMaterialRef( self, integrationPoint );
 		ref->swarm_I = materialSwarm->swarmReg_I;
-		ref->particle_I = point_I;
-
-		Swarm_AddParticleToCell( integrationSwarm, cell_I, point_I );
+		ref->particle_I = particle_lI;
+		Journal_DPrintfL( debugStream, 3, "updated the coincident mapper's material reference for "
+			"this integration point to map back to the material point.\n" );
+		Stream_UnIndentBranch( debugStream );	
 	}
 
-	if ( integrationSwarm->weights != NULL && integrationSwarm->recalculateWeights ) {
-		WeightsCalculator_CalculateAll( integrationSwarm->weights, integrationSwarm );
-	}
+	Stream_UnIndentBranch( debugStream );	
+	Journal_DPrintfL( debugStream, 2, "...finished updating local positions.\n" );
+
+	Stream_UnIndentBranch( debugStream );
+	Journal_DPrintfL( debugStream, 1, "...%s(): Done.\n", __func__ );
 }

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/CoincidentMapper.meta
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/CoincidentMapper.meta	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/CoincidentMapper.meta	2006-06-28 09:56:23 UTC (rev 3897)
@@ -10,7 +10,9 @@
 <param name="Copyright">Copyright (C) 2005 VPAC and Monash Cluster Computing.</param>
 <param name="License">https://csd.vpac.org/twiki/bin/view/Stgermain/SoftwareLicense http://www.opensource.org/licenses/bsd-license.php</param>
 <param name="Parent">IntegrationPointMapper</param>
-<param name="Description">...</param>
+<param name="Description">A one-to-one mapper that maps integration points to material points at the same coordinates. A simple
+global to local operation is performed. The weight of the integration point is dependant on the WeightCalculator of the
+IntegrationPointsSwarm.<param>
 
 <!--Now the interesting stuff-->
 
@@ -20,7 +22,12 @@
 </list>
 
 <list name="Dependencies">
-
+	<struct>
+		<param name="Essential">True</param>
+		<param name="Name">MaterialPointsSwarm</param>
+		<param name="Type">MaterialPointsSwarm</param>
+		<param name="Description">The material points to be mapped.</param>
+	</struct>
 </list>
 <!-- Add an exmaple XML if possible -->
 <param name="Example">...</param>

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Context.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Context.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Context.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -64,10 +64,10 @@
 		NULL, 
 		_PICelleratorContext_DefaultNew,
 		_PICelleratorContext_ComponentConstruct,
-		_PICelleratorContext_ComponentBuild,
-		_PICelleratorContext_ComponentInitialise,
-		_PICelleratorContext_ComponentExecute,
-		_PICelleratorContext_ComponentDestroy,
+		_AbstractContext_Build,
+		_AbstractContext_Initialise,
+		_AbstractContext_Execute,
+		_AbstractContext_Destroy,
 		_PICelleratorContext_SetDt,
 		name,
 		False,
@@ -92,10 +92,10 @@
 		NULL, 
 		_PICelleratorContext_DefaultNew,
 		_PICelleratorContext_ComponentConstruct,
-		_PICelleratorContext_ComponentBuild,
-		_PICelleratorContext_ComponentInitialise,
-		_PICelleratorContext_ComponentExecute,
-		_PICelleratorContext_ComponentDestroy,
+		_AbstractContext_Build,
+		_AbstractContext_Initialise,
+		_AbstractContext_Execute,
+		_AbstractContext_Destroy,
 		_PICelleratorContext_SetDt,
 		name,
 		True,
@@ -169,12 +169,10 @@
 	Stg_ObjectList_ClassAppend( self->register_Register, (void*)self->materials_Register, "Materials_Register" );
 
 	ContextEP_Prepend( self, AbstractContext_EP_ConstructExtensions, PICelleratorContext_CreateDefaultMaterial );
-	
-	EntryPoint_Append(
-		Context_GetEntryPoint( self, AbstractContext_EP_Save ),
-		"saveSwarms",
-		_PICelleratorContext_SaveSwarms,
-		PICelleratorContext_Type );
+
+	// TODO want to append an EP to the end of the time integration that makes sure that after all integration 
+	// swarms have been updated, each element has at least one integration point from one swarm in it, or else
+	// we will fail the next timestep
 }
 
 
@@ -237,41 +235,4 @@
 	
 }
 	
-void _PICelleratorContext_ComponentBuild( void* context, void *data ){
-	
-}
-	
-void _PICelleratorContext_ComponentInitialise( void* context, void *data ){
-}
-	
-void _PICelleratorContext_ComponentExecute( void* context, void *data ){
-	
-}
-	
-void _PICelleratorContext_ComponentDestroy( void* context, void *data ){
-}
 
-
-void _PICelleratorContext_SaveSwarms( void* context ) {
-	PICelleratorContext*      self         = (PICelleratorContext*) context;
-	Swarm_Register*           swarm_register = Swarm_Register_GetSwarm_Register();
-	Index                     swarmCount = Swarm_Register_GetCount( swarm_register );
-	Swarm**                   swarmList = NULL;
-	Index                     swarm_I;
-	SwarmDump*                swarmDumper;
-	
-	swarmList = Memory_Alloc_Array_Unnamed( Swarm*, swarmCount ); 
-
-	for ( swarm_I=0 ; swarm_I < swarmCount; swarm_I++ ) {
-		swarmList[swarm_I] = Swarm_Register_At( swarm_register, swarm_I );
-	}
-	
-	/* Create new SwarmDump object to check point the swarms
-	 * We're not passing in the 'context' as the second argument because we don't need the swarm dumper to 
-	 * add a hook on the Save entrypoint - we'll execute it ourselves from here */
-	swarmDumper = SwarmDump_New( "swarmDumper", NULL, swarmList, swarmCount, True );
-	SwarmDump_Execute( swarmDumper, self );
-	Stg_Class_Delete( swarmDumper );
-
-	Memory_Free( swarmList );
-}	

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Context.h
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Context.h	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Context.h	2006-06-28 09:56:23 UTC (rev 3897)
@@ -120,18 +120,8 @@
 
 	void _PICelleratorContext_ComponentConstruct( void* context, Stg_ComponentFactory *cf );
 	
-	void _PICelleratorContext_ComponentBuild( void* context, void *data );
-	
-	void _PICelleratorContext_ComponentInitialise( void* context, void *data );
-	
-	void _PICelleratorContext_ComponentExecute( void* context, void *data );
-	
-	void _PICelleratorContext_ComponentDestroy( void* context, void *data );
-
 	/* Public functions -----------------------------------------------------------------------------------------------*/
 	void PICelleratorContext_CreateDefaultMaterial( void* context ) ;
 	
 	/* Private functions -----------------------------------------------------------------------------------------------*/
-	void _PICelleratorContext_SaveSwarms( void* context );
-
 #endif /* __PICelleratorContext_h__ */

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/GaussMapper.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/GaussMapper.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/GaussMapper.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -169,11 +169,7 @@
 	MaterialPoint*          materialPoint;
 	MaterialPointRef*       ref;
 
-	FiniteElement_Mesh*     mesh                   = materialSwarm->mesh;
-	ElementLayout*          layout                 = mesh->layout->elementLayout;
-
 	Particle_Index          point_I;
-	Cell_Index              cell_I;
 
 	materialPoint = (MaterialPoint*)Swarm_ParticleAt( materialSwarm, 0 ); /* Get the first and only point */
 	

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/GaussMapper.meta
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/GaussMapper.meta	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/GaussMapper.meta	2006-06-28 09:56:23 UTC (rev 3897)
@@ -10,7 +10,10 @@
 <param name="Copyright">Copyright (C) 2005 VPAC and Monash Cluster Computing.</param>
 <param name="License">https://csd.vpac.org/twiki/bin/view/Stgermain/SoftwareLicense http://www.opensource.org/licenses/bsd-license.php</param>
 <param name="Parent">OneToOneMapper</param>
-<param name="Description">...</param>
+<param name="Description">A special one-to-one mapper designed for IntegrationPointsSwarms that uses a GaussParticleLayout. Because
+you may still want to use a simple single-cell, 4-gauss point conservative option for perfect weights and local coord calculation,
+this mapper allow you to map IntegrationPoints to a signle MaterialPoint. The MaterialPointsSwarm will most likely be using a
+BackgroundParticleLayout.</param>
 
 <!--Now the interesting stuff-->
 
@@ -20,16 +23,12 @@
 </list>
 
 <list name="Dependencies">
-	<struct>
-		<param name="Essential">True</param>
+        <struct>
+                <param name="Essential">True</param>
 		<param name="Name">MaterialPointsSwarm</param>
 		<param name="Type">MaterialPointsSwarm</param>
-		<param name="Description">...</param>
+		<param name="Description">The material points to be mapped.</param>
 	</struct>
-
-<!-- PLEASE, check the above struct information is accurate, in line number 152 of the c file and then remove this comment afterwards -->
-
-
 </list>
 <!-- Add an exmaple XML if possible -->
 <param name="Example">...</param>

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointMapper.meta
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointMapper.meta	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointMapper.meta	2006-06-28 09:56:23 UTC (rev 3897)
@@ -27,9 +27,7 @@
 		<param name="Description">...</param>
 	</struct>
 
-<!-- PLEASE, check the above struct information is accurate, in line number 130 of the c file and then remove this comment afterwards -->
 
-
 </list>
 <!-- Add an exmaple XML if possible -->
 <param name="Example">...</param>

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -51,6 +51,7 @@
 #include <PICellerator/Weights/Weights.h>
 
 #include "MaterialPoints.h"
+#include "Material.h"
 
 #include <assert.h>
 #include <string.h>
@@ -140,6 +141,12 @@
 
 	self->recalculateWeights = recalculateWeights;
 
+	/* Disable checkpointing and reloading of IP swarms - currently they can't be reloaded if the particles
+	don't have a global coord. We assume there is no history info on them which means we're happy to re-create
+	them from scratch given the position the material points were in when the checkpoint was made as input
+	-- PatrickSunter 12 June 2006 */
+	self->isSwarmTypeToCheckPointAndReload = False;
+
 	self->weightVariable = Swarm_NewScalarVariable( 
 			self,
 			"Weight",
@@ -180,21 +187,21 @@
 	ExtensionManager_SetLockDown( self->particleExtensionMgr, True );
 }
 
-void _IntegrationPointsSwarm_Delete( void* materialPoints ) {
-	IntegrationPointsSwarm* self = (IntegrationPointsSwarm*)materialPoints;
+void _IntegrationPointsSwarm_Delete( void* integrationPoints ) {
+	IntegrationPointsSwarm* self = (IntegrationPointsSwarm*)integrationPoints;
 
 	_Swarm_Delete( self );
 }
 
 
-void _IntegrationPointsSwarm_Print( void* materialPoints, Stream* stream ) {
-	IntegrationPointsSwarm* self = (IntegrationPointsSwarm*)materialPoints;
+void _IntegrationPointsSwarm_Print( void* integrationPoints, Stream* stream ) {
+	IntegrationPointsSwarm* self = (IntegrationPointsSwarm*)integrationPoints;
 	
 	_Swarm_Print( self, stream );
 }
 
-void* _IntegrationPointsSwarm_Copy( void* materialPoints, void* dest, Bool deep, Name nameExt, PtrMap* ptrMap ) {
-	IntegrationPointsSwarm*	self = (IntegrationPointsSwarm*)materialPoints;
+void* _IntegrationPointsSwarm_Copy( void* integrationPoints, void* dest, Bool deep, Name nameExt, PtrMap* ptrMap ) {
+	IntegrationPointsSwarm*	self = (IntegrationPointsSwarm*)integrationPoints;
 	IntegrationPointsSwarm*	newIntegrationPointsSwarm;
 	
 	newIntegrationPointsSwarm = (IntegrationPointsSwarm*)_Swarm_Copy( self, dest, deep, nameExt, ptrMap );
@@ -259,8 +266,8 @@
 }
 
 
-void _IntegrationPointsSwarm_Construct( void* materialPoints, Stg_ComponentFactory* cf ) {
-	IntegrationPointsSwarm*	        self          = (IntegrationPointsSwarm*) materialPoints;
+void _IntegrationPointsSwarm_Construct( void* integrationPoints, Stg_ComponentFactory* cf ) {
+	IntegrationPointsSwarm*	        self          = (IntegrationPointsSwarm*) integrationPoints;
 	FiniteElement_Mesh*             mesh;
 	TimeIntegrator*                 timeIntegrator;
 	WeightsCalculator*              weights;
@@ -294,8 +301,8 @@
 	_IntegrationPointsSwarm_Init( self, mesh, timeIntegrator, weights, mapper, materials_Register, recalculateWeights );
 }
 
-void _IntegrationPointsSwarm_Build( void* materialPoints, void* data ) {
-	IntegrationPointsSwarm*	self = (IntegrationPointsSwarm*) materialPoints;
+void _IntegrationPointsSwarm_Build( void* integrationPoints, void* data ) {
+	IntegrationPointsSwarm*	self = (IntegrationPointsSwarm*) integrationPoints;
 
 	_Swarm_Build( self, data );
 
@@ -303,31 +310,38 @@
 	Stg_Component_Build( self->weightVariable, data, False );
 	Stg_Component_Build( self->mapper, data, False );
 }
-void _IntegrationPointsSwarm_Initialise( void* materialPoints, void* data ) {
-	IntegrationPointsSwarm*	self = (IntegrationPointsSwarm*) materialPoints;
+void _IntegrationPointsSwarm_Initialise( void* integrationPoints, void* data ) {
+	IntegrationPointsSwarm*	self = (IntegrationPointsSwarm*) integrationPoints;
 
+	Journal_DPrintf( self->debug, "In %s(): for swarm \"%s\":\n",
+		__func__, self->name );
+	Stream_IndentBranch( Swarm_Debug );
+
 	_Swarm_Initialise( self, data );
 
 	Stg_Component_Initialise( self->localCoordVariable, data, False );
 	Stg_Component_Initialise( self->weightVariable, data, False );
 	Stg_Component_Initialise( self->mapper, data, False );
+
 	if ( self->weights != NULL ) {
 		Stg_Component_Initialise( self->weights, data, False );
 	}
 
-	IntegrationPointMapper_Map( self->mapper );
-	if ( self->weights != NULL ) {
-		WeightsCalculator_CalculateAll(self->weights, self );
-	}
+	/* We call this function to actually set up the integration point positions and 
+	weights, based on the now set up material point swarm */
+	IntegrationPointsSwarm_RemapIntegrationPointsAndRecalculateWeights( self );
 
+	Stream_UnIndentBranch( Swarm_Debug );
+	Journal_DPrintf( self->debug, "...done in %s() for swarm \"%s\".\n",
+		__func__, self->name );
 }
-void _IntegrationPointsSwarm_Execute( void* materialPoints, void* data ) {
-	IntegrationPointsSwarm*	self = (IntegrationPointsSwarm*)materialPoints;
+void _IntegrationPointsSwarm_Execute( void* integrationPoints, void* data ) {
+	IntegrationPointsSwarm*	self = (IntegrationPointsSwarm*)integrationPoints;
 	
 	_Swarm_Execute( self, data );
 }
-void _IntegrationPointsSwarm_Destroy( void* materialPoints, void* data ) {
-	IntegrationPointsSwarm*	self = (IntegrationPointsSwarm*)materialPoints;
+void _IntegrationPointsSwarm_Destroy( void* integrationPoints, void* data ) {
+	IntegrationPointsSwarm*	self = (IntegrationPointsSwarm*)integrationPoints;
 	
 	_Swarm_Destroy( self, data );
 }
@@ -335,8 +349,67 @@
 void _IntegrationPointsSwarm_UpdateHook( void* timeIntegrator, void* swarm ) {
 	IntegrationPointsSwarm* self = (IntegrationPointsSwarm*)swarm;
 
+	Journal_DPrintf( self->debug, "In %s(): for swarm \"%s\":\n",
+		__func__, self->name );
+	Stream_IndentBranch( Swarm_Debug );
+
+	IntegrationPointsSwarm_RemapIntegrationPointsAndRecalculateWeights( self );
+
+	Stream_UnIndentBranch( Swarm_Debug );
+	Journal_DPrintf( self->debug, "...done in %s() for swarm \"%s\".\n",
+		__func__, self->name );
+}
+
+
+void IntegrationPointsSwarm_RemapIntegrationPointsAndRecalculateWeights( void* swarm ) {	
+	IntegrationPointsSwarm* self = (IntegrationPointsSwarm*)swarm;
+	double                  mapStartTime, mapTime;
+	double                  weightsUpdateStartTime, weightsUpdateTime;
+
+	Journal_DPrintf( self->debug, "In %s(): for swarm \"%s\":\n",
+		__func__, self->name );
+	Stream_IndentBranch( Swarm_Debug );
+
+	Journal_DPrintf( self->debug, "Calling IntegrationPointsMapper \"%s\" (of type %s) to set up mappings\n"
+		"\tfrom I.P.s to M.P.s, and calculate local coords:\n", self->mapper->name, self->mapper->type );
+	mapStartTime = MPI_Wtime();	
 	IntegrationPointMapper_Map( self->mapper );
+	mapTime = MPI_Wtime() - mapStartTime;
+	Journal_DPrintf( self->debug, "...done - took %g secs.\n", mapTime );
+
+	if ( self->weights != NULL ) {
+		Journal_DPrintf( self->debug, "Calling WeightsCalculator \"%s\" (of type %s)\n"
+			"\tto calculate and set integration weights:\n",
+			self->weights->name, self->weights->type );
+		weightsUpdateStartTime = MPI_Wtime();
+		WeightsCalculator_CalculateAll(self->weights, self );
+		weightsUpdateTime = MPI_Wtime() - weightsUpdateStartTime;
+		Journal_DPrintf( self->debug, "...weights updating finished - took %g secs.\n", weightsUpdateTime );
+	}	
+	else {
+		Stream* errorStream = Journal_Register( Error_Type, self->type );
+		Journal_Firewall( Stg_Class_IsInstance( self->mapper, GaussMapper_Type ), errorStream,
+			"Error - in %s(): for IntegrationPointSwarm \"%s\", no weights calculator provided "
+			"and mapper is not a %s.\n", GaussMapper_Type );
+
+		Journal_DPrintf( self->debug, "not recalculating weights since we are using a %s mapper and "
+			"assume the points are not being advected.\n", GaussMapper_Type );
+	}
+
+	Stream_UnIndentBranch( Swarm_Debug );
+	Journal_DPrintf( self->debug, "...done in %s() for swarm \"%s\"\n",
+		__func__, self->name );
 }
 
 
+Material_Index IntegrationPointsSwarm_GetMaterialIndexOn( IntegrationPointsSwarm* swarm, IntegrationPoint* point ) {
+	return IntegrationPointMapper_GetMaterialIndexOn( swarm->mapper, point );
+}
 
+
+Material* IntegrationPointsSwarm_GetMaterialOn( IntegrationPointsSwarm* swarm, IntegrationPoint* point ) {
+	return Materials_Register_GetByIndex(
+		swarm->materials_Register, 
+		IntegrationPointsSwarm_GetMaterialIndexOn( swarm, point ) );
+}
+

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.h
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.h	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.h	2006-06-28 09:56:23 UTC (rev 3897)
@@ -112,32 +112,36 @@
 		Bool                                            recalculateWeights );
 
 	/* Stg_Class_Delete IntegrationPointsSwarm implementation */
-	void _IntegrationPointsSwarm_Delete( void* materialPoints );
-	void _IntegrationPointsSwarm_Print( void* materialPoints, Stream* stream );
+	void _IntegrationPointsSwarm_Delete( void* integrationPoints );
+	void _IntegrationPointsSwarm_Print( void* integrationPoints, Stream* stream );
 	#define IntegrationPointsSwarm_Copy( self ) \
 		(IntegrationPointsSwarm*) Stg_Class_Copy( self, NULL, False, NULL, NULL )
 	#define IntegrationPointsSwarm_DeepCopy( self ) \
 		(IntegrationPointsSwarm*) Stg_Class_Copy( self, NULL, True, NULL, NULL )
-	void* _IntegrationPointsSwarm_Copy( void* materialPoints, void* dest, Bool deep, Name nameExt, PtrMap* ptrMap );
+	void* _IntegrationPointsSwarm_Copy( void* integrationPoints, void* dest, Bool deep, Name nameExt, PtrMap* ptrMap );
 	
 	void* _IntegrationPointsSwarm_DefaultNew( Name name ) ;
 	void _IntegrationPointsSwarm_Construct( void* shape, Stg_ComponentFactory* cf ) ;
-	void _IntegrationPointsSwarm_Build( void* materialPoints, void* data ) ;
-	void _IntegrationPointsSwarm_Initialise( void* materialPoints, void* data ) ;
-	void _IntegrationPointsSwarm_Execute( void* materialPoints, void* data );
-	void _IntegrationPointsSwarm_Destroy( void* materialPoints, void* data ) ;
+	void _IntegrationPointsSwarm_Build( void* integrationPoints, void* data ) ;
+	void _IntegrationPointsSwarm_Initialise( void* integrationPoints, void* data ) ;
+	void _IntegrationPointsSwarm_Execute( void* integrationPoints, void* data );
+	void _IntegrationPointsSwarm_Destroy( void* integrationPoints, void* data ) ;
 
 	void _IntegrationPointsSwarm_UpdateHook( void* timeIntegrator, void* swarm );
 	
+	/** Update the weights and local positions of all integration points, based on the 
+		current mapped material particles */
+	void IntegrationPointsSwarm_RemapIntegrationPointsAndRecalculateWeights( void* swarm );
+	
 	/** Get the material index associated with this integration point */
-	#define IntegrationPointsSwarm_GetMaterialIndexOn( swarm, point ) \
-		IntegrationPointMapper_GetMaterialIndexOn( ((IntegrationPointsSwarm*)(swarm))->mapper, (point) )
+	Material_Index IntegrationPointsSwarm_GetMaterialIndexOn(
+		IntegrationPointsSwarm* swarm,
+		IntegrationPoint* point ); 
 	
 	/** Get the material associated with this integration point */
-	#define IntegrationPointsSwarm_GetMaterialOn( swarm, point ) \
-		Materials_Register_GetByIndex( \
-				((IntegrationPointsSwarm*)(swarm))->materials_Register, \
-				IntegrationPointsSwarm_GetMaterialIndexOn( (swarm), (point) ) )
+	Material* IntegrationPointsSwarm_GetMaterialOn(
+		IntegrationPointsSwarm* swarm,
+		IntegrationPoint* point );
 
 	/** Get the extension associated with this integration point */
 	#define IntegrationPointsSwarm_GetExtensionOn( swarm, point, extHandle ) \

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.meta
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.meta	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/IntegrationPointsSwarm.meta	2006-06-28 09:56:23 UTC (rev 3897)
@@ -9,45 +9,50 @@
 <param name="Project Web">https://csd.vpac.org/twiki/bin/view/PICellerator/WebHome</param>
 <param name="Copyright">Copyright (C) 2005 VPAC and Monash Cluster Computing.</param>
 <param name="License">https://csd.vpac.org/twiki/bin/view/Stgermain/SoftwareLicense http://www.opensource.org/licenses/bsd-license.php</param>
-<param name="Parent">PopulationControlSwarm</param>
-<param name="Description">...</param>
+<param name="Parent">Swarm</param>
+<param name="Description">A specific swarm used for integration which is "aware" of the materials used. A mapper relationship links
+it with the physical material swarm(s) of which can actually be advected.</param>
 
 <!--Now the interesting stuff-->
 
-
 <list name="Params">
 	<struct>
-		<param name="Name">ParticleType</param>
-		<param name="Type">String</param>
-		<param name="Default">IntegrationPoint</param>
-		<param name="Description">...</param>
+		<param name="Name">recalculateWeights</param>
+		<param name="Type">Bool</param>
+		<param name="Default">True</param>
+		<param name="Description">Whether weights should be recalculated at every timestep</param>
 	</struct>
-
 </list>
 
 <list name="Dependencies">
 	<struct>
 		<param name="Essential">True</param>
+		<param name="Name">FiniteElement_Mesh</param>
+		<param name="Type">FiniteElement_Mesh</param>
+		<param name="Description">The mesh this swarm exists in.</param>
+	</struct>
+	<struct>
+		<param name="Essential">True</param>
+		<param name="Name">TimeIntegrator</param>
+		<param name="Type">TimeIntegrator</param>
+		<param name="Description">This is for particle updates</param>
+	</struct>
+	<struct>
+		<param name="Essential">False</param>
 		<param name="Name">WeightsCalculator</param>
 		<param name="Type">WeightsCalculator</param>
-		<param name="Description">...</param>
+		<param name="Description">Calculates each IntegrationPoint's weight at every timestep. If the particle layout is a
+		generally needed unless you are using a gauss layout which will set the weight for you.</param>
 	</struct>
-
-<!-- PLEASE, check the above struct information is accurate, in line number 243 of the c file and then remove this comment afterwards -->
-
 	<struct>
-		<param name="Essential">No</param>
+		<param name="Essential">True</param>
 		<param name="Name">IntegrationPointMapper</param>
 		<param name="Type">IntegrationPointMapper</param>
-		<param name="Description">...</param>
+		<param name="Description">Maps these IntegrationPoints to MaterialPointsSwarm(s). The mapper type determines the
+		method which the points are mapped.</param>
 	</struct>
 
-<!-- PLEASE, check the above struct information is accurate, in line number 244 of the c file and then remove this comment afterwards -->
-
-<!-- This component calls in another directory so the info above/below may not be complete-->
-
 </list>
-<!-- Add an exmaple XML if possible -->
 <param name="Example">...</param>
 
 </StGermainData>

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/ManyToOneMapper.meta
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/ManyToOneMapper.meta	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/ManyToOneMapper.meta	2006-06-28 09:56:23 UTC (rev 3897)
@@ -10,7 +10,7 @@
 <param name="Copyright">Copyright (C) 2005 VPAC and Monash Cluster Computing.</param>
 <param name="License">https://csd.vpac.org/twiki/bin/view/Stgermain/SoftwareLicense http://www.opensource.org/licenses/bsd-license.php</param>
 <param name="Parent">IntegrationPointMapper</param>
-<param name="Description">...</param>
+<param name="Description">Maps many MaterialPointsSwarms to one IntegrationPointsSwarm</param>
 
 <!--Now the interesting stuff-->
 
@@ -20,10 +20,12 @@
 </list>
 
 <list name="Dependencies">
-
-<!-- PLEASE, check line number 192 for a dependency and add its information and then remove this comment afterwards -->
-
-
+	<struct>
+		<param name="Essential">True</param>
+		<param name="Name">MaterialPointsSwarm</param>
+		<param name="Type">MaterialPointsSwarm</param>
+		<param name="Description">The list of material points to be mapped.</param>
+	</struct>
 </list>
 <!-- Add an exmaple XML if possible -->
 <param name="Example">...</param>

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MappedParticleLayout.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MappedParticleLayout.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MappedParticleLayout.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -176,7 +176,6 @@
 
 		sprintf( tempStr, "Swarm->cellParticleTbl[%d]", cell_I );
 		swarm->cellParticleTbl[cell_I] = Memory_Alloc_Array( Particle_Index, swarm->cellParticleSizeTbl[cell_I], tempStr );
-										
 	}
 
 	/* Now initialise the shadow cell particle counts */

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MappedParticleLayout.meta
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MappedParticleLayout.meta	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MappedParticleLayout.meta	2006-06-28 09:56:23 UTC (rev 3897)
@@ -10,7 +10,8 @@
 <param name="Copyright">Copyright (C) 2005 VPAC and Monash Cluster Computing.</param>
 <param name="License">https://csd.vpac.org/twiki/bin/view/Stgermain/SoftwareLicense http://www.opensource.org/licenses/bsd-license.php</param>
 <param name="Parent">ParticleLayout</param>
-<param name="Description">...</param>
+<param name="Description">Special particle layout for IntegrationPointsSwarms. Indicates that the particle layout will be determined
+by a IntegrationPointMapper.</param>
 
 <!--Now the interesting stuff-->
 

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialFeVariable.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialFeVariable.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialFeVariable.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -115,7 +115,7 @@
 
 	/* Assign Pointers */
 	swarm = Stg_CheckType( self->assemblyTerm->integrationSwarm, IntegrationPointsSwarm );
-	self->materialPoints = swarm;
+	self->picIntegrationPoints = swarm;
 	self->material       = material;
 
 	/* Create Dof Layout */
@@ -166,7 +166,7 @@
 	
 	newMaterialFeVariable = (MaterialFeVariable*) _ParticleFeVariable_Copy( feVariable, dest, deep, nameExt, ptrMap );
 
-	newMaterialFeVariable->materialPoints = self->materialPoints;
+	newMaterialFeVariable->picIntegrationPoints = self->picIntegrationPoints;
 	newMaterialFeVariable->material = self->material;
 	
 	return (void*)newMaterialFeVariable;

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialFeVariable.h
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialFeVariable.h	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialFeVariable.h	2006-06-28 09:56:23 UTC (rev 3897)
@@ -52,7 +52,7 @@
 		__ParticleFeVariable \
 		\
 		Material*                         material;                       \
-		IntegrationPointsSwarm*           materialPoints;                 
+		IntegrationPointsSwarm*           picIntegrationPoints;                 
 		
 	struct MaterialFeVariable { __MaterialFeVariable };
 	

Deleted: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsClass.meta
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsClass.meta	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsClass.meta	2006-06-28 09:56:23 UTC (rev 3897)
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE StGermainData SYSTEM "stgermain.dtd">
-<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
-
-<param name="Name">MaterialPoints</param>
-<param name="Organisation">VPAC & MCC</param>
-<param name="Project">PICellerator</param>
-<param name="Project Web">https://csd.vpac.org/twiki/bin/view/PICellerator/WebHome</param>
-<param name="Copyright">Copyright (C) 2005 VPAC & Monash Cluster Computing.</param>
-<param name="License">https://csd.vpac.org/twiki/bin/view/Stgermain/SoftwareLicensehttp://www.opensource.org/licenses/bsd-license.php</param>
-<param name="Parent">PopulationControlSwarm</param>
-<param name="Description">...</param>
-
-<!--Now the interesting stuff-->
-
-
-<list name="Params">
-	<struct>
-		<param name="Name">ParticleType</param>
-		<param name="Type">String</param>
-		<param name="Default">IntegrationPoint</param>
-		<param name="Description">...</param>
-	</struct>
-
-</list>
-
-<list name="Dependencies">
-	<struct>
-		<param name="Essential">WeightsCalculator</param>
-		<param name="Name">WeightsCalculator</param>
-		<param name="Type">WeightsCalculator</param>
-		<param name="Description">...</param>
-	</struct>
-
-<!-- PLEASE, check the above struct information is accurate, in line number 243 of the c file and then remove this comment afterwards -->
-
-	<struct>
-		<param name="Essential">IPMapper</param>
-		<param name="Name">IPMapper</param>
-		<param name="Type">IPMapper</param>
-		<param name="Description">...</param>
-	</struct>
-
-<!-- PLEASE, check the above struct information is accurate, in line number 244 of the c file and then remove this comment afterwards -->
-
-<!-- This component calls in another directory so the info above/below may not be complete-->
-
-</list>
-<!-- Add an exmaple XML if possible -->
-<param name="Example">...</param>
-
-</StGermainData>

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -256,22 +256,31 @@
 }
 void _MaterialPointsSwarm_Initialise( void* swarm, void* data ) {
 	MaterialPointsSwarm*	self = (MaterialPointsSwarm*) swarm;
+	AbstractContext* context = (AbstractContext*)data;
 	
 	_Swarm_Initialise( self, data );
 	Stg_Component_Initialise( self->particleCoordVariable, data, False );
 	Stg_Component_Initialise( self->materialIndexVariable, data, False );
 
-	/* Setup the material properties */
-	if ( self->material == NULL ) {
-		/* Do it by the layout of all known materials */
-		Materials_Register_SetupSwarm( self->materials_Register, self );
+	/* if loading from checkpoint, particle materials etc have already been loaded in Swarm_Build() - 
+	 * thus nothing to do here */
+	if ( context && (True == context->loadFromCheckPoint) ) {
+		/* TODO: print info / debug message */
 	}
+	/* else for a normal run, lay out the particle->material mappings based on user defined materials */
 	else {
-		Material_Layout( self->material, self );
-		Materials_Register_AssignParticleProperties( 
-				self->materials_Register, 
-				self, 
-				self->swarmVariable_Register->variable_Register );
+		/* Setup the material properties */
+		if ( self->material == NULL ) {
+			/* Do it by the layout of all known materials */
+			Materials_Register_SetupSwarm( self->materials_Register, self );
+		}
+		else {
+			Material_Layout( self->material, self );
+			Materials_Register_AssignParticleProperties( 
+					self->materials_Register, 
+					self, 
+					self->swarmVariable_Register->variable_Register );
+		}
 	}
 }
 void _MaterialPointsSwarm_Execute( void* swarm, void* data ) {
@@ -296,6 +305,14 @@
 	if ( self->escapedRoutine ) {
 		Stg_Component_Execute( self->escapedRoutine, self, True );
 	}
+	/* These two should also come before the "outside box" check, so we
+	can check that split particles never end up outside the box either */
+	if ( self->removalRoutine ) {
+		RemovalRoutine_RemoveFromSwarm( self->removalRoutine, self );
+	}
+	if ( self->splittingRoutine ) {
+		Stg_Component_Execute( self->splittingRoutine, self, True );
+	}
 
 	/* Check that particles have not exited the box after advection */
 	if ( self->swarmAdvector  ) {
@@ -314,12 +331,6 @@
 		}
 	}
 	
-	if ( self->removalRoutine ) {
-		RemovalRoutine_RemoveFromSwarm( self->removalRoutine, self );
-	}
-	if ( self->splittingRoutine ) {
-		Stg_Component_Execute( self->splittingRoutine, self, True );
-	}
 }
 
 void MaterialPointsSwarm_SetMaterialAt( void* swarm, Index point_I, Index materialIndex ) {

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.meta
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.meta	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/MaterialPointsSwarm.meta	2006-06-28 09:56:23 UTC (rev 3897)
@@ -9,24 +9,52 @@
 <param name="Project Web">https://csd.vpac.org/twiki/bin/view/PICellerator/WebHome</param>
 <param name="Copyright">Copyright (C) 2005 VPAC and Monash Cluster Computing.</param>
 <param name="License">https://csd.vpac.org/twiki/bin/view/Stgermain/SoftwareLicense http://www.opensource.org/licenses/bsd-license.php</param>
-<param name="Parent">PopulationControlSwarm</param>
-<param name="Description">...</param>
+<param name="Parent">Swarm</param>
+<param name="Description">Represents a set of points which track materials in the domain. It can be advected during the simulation
+and can be population controlled for load balancing purposes.
+</param>
 
 <!--Now the interesting stuff-->
 
 
 <list name="Params">
-	<struct>
-		<param name="Name">ParticleType</param>
-		<param name="Type">String</param>
-		<param name="Default">MaterialPoint</param>
-		<param name="Description">...</param>
-	</struct>
-
 </list>
 
 <list name="Dependencies">
-
+	<struct>
+		<param name="Essential">True</param>
+		<param name="Name">FiniteElement_Mesh</param>
+		<param name="Type">FiniteElement_Mesh</param>
+		<param name="Description">The mesh this swarm exists in.</param>
+	</struct>
+	<struct>
+		<param name="Essential">False</param>
+		<param name="Name">RemovalRoutine</param>
+		<param name="Type">RemovalRoutine</param>
+		<param name="Description">Population control routine that reduces particles in a cell when there is too many.</param>
+	</struct>
+	<struct>
+		<param name="Essential">False</param>
+		<param name="Name">SplittingRoutine</param>
+		<param name="Type">SplittingRoutine</param>
+		<param name="Description">Population control routine that increases the number of particles in a cell when there is
+		not enough. </param>
+	</struct>
+	<struct>
+		<param name="Essential">False</param>
+		<param name="Name">EscapedRoutine</param>
+		<param name="Type">EscapedRoutine</param>
+		<param name="Description">Population control routine which removes particles which have escaped the mesh
+		domain</param>
+	</struct>
+	<struct>
+		<param name="Essential">False</param>
+		<param name="Name">Material</param>
+		<param name="Type">Material</param>
+		<param name="Description">If you set a material in a MaterialPointsSwarm, the entire swarm's particle will be
+		located within the material's bounds and will only consist of particle of that material. Otherwise, the swarm is
+		spread across the entire domain and will be assigned materials according to the all the materials. </param>
+	</struct>
 </list>
 <!-- Add an exmaple XML if possible -->
 <param name="Example">...</param>

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Materials_Register.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Materials_Register.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/Materials_Register.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -54,6 +54,7 @@
 
 #include <string.h>
 #include <assert.h>
+#include <math.h>
 
 const Type Materials_Register_Type = "Materials_Register";
 
@@ -98,9 +99,11 @@
 	assert( swarm != NULL );
 
 	_Materials_Register_LayoutGeometry( self, swarm );
+	//Materials_Register_SetupParticleToMaterialMappings( self, swarm );
 	Materials_Register_AssignParticleProperties( self, swarm, swarm->swarmVariable_Register->variable_Register );
 }
 
+
 ExtensionInfo_Index Materials_Register_AddMaterialExtension( void* materialsRegister, Type type, SizeT extensionSize ) {
 	Materials_Register*     self         = (Materials_Register*) materialsRegister;
 	Material*               material;
@@ -147,10 +150,30 @@
 	Material*           material;
 	Particle_Index      lParticle_I;
 	Particle_Index      particleLocalCount = swarm->particleLocalCount;
-	Stream*             stream             = Journal_Register( Info_Type, self->type );
+	Particle_Index      particleGlobalCount = 0;
+	Stream*             stream = Journal_Register( Info_Type, self->type );
+	double              setupStartTime = 0;
+	double              setupTime = 0;
+	Processor_Index     formerStreamPrintingRank;
+	unsigned int        numberOfCompletionPrintIncrements=10;
+	double              completionRatioIncrement= 1 / (double)numberOfCompletionPrintIncrements;
+	double              nextCompletionRatioToPrint=0;
+	Particle_Index      nextCompletedParticleCountToPrint=0;
+	Particle_Index      nextPlusOneCompletedParticleCountToPrint=0;
 
-	Journal_Printf( stream, "In func %s:\n", __func__ );
+	Journal_Printf( stream, "In func %s(): for swarm \"%s\"\n", __func__, swarm->name );
+	Stream_Indent( stream );
+	setupStartTime = MPI_Wtime();
+	formerStreamPrintingRank = Stream_GetPrintingRank( stream );
+	Stream_SetPrintingRank( stream, 0 );
+	MPI_Reduce( &particleLocalCount, &particleGlobalCount, 1, MPI_UNSIGNED, MPI_SUM, 0, swarm->comm );
+	Journal_Printf( stream, "Assigning initial particle properties to the %u global particles\n",
+		particleGlobalCount );
+	Stream_Indent( stream );
 
+	nextCompletionRatioToPrint = completionRatioIncrement;
+	nextCompletedParticleCountToPrint = ceil(particleLocalCount * nextCompletionRatioToPrint - 0.001 );
+
 	for ( lParticle_I = 0 ; lParticle_I < particleLocalCount ; lParticle_I++ ) {
 		material = MaterialPointsSwarm_GetMaterialAt( swarm, lParticle_I );
 
@@ -163,7 +186,43 @@
 	
 		/* Loop through material's dictionary assigning values to the variables of this particle */
 		Variable_Register_SetAllVariablesFromDictionary( variableRegister, lParticle_I, material->dictionary );
+
+		
+		if ( /*(swarm->myRank == 0) && */ ((lParticle_I+1) >= nextCompletedParticleCountToPrint ) ) {
+			// TODO: parallelise : non-master CPUs send a non-blocking update to the master to report
+			// status. Master does blocking receive on all updates before printing
+
+			/* Special case for really small swarms, or really small increments - may cross more than one
+				at once */
+			nextPlusOneCompletedParticleCountToPrint = ceil(( particleLocalCount
+				* (nextCompletionRatioToPrint + completionRatioIncrement )) - 0.001 );
+
+			while ( (lParticle_I+1) >= nextPlusOneCompletedParticleCountToPrint )
+			{
+				nextCompletionRatioToPrint += completionRatioIncrement;
+				nextPlusOneCompletedParticleCountToPrint = ceil(( particleLocalCount
+					* (nextCompletionRatioToPrint + completionRatioIncrement )) - 0.001 );
+				if ( nextCompletionRatioToPrint >= 1.0 ) {
+					nextCompletionRatioToPrint = 1.0;
+					break;
+				}
+			}
+			Journal_Printf( stream, "done %.0f%% (%u particles)...\n", 
+				(nextCompletionRatioToPrint * 100),
+				lParticle_I+1 );
+			nextCompletionRatioToPrint += completionRatioIncrement;
+			nextCompletedParticleCountToPrint = ceil(particleLocalCount * nextCompletionRatioToPrint - 0.001);
+		}
 	}
+	Stream_UnIndent( stream );
+	/* Need this barrier so the time is accurate */
+	MPI_Barrier( swarm->comm );
+	setupTime = MPI_Wtime() - setupStartTime;
+
+	Stream_UnIndent( stream );
+	Stream_SetPrintingRank( stream, formerStreamPrintingRank );
+	Journal_Printf( stream, "%s(): finished setup of material properties for swarm \"%s\"\n"
+		"\ttook %g secs\n", __func__, swarm->name, setupTime );
 }
 
 

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/OneToOneMapper.meta
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/OneToOneMapper.meta	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/OneToOneMapper.meta	2006-06-28 09:56:23 UTC (rev 3897)
@@ -10,13 +10,12 @@
 <param name="Copyright">Copyright (C) 2005 VPAC and Monash Cluster Computing.</param>
 <param name="License">https://csd.vpac.org/twiki/bin/view/Stgermain/SoftwareLicense http://www.opensource.org/licenses/bsd-license.php</param>
 <param name="Parent">IntegrationPointMapper</param>
-<param name="Description">...</param>
+<param name="Description">An abstract mapper which will yield one-to-one mapping of integration points to material points.</param>
 
 <!--Now the interesting stuff-->
 
 
 <list name="Params">
-
 </list>
 
 <list name="Dependencies">
@@ -24,12 +23,9 @@
 		<param name="Essential">True</param>
 		<param name="Name">MaterialPointsSwarm</param>
 		<param name="Type">MaterialPointsSwarm</param>
-		<param name="Description">...</param>
+		<param name="Description">The material swarm to map to</param>
 	</struct>
 
-<!-- PLEASE, check the above struct information is accurate, in line number 152 of the c file and then remove this comment afterwards -->
-
-
 </list>
 <!-- Add an exmaple XML if possible -->
 <param name="Example">...</param>

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/PeriodicBoundariesManager.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/PeriodicBoundariesManager.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/PeriodicBoundariesManager.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -327,6 +327,8 @@
 	newPeriodicBoundary->axis = axis;
 	newPeriodicBoundary->minWall = self->geometry->min[axis];
 	newPeriodicBoundary->maxWall = self->geometry->max[axis];
+	newPeriodicBoundary->particlesUpdatedMinEndCount = 0;	
+	newPeriodicBoundary->particlesUpdatedMaxEndCount = 0;	
 	self->count++;
 }
 
@@ -339,30 +341,66 @@
 	Index				perBoundary_I = 0;
 	PeriodicBoundary*		perBoundary = NULL;
 
-	Journal_DPrintfL( self->debug, 2, "Starting update of periodic BCs\n" );
+	Journal_DPrintfL( self->debug, 2, "In %s:\n", __func__ );
+	Stream_Indent( self->debug );
+
+	particle = (GlobalParticle*)Swarm_ParticleAt( self->swarm, lParticle_I );
+
+	Journal_DPrintfL( self->debug, 2, "Checking particle %d at (%.2f,%.2f,%2f)\n", lParticle_I,
+		particle->coord[0], particle->coord[1], particle->coord[2] );
+
 	for ( perBoundary_I = 0; perBoundary_I < self->count; perBoundary_I++ ) {
 
 		perBoundary = &self->boundaries[perBoundary_I];
 		boundaryAxis = perBoundary->axis;
 
-		Journal_DPrintfL( self->debug, 2, "Checking boundary of axis %d:\n", boundaryAxis );
+		Journal_DPrintfL( self->debug, 2, "Checking axis %d:\n", boundaryAxis );
 
-		particle = (GlobalParticle*)Swarm_ParticleAt( self->swarm, lParticle_I );
 			
+		Stream_Indent( self->debug );
 		if ( particle->coord[boundaryAxis] < perBoundary->minWall ) {
-			Journal_DPrintfL( self->debug, 3, "found particle %d < min wall (at "
-				"(%.2f,%.2f,%.2f):\n", lParticle_I, particle->coord[I_AXIS],
-				particle->coord[J_AXIS], particle->coord[K_AXIS] );
+			Journal_DPrintfL( self->debug, 3, "coord is < min wall %.2f:\n", perBoundary->minWall );
 			difference = perBoundary->minWall - particle->coord[boundaryAxis];
 			particle->coord[boundaryAxis] = perBoundary->maxWall - difference;
-			Journal_DPrintfL( self->debug, 3, "moving to (%.2f,%.2f,%.2f):\n",
+			perBoundary->particlesUpdatedMinEndCount++;
+			Journal_DPrintfL( self->debug, 3, "moving to (%.2f,%.2f,%.2f).\n",
 				particle->coord[I_AXIS], particle->coord[J_AXIS],
 				particle->coord[K_AXIS] );
 		}
 		else if ( particle->coord[perBoundary->axis] > perBoundary->maxWall ) {
+			Journal_DPrintfL( self->debug, 3, "coord is > max wall %.2f:\n", perBoundary->maxWall );
 			difference = particle->coord[boundaryAxis] - perBoundary->maxWall; 
 			particle->coord[boundaryAxis] = perBoundary->minWall + difference;
+			perBoundary->particlesUpdatedMaxEndCount++;
+			Journal_DPrintfL( self->debug, 3, "moving to (%.2f,%.2f,%.2f).\n",
+				particle->coord[I_AXIS], particle->coord[J_AXIS],
+				particle->coord[K_AXIS] );
 		}
+		Stream_UnIndent( self->debug );
 	}	
+
+	Stream_UnIndent( self->debug );
+
+	/* TODO: this is a bit of a hack to print this here using the lParticleI = swarm->total - 1, but its
+	the only way I can see given this func is part of the SwarmAdvector intermediate. Should really be a 
+	function on this class that updates all the particles. -- Main.PatrickSunter 15 May 2006 */
+	if ( lParticle_I == (self->swarm->particleLocalCount-1) ) {
+		PeriodicBoundary*      boundary = NULL;
+		Index                  perB_I;
+	
+		Journal_DPrintfL( self->debug, 1, "PeriodicBoundariesManager total particles updated:\n" );
+		Stream_Indent( self->debug );
+		for ( perB_I = 0; perB_I < self->count; perB_I++ ) {
+			boundary = &self->boundaries[perB_I];
+
+			Journal_DPrintfL( self->debug, 1, "Periodic Boundary in %c Axis {%.2f,%.2f}: %d min end, %d max end\n",
+				IJKTopology_DimNumToDimLetter[boundary->axis], boundary->minWall, boundary->maxWall,
+				boundary->particlesUpdatedMinEndCount, boundary->particlesUpdatedMaxEndCount );
+			/* Reset the counters for next time */
+			boundary->particlesUpdatedMinEndCount = 0;	
+			boundary->particlesUpdatedMaxEndCount = 0;	
+		}
+		Stream_UnIndent( self->debug );
+	}
 }	
 

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/PeriodicBoundariesManager.h
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/PeriodicBoundariesManager.h	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/PeriodicBoundariesManager.h	2006-06-28 09:56:23 UTC (rev 3897)
@@ -61,6 +61,8 @@
 		Axis		axis;	/* Which plane the BC is in */
 		double		minWall;
 		double		maxWall;
+		unsigned int    particlesUpdatedMinEndCount;
+		unsigned int    particlesUpdatedMaxEndCount;
 	} PeriodicBoundary;
 
 	#define __PeriodicBoundariesManager \

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/SwarmAdvector.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/SwarmAdvector.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/SwarmAdvector.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -269,10 +269,10 @@
 	{
 		Journal_Printf( Journal_Register( Error_Type, self->type ),
 			"Error in func '%s' for particle with index %u.\n\tPosition (%g, %g, %g)\n\tVelocity here is (%g, %g, %g)."
-			"\n\tInteropolation result is %u.\n",
+			"\n\tInterpolation result is %s.\n",
 			__func__, array_I, coord[0], coord[1], coord[2], 
 			timeDeriv[0], timeDeriv[1], ( self->swarm->dim == 3 ? timeDeriv[2] : 0.0 ),
-			result );
+			InterpolationResultToStringMap[result]  );
 		abort();
 	}
 	#endif

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/SwarmAdvector.h
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/SwarmAdvector.h	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/SwarmAdvector.h	2006-06-28 09:56:23 UTC (rev 3897)
@@ -100,20 +100,20 @@
 		MaterialPointsSwarm*                       swarm,
 		PeriodicBoundariesManager*                 periodicBCsManager );
 
-	void _SwarmAdvector_Delete( void* materialPoints );
-	void _SwarmAdvector_Print( void* materialPoints, Stream* stream );
+	void _SwarmAdvector_Delete( void* materialSwarm );
+	void _SwarmAdvector_Print( void* materialSwarm, Stream* stream );
 	#define SwarmAdvector_Copy( self ) \
 		(SwarmAdvector*) Stg_Class_Copy( self, NULL, False, NULL, NULL )
 	#define SwarmAdvector_DeepCopy( self ) \
 		(SwarmAdvector*) Stg_Class_Copy( self, NULL, True, NULL, NULL )
-	void* _SwarmAdvector_Copy( void* materialPoints, void* dest, Bool deep, Name nameExt, PtrMap* ptrMap );
+	void* _SwarmAdvector_Copy( void* materialSwarm, void* dest, Bool deep, Name nameExt, PtrMap* ptrMap );
 	
 	void* _SwarmAdvector_DefaultNew( Name name ) ;
 	void _SwarmAdvector_Construct( void* shape, Stg_ComponentFactory* cf ) ;
-	void _SwarmAdvector_Build( void* materialPoints, void* data ) ;
-	void _SwarmAdvector_Initialise( void* materialPoints, void* data ) ;
-	void _SwarmAdvector_Execute( void* materialPoints, void* data );
-	void _SwarmAdvector_Destroy( void* materialPoints, void* data ) ;
+	void _SwarmAdvector_Build( void* materialSwarm, void* data ) ;
+	void _SwarmAdvector_Initialise( void* materialSwarm, void* data ) ;
+	void _SwarmAdvector_Execute( void* materialSwarm, void* data );
+	void _SwarmAdvector_Destroy( void* materialSwarm, void* data ) ;
 	void _SwarmAdvector_TimeDeriv( void* swarmAdvector, Index array_I, double* timeDeriv ) ;
 	void _SwarmAdvector_Intermediate( void* swarmAdvector, Index array_I ) ;
 	

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/SwarmAdvectorD.h
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/SwarmAdvectorD.h	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/src/SwarmAdvectorD.h	2006-06-28 09:56:23 UTC (rev 3897)
@@ -94,20 +94,20 @@
 	void _SwarmAdvectorD_Init( 
 		SwarmAdvectorD*                             self );
 
-	void _SwarmAdvectorD_Delete( void* materialPoints );
-	void _SwarmAdvectorD_Print( void* materialPoints, Stream* stream );
+	void _SwarmAdvectorD_Delete( void* materialSwarm );
+	void _SwarmAdvectorD_Print( void* materialSwarm, Stream* stream );
 	#define SwarmAdvectorD_Copy( self ) \
 		(SwarmAdvectorD*) Stg_Class_Copy( self, NULL, False, NULL, NULL )
 	#define SwarmAdvectorD_DeepCopy( self ) \
 		(SwarmAdvectorD*) Stg_Class_Copy( self, NULL, True, NULL, NULL )
-	void* _SwarmAdvectorD_Copy( void* materialPoints, void* dest, Bool deep, Name nameExt, PtrMap* ptrMap );
+	void* _SwarmAdvectorD_Copy( void* materialSwarm, void* dest, Bool deep, Name nameExt, PtrMap* ptrMap );
 	
 	void* _SwarmAdvectorD_DefaultNew( Name name ) ;
 	void _SwarmAdvectorD_Construct( void* shape, Stg_ComponentFactory* cf ) ;
-	void _SwarmAdvectorD_Build( void* materialPoints, void* data ) ;
-	void _SwarmAdvectorD_Initialise( void* materialPoints, void* data ) ;
-	void _SwarmAdvectorD_Execute( void* materialPoints, void* data );
-	void _SwarmAdvectorD_Destroy( void* materialPoints, void* data ) ;
+	void _SwarmAdvectorD_Build( void* materialSwarm, void* data ) ;
+	void _SwarmAdvectorD_Initialise( void* materialSwarm, void* data ) ;
+	void _SwarmAdvectorD_Execute( void* materialSwarm, void* data );
+	void _SwarmAdvectorD_Destroy( void* materialSwarm, void* data ) ;
 	void _SwarmAdvectorD_TimeDeriv( void* swarmAdvector, Index array_I, double* timeDeriv ) ;
 	void _SwarmAdvectorD_Intermediate( void* swarmAdvector, Index array_I ) ;
 	

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/Viewport.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/Viewport.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/Viewport.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -12,11 +12,11 @@
 		<!-- Drawing Objects -->
 		<struct name="particleDots">
 			<param name="Type">lucSwarmViewer</param>
-			<param name="Swarm">materialPoints</param>
+			<param name="Swarm">picIntegrationPoints</param>
 			<param name="colour">blue</param>
 			<!--
 			-->
-			<param name="MaskVariable">materialPoints-MaterialIndex</param>
+			<param name="MaskVariable">picIntegrationPoints-MaterialIndex</param>
 			<param name="maskValue">1</param>
 			<param name="maskType">EqualTo</param>
 			<param name="pointSize">2.0</param>

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/expected/testPeriodicBCs.0of1.expected
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/expected/testPeriodicBCs.0of1.expected	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/expected/testPeriodicBCs.0of1.expected	2006-06-28 09:56:23 UTC (rev 3897)
@@ -1,91 +1,101 @@
-StGermain Framework revision 3498. Copyright (C) 2003-2005 VPAC.
-StGermain Discretisation Library revision 3498. Copyright (C) 2003-2005 VPAC.
-StGermain Finite Element Framework revision 527. Copyright (C) 2003-2005 VPAC.
-StGermain FEM Discretisation Framework revision 527. Copyright (C) 2003-2005 VPAC.
-StGermain SLE Library revision 527. Copyright (C) 2003-2005 VPAC.
-StGermain PETSc-LinearAlgebra Interface revision 527. Copyright (C) 2003-2005 VPAC.
-StGermain FEM Assembly Library revision 527. Copyright (C) 2003-2005 VPAC.
+StGermain Framework revision 3638. Copyright (C) 2003-2005 VPAC.
+StGermain Discretisation Library revision 3638. Copyright (C) 2003-2005 VPAC.
+StGermain Finite Element Framework revision 585. Copyright (C) 2003-2005 VPAC.
+StGermain FEM Discretisation Framework revision 585. Copyright (C) 2003-2005 VPAC.
+StGermain SLE Library revision 585. Copyright (C) 2003-2005 VPAC.
+StGermain PETSc-LinearAlgebra Interface revision 585. Copyright (C) 2003-2005 VPAC.
+StGermain FEM Assembly Library revision 585. Copyright (C) 2003-2005 VPAC.
 Watching rank: 0
-Swarm (ptr): 0x806ae20
-Stg_Component (ptr): 0x806ae20
-Stg_Object (ptr): 0x806ae20
-	Stg_Class (ptr): 0x806ae20
-		sizeOfSelf: 200
+Swarm (ptr): 0x63f5e0
+Stg_Component (ptr): 0x63f5e0
+Stg_Object (ptr): 0x63f5e0
+	Stg_Class (ptr): 0x63f5e0
+		sizeOfSelf: 376
 		_deleteSelf: Yes
 		type: Swarm
-		_delete (func ptr): 0xb7dd03c2
-		_print (func ptr): 0xb7dd04cb
-		_copy (func ptr): 0xb7dd0a96
+		_delete (func ptr): 0x2aaaabce3dab
+		_print (func ptr): 0x2aaaabce3eb8
+		_copy (func ptr): 0x2aaaabce449c
 	name: testSwarm
 	nameAllocationType: NON_GLOBAL
-	_defaultConstructor (func ptr): 0xb7dd1309
-	_construct (func ptr): 0xb7dd13ec
-	_build (func ptr): 0xb7dd162c
-	_initialise (func ptr): 0xb7dd17e3
-	_execute (func ptr): 0xb7dd188f
-	_destroy (func ptr): 0xb7dd1894
+	_defaultConstructor (func ptr): 0x2aaaabce4e75
+	_construct (func ptr): 0x2aaaabce4f4e
+	_build (func ptr): 0x2aaaabce516d
+	_initialise (func ptr): 0x2aaaabce5322
+	_execute (func ptr): 0x2aaaabce5393
+	_destroy (func ptr): 0x2aaaabce53a1
 	isConstructed: True
 	isBuilt: True
 	isInitialised: True
 	hasExecuted: False
 	isDestroyed: False
-ElementCellLayout (ptr): 0x806aaf8
-CellLayout (ptr): 0x806aaf8
-Stg_Component (ptr): 0x806aaf8
-Stg_Object (ptr): 0x806aaf8
-	Stg_Class (ptr): 0x806aaf8
-		sizeOfSelf: 112
+	constructor function name: testSwarm-Construct
+	build function name: testSwarm-Build
+	initialise function name: testSwarm-Initialise
+	execute function name: testSwarm-Execute
+	destroy function name: testSwarm-Destroy
+ElementCellLayout (ptr): 0x63e770
+CellLayout (ptr): 0x63e770
+Stg_Component (ptr): 0x63e770
+Stg_Object (ptr): 0x63e770
+	Stg_Class (ptr): 0x63e770
+		sizeOfSelf: 248
 		_deleteSelf: Yes
 		type: ElementCellLayout
-		_delete (func ptr): 0xb7dc6aea
-		_print (func ptr): 0xb7dc6b13
-		_copy (func ptr): 0xb7dc6b84
+		_delete (func ptr): 0x2aaaabcd8613
+		_print (func ptr): 0x2aaaabcd8632
+		_copy (func ptr): 0x2aaaabcd869a
 	name: elementCellLayout
 	nameAllocationType: NON_GLOBAL
-	_defaultConstructor (func ptr): 0xb7dc6630
-	_construct (func ptr): 0xb7dc6c50
-	_build (func ptr): 0xb7dc6cc4
-	_initialise (func ptr): 0xb7dc6cc9
-	_execute (func ptr): 0xb7dc6cce
-	_destroy (func ptr): 0xb7dc6cd3
+	_defaultConstructor (func ptr): 0x2aaaabcd80c0
+	_construct (func ptr): 0x2aaaabcd876b
+	_build (func ptr): 0x2aaaabcd87d0
+	_initialise (func ptr): 0x2aaaabcd87de
+	_execute (func ptr): 0x2aaaabcd87ec
+	_destroy (func ptr): 0x2aaaabcd87fa
 	isConstructed: True
 	isBuilt: False
 	isInitialised: False
 	hasExecuted: False
 	isDestroyed: False
-	_cellLocalCount (func ptr): 0xb7dc6cd8
-	_cellShadowCount (func ptr): 0xb7dc6cf2
-	_pointCount (func ptr): 0xb7dc6d0c
-	_initialisePoints (func ptr): 0xb7dc6d33
-	_mapElementIdToCellId (func ptr): 0xb7dc6db2
-	_isInCell (func ptr): 0xb7dc6dba
-	_cellOf (func ptr): 0xb7dc6e23
-	_getShadowInfo (func ptr): 0xb7dc6e76
-	mesh (ptr): 0x806a318
-RandomParticleLayout (ptr): 0x806ad80:
-PerCellParticleLayout (ptr): 0x806ad80
-ParticleLayout (ptr): 0x806ad80
-Stg_Class (ptr): 0x806ad80
-	sizeOfSelf: 108
+	constructor function name: elementCellLayout-Construct
+	build function name: elementCellLayout-Build
+	initialise function name: elementCellLayout-Initialise
+	execute function name: elementCellLayout-Execute
+	destroy function name: elementCellLayout-Destroy
+	_cellLocalCount (func ptr): 0x2aaaabcd8808
+	_cellShadowCount (func ptr): 0x2aaaabcd882b
+	_pointCount (func ptr): 0x2aaaabcd884e
+	_initialisePoints (func ptr): 0x2aaaabcd8882
+	_mapElementIdToCellId (func ptr): 0x2aaaabcd8916
+	_isInCell (func ptr): 0x2aaaabcd8926
+	_cellOf (func ptr): 0x2aaaabcd8b7a
+	_getShadowInfo (func ptr): 0x2aaaabcd8dbb
+	mesh (ptr): 0x63d6c0
+RandomParticleLayout (ptr): 0x63ef90:
+PerCellParticleLayout (ptr): 0x63ef90
+ParticleLayout (ptr): 0x63ef90
+Stg_Class (ptr): 0x63ef90
+	sizeOfSelf: 232
 	_deleteSelf: Yes
 	type: RandomParticleLayout
-	_delete (func ptr): 0xb7dce6f9
-	_print (func ptr): 0xb7dce722
-	_copy (func ptr): 0xb7dce7b2
-	_setInitialCounts (func ptr): 0xb7dce17d
-	_initialiseParticles (func ptr): 0xb7dce310
+	_delete (func ptr): 0x2aaaabce1e12
+	_print (func ptr): 0x2aaaabce1e31
+	_copy (func ptr): 0x2aaaabce1eb7
+	_setInitialCounts (func ptr): 0x2aaaabce1165
+	_initialiseParticles (func ptr): 0x2aaaabce131c
 	coordSystem: GlobalCoordSystem
 	weightsInitialisedAtStartup : False
-	_initialCount (func ptr): 0xb7dce985
-	_initialiseParticlesOfCell (func ptr): 0xb7dce999
+	_initialCount (func ptr): 0x2aaaabce2098
+	_initialiseParticlesOfCell (func ptr): 0x2aaaabce20bb
 	cellParticleCount: 1
 	seed: 13
 	cellLocalCount: 144
 	cellDomainCount: 144
 	cellShadowCount: 0
-	cellPointCountTbl (ptr): 0x8071350
+	cellPointCountTbl (ptr): 0x647510
 	cellPointCountTbl[0-144]: 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 
-	cellPointTbl (ptr): 0x8072f48
+	cellPointTbl (ptr): 0x649370
 	cellPointTbl[0-144]: {
 	cellPointTbl[0][0-8]: {0 0 0} {0.0833 0 0} {0.0833 0.0833 0} {0 0.0833 0} {0 0 1} {0.0833 0 1} {0.0833 0.0833 1} {0 0.0833 1} 
 	cellPointTbl[1][0-8]: {0.0833 0 0} {0.167 0 0} {0.167 0.0833 0} {0.0833 0.0833 0} {0.0833 0 1} {0.167 0 1} {0.167 0.0833 1} {0.0833 0.0833 1} 
@@ -233,11 +243,11 @@
 	cellPointTbl[143][0-8]: {0.917 0.917 0} {1 0.917 0} {1 1 0} {0.917 1 0} {0.917 0.917 1} {1 0.917 1} {1 1 1} {0.917 1 1} 
 }
 
-	cellParticleCountTbl (ptr): 0x80715a0
+	cellParticleCountTbl (ptr): 0x647770
 	cellParticleCountTbl[0-144]: 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 
-	cellParticleSizeTbl (ptr): 0x8074398
+	cellParticleSizeTbl (ptr): 0x64bc10
 	cellParticleSizeTbl[0-144]: 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 
-	cellParticleTbl (ptr): 0x80745e8
+	cellParticleTbl (ptr): 0x64be70
 	cellParticleTbl [0-144]: {
 		cellParticleTbl[0][0-1]:
 			(part. index) 0
@@ -674,7 +684,7 @@
 	}
 	particlesArraySize: 151
 	particlesArrayDelta: 7
-	particlesArrayDelta: 0.05
+	extraParticlesFactor: 0.05
 
 Starting timestep 1:
 	Updating Particles positions in local cell 0:

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/expected/testPeriodicBCs.0of2.expected
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/expected/testPeriodicBCs.0of2.expected	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/expected/testPeriodicBCs.0of2.expected	2006-06-28 09:56:23 UTC (rev 3897)
@@ -1,91 +1,101 @@
-StGermain Framework revision 3570. Copyright (C) 2003-2005 VPAC.
-StGermain Discretisation Library revision 3570. Copyright (C) 2003-2005 VPAC.
-StGermain Finite Element Framework revision 559. Copyright (C) 2003-2005 VPAC.
-StGermain FEM Discretisation Framework revision 559. Copyright (C) 2003-2005 VPAC.
-StGermain SLE Library revision 559. Copyright (C) 2003-2005 VPAC.
-StGermain PETSc-LinearAlgebra Interface revision 559. Copyright (C) 2003-2005 VPAC.
-StGermain FEM Assembly Library revision 559. Copyright (C) 2003-2005 VPAC.
+StGermain Framework revision 3638. Copyright (C) 2003-2005 VPAC.
+StGermain Discretisation Library revision 3638. Copyright (C) 2003-2005 VPAC.
+StGermain Finite Element Framework revision 585. Copyright (C) 2003-2005 VPAC.
+StGermain FEM Discretisation Framework revision 585. Copyright (C) 2003-2005 VPAC.
+StGermain SLE Library revision 585. Copyright (C) 2003-2005 VPAC.
+StGermain PETSc-LinearAlgebra Interface revision 585. Copyright (C) 2003-2005 VPAC.
+StGermain FEM Assembly Library revision 585. Copyright (C) 2003-2005 VPAC.
 Watching rank: 0
-Swarm (ptr): 0x809a468
-Stg_Component (ptr): 0x809a468
-Stg_Object (ptr): 0x809a468
-	Stg_Class (ptr): 0x809a468
-		sizeOfSelf: 196
+Swarm (ptr): 0x640070
+Stg_Component (ptr): 0x640070
+Stg_Object (ptr): 0x640070
+	Stg_Class (ptr): 0x640070
+		sizeOfSelf: 376
 		_deleteSelf: Yes
 		type: Swarm
-		_delete (func ptr): 0x402067fd
-		_print (func ptr): 0x4020690b
-		_copy (func ptr): 0x40206eed
+		_delete (func ptr): 0x2aaaabce3dab
+		_print (func ptr): 0x2aaaabce3eb8
+		_copy (func ptr): 0x2aaaabce449c
 	name: testSwarm
 	nameAllocationType: NON_GLOBAL
-	_defaultConstructor (func ptr): 0x40207794
-	_construct (func ptr): 0x40207877
-	_build (func ptr): 0x40207ab7
-	_initialise (func ptr): 0x40207c16
-	_execute (func ptr): 0x40207c74
-	_destroy (func ptr): 0x40207c79
+	_defaultConstructor (func ptr): 0x2aaaabce4e75
+	_construct (func ptr): 0x2aaaabce4f4e
+	_build (func ptr): 0x2aaaabce516d
+	_initialise (func ptr): 0x2aaaabce5322
+	_execute (func ptr): 0x2aaaabce5393
+	_destroy (func ptr): 0x2aaaabce53a1
 	isConstructed: True
 	isBuilt: True
 	isInitialised: True
 	hasExecuted: False
 	isDestroyed: False
-ElementCellLayout (ptr): 0x809a0b0
-CellLayout (ptr): 0x809a0b0
-Stg_Component (ptr): 0x809a0b0
-Stg_Object (ptr): 0x809a0b0
-	Stg_Class (ptr): 0x809a0b0
-		sizeOfSelf: 112
+	constructor function name: testSwarm-Construct
+	build function name: testSwarm-Build
+	initialise function name: testSwarm-Initialise
+	execute function name: testSwarm-Execute
+	destroy function name: testSwarm-Destroy
+ElementCellLayout (ptr): 0x63f170
+CellLayout (ptr): 0x63f170
+Stg_Component (ptr): 0x63f170
+Stg_Object (ptr): 0x63f170
+	Stg_Class (ptr): 0x63f170
+		sizeOfSelf: 248
 		_deleteSelf: Yes
 		type: ElementCellLayout
-		_delete (func ptr): 0x401fb7ba
-		_print (func ptr): 0x401fb7e3
-		_copy (func ptr): 0x401fb854
+		_delete (func ptr): 0x2aaaabcd8613
+		_print (func ptr): 0x2aaaabcd8632
+		_copy (func ptr): 0x2aaaabcd869a
 	name: elementCellLayout
 	nameAllocationType: NON_GLOBAL
-	_defaultConstructor (func ptr): 0x401fb300
-	_construct (func ptr): 0x401fb920
-	_build (func ptr): 0x401fb994
-	_initialise (func ptr): 0x401fb999
-	_execute (func ptr): 0x401fb99e
-	_destroy (func ptr): 0x401fb9a3
+	_defaultConstructor (func ptr): 0x2aaaabcd80c0
+	_construct (func ptr): 0x2aaaabcd876b
+	_build (func ptr): 0x2aaaabcd87d0
+	_initialise (func ptr): 0x2aaaabcd87de
+	_execute (func ptr): 0x2aaaabcd87ec
+	_destroy (func ptr): 0x2aaaabcd87fa
 	isConstructed: True
 	isBuilt: False
 	isInitialised: False
 	hasExecuted: False
 	isDestroyed: False
-	_cellLocalCount (func ptr): 0x401fb9a8
-	_cellShadowCount (func ptr): 0x401fb9c2
-	_pointCount (func ptr): 0x401fb9dc
-	_initialisePoints (func ptr): 0x401fba03
-	_mapElementIdToCellId (func ptr): 0x401fba84
-	_isInCell (func ptr): 0x401fbb11
-	_cellOf (func ptr): 0x401fbcf3
-	_getShadowInfo (func ptr): 0x401fbec5
-	mesh (ptr): 0x8099770
-RandomParticleLayout (ptr): 0x809a3c8:
-PerCellParticleLayout (ptr): 0x809a3c8
-ParticleLayout (ptr): 0x809a3c8
-Stg_Class (ptr): 0x809a3c8
-	sizeOfSelf: 108
+	constructor function name: elementCellLayout-Construct
+	build function name: elementCellLayout-Build
+	initialise function name: elementCellLayout-Initialise
+	execute function name: elementCellLayout-Execute
+	destroy function name: elementCellLayout-Destroy
+	_cellLocalCount (func ptr): 0x2aaaabcd8808
+	_cellShadowCount (func ptr): 0x2aaaabcd882b
+	_pointCount (func ptr): 0x2aaaabcd884e
+	_initialisePoints (func ptr): 0x2aaaabcd8882
+	_mapElementIdToCellId (func ptr): 0x2aaaabcd8916
+	_isInCell (func ptr): 0x2aaaabcd8926
+	_cellOf (func ptr): 0x2aaaabcd8b7a
+	_getShadowInfo (func ptr): 0x2aaaabcd8dbb
+	mesh (ptr): 0x63e030
+RandomParticleLayout (ptr): 0x63f9b0:
+PerCellParticleLayout (ptr): 0x63f9b0
+ParticleLayout (ptr): 0x63f9b0
+Stg_Class (ptr): 0x63f9b0
+	sizeOfSelf: 232
 	_deleteSelf: Yes
 	type: RandomParticleLayout
-	_delete (func ptr): 0x40204c09
-	_print (func ptr): 0x40204c32
-	_copy (func ptr): 0x40204cc2
-	_setInitialCounts (func ptr): 0x40204091
-	_initialiseParticles (func ptr): 0x40204228
+	_delete (func ptr): 0x2aaaabce1e12
+	_print (func ptr): 0x2aaaabce1e31
+	_copy (func ptr): 0x2aaaabce1eb7
+	_setInitialCounts (func ptr): 0x2aaaabce1165
+	_initialiseParticles (func ptr): 0x2aaaabce131c
 	coordSystem: GlobalCoordSystem
 	weightsInitialisedAtStartup : False
-	_initialCount (func ptr): 0x40204e95
-	_initialiseParticlesOfCell (func ptr): 0x40204ea9
+	_initialCount (func ptr): 0x2aaaabce2098
+	_initialiseParticlesOfCell (func ptr): 0x2aaaabce20bb
 	cellParticleCount: 1
 	seed: 13
 	cellLocalCount: 72
 	cellDomainCount: 84
 	cellShadowCount: 12
-	cellPointCountTbl (ptr): 0x80a04e0
+	cellPointCountTbl (ptr): 0x647c50
 	cellPointCountTbl[0-84]: 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 
-	cellPointTbl (ptr): 0x80a0998
+	cellPointTbl (ptr): 0x648270
 	cellPointTbl[0-84]: {
 	cellPointTbl[0][0-8]: {0 0 0} {0.0833 0 0} {0.0833 0.0833 0} {0 0.0833 0} {0 0 1} {0.0833 0 1} {0.0833 0.0833 1} {0 0.0833 1} 
 	cellPointTbl[1][0-8]: {0.0833 0 0} {0.167 0 0} {0.167 0.0833 0} {0.0833 0.0833 0} {0.0833 0 1} {0.167 0 1} {0.167 0.0833 1} {0.0833 0.0833 1} 
@@ -173,11 +183,11 @@
 	cellPointTbl[83][0-8]: {0.5 0.917 0} {0.583 0.917 0} {0.583 1 0} {0.5 1 0} {0.5 0.917 1} {0.583 0.917 1} {0.583 1 1} {0.5 1 1} 
 }
 
-	cellParticleCountTbl (ptr): 0x80a1578
+	cellParticleCountTbl (ptr): 0x649a30
 	cellParticleCountTbl[0-84]: 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 000 000 000 000 000 000 000 000 000 000 000 000 
-	cellParticleSizeTbl (ptr): 0x80a16d8
+	cellParticleSizeTbl (ptr): 0x649ba0
 	cellParticleSizeTbl[0-84]: 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 000 000 000 000 000 000 000 000 000 000 000 000 
-	cellParticleTbl (ptr): 0x80a1838
+	cellParticleTbl (ptr): 0x649d10
 	cellParticleTbl [0-84]: {
 		cellParticleTbl[0][0-1]:
 			(part. index) 0
@@ -422,7 +432,7 @@
 	}
 	particlesArraySize: 75
 	particlesArrayDelta: 3
-	particlesArrayDelta: 0.05
+	extraParticlesFactor: 0.05
 
 Starting timestep 1:
 	Updating Particles positions in local cell 0:

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/expected/testPeriodicBCs.1of2.expected
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/expected/testPeriodicBCs.1of2.expected	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/expected/testPeriodicBCs.1of2.expected	2006-06-28 09:56:23 UTC (rev 3897)
@@ -1,91 +1,101 @@
-StGermain Framework revision 3570. Copyright (C) 2003-2005 VPAC.
-StGermain Discretisation Library revision 3570. Copyright (C) 2003-2005 VPAC.
-StGermain Finite Element Framework revision 559. Copyright (C) 2003-2005 VPAC.
-StGermain FEM Discretisation Framework revision 559. Copyright (C) 2003-2005 VPAC.
-StGermain SLE Library revision 559. Copyright (C) 2003-2005 VPAC.
-StGermain PETSc-LinearAlgebra Interface revision 559. Copyright (C) 2003-2005 VPAC.
-StGermain FEM Assembly Library revision 559. Copyright (C) 2003-2005 VPAC.
+StGermain Framework revision 3638. Copyright (C) 2003-2005 VPAC.
+StGermain Discretisation Library revision 3638. Copyright (C) 2003-2005 VPAC.
+StGermain Finite Element Framework revision 585. Copyright (C) 2003-2005 VPAC.
+StGermain FEM Discretisation Framework revision 585. Copyright (C) 2003-2005 VPAC.
+StGermain SLE Library revision 585. Copyright (C) 2003-2005 VPAC.
+StGermain PETSc-LinearAlgebra Interface revision 585. Copyright (C) 2003-2005 VPAC.
+StGermain FEM Assembly Library revision 585. Copyright (C) 2003-2005 VPAC.
 Watching rank: 1
-Swarm (ptr): 0x809aa50
-Stg_Component (ptr): 0x809aa50
-Stg_Object (ptr): 0x809aa50
-	Stg_Class (ptr): 0x809aa50
-		sizeOfSelf: 196
+Swarm (ptr): 0x640810
+Stg_Component (ptr): 0x640810
+Stg_Object (ptr): 0x640810
+	Stg_Class (ptr): 0x640810
+		sizeOfSelf: 376
 		_deleteSelf: Yes
 		type: Swarm
-		_delete (func ptr): 0x402067fd
-		_print (func ptr): 0x4020690b
-		_copy (func ptr): 0x40206eed
+		_delete (func ptr): 0x2aaaabce3dab
+		_print (func ptr): 0x2aaaabce3eb8
+		_copy (func ptr): 0x2aaaabce449c
 	name: testSwarm
 	nameAllocationType: NON_GLOBAL
-	_defaultConstructor (func ptr): 0x40207794
-	_construct (func ptr): 0x40207877
-	_build (func ptr): 0x40207ab7
-	_initialise (func ptr): 0x40207c16
-	_execute (func ptr): 0x40207c74
-	_destroy (func ptr): 0x40207c79
+	_defaultConstructor (func ptr): 0x2aaaabce4e75
+	_construct (func ptr): 0x2aaaabce4f4e
+	_build (func ptr): 0x2aaaabce516d
+	_initialise (func ptr): 0x2aaaabce5322
+	_execute (func ptr): 0x2aaaabce5393
+	_destroy (func ptr): 0x2aaaabce53a1
 	isConstructed: True
 	isBuilt: True
 	isInitialised: True
 	hasExecuted: False
 	isDestroyed: False
-ElementCellLayout (ptr): 0x809a698
-CellLayout (ptr): 0x809a698
-Stg_Component (ptr): 0x809a698
-Stg_Object (ptr): 0x809a698
-	Stg_Class (ptr): 0x809a698
-		sizeOfSelf: 112
+	constructor function name: testSwarm-Construct
+	build function name: testSwarm-Build
+	initialise function name: testSwarm-Initialise
+	execute function name: testSwarm-Execute
+	destroy function name: testSwarm-Destroy
+ElementCellLayout (ptr): 0x63f910
+CellLayout (ptr): 0x63f910
+Stg_Component (ptr): 0x63f910
+Stg_Object (ptr): 0x63f910
+	Stg_Class (ptr): 0x63f910
+		sizeOfSelf: 248
 		_deleteSelf: Yes
 		type: ElementCellLayout
-		_delete (func ptr): 0x401fb7ba
-		_print (func ptr): 0x401fb7e3
-		_copy (func ptr): 0x401fb854
+		_delete (func ptr): 0x2aaaabcd8613
+		_print (func ptr): 0x2aaaabcd8632
+		_copy (func ptr): 0x2aaaabcd869a
 	name: elementCellLayout
 	nameAllocationType: NON_GLOBAL
-	_defaultConstructor (func ptr): 0x401fb300
-	_construct (func ptr): 0x401fb920
-	_build (func ptr): 0x401fb994
-	_initialise (func ptr): 0x401fb999
-	_execute (func ptr): 0x401fb99e
-	_destroy (func ptr): 0x401fb9a3
+	_defaultConstructor (func ptr): 0x2aaaabcd80c0
+	_construct (func ptr): 0x2aaaabcd876b
+	_build (func ptr): 0x2aaaabcd87d0
+	_initialise (func ptr): 0x2aaaabcd87de
+	_execute (func ptr): 0x2aaaabcd87ec
+	_destroy (func ptr): 0x2aaaabcd87fa
 	isConstructed: True
 	isBuilt: False
 	isInitialised: False
 	hasExecuted: False
 	isDestroyed: False
-	_cellLocalCount (func ptr): 0x401fb9a8
-	_cellShadowCount (func ptr): 0x401fb9c2
-	_pointCount (func ptr): 0x401fb9dc
-	_initialisePoints (func ptr): 0x401fba03
-	_mapElementIdToCellId (func ptr): 0x401fba84
-	_isInCell (func ptr): 0x401fbb11
-	_cellOf (func ptr): 0x401fbcf3
-	_getShadowInfo (func ptr): 0x401fbec5
-	mesh (ptr): 0x8099d58
-RandomParticleLayout (ptr): 0x809a9b0:
-PerCellParticleLayout (ptr): 0x809a9b0
-ParticleLayout (ptr): 0x809a9b0
-Stg_Class (ptr): 0x809a9b0
-	sizeOfSelf: 108
+	constructor function name: elementCellLayout-Construct
+	build function name: elementCellLayout-Build
+	initialise function name: elementCellLayout-Initialise
+	execute function name: elementCellLayout-Execute
+	destroy function name: elementCellLayout-Destroy
+	_cellLocalCount (func ptr): 0x2aaaabcd8808
+	_cellShadowCount (func ptr): 0x2aaaabcd882b
+	_pointCount (func ptr): 0x2aaaabcd884e
+	_initialisePoints (func ptr): 0x2aaaabcd8882
+	_mapElementIdToCellId (func ptr): 0x2aaaabcd8916
+	_isInCell (func ptr): 0x2aaaabcd8926
+	_cellOf (func ptr): 0x2aaaabcd8b7a
+	_getShadowInfo (func ptr): 0x2aaaabcd8dbb
+	mesh (ptr): 0x63e7d0
+RandomParticleLayout (ptr): 0x640150:
+PerCellParticleLayout (ptr): 0x640150
+ParticleLayout (ptr): 0x640150
+Stg_Class (ptr): 0x640150
+	sizeOfSelf: 232
 	_deleteSelf: Yes
 	type: RandomParticleLayout
-	_delete (func ptr): 0x40204c09
-	_print (func ptr): 0x40204c32
-	_copy (func ptr): 0x40204cc2
-	_setInitialCounts (func ptr): 0x40204091
-	_initialiseParticles (func ptr): 0x40204228
+	_delete (func ptr): 0x2aaaabce1e12
+	_print (func ptr): 0x2aaaabce1e31
+	_copy (func ptr): 0x2aaaabce1eb7
+	_setInitialCounts (func ptr): 0x2aaaabce1165
+	_initialiseParticles (func ptr): 0x2aaaabce131c
 	coordSystem: GlobalCoordSystem
 	weightsInitialisedAtStartup : False
-	_initialCount (func ptr): 0x40204e95
-	_initialiseParticlesOfCell (func ptr): 0x40204ea9
+	_initialCount (func ptr): 0x2aaaabce2098
+	_initialiseParticlesOfCell (func ptr): 0x2aaaabce20bb
 	cellParticleCount: 1
 	seed: 13
 	cellLocalCount: 72
 	cellDomainCount: 84
 	cellShadowCount: 12
-	cellPointCountTbl (ptr): 0x80a0ac8
+	cellPointCountTbl (ptr): 0x6483f0
 	cellPointCountTbl[0-84]: 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 008 
-	cellPointTbl (ptr): 0x80a0f80
+	cellPointTbl (ptr): 0x648a10
 	cellPointTbl[0-84]: {
 	cellPointTbl[0][0-8]: {0.5 0 0} {0.583 0 0} {0.583 0.0833 0} {0.5 0.0833 0} {0.5 0 1} {0.583 0 1} {0.583 0.0833 1} {0.5 0.0833 1} 
 	cellPointTbl[1][0-8]: {0.583 0 0} {0.667 0 0} {0.667 0.0833 0} {0.583 0.0833 0} {0.583 0 1} {0.667 0 1} {0.667 0.0833 1} {0.583 0.0833 1} 
@@ -173,11 +183,11 @@
 	cellPointTbl[83][0-8]: {0.417 0.917 0} {0.5 0.917 0} {0.5 1 0} {0.417 1 0} {0.417 0.917 1} {0.5 0.917 1} {0.5 1 1} {0.417 1 1} 
 }
 
-	cellParticleCountTbl (ptr): 0x80a1b60
+	cellParticleCountTbl (ptr): 0x64a1d0
 	cellParticleCountTbl[0-84]: 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 000 000 000 000 000 000 000 000 000 000 000 000 
-	cellParticleSizeTbl (ptr): 0x80a1cc0
+	cellParticleSizeTbl (ptr): 0x64a340
 	cellParticleSizeTbl[0-84]: 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 000 000 000 000 000 000 000 000 000 000 000 000 
-	cellParticleTbl (ptr): 0x80a1e20
+	cellParticleTbl (ptr): 0x64a4b0
 	cellParticleTbl [0-84]: {
 		cellParticleTbl[0][0-1]:
 			(part. index) 0
@@ -422,7 +432,7 @@
 	}
 	particlesArraySize: 75
 	particlesArrayDelta: 3
-	particlesArrayDelta: 0.05
+	extraParticlesFactor: 0.05
 
 Starting timestep 1:
 	Updating Particles positions in local cell 0:

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/plugins/testAdvection.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/plugins/testAdvection.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/plugins/testAdvection.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -156,7 +156,7 @@
 	ContextEP_Append( context, AbstractContext_EP_ConstructExtensions, construct );
 	ContextEP_Append( context, AbstractContext_EP_IC, storeOriginalPos );
 	ContextEP_Prepend( context, AbstractContext_EP_Step, check );
-	EP_AppendClassHook( Context_GetEntryPoint( context, FiniteElementContext_EP_SetDt ), dt, context );
+	EP_AppendClassHook( Context_GetEntryPoint( context, FiniteElementContext_EP_CalcDt ), dt, context );
 
 	Stream_RedirectFile_WithPrependedPath( stream, context->outputPath, "output.dat" );
 	Stream_SetPrintingRank( stream, 0 );

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/plugins/testMaterialFeVariable.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/plugins/testMaterialFeVariable.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/plugins/testMaterialFeVariable.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -76,7 +76,7 @@
 	assert(gaussSwarm);
 
 	material = materialFeVariable->material;
-	swarm = materialFeVariable->materialPoints;
+	swarm = materialFeVariable->picIntegrationPoints;
 
 	volumePIC = Material_Volume( material, swarm, centroid );
 	volumeFEM = FeVariable_Integrate( materialFeVariable, gaussSwarm );

Modified: long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/testMaterialFeVariable.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/testMaterialFeVariable.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/MaterialPoints/tests/testMaterialFeVariable.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -24,7 +24,7 @@
 			<param name="CentreY">0.0</param> 
 			<param name="CentreZ">0.0</param> 
 		</struct>		
-		<struct name="materialPointsParticleLayout">
+		<struct name="picIntegrationPointsParticleLayout">
 			<param name="Type">SpaceFillerParticleLayout</param>
 			<param name="totalInitialParticles">5000</param>
 		</struct>
@@ -40,7 +40,7 @@
 		<struct name="localLayout">
 			<param name="Type">MappedParticleLayout</param>
 		</struct>
-		<struct name="materialPoints">
+		<struct name="picIntegrationPoints">
 			<param name="Type">IntegrationPointsSwarm</param>
 			<param name="CellLayout">elementCellLayout</param>
 			<param name="ParticleLayout">localLayout</param>
@@ -51,13 +51,13 @@
 		</struct>
 		<struct name="mapper">
 			<param name="Type">CoincidentMapper</param>
-			<param name="IntegrationPointsSwarm">materialPoints</param>
+			<param name="IntegrationPointsSwarm">picIntegrationPoints</param>
 			<param name="MaterialPointsSwarm">materialSwarm</param>
 		</struct>
 		<struct name="materialSwarm">
 			<param name="Type">MaterialPointsSwarm</param>
 			<param name="CellLayout">elementCellLayout</param>
-			<param name="ParticleLayout">materialPointsParticleLayout</param>
+			<param name="ParticleLayout">picIntegrationPointsParticleLayout</param>
 			<param name="FiniteElement_Mesh">mesh-linear</param>
 		</struct>
 
@@ -72,7 +72,7 @@
 		</struct>		
 		<struct name="materialFeVariable">
 			<param name="Type">MaterialFeVariable</param>
-			<param name="Swarm">materialPoints</param>
+			<param name="Swarm">picIntegrationPoints</param>
 			<param name="Material">material</param>
 			<param name="Context">context</param>
 			<param name="Mesh">mesh-linear</param>

Modified: long/3D/Gale/trunk/src/PICellerator/PopulationControl/tests/plugins/testParticleCoords.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/PopulationControl/tests/plugins/testParticleCoords.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/PopulationControl/tests/plugins/testParticleCoords.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -68,7 +68,7 @@
 
 	Memory_Free( filename );
 
-	swarm = (Swarm*)            LiveComponentRegister_Get( context->CF->LCRegister, "materialPoints" );
+	swarm = (Swarm*)            LiveComponentRegister_Get( context->CF->LCRegister, "picIntegrationPoints" );
 	assert(swarm);
 
 	Swarm_PrintParticleCoords( swarm, stream );

Modified: long/3D/Gale/trunk/src/PICellerator/Utils/src/BuoyancyForceTerm.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Utils/src/BuoyancyForceTerm.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Utils/src/BuoyancyForceTerm.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -312,7 +312,7 @@
 	Particle_InCellIndex             cellParticleCount;
 	Element_NodeIndex                elementNodeCount;
 	Dimension_Index                  dim                = forceVector->dim;
-	IntegrationPointsSwarm*          swarm              = self->integrationSwarm;
+	IntegrationPointsSwarm*          swarm              = (IntegrationPointsSwarm*)self->integrationSwarm;
 	FiniteElement_Mesh*              mesh               = forceVector->feVariable->feMesh;
 	Node_ElementLocalIndex           eNode_I;
 	Cell_Index                       cell_I;
@@ -370,7 +370,7 @@
 		materialExt = ExtensionManager_Get( material->extensionMgr, material, self->materialExtHandle );
 
 		/* Calculate Force */
-		gravity = BuoyancyForceTerm_CalcGravity( self, swarm, lElement_I, particle );
+		gravity = BuoyancyForceTerm_CalcGravity( self, (Swarm*)swarm, lElement_I, particle );
 		force = - materialExt->density * gravity * (1.0 - materialExt->alpha * temperature);
 		factor = detJac * particle->weight * adjustFactor * force;
 

Modified: long/3D/Gale/trunk/src/PICellerator/Voronoi/src/CellularAutomataVoronoi.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Voronoi/src/CellularAutomataVoronoi.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Voronoi/src/CellularAutomataVoronoi.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -54,7 +54,7 @@
 #include <string.h>
 #include <math.h>
 
-#define UNCLAIMED                    ((unsigned int) -1)
+const unsigned int CELLULAR_AUTOMATA_UNCLAIMED = ((unsigned int) -1);
 #define NO_CHECK                     ((unsigned int) -2)
 #define VICTOR                       0
 #define LOSER                        1
@@ -339,7 +339,7 @@
 		particleToCheck = cell->particleToCheck;
 
 		/* If this cell is unclaimed - then claim it for this particle */
-		if ( claimedParticle == UNCLAIMED ) {
+		if ( claimedParticle == CELLULAR_AUTOMATA_UNCLAIMED ) {
 			cell->claimedParticle = particleToCheck;
 			CellularAutomataVoronoiCellList_AddCell( &self->cellsToGrow, cell );
 		}
@@ -535,7 +535,7 @@
 		Dimension_1DTo3D( vCell_I, resolution, ijk_I );
 		cell = &self->cellList[ vCell_I ];
 
-		cell->claimedParticle = UNCLAIMED;
+		cell->claimedParticle = CELLULAR_AUTOMATA_UNCLAIMED;
 		cell->particleToCheck = NO_CHECK;
 		cell->battleHistory.battleCount = 0;
 
@@ -617,7 +617,7 @@
 		cell = &self->cellList[ vCell_I ];
 
 		/* Check if there is another particle in this cell - Then do growing and checking stage before anything else */
-		if ( cell->claimedParticle != UNCLAIMED ) {
+		if ( cell->claimedParticle != CELLULAR_AUTOMATA_UNCLAIMED ) {
 			Particle_InCellIndex previousClaimedParticle = cell->claimedParticle;
 			CellularAutomataVoronoi_GrowCells( self );
 			CellularAutomataVoronoi_CheckCells( self );
@@ -658,7 +658,7 @@
 			Dimension_3DTo1D( vCell_IJK, self->resolution, &vCell_I );
 			cell = &self->cellList[ vCell_I ];
 
-			if ( cell->claimedParticle == UNCLAIMED ) {
+			if ( cell->claimedParticle == CELLULAR_AUTOMATA_UNCLAIMED ) {
 				if ( cell->particleToCheck == NO_CHECK ) {
 					c = ' ';
 				}

Modified: long/3D/Gale/trunk/src/PICellerator/Voronoi/src/CellularAutomataVoronoi.h
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Voronoi/src/CellularAutomataVoronoi.h	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Voronoi/src/CellularAutomataVoronoi.h	2006-06-28 09:56:23 UTC (rev 3897)
@@ -56,6 +56,8 @@
 	/* Textual name of this class */
 	extern const Type CellularAutomataVoronoi_Type;
 
+	extern const unsigned int CELLULAR_AUTOMATA_UNCLAIMED;
+
 	typedef Particle_InCellIndex                           BattlePair[2];
 
 	typedef struct {

Modified: long/3D/Gale/trunk/src/PICellerator/Weights/src/DiscreteVoronoiWeights.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Weights/src/DiscreteVoronoiWeights.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Weights/src/DiscreteVoronoiWeights.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -174,7 +174,15 @@
 	double                      detJac;	
 	Dimension_Index             dim             = swarm->dim;
 	Particle_InCellIndex        cParticle_I;
+	#ifdef CAUTIOUS
+	Stream*                     errorStream = Journal_Register( Error_Type, self->type );
+	#endif
 
+	/* If the cell has no particles of the current swarm - just return */
+	if ( swarm->cellParticleCountTbl[lCell_I] == 0) {
+		return;
+	}
+
 	WeightsCalculator_ZeroWeightsInCell( self, swarm, lCell_I );
 	elementType    = FeMesh_ElementTypeAt( feMesh, lCell_I );
 
@@ -183,7 +191,26 @@
 	claimedVoronoiCellsCount = self->discreteVoronoi->claimedCellCount;
 
 	for ( voronoiCell_I = 0 ; voronoiCell_I < claimedVoronoiCellsCount ; voronoiCell_I++ ) {
+		
 		cParticle_I = DiscreteVoronoi_GetParticleIndex( self->discreteVoronoi, voronoiCell_I );
+
+		#ifdef CAUTIOUS
+		Journal_Firewall( cParticle_I != CELLULAR_AUTOMATA_UNCLAIMED, errorStream,
+			"Error - in %s(): while calculating weights for swarm \"%s\", in local cell %u, "
+			"DiscreteVoronoi_GetParticleIndex() returned a cell particle index of UNCLAIMED for "
+			"voronoi cell %u, which suggestes Voronoi thinks this element is empty, however the "
+			"swarm's cellParticleCount for that element is %u.\n",
+			__func__, swarm->name, lCell_I, voronoiCell_I, 
+			swarm->cellParticleCountTbl[lCell_I] );
+			
+		Journal_Firewall( cParticle_I < swarm->cellParticleCountTbl[lCell_I], errorStream,
+			"Error - in %s(): while calculating weights for swarm \"%s\", in local cell %u, "
+			"DiscreteVoronoi_GetParticleIndex() returned a cell particle index of %u for "
+			"voronoi cell %u, which is >= the swarm's cellParticleCount for that cell of %u.\n",
+			__func__, swarm->name, lCell_I, cParticle_I, voronoiCell_I, 
+			swarm->cellParticleCountTbl[lCell_I] );
+		#endif
+		
 		particle = (IntegrationPoint*) Swarm_ParticleInCellAt( swarm, lCell_I, cParticle_I );
 
 		/* Calculate Volume for Voronoi Cell */

Modified: long/3D/Gale/trunk/src/PICellerator/Weights/src/VolumeWeights.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Weights/src/VolumeWeights.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Weights/src/VolumeWeights.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -164,13 +164,13 @@
 
 	shape = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Shape", Stg_Shape, True );
 	mesh  = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Mesh", FiniteElement_Mesh, True );
-
+/*
 	Journal_Firewall(
 			Stg_Class_IsInstance( shape, Sphere_Type ),
 			Journal_MyStream( Error_Type, self ),
 			"In func %s, VolumeWeights is only designed for spheres right now.\n",
 			__func__ );
-	
+*/	
 	_VolumeWeights_Init( self, shape, mesh );
 }
 
@@ -222,10 +222,10 @@
 
 	memcpy(&size, &(((IJKTopology*)self->mesh->layout->nodeLayout->topology)->size), sizeof(IJK) );
 	
-	dx = 1.0 / (double)size[0]; /* size of an element */
-	dy = 1.0 / (double)size[1];
+	dx = 1.0 / (double)(size[0] - 1); /* size of an element */
+	dy = 1.0 / (double)(size[1] - 1);
 	if ( self->dim > 2 ) {
-		dz = 1.0 / (double)size[2];
+		dz = 1.0 / (double)(size[2] - 1);
 	}
 	else {
 		dz = 1.0;

Modified: long/3D/Gale/trunk/src/PICellerator/Weights/src/WeightsCalculator.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Weights/src/WeightsCalculator.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Weights/src/WeightsCalculator.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -197,13 +197,62 @@
 	WeightsCalculator*   self           = (WeightsCalculator*)weightsCalculator;
 	Swarm*               swarm          = (Swarm*) _swarm;
 	Cell_LocalIndex	     cellLocalCount = swarm->cellLocalCount;
+	Cell_LocalIndex	     cellGlobalCount = 0;
 	Cell_LocalIndex	     lCell_I;
+	unsigned int         numberOfCompletionPrintIncrements=10;
+	double               completionRatioIncrement= 1 / (double)numberOfCompletionPrintIncrements;
+	double               nextCompletionRatioToPrint=0;
+	Cell_Index           nextCompletedCellCountToPrint=0;
+	Cell_Index           nextPlusOneCompletedCellCountToPrint=0;
+	Stream*              stream = Journal_Register( Info_Type, self->type );
+	Processor_Index      formerStreamPrintingRank = 0;
 
+	Journal_Printf( stream, "In func %s(): for swarm \"%s\"\n", __func__, swarm->name );
+	Stream_Indent( stream );
+	formerStreamPrintingRank = Stream_GetPrintingRank( stream );
+	Stream_SetPrintingRank( stream, 0 );
+	MPI_Reduce( &cellLocalCount, &cellGlobalCount, 1, MPI_UNSIGNED, MPI_SUM, 0, swarm->comm );
+	Journal_Printf( stream, "Calculating weights for the particles in the %u global cells\n",
+		cellGlobalCount );
+	Stream_Indent( stream );
+
+	nextCompletionRatioToPrint = completionRatioIncrement;
+	nextCompletedCellCountToPrint = ceil(cellLocalCount * nextCompletionRatioToPrint - 0.001 );
+
 	/* Loop over all local cells */
 	for ( lCell_I = 0 ; lCell_I < cellLocalCount ; lCell_I++ ) {
 /*		WeightsCalculator_CheckEmptyCell( self, swarm, lCell_I );*/
 		WeightsCalculator_CalculateCell( self, swarm, lCell_I );
+		// TODO: parallelise
+
+		if ( (lCell_I+1) >= nextCompletedCellCountToPrint ) {
+			nextPlusOneCompletedCellCountToPrint = ceil(( cellLocalCount
+				* (nextCompletionRatioToPrint + completionRatioIncrement )) - 0.001 );
+
+			while ( (lCell_I+1) >= nextPlusOneCompletedCellCountToPrint )
+			{
+				nextCompletionRatioToPrint += completionRatioIncrement;
+				nextPlusOneCompletedCellCountToPrint = ceil(( cellLocalCount
+					* (nextCompletionRatioToPrint + completionRatioIncrement )) - 0.001 );
+				if ( nextCompletionRatioToPrint >= 1.0 ) {
+					nextCompletionRatioToPrint = 1.0;
+					break;
+				}
+			}
+			Journal_Printf( stream, "done %.0f%% (%u cells)...\n", 
+				(nextCompletionRatioToPrint * 100),
+				lCell_I+1 );
+			nextCompletionRatioToPrint += completionRatioIncrement;
+			nextCompletedCellCountToPrint = ceil(cellLocalCount * nextCompletionRatioToPrint - 0.001);
+		}
 	}
+	Stream_UnIndent( stream );
+	/* Need this barrier so the time is accurate */
+	MPI_Barrier( swarm->comm );
+	Stream_SetPrintingRank( stream, formerStreamPrintingRank );
+	Stream_UnIndent( stream );
+	Journal_Printf( stream, "%s(): finished update of weights for swarm \"%s\"\n"
+		/*"\ttook %g secs\n"*/, __func__, swarm->name );
 }
 
 

Modified: long/3D/Gale/trunk/src/PICellerator/Weights/tests/plugins/testElementIntegral.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Weights/tests/plugins/testElementIntegral.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Weights/tests/plugins/testElementIntegral.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -105,7 +105,7 @@
 
 void PICellerator_testElementIntegral( DiscretisationContext* context ) {
 	Swarm*              integrationSwarm = (Swarm*)LiveComponentRegister_Get( context->CF->LCRegister, "swarm" );
-	Swarm*              materialSwarm    = (Swarm*)LiveComponentRegister_Get( context->CF->LCRegister, "materialPoints" );
+	Swarm*              materialSwarm    = (Swarm*)LiveComponentRegister_Get( context->CF->LCRegister, "picIntegrationPoints" );
 	FiniteElement_Mesh* mesh             = (FiniteElement_Mesh*) LiveComponentRegister_Get( context->CF->LCRegister, "mesh-linear" );
 	WeightsCalculator*  weights          = (WeightsCalculator*) LiveComponentRegister_Get( context->CF->LCRegister, "weights" );
 	FeVariable*         feVariable;

Modified: long/3D/Gale/trunk/src/PICellerator/Weights/tests/testElementIntegral.xml
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Weights/tests/testElementIntegral.xml	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/Weights/tests/testElementIntegral.xml	2006-06-28 09:56:23 UTC (rev 3897)
@@ -30,13 +30,13 @@
 		<struct name="mapper">
 			<param name="Type">CoincidentMapper</param>
 			<param name="IntegrationPointsSwarm">swarm</param>
-			<param name="MaterialPointsSwarm">materialPoints</param>
+			<param name="MaterialPointsSwarm">picIntegrationPoints</param>
 		</struct>
 		<struct name="particleLayout">
 			<param name="Type">RandomParticleLayout</param>
 			<param name="cellParticleCount">particleCount</param>
 		</struct>
-		<struct name="materialPoints">
+		<struct name="picIntegrationPoints">
 			<param name="Type">MaterialPointsSwarm</param>
 			<param name="CellLayout">elementCellLayout</param>
 			<param name="ParticleLayout">particleLayout</param>

Added: long/3D/Gale/trunk/src/PICellerator/plugins/Application/Application.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/plugins/Application/Application.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/plugins/Application/Application.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,175 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+**
+** Copyright (C), 2003-2006, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street,
+**	Melbourne, 3053, Australia.
+**
+** Primary Contributing Organisations:
+**	Victorian Partnership for Advanced Computing Ltd, Computational Software Development - http://csd.vpac.org
+**	Australian Computational Earth Systems Simulator - http://www.access.edu.au
+**	Monash Cluster Computing - http://www.mcc.monash.edu.au
+**	Computational Infrastructure for Geodynamics - http://www.geodynamics.org
+**
+** Contributors:
+**	Patrick D. Sunter, Software Engineer, VPAC. (pds at vpac.org)
+**	Robert Turnbull, Research Assistant, Monash University. (robert.turnbull at sci.monash.edu.au)
+**	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+**	David May, PhD Student, Monash University (david.may at sci.monash.edu.au)
+**	Louis Moresi, Associate Professor, Monash University. (louis.moresi at sci.monash.edu.au)
+**	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+**	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+**	Raquibul Hassan, Computational Engineer, VPAC. (raq at vpac.org)
+**	Julian Giordani, Research Assistant, Monash University. (julian.giordani at sci.monash.edu.au)
+**	Vincent Lemiale, Postdoctoral Fellow, Monash University. (vincent.lemiale at sci.monash.edu.au)
+**	Kent Humphries, Software Engineer, VPAC. (kenth at vpac.org)
+**
+**  This library is free software; you can redistribute it and/or
+**  modify it under the terms of the GNU Lesser General Public
+**  License as published by the Free Software Foundation; either
+**  version 2.1 of the License, or (at your option) any later version.
+**
+**  This library is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+**  Lesser General Public License for more details.
+**
+**  You should have received a copy of the GNU Lesser General Public
+**  License along with this library; if not, write to the Free Software
+**  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+**
+** $Id: StandardConditionFunctions.c 532 2006-04-04 00:21:59Z PatrickSunter $
+**
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+#ifdef HAVE_PYTHON
+#include <Python.h>
+#endif
+
+#include <mpi.h>
+//EP_APPLICATIONS_FINALISE defined in StGermain.h
+#include <StGermain/StGermain.h>
+//Must include StG_FEM library, but WON'T call Stg_FEM_Init in this plugin.
+#include <StG_FEM/StG_FEM.h>
+#include <PICellerator/PICellerator.h>
+#include "Application.h"
+
+#include <stdio.h>
+//for strcmp
+#include <string.h>
+
+//All StGermain Application Plugins should use this finalise.
+//char EP_APPLICATIONS_FINALISE[] = "StGermain_EP_ApplicationsFinalise";
+const Type PICellerator_Application_Type = "PICellerator_Application";
+
+void _PICellerator_Application_Construct( void* component, Stg_ComponentFactory* cf ) 
+ {
+	AbstractContext* currAbstractContext;
+	PICelleratorContext* context = NULL;
+	int tmp = 0;
+
+        AbstractContext* prevContext;
+        EntryPoint* applicationsFinalise_EP;
+
+	//Get the existing abstract context, as defined by StGermain.
+	//Get it up here, so the communicator can be used for messages.
+	prevContext = (AbstractContext*)Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True );
+
+	/* Ensures copyright info always come first in output */
+	MPI_Barrier( prevContext->communicator ); 
+
+        /* PICellerator's init message */
+        tmp = Stream_GetPrintingRank( Journal_Register( InfoStream_Type, "Context" ) );
+        Stream_SetPrintingRank( Journal_Register( InfoStream_Type, "Context" ), 0 );
+        Journal_Printf( /* DO NOT CHANGE OR REMOVE */
+                Journal_Register( InfoStream_Type, "Context" ),
+                "PICellerator revision %s. "
+		"Copyright (C) 2005 VPAC & Monash Cluster Computing.\n", 
+		    VERSION );
+        Stream_Flush( Journal_Register( InfoStream_Type, "Context" ) );
+        Stream_SetPrintingRank( Journal_Register( InfoStream_Type, "Context" ), tmp );
+
+	/* Ensures copyright info always come first in output */
+        MPI_Barrier( prevContext->communicator ); 
+
+	//Only need to initialise a new context, and copy all relevant registers over IF this is the first application
+	//plugin to be constructed.
+	//The first application plugin to be constructed is Guaranteed to have the 'largest' context.
+	//			(ie is an inherited child of ALL other application plugins about to be loaded)
+	if( prevContext->type == AbstractContext_Type )
+	{
+		//Set the existing abstract context.
+		currAbstractContext = prevContext;
+		//Create a new, empty PICelleratorContext.
+		context = PICelleratorContext_New( "context", 0, 0, currAbstractContext->communicator, cf->rootDict );
+	
+		context->dictionary = cf->rootDict;
+	
+		//Initialise Abstract parts of PICelleratorContext
+		_AbstractContext_Init((AbstractContext*)context, 0, 0, MPI_COMM_WORLD );
+		//Initialise Discretisation parts of PICelleratorContext
+		_DiscretisationContext_Init((DiscretisationContext*)context );
+		//Initialise FiniteElement parts of PICelleratorContext
+		_FiniteElementContext_Init( (FiniteElementContext*)context );
+		//Initialise PIcellerator parts of PICelleratorContext
+		_PICelleratorContext_Init( context );
+	
+	       	//Need to get the old CF from currAbstractContext, and use that in my new context.
+	        //Now I CANNOT delete this currAbstractContext or I'll lose the CF. :(
+	        context->CF = currAbstractContext->CF;
+
+	        //Need to get the LCRegister componentList, and replace the existing (abstract) context 
+		//with the newly created (PICellerator) context!!!
+	        Stg_ObjectList_Replace( context->CF->LCRegister->componentList,
+                                	((Stg_Component*) currAbstractContext)->name, 
+					KEEP, 
+					(Stg_Component*) context);
+	
+		//Recreate the registerRegister link in CF.
+		context->CF->registerRegister = context->register_Register;
+
+		//Create the EntryPoint for all application plugins' finalise functions to hook into.
+	        applicationsFinalise_EP = EntryPoint_New( EP_APPLICATIONS_FINALISE, EntryPoint_VoidPtr_CastType );
+	        EntryPoint_Register_Add(context->entryPoint_Register, (void*)applicationsFinalise_EP);
+
+	} //close of if(context->type == AbstractContext_Type)
+	else //prevContext was NOT an abstract context -> that is does NOT need to be replaced
+		context = (PICelleratorContext*) prevContext;
+
+
+        EntryPoint_Append( Context_GetEntryPoint( context, EP_APPLICATIONS_FINALISE ),
+                           "PICellerator App Finalise",
+                           PICellerator_Application_Finalise,
+                           "PICellerator_App_Construct" );
+}
+
+void PICellerator_Application_Finalise() 
+{
+	Stream* finaliseStream = 
+			Journal_Register(Info_Type, "PICellerator_Application");
+	Journal_Printf( finaliseStream, 
+		      "Finalised: Particle-In-Cellerator (FEM/PIC Framework).\n");
+
+	PICellerator_Finalise();
+}
+
+void* _PICellerator_Application_DefaultNew( Name name ) {
+	return Codelet_New(
+			PICellerator_Application_Type,
+			_PICellerator_Application_DefaultNew,
+			_PICellerator_Application_Construct,
+			_Codelet_Build,
+			_Codelet_Initialise,
+			_Codelet_Execute,
+			_Codelet_Destroy,
+			name );
+}
+
+Index PICellerator_Application_Register( PluginsManager* pluginsManager ) 
+{
+	//Initialise the PICellerator context.
+        PICellerator_Init( NULL, NULL);
+	#ifdef HAVE_PYTHON
+	Py_Initialize();
+	#endif
+
+	return PluginsManager_Submit( pluginsManager, PICellerator_Application_Type, "0", _PICellerator_Application_DefaultNew );
+}
+

Added: long/3D/Gale/trunk/src/PICellerator/plugins/Application/Application.h
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/plugins/Application/Application.h	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/plugins/Application/Application.h	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,64 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+**
+** Copyright (C), 2003-2006, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street,
+**	Melbourne, 3053, Australia.
+**
+** Primary Contributing Organisations:
+**	Victorian Partnership for Advanced Computing Ltd, Computational Software Development - http://csd.vpac.org
+**	Australian Computational Earth Systems Simulator - http://www.access.edu.au
+**	Monash Cluster Computing - http://www.mcc.monash.edu.au
+**	Computational Infrastructure for Geodynamics - http://www.geodynamics.org
+**
+** Contributors:
+**	Patrick D. Sunter, Software Engineer, VPAC. (pds at vpac.org)
+**	Robert Turnbull, Research Assistant, Monash University. (robert.turnbull at sci.monash.edu.au)
+**	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+**	David May, PhD Student, Monash University (david.may at sci.monash.edu.au)
+**	Louis Moresi, Associate Professor, Monash University. (louis.moresi at sci.monash.edu.au)
+**	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+**	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+**	Raquibul Hassan, Computational Engineer, VPAC. (raq at vpac.org)
+**	Julian Giordani, Research Assistant, Monash University. (julian.giordani at sci.monash.edu.au)
+**	Vincent Lemiale, Postdoctoral Fellow, Monash University. (vincent.lemiale at sci.monash.edu.au)
+**
+**  This library is free software; you can redistribute it and/or
+**  modify it under the terms of the GNU Lesser General Public
+**  License as published by the Free Software Foundation; either
+**  version 2.1 of the License, or (at your option) any later version.
+**
+**  This library is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+**  Lesser General Public License for more details.
+**
+**  You should have received a copy of the GNU Lesser General Public
+**  License along with this library; if not, write to the Free Software
+**  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+**
+*/
+/** \file
+** Role:
+**	Defines any header info, such as new structures, needed by this plugin
+**
+** Assumptions:
+**
+** Comments:
+**
+** $Id $
+**
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#ifndef __PICellerator_Application_h__
+#define __PICellerator_Application_h__
+
+extern const Type PICellerator_Application_Type;
+
+typedef struct {
+	__Codelet
+} PICellerator_Application;
+
+Index PICellerator_Application_Register( PluginsManager* pluginsManager );
+
+void PICellerator_Application_Finalise();
+
+#endif	

Added: long/3D/Gale/trunk/src/PICellerator/plugins/Application/makefile
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/plugins/Application/makefile	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/plugins/Application/makefile	2006-06-28 09:56:23 UTC (rev 3897)
@@ -0,0 +1,66 @@
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+##
+## Copyright (C), 2003-2006, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street,
+##	Melbourne, 3053, Australia.
+##
+## Primary Contributing Organisations:
+##	Victorian Partnership for Advanced Computing Ltd, Computational Software Development - http://csd.vpac.org
+##	Australian Computational Earth Systems Simulator - http://www.access.edu.au
+##	Monash Cluster Computing - http://www.mcc.monash.edu.au
+##	Computational Infrastructure for Geodynamics - http://www.geodynamics.org
+##
+## Contributors:
+##	Patrick D. Sunter, Software Engineer, VPAC. (pds at vpac.org)
+##	Robert Turnbull, Research Assistant, Monash University. (robert.turnbull at sci.monash.edu.au)
+##	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+##	David May, PhD Student, Monash University (david.may at sci.monash.edu.au)
+##	Louis Moresi, Associate Professor, Monash University. (louis.moresi at sci.monash.edu.au)
+##	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+##	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+##	Raquibul Hassan, Computational Engineer, VPAC. (raq at vpac.org)
+##	Julian Giordani, Research Assistant, Monash University. (julian.giordani at sci.monash.edu.au)
+##	Vincent Lemiale, Postdoctoral Fellow, Monash University. (vincent.lemiale at sci.monash.edu.au)
+##
+##  This library is free software; you can redistribute it and/or
+##  modify it under the terms of the GNU Lesser General Public
+##  License as published by the Free Software Foundation; either
+##  version 2.1 of the License, or (at your option) any later version.
+##
+##  This library is distributed in the hope that it will be useful,
+##  but WITHOUT ANY WARRANTY; without even the implied warranty of
+##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+##  Lesser General Public License for more details.
+##
+##  You should have received a copy of the GNU Lesser General Public
+##  License along with this library; if not, write to the Free Software
+##  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+##
+## $Id: makefile 535 2006-04-11 13:07:34Z PatrickSunter $
+##
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+SHELL := $(shell which bash)
+PROJ_ROOT := $(shell until test -r ./Makefile.system ; do cd .. ; done ; echo `pwd`)
+
+include ${PROJ_ROOT}/Makefile.system
+
+modName := $(shell basename `pwd` )
+modName := $(shell echo ${modName} | cut -c 1 | tr '[:lower:]' '[:upper:]' )$(shell echo ${modName} | cut -c 2- ) 
+
+mod = ${PROJECT}_${modName}
+includes = ${PROJECT}/${modName}
+
+SRCS = $(wildcard *.c)
+HDRS = $(wildcard *.h)
+
+EXTERNAL_LIBS = -lPICellerator ${EXPORT_DYNAMIC_LFLAGS}
+
+EXTERNAL_INCLUDES = -DMODULE_EXT=\"${MODULE_EXT}\"
+
+packages = STG_FEM STGERMAIN PETSC MPI XML MATH DL HYPRE
+
+ifdef HAVE_PYTHON
+        packages += PYTHON
+endif
+
+include ${PROJ_ROOT}/Makefile.vmake

Modified: long/3D/Gale/trunk/src/PICellerator/plugins/Output/MaterialCentroid/MaterialCentroid.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/plugins/Output/MaterialCentroid/MaterialCentroid.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/plugins/Output/MaterialCentroid/MaterialCentroid.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -59,11 +59,14 @@
 	Stream*                     stream                = Journal_Register( Info_Type, "MaterialCentroid" );
 
 	if (!beenHere) {
+		Name                 swarmName;
 		Name                 materialName;
 		Name                 filename;
 
+		swarmName = Dictionary_GetString_WithDefault( context->dictionary, "MaterialCentroid_Swarm", "picIntegrationPoints" );
+		
 		/* Get Swarm */
-		swarm = (IntegrationPointsSwarm*) LiveComponentRegister_Get( context->CF->LCRegister, "materialPoints" );
+		swarm = (IntegrationPointsSwarm*) LiveComponentRegister_Get( context->CF->LCRegister, swarmName );
 		assert( swarm );
 	
 		/* Get Material */

Modified: long/3D/Gale/trunk/src/PICellerator/src/main.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/src/main.c	2006-06-28 09:54:00 UTC (rev 3896)
+++ long/3D/Gale/trunk/src/PICellerator/src/main.c	2006-06-28 09:56:23 UTC (rev 3897)
@@ -106,9 +106,13 @@
 	if ( componentDict == NULL ) {
 		componentDict = Dictionary_New();
 	}
-
+	
 	context->CF = Stg_ComponentFactory_New( dictionary, componentDict, context->register_Register );
 
+	/*check components dictionary for double entries */
+	char* errMessage = "Component dictionary must have unique names\n";
+	CheckDictionaryKeys(componentDict, errMessage);
+	
 	LiveComponentRegister_Add( context->CF->LCRegister, (Stg_Component*) context );
 	PluginsManager_Load( context->plugins, context, dictionary );
 		
@@ -126,17 +130,18 @@
 	}	
 
 	/* Building phase ---------------------------------------------------------------------------------------------------*/
-	KeyCall( context, context->buildK, EntryPoint_VoidPtr_CallCast* )( KeyHandle(context,context->buildK), context );
+	//KeyCall( context, context->buildK, EntryPoint_VoidPtr_CallCast* )( KeyHandle(context,context->buildK), context );
+	Stg_Component_Build( context, 0 /* dummy */, False );
 	
 	/* Initialisaton phase ----------------------------------------------------------------------------------------------*/
-	Context_Initialise( context );
+	Stg_Component_Initialise( context, 0 /* dummy */, False );
 	
 	/* Run (Solve) phase ------------------------------------------------------------------------------------------------*/
 	AbstractContext_Dump( context );
-	Context_Run( context );		
+	Stg_Component_Execute( context, 0 /* dummy */, False );
 
 	/* Destruct phase ---------------------------------------------------------------------------------------------------*/
-	
+	Stg_Component_Destroy( context, 0 /* dummy */, False );
 	Stg_Class_Delete( context );
 	Stg_Class_Delete( dictionary );
 



More information about the Cig-commits mailing list