[cig-commits] r5670 - in long/3D/Gale/trunk/src/StGermain: . Discretisation/Mesh/src

walter at geodynamics.org walter at geodynamics.org
Fri Jan 5 11:36:37 PST 2007


Author: walter
Date: 2007-01-05 11:36:36 -0800 (Fri, 05 Jan 2007)
New Revision: 5670

Added:
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidAlgorithms.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidAlgorithms.h
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidAlgorithms.meta
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidType.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidType.h
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexAlgorithms.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexAlgorithms.h
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexAlgorithms.meta
Modified:
   long/3D/Gale/trunk/src/StGermain/
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Init.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh.h
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_Algorithms.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_Algorithms.h
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexType.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_RegularAlgorithms.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/types.h
Log:
 r3241 at earth (orig r3938):  LukeHodkinson | 2007-01-03 22:46:44 -0800
 Swapping some functionality previously housed in
 StgFEM to StGermain.
 
 



Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
   - 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:3196
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/branches/decomp3d/StGermain:3936
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3899
   + 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:3196
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/branches/decomp3d/StGermain:3938
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3899

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Init.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Init.c	2007-01-05 19:36:34 UTC (rev 5669)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Init.c	2007-01-05 19:36:36 UTC (rev 5670)
@@ -54,9 +54,12 @@
 	Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), 
 				   Mesh_Algorithms_Type, "0", (Stg_Component_DefaultConstructorFunction*)Mesh_Algorithms_New );
 	Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), 
-				   Mesh_RegularAlgorithms_Type, "0", 
-				   (Stg_Component_DefaultConstructorFunction*)Mesh_RegularAlgorithms_New );
+				   Mesh_HexAlgorithms_Type, "0", 
+				   (Stg_Component_DefaultConstructorFunction*)Mesh_HexAlgorithms_New );
 	Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), 
+				   Mesh_CentroidAlgorithms_Type, "0", 
+				   (Stg_Component_DefaultConstructorFunction*)Mesh_CentroidAlgorithms_New );
+	Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), 
 				   MeshTopology_Type, "0", (Stg_Component_DefaultConstructorFunction*)MeshTopology_New );
 	Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), 
 				   CartesianGenerator_Type, "0", (Stg_Component_DefaultConstructorFunction*)CartesianGenerator_New );
@@ -68,12 +71,13 @@
 				   MeshVariable_Type, "0", (Stg_Component_DefaultConstructorFunction*)MeshVariable_New );
 
 	RegisterParent( Mesh_Algorithms_Type, Stg_Component_Type );
-	RegisterParent( Mesh_RegularAlgorithms_Type, Mesh_Algorithms_Type );
+	RegisterParent( Mesh_HexAlgorithms_Type, Mesh_Algorithms_Type );
+	RegisterParent( Mesh_CentroidAlgorithms_Type, Mesh_Algorithms_Type );
 	RegisterParent( MeshTopology_Type, Stg_Component_Type );
 	RegisterParent( Mesh_Type, Stg_Component_Type );
 	RegisterParent( MeshGenerator_Type, Stg_Component_Type );
 	RegisterParent( CartesianGenerator_Type, MeshGenerator_Type );
-	RegisterParent( MeshAdaptor_Type, Stg_Component_Type );
+	RegisterParent( MeshAdaptor_Type, MeshGenerator_Type );
 	RegisterParent( SurfaceAdaptor_Type, MeshAdaptor_Type );
 	RegisterParent( MeshVariable_Type, Variable_Type );
 

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh.h	2007-01-05 19:36:34 UTC (rev 5669)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh.h	2007-01-05 19:36:36 UTC (rev 5670)
@@ -55,8 +55,11 @@
 	#include "MeshTopology.h"
 	#include "Mesh_ElementType.h"
 	#include "Mesh_HexType.h"
+	#include "Mesh_CentroidType.h"
 	#include "Mesh_Algorithms.h"
+	#include "Mesh_HexAlgorithms.h"
 	#include "Mesh_RegularAlgorithms.h"
+	#include "Mesh_CentroidAlgorithms.h"
 	#include "MeshClass.h"
 	#include "MeshGenerator.h"
 	#include "CartesianGenerator.h"

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_Algorithms.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_Algorithms.c	2007-01-05 19:36:34 UTC (rev 5669)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_Algorithms.c	2007-01-05 19:36:36 UTC (rev 5670)
@@ -69,7 +69,8 @@
 				     _Mesh_Algorithms_GetMinimumSeparation, 
 				     _Mesh_Algorithms_GetLocalCoordRange, 
 				     _Mesh_Algorithms_GetDomainCoordRange, 
-				     _Mesh_Algorithms_GetGlobalCoordRange );
+				     _Mesh_Algorithms_GetGlobalCoordRange, 
+				     _Mesh_Algorithms_Subsample );
 }
 
 Mesh_Algorithms* _Mesh_Algorithms_New( MESH_ALGORITHMS_DEFARGS ) {
@@ -89,6 +90,7 @@
 	self->getLocalCoordRangeFunc = getLocalCoordRangeFunc;
 	self->getDomainCoordRangeFunc = getDomainCoordRangeFunc;
 	self->getGlobalCoordRangeFunc = getGlobalCoordRangeFunc;
+	self->subsampleFunc = subsampleFunc;
 
 	/* Mesh_Algorithms info */
 	_Mesh_Algorithms_Init( self );
@@ -233,12 +235,12 @@
 			else {
 				unsigned	owner;
 
-				owner = Mesh_GetOwner( mesh, dim, ind );
+				owner = Mesh_GetOwner( mesh, dim, ind - Mesh_GetLocalSize( mesh, dim ) );
 
 				/* Find a shadow element owned by the other owner. */
 				for( inc_i = 0; inc_i < nInc; inc_i++ ) {
 					if( inc[inc_i] >= nLocalEls && 
-					    Mesh_GetOwner( mesh, nDims, inc[inc_i] ) == owner )
+					    Mesh_GetOwner( mesh, nDims, inc[inc_i] - nLocalEls ) == owner )
 					{
 						global = Mesh_DomainToGlobal( mesh, nDims, inc[inc_i] );
 						if( global < lowest )
@@ -381,7 +383,20 @@
 	FreeArray( localMax );
 }
 
+void _Mesh_Algorithms_Subsample( void* algorithms, void* dstMesh ) {
+	Stream*	errorStream = Journal_Register( ErrorStream_Type, "Mesh_Algorithms::Subsample" );
 
+	Journal_Firewall( 0, 
+			  errorStream, 
+			  "\n" \
+			  "**************************************************************\n" \
+			  "* Error: There is no general implentation for subsampling an *\n" \
+			  "*        arbitrary mesh yet.                                 *\n" \
+			  "**************************************************************\n" \
+			  "\n" );
+}
+
+
 /*--------------------------------------------------------------------------------------------------------------------------
 ** Public Functions
 */

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_Algorithms.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_Algorithms.h	2007-01-05 19:36:34 UTC (rev 5669)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_Algorithms.h	2007-01-05 19:36:36 UTC (rev 5670)
@@ -56,6 +56,7 @@
 	typedef void (Mesh_Algorithms_GetLocalCoordRangeFunc)( void* algorithms, double* min, double* max );
 	typedef void (Mesh_Algorithms_GetDomainCoordRangeFunc)( void* algorithms, double* min, double* max );
 	typedef void (Mesh_Algorithms_GetGlobalCoordRangeFunc)( void* algorithms, double* min, double* max );
+	typedef void (Mesh_Algorithms_SubsampleFunc)( void* algorithms, void* dstMesh );
 
 	/** Class contents */
 	#define __Mesh_Algorithms								\
@@ -72,6 +73,7 @@
 		Mesh_Algorithms_GetLocalCoordRangeFunc*		getLocalCoordRangeFunc;		\
 		Mesh_Algorithms_GetDomainCoordRangeFunc*	getDomainCoordRangeFunc;	\
 		Mesh_Algorithms_GetGlobalCoordRangeFunc*	getGlobalCoordRangeFunc;	\
+		Mesh_Algorithms_SubsampleFunc*			subsampleFunc;			\
 												\
 		/* Mesh_Algorithms info */							\
 		Mesh_Algorithms_NearestVertexFunc*	nearestVertex;				\
@@ -94,7 +96,8 @@
 		Mesh_Algorithms_GetMinimumSeparationFunc*	getMinimumSeparationFunc, 	\
 		Mesh_Algorithms_GetLocalCoordRangeFunc*		getLocalCoordRangeFunc,		\
 		Mesh_Algorithms_GetDomainCoordRangeFunc*	getDomainCoordRangeFunc,	\
-		Mesh_Algorithms_GetGlobalCoordRangeFunc*	getGlobalCoordRangeFunc
+		Mesh_Algorithms_GetGlobalCoordRangeFunc*	getGlobalCoordRangeFunc,	\
+		Mesh_Algorithms_SubsampleFunc*			subsampleFunc
 
 	#define MESH_ALGORITHMS_PASSARGS	\
 		STG_COMPONENT_PASSARGS, 	\
@@ -106,7 +109,8 @@
 		getMinimumSeparationFunc,	\
 		getLocalCoordRangeFunc, 	\
 		getDomainCoordRangeFunc, 	\
-		getGlobalCoordRangeFunc
+		getGlobalCoordRangeFunc, 	\
+		subsampleFunc
 
 	Mesh_Algorithms* Mesh_Algorithms_New( Name name );
 	Mesh_Algorithms* _Mesh_Algorithms_New( MESH_ALGORITHMS_DEFARGS );
@@ -135,6 +139,7 @@
 	void _Mesh_Algorithms_GetLocalCoordRange( void* algorithms, double* min, double* max );
 	void _Mesh_Algorithms_GetDomainCoordRange( void* algorithms, double* min, double* max );
 	void _Mesh_Algorithms_GetGlobalCoordRange( void* algorithms, double* min, double* max );
+	void _Mesh_Algorithms_Subsample( void* algorithms, void* dstMesh );
 
 	/*--------------------------------------------------------------------------------------------------------------------------
 	** Public functions
@@ -173,6 +178,9 @@
 		(assert( (algorithms) && ((Mesh_Algorithms*)algorithms)->getGlobalCoordRangeFunc ),	\
 		 ((Mesh_Algorithms*)algorithms)->getGlobalCoordRangeFunc( algorithms, min, max ))
 
+	#define Mesh_Algorithms_Subsample( self, dstMesh )		\
+		VirtualCall( self, subsampleFunc, self, dstMesh )
+
 	unsigned Mesh_Algorithms_NearestVertexWithNeighbours( void* algorithms, double* point );
 	unsigned Mesh_Algorithms_NearestVertexGeneral( void* algorithms, double* point );
 	Bool Mesh_Algorithms_SearchWithIncidence( void* algorithms, double* point, 

Added: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidAlgorithms.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidAlgorithms.c	2007-01-05 19:36:34 UTC (rev 5669)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidAlgorithms.c	2007-01-05 19:36:36 UTC (rev 5670)
@@ -0,0 +1,193 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+**
+** Copyright (C), 2003, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street, Melbourne, 3053, Australia.
+**
+** Authors:
+**	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+**	Patrick D. Sunter, Software Engineer, VPAC. (pds at vpac.org)
+**	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+**	Siew-Ching Tan, Software Engineer, VPAC. (siew at vpac.org)
+**	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+**	Raquibul Hassan, Computational Engineer, VPAC. (raq 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: Mesh_CentroidAlgorithms.c 3584 2006-05-16 11:11:07Z PatrickSunter $
+**
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <mpi.h>
+
+#include "Base/Base.h"
+#include "Discretisation/Geometry/Geometry.h"
+
+#include "Mesh.h"
+
+
+/* Textual name of this class */
+const Type Mesh_CentroidAlgorithms_Type = "Mesh_CentroidAlgorithms";
+
+/*----------------------------------------------------------------------------------------------------------------------------------
+** Constructors
+*/
+
+Mesh_CentroidAlgorithms* Mesh_CentroidAlgorithms_New( Name name ) {
+	return _Mesh_CentroidAlgorithms_New( sizeof(Mesh_CentroidAlgorithms), 
+					     Mesh_CentroidAlgorithms_Type, 
+					     _Mesh_CentroidAlgorithms_Delete, 
+					     _Mesh_CentroidAlgorithms_Print, 
+					     NULL, 
+					     (void* (*)(Name))_Mesh_CentroidAlgorithms_New, 
+					     _Mesh_CentroidAlgorithms_Construct, 
+					     _Mesh_CentroidAlgorithms_Build, 
+					     _Mesh_CentroidAlgorithms_Initialise, 
+					     _Mesh_CentroidAlgorithms_Execute, 
+					     _Mesh_CentroidAlgorithms_Destroy, 
+					     name, 
+					     NON_GLOBAL, 
+					     _Mesh_Algorithms_SetMesh, 
+					     Mesh_CentroidAlgorithms_Update, 
+					     Mesh_CentroidAlgorithms_NearestVertex, 
+					     Mesh_CentroidAlgorithms_Search, 
+					     Mesh_CentroidAlgorithms_SearchElements, 
+					     _Mesh_Algorithms_GetMinimumSeparation, 
+					     _Mesh_Algorithms_GetLocalCoordRange, 
+					     _Mesh_Algorithms_GetDomainCoordRange, 
+					     _Mesh_Algorithms_GetGlobalCoordRange, 
+					     _Mesh_Algorithms_Subsample );
+}
+
+Mesh_CentroidAlgorithms* _Mesh_CentroidAlgorithms_New( MESH_HEXALGORITHMS_DEFARGS ) {
+	Mesh_CentroidAlgorithms* self;
+	
+	/* Allocate memory */
+	assert( sizeOfSelf >= sizeof(Mesh_CentroidAlgorithms) );
+	self = (Mesh_CentroidAlgorithms*)_Mesh_Algorithms_New( MESH_ALGORITHMS_PASSARGS );
+
+	/* Virtual info */
+
+	/* Mesh_CentroidAlgorithms info */
+	_Mesh_CentroidAlgorithms_Init( self );
+
+	return self;
+}
+
+void _Mesh_CentroidAlgorithms_Init( Mesh_CentroidAlgorithms* self ) {
+	assert( self && Stg_CheckType( self, Mesh_CentroidAlgorithms ) );
+
+	self->elMesh = NULL;
+}
+
+
+/*----------------------------------------------------------------------------------------------------------------------------------
+** Virtual functions
+*/
+
+void _Mesh_CentroidAlgorithms_Delete( void* centroidAlgorithms ) {
+	Mesh_CentroidAlgorithms*	self = (Mesh_CentroidAlgorithms*)centroidAlgorithms;
+
+	/* Delete the parent. */
+	_Mesh_Algorithms_Delete( self );
+}
+
+void _Mesh_CentroidAlgorithms_Print( void* centroidAlgorithms, Stream* stream ) {
+	Mesh_CentroidAlgorithms*	self = (Mesh_CentroidAlgorithms*)centroidAlgorithms;
+	
+	/* Set the Journal for printing informations */
+	Stream* centroidAlgorithmsStream;
+	centroidAlgorithmsStream = Journal_Register( InfoStream_Type, "Mesh_CentroidAlgorithmsStream" );
+
+	/* Print parent */
+	Journal_Printf( stream, "Mesh_CentroidAlgorithms (ptr): (%p)\n", self );
+	_Mesh_Algorithms_Print( self, stream );
+}
+
+void _Mesh_CentroidAlgorithms_Construct( void* centroidAlgorithms, Stg_ComponentFactory* cf, void* data ) {
+}
+
+void _Mesh_CentroidAlgorithms_Build( void* centroidAlgorithms, void* data ) {
+}
+
+void _Mesh_CentroidAlgorithms_Initialise( void* centroidAlgorithms, void* data ) {
+}
+
+void _Mesh_CentroidAlgorithms_Execute( void* centroidAlgorithms, void* data ) {
+}
+
+void _Mesh_CentroidAlgorithms_Destroy( void* centroidAlgorithms, void* data ) {
+}
+
+void Mesh_CentroidAlgorithms_Update( void* centroidAlgorithms ) {
+}
+
+unsigned Mesh_CentroidAlgorithms_NearestVertex( void* centroidAlgorithms, double* point ) {
+	Mesh_CentroidAlgorithms*	self = (Mesh_CentroidAlgorithms*)centroidAlgorithms;
+	unsigned			elInd;
+
+	assert( self && Stg_CheckType( self, Mesh_CentroidAlgorithms ) );
+
+	if( Mesh_SearchElements( self->elMesh, point, &elInd ) ) {
+		unsigned	nInc, *inc;
+
+		Mesh_GetIncidence( self->elMesh, Mesh_GetDimSize( self->mesh ), elInd, MT_VERTEX, 
+				   &nInc, &inc );
+		assert( nInc == 1 );
+		return inc[0];
+	}
+	else
+		return _Mesh_Algorithms_NearestVertex( self, point );
+}
+
+Bool Mesh_CentroidAlgorithms_Search( void* centroidAlgorithms, double* point, 
+				     MeshTopology_Dim* dim, unsigned* ind )
+{
+	Mesh_CentroidAlgorithms*	self = (Mesh_CentroidAlgorithms*)centroidAlgorithms;
+
+	assert( self && Stg_CheckType( self, Mesh_CentroidAlgorithms ) );
+
+	return Mesh_Search( self->elMesh, point, dim, ind );
+}
+
+Bool Mesh_CentroidAlgorithms_SearchElements( void* centroidAlgorithms, double* point, 
+					     unsigned* elInd )
+{
+	Mesh_CentroidAlgorithms*	self = (Mesh_CentroidAlgorithms*)centroidAlgorithms;
+
+	assert( self && Stg_CheckType( self, Mesh_CentroidAlgorithms ) );
+
+	return Mesh_SearchElements( self->elMesh, point, elInd );
+}
+
+
+/*--------------------------------------------------------------------------------------------------------------------------
+** Public Functions
+*/
+
+void Mesh_CentroidAlgorithms_SetElementMesh( void* centroidAlgorithms, void* mesh ) {
+	Mesh_CentroidAlgorithms*	self = (Mesh_CentroidAlgorithms*)centroidAlgorithms;
+
+	assert( self && Stg_CheckType( self, Mesh_CentroidAlgorithms ) );
+
+	self->elMesh = mesh;
+}
+
+
+/*----------------------------------------------------------------------------------------------------------------------------------
+** Private Functions
+*/

Added: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidAlgorithms.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidAlgorithms.h	2007-01-05 19:36:34 UTC (rev 5669)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidAlgorithms.h	2007-01-05 19:36:36 UTC (rev 5670)
@@ -0,0 +1,104 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+**
+** Copyright (C), 2003, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street, Melbourne, 3053, Australia.
+**
+** Authors:
+**	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+**	Patrick D. Sunter, Software Engineer, VPAC. (pds at vpac.org)
+**	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+**	Siew-Ching Tan, Software Engineer, VPAC. (siew at vpac.org)
+**	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+**	Raquibul Hassan, Computational Engineer, VPAC. (raq 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
+**
+*/
+/** \file
+**  Role:
+**
+** Assumptions:
+**
+** Invariants:
+**
+** Comments:
+**
+** $Id: Mesh_CentroidAlgorithms.h 3584 2006-05-16 11:11:07Z PatrickSunter $
+**
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#ifndef __Discretisaton_Mesh_Mesh_CentroidAlgorithms_h__
+#define __Discretisaton_Mesh_Mesh_CentroidAlgorithms_h__
+
+	/** Textual name of this class */
+	extern const Type Mesh_CentroidAlgorithms_Type;
+
+	/** Virtual function types */
+
+	/** Class contents */
+	#define __Mesh_CentroidAlgorithms		\
+		/* General info */			\
+		__Mesh_Algorithms			\
+							\
+		/* Virtual info */			\
+							\
+		/* Mesh_CentroidAlgorithms info */	\
+		Mesh*			elMesh;
+
+	struct Mesh_CentroidAlgorithms { __Mesh_CentroidAlgorithms };
+
+	/*--------------------------------------------------------------------------------------------------------------------------
+	** Constructors
+	*/
+
+	#define MESH_HEXALGORITHMS_DEFARGS \
+		MESH_ALGORITHMS_DEFARGS
+
+	#define MESH_HEXALGORITHMS_PASSARGS \
+		MESH_ALGORITHMS_PASSARGS
+
+	Mesh_CentroidAlgorithms* Mesh_CentroidAlgorithms_New( Name name );
+	Mesh_CentroidAlgorithms* _Mesh_CentroidAlgorithms_New( MESH_HEXALGORITHMS_DEFARGS );
+	void _Mesh_CentroidAlgorithms_Init( Mesh_CentroidAlgorithms* self );
+
+	/*--------------------------------------------------------------------------------------------------------------------------
+	** Virtual functions
+	*/
+
+	void _Mesh_CentroidAlgorithms_Delete( void* centroidAlgorithms );
+	void _Mesh_CentroidAlgorithms_Print( void* centroidAlgorithms, Stream* stream );
+	void _Mesh_CentroidAlgorithms_Construct( void* centroidAlgorithms, Stg_ComponentFactory* cf, void* data );
+	void _Mesh_CentroidAlgorithms_Build( void* centroidAlgorithms, void* data );
+	void _Mesh_CentroidAlgorithms_Initialise( void* centroidAlgorithms, void* data );
+	void _Mesh_CentroidAlgorithms_Execute( void* centroidAlgorithms, void* data );
+	void _Mesh_CentroidAlgorithms_Destroy( void* centroidAlgorithms, void* data );
+
+	void Mesh_CentroidAlgorithms_Update( void* centroidAlgorithms );
+	unsigned Mesh_CentroidAlgorithms_NearestVertex( void* centroidAlgorithms, double* point );
+	Bool Mesh_CentroidAlgorithms_Search( void* centroidAlgorithms, double* point, 
+					     MeshTopology_Dim* dim, unsigned* ind );
+	Bool Mesh_CentroidAlgorithms_SearchElements( void* centroidAlgorithms, double* point, 
+						     unsigned* elInd );
+
+	/*--------------------------------------------------------------------------------------------------------------------------
+	** Public functions
+	*/
+
+	void Mesh_CentroidAlgorithms_SetElementMesh( void* centroidAlgorithms, void* mesh );
+
+	/*--------------------------------------------------------------------------------------------------------------------------
+	** Private Member functions
+	*/
+
+#endif /* __Discretisaton_Mesh_Mesh_CentroidAlgorithms_h__ */

Added: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidAlgorithms.meta
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidAlgorithms.meta	2007-01-05 19:36:34 UTC (rev 5669)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidAlgorithms.meta	2007-01-05 19:36:36 UTC (rev 5670)
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE StGermainData SYSTEM "stgermain.dtd">
+<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
+
+<param name="Name">Mesh_CentroidAlgorithms</param>
+<param name="Organisation">VPAC</param>
+<param name="Project">StGermain</param>
+<param name="Location">./StGermain/Discretisation/Utils/src/</param>
+<param name="Project Web">https://csd.vpac.org/twiki/bin/view/Stgermain/WebHome</param>
+<param name="Copyright">StGermain Framework. Copyright (C) 2003-2005 VPAC.</param>
+<param name="License">The Gnu Lesser General Public License http://www.gnu.org/licenses/lgpl.html</param>
+<param name="Parent">Stg_Component</param>
+<param name="Description">...</param>
+
+</StGermainData>

Added: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidType.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidType.c	2007-01-05 19:36:34 UTC (rev 5669)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidType.c	2007-01-05 19:36:36 UTC (rev 5670)
@@ -0,0 +1,158 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+**
+** Copyright (C), 2003, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street, Melbourne, 3053, Australia.
+**
+** Authors:
+**	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+**	Patrick D. Sunter, Software Engineer, VPAC. (pds at vpac.org)
+**	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+**	Siew-Ching Tan, Software Engineer, VPAC. (siew at vpac.org)
+**	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+**	Raquibul Hassan, Computational Engineer, VPAC. (raq 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: Mesh_CentroidType.c 3584 2006-05-16 11:11:07Z PatrickSunter $
+**
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <mpi.h>
+
+#include "Base/Base.h"
+#include "Discretisation/Geometry/Geometry.h"
+
+#include "types.h"
+#include "shortcuts.h"
+#include "Decomp.h"
+#include "Decomp_Sync.h"
+#include "MeshTopology.h"
+#include "Mesh_ElementType.h"
+#include "MeshClass.h"
+#include "Mesh_CentroidType.h"
+
+
+/* Textual name of this class */
+const Type Mesh_CentroidType_Type = "Mesh_CentroidType";
+
+
+/*----------------------------------------------------------------------------------------------------------------------------------
+** Constructors
+*/
+
+Mesh_CentroidType* Mesh_CentroidType_New( Name name ) {
+	return _Mesh_CentroidType_New( sizeof(Mesh_CentroidType), 
+				       Mesh_CentroidType_Type, 
+				       _Mesh_CentroidType_Delete, 
+				       _Mesh_CentroidType_Print, 
+				       NULL, 
+				       Mesh_CentroidType_ElementHasPoint, 
+				       Mesh_CentroidType_GetMinimumSeparation, 
+				       Mesh_CentroidType_GetCentroid );
+}
+
+Mesh_CentroidType* _Mesh_CentroidType_New( MESH_CENTROIDTYPE_DEFARGS ) {
+	Mesh_CentroidType* self;
+
+	/* Allocate memory */
+	assert( sizeOfSelf >= sizeof(Mesh_CentroidType) );
+	self = (Mesh_CentroidType*)_Mesh_ElementType_New( MESH_ELEMENTTYPE_PASSARGS );
+
+	/* Virtual info */
+
+	/* Mesh_CentroidType info */
+	_Mesh_CentroidType_Init( self );
+
+	return self;
+}
+
+void _Mesh_CentroidType_Init( Mesh_CentroidType* self ) {
+	assert( self && Stg_CheckType( self, Mesh_CentroidType ) );
+
+	self->elMesh = NULL;
+}
+
+
+/*----------------------------------------------------------------------------------------------------------------------------------
+** Virtual functions
+*/
+
+void _Mesh_CentroidType_Delete( void* elementType ) {
+	Mesh_CentroidType*	self = (Mesh_CentroidType*)elementType;
+
+	/* Delete the parent. */
+	_Mesh_ElementType_Delete( self );
+}
+
+void _Mesh_CentroidType_Print( void* elementType, Stream* stream ) {
+	Mesh_CentroidType*	self = (Mesh_CentroidType*)elementType;
+	Stream*			elementTypeStream;
+
+	elementTypeStream = Journal_Register( InfoStream_Type, "Mesh_CentroidTypeStream" );
+
+	/* Print parent */
+	Journal_Printf( stream, "Mesh_CentroidType (ptr): (%p)\n", self );
+	_Mesh_ElementType_Print( self, stream );
+}
+
+Bool Mesh_CentroidType_ElementHasPoint( void* centroidType, void* _mesh, unsigned elInd, double* point, 
+					MeshTopology_Dim* dim, unsigned* ind )
+{
+	Mesh_CentroidType*	self = (Mesh_CentroidType*)centroidType;
+
+	assert( self && Stg_CheckType( self, Mesh_CentroidType ) );
+
+	return Mesh_ElementHasPoint( self->elMesh, elInd, point, dim, ind );
+}
+
+double Mesh_CentroidType_GetMinimumSeparation( void* centroidType, void* mesh, unsigned elInd, double* perDim ) {
+	Mesh_CentroidType*	self = (Mesh_CentroidType*)centroidType;
+	Mesh_ElementType*	elType;
+
+	assert( self && Stg_CheckType( self, Mesh_CentroidType ) );
+
+	elType = Mesh_GetElementType( self->elMesh, elInd );
+
+	return Mesh_ElementType_GetMinimumSeparation( elType, self->elMesh, elInd, perDim );
+}
+
+void Mesh_CentroidType_GetCentroid( void* centroidType, void* mesh, unsigned element, double* centroid ) {
+	unsigned	nInc, *inc;
+
+	Mesh_GetIncidence( mesh, Mesh_GetDimSize( mesh ), element, MT_VERTEX, &nInc, &inc );
+	assert( nInc == 1 );
+	memcpy( centroid, Mesh_GetVertex( mesh, inc[0] ), Mesh_GetDimSize( mesh ) * sizeof(unsigned) );
+}
+
+
+/*--------------------------------------------------------------------------------------------------------------------------
+** Public Functions
+*/
+
+void Mesh_CentroidType_SetElementMesh( void* centroidType, void* mesh ) {
+	Mesh_CentroidType*	self = (Mesh_CentroidType*)centroidType;
+
+	assert( self && Stg_CheckType( self, Mesh_CentroidType ) );
+
+	self->elMesh = mesh;
+}
+
+
+/*----------------------------------------------------------------------------------------------------------------------------------
+** Private Functions
+*/

Added: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidType.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidType.h	2007-01-05 19:36:34 UTC (rev 5669)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_CentroidType.h	2007-01-05 19:36:36 UTC (rev 5670)
@@ -0,0 +1,97 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+**
+** Copyright (C), 2003, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street, Melbourne, 3053, Australia.
+**
+** Authors:
+**	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+**	Patrick D. Sunter, Software Engineer, VPAC. (pds at vpac.org)
+**	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+**	Siew-Ching Tan, Software Engineer, VPAC. (siew at vpac.org)
+**	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+**	Raquibul Hassan, Computational Engineer, VPAC. (raq 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
+**
+*/
+/** \file
+**  Role:
+**
+** Assumptions:
+**
+** Invariants:
+**
+** Comments:
+**
+** $Id: Mesh_CentroidType.h 3584 2006-05-16 11:11:07Z PatrickSunter $
+**
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#ifndef __Discretisaton_Mesh_Mesh_CentroidType_h__
+#define __Discretisaton_Mesh_Mesh_CentroidType_h__
+
+	/** Textual name of this class */
+	extern const Type Mesh_CentroidType_Type;
+
+	/** Virtual function types */
+
+	/** Class contents */
+	#define __Mesh_CentroidType			\
+		/* General info */			\
+		__Mesh_ElementType			\
+							\
+		/* Virtual info */			\
+							\
+		/* Mesh_CentroidType info */		\
+		Mesh*		elMesh;
+
+	struct Mesh_CentroidType { __Mesh_CentroidType };
+
+	/*--------------------------------------------------------------------------------------------------------------------------
+	** Constructors
+	*/
+
+	#define MESH_CENTROIDTYPE_DEFARGS		\
+		MESH_ELEMENTTYPE_DEFARGS
+
+	#define MESH_CENTROIDTYPE_PASSARGS		\
+		MESH_ELEMENTTYPE_PASSARGS
+
+	Mesh_CentroidType* Mesh_CentroidType_New();
+	Mesh_CentroidType* _Mesh_CentroidType_New( MESH_CENTROIDTYPE_DEFARGS );
+	void _Mesh_CentroidType_Init( Mesh_CentroidType* self );
+
+	/*--------------------------------------------------------------------------------------------------------------------------
+	** Virtual functions
+	*/
+
+	void _Mesh_CentroidType_Delete( void* centroidType );
+	void _Mesh_CentroidType_Print( void* centroidType, Stream* stream );
+
+	Bool Mesh_CentroidType_ElementHasPoint( void* centroidType, void* mesh, unsigned elInd, double* point, 
+					   MeshTopology_Dim* dim, unsigned* ind );
+	double Mesh_CentroidType_GetMinimumSeparation( void* centroidType, void* mesh, unsigned elInd, double* perDim );
+	void Mesh_CentroidType_GetCentroid( void* centroidType, void* mesh, unsigned element, double* centroid );
+
+	/*--------------------------------------------------------------------------------------------------------------------------
+	** Public functions
+	*/
+
+	void Mesh_CentroidType_SetElementMesh( void* centroidType, void* mesh );
+
+	/*--------------------------------------------------------------------------------------------------------------------------
+	** Private Member functions
+	*/
+
+#endif /* __Discretisaton_Mesh_Mesh_CentroidType_h__ */

Added: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexAlgorithms.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexAlgorithms.c	2007-01-05 19:36:34 UTC (rev 5669)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexAlgorithms.c	2007-01-05 19:36:36 UTC (rev 5670)
@@ -0,0 +1,147 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+**
+** Copyright (C), 2003, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street, Melbourne, 3053, Australia.
+**
+** Authors:
+**	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+**	Patrick D. Sunter, Software Engineer, VPAC. (pds at vpac.org)
+**	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+**	Siew-Ching Tan, Software Engineer, VPAC. (siew at vpac.org)
+**	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+**	Raquibul Hassan, Computational Engineer, VPAC. (raq 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: Mesh_HexAlgorithms.c 3584 2006-05-16 11:11:07Z PatrickSunter $
+**
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <mpi.h>
+
+#include "Base/Base.h"
+#include "Discretisation/Geometry/Geometry.h"
+
+#include "Mesh.h"
+
+
+/* Textual name of this class */
+const Type Mesh_HexAlgorithms_Type = "Mesh_HexAlgorithms";
+
+/*----------------------------------------------------------------------------------------------------------------------------------
+** Constructors
+*/
+
+Mesh_HexAlgorithms* Mesh_HexAlgorithms_New( Name name ) {
+	return _Mesh_HexAlgorithms_New( sizeof(Mesh_HexAlgorithms), 
+				     Mesh_HexAlgorithms_Type, 
+				     _Mesh_HexAlgorithms_Delete, 
+				     _Mesh_HexAlgorithms_Print, 
+				     NULL, 
+				     (void* (*)(Name))_Mesh_HexAlgorithms_New, 
+				     _Mesh_HexAlgorithms_Construct, 
+				     _Mesh_HexAlgorithms_Build, 
+				     _Mesh_HexAlgorithms_Initialise, 
+				     _Mesh_HexAlgorithms_Execute, 
+				     _Mesh_HexAlgorithms_Destroy, 
+				     name, 
+				     NON_GLOBAL, 
+				     _Mesh_Algorithms_SetMesh, 
+				     _Mesh_Algorithms_Update, 
+				     _Mesh_Algorithms_NearestVertex, 
+				     _Mesh_Algorithms_Search, 
+				     _Mesh_Algorithms_SearchElements, 
+				     _Mesh_Algorithms_GetMinimumSeparation, 
+				     _Mesh_Algorithms_GetLocalCoordRange, 
+				     _Mesh_Algorithms_GetDomainCoordRange, 
+				     _Mesh_Algorithms_GetGlobalCoordRange, 
+				     Mesh_HexAlgorithms_Subsample );
+}
+
+Mesh_HexAlgorithms* _Mesh_HexAlgorithms_New( MESH_HEXALGORITHMS_DEFARGS ) {
+	Mesh_HexAlgorithms* self;
+	
+	/* Allocate memory */
+	assert( sizeOfSelf >= sizeof(Mesh_HexAlgorithms) );
+	self = (Mesh_HexAlgorithms*)_Mesh_Algorithms_New( MESH_ALGORITHMS_PASSARGS );
+
+	/* Virtual info */
+
+	/* Mesh_HexAlgorithms info */
+	_Mesh_HexAlgorithms_Init( self );
+
+	return self;
+}
+
+void _Mesh_HexAlgorithms_Init( Mesh_HexAlgorithms* self ) {
+}
+
+
+/*----------------------------------------------------------------------------------------------------------------------------------
+** Virtual functions
+*/
+
+void _Mesh_HexAlgorithms_Delete( void* hexAlgorithms ) {
+	Mesh_HexAlgorithms*	self = (Mesh_HexAlgorithms*)hexAlgorithms;
+
+	/* Delete the parent. */
+	_Mesh_Algorithms_Delete( self );
+}
+
+void _Mesh_HexAlgorithms_Print( void* hexAlgorithms, Stream* stream ) {
+	Mesh_HexAlgorithms*	self = (Mesh_HexAlgorithms*)hexAlgorithms;
+	
+	/* Set the Journal for printing informations */
+	Stream* hexAlgorithmsStream;
+	hexAlgorithmsStream = Journal_Register( InfoStream_Type, "Mesh_HexAlgorithmsStream" );
+
+	/* Print parent */
+	Journal_Printf( stream, "Mesh_HexAlgorithms (ptr): (%p)\n", self );
+	_Mesh_Algorithms_Print( self, stream );
+}
+
+void _Mesh_HexAlgorithms_Construct( void* hexAlgorithms, Stg_ComponentFactory* cf, void* data ) {
+}
+
+void _Mesh_HexAlgorithms_Build( void* hexAlgorithms, void* data ) {
+}
+
+void _Mesh_HexAlgorithms_Initialise( void* hexAlgorithms, void* data ) {
+}
+
+void _Mesh_HexAlgorithms_Execute( void* hexAlgorithms, void* data ) {
+}
+
+void _Mesh_HexAlgorithms_Destroy( void* hexAlgorithms, void* data ) {
+}
+
+void Mesh_HexAlgorithms_Subsample( void* hexAlgorithms, void* dstMesh ) {
+	Mesh_HexAlgorithms*	self = (Mesh_HexAlgorithms*)hexAlgorithms;
+
+	assert( self && Stg_CheckType( self, Mesh_HexAlgorithms ) );
+}
+
+
+/*--------------------------------------------------------------------------------------------------------------------------
+** Public Functions
+*/
+
+
+/*----------------------------------------------------------------------------------------------------------------------------------
+** Private Functions
+*/

Added: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexAlgorithms.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexAlgorithms.h	2007-01-05 19:36:34 UTC (rev 5669)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexAlgorithms.h	2007-01-05 19:36:36 UTC (rev 5670)
@@ -0,0 +1,96 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+**
+** Copyright (C), 2003, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street, Melbourne, 3053, Australia.
+**
+** Authors:
+**	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+**	Patrick D. Sunter, Software Engineer, VPAC. (pds at vpac.org)
+**	Luke J. Hodkinson, Computational Engineer, VPAC. (lhodkins at vpac.org)
+**	Siew-Ching Tan, Software Engineer, VPAC. (siew at vpac.org)
+**	Alan H. Lo, Computational Engineer, VPAC. (alan at vpac.org)
+**	Raquibul Hassan, Computational Engineer, VPAC. (raq 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
+**
+*/
+/** \file
+**  Role:
+**
+** Assumptions:
+**
+** Invariants:
+**
+** Comments:
+**
+** $Id: Mesh_HexAlgorithms.h 3584 2006-05-16 11:11:07Z PatrickSunter $
+**
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#ifndef __Discretisaton_Mesh_Mesh_HexAlgorithms_h__
+#define __Discretisaton_Mesh_Mesh_HexAlgorithms_h__
+
+	/** Textual name of this class */
+	extern const Type Mesh_HexAlgorithms_Type;
+
+	/** Virtual function types */
+
+	/** Class contents */
+	#define __Mesh_HexAlgorithms			\
+		/* General info */			\
+		__Mesh_Algorithms			\
+							\
+		/* Virtual info */			\
+							\
+		/* Mesh_HexAlgorithms info */
+
+	struct Mesh_HexAlgorithms { __Mesh_HexAlgorithms };
+
+	/*--------------------------------------------------------------------------------------------------------------------------
+	** Constructors
+	*/
+
+	#define MESH_HEXALGORITHMS_DEFARGS \
+		MESH_ALGORITHMS_DEFARGS
+
+	#define MESH_HEXALGORITHMS_PASSARGS \
+		MESH_ALGORITHMS_PASSARGS
+
+	Mesh_HexAlgorithms* Mesh_HexAlgorithms_New( Name name );
+	Mesh_HexAlgorithms* _Mesh_HexAlgorithms_New( MESH_HEXALGORITHMS_DEFARGS );
+	void _Mesh_HexAlgorithms_Init( Mesh_HexAlgorithms* self );
+
+	/*--------------------------------------------------------------------------------------------------------------------------
+	** Virtual functions
+	*/
+
+	void _Mesh_HexAlgorithms_Delete( void* hexAlgorithms );
+	void _Mesh_HexAlgorithms_Print( void* hexAlgorithms, Stream* stream );
+	void _Mesh_HexAlgorithms_Construct( void* hexAlgorithms, Stg_ComponentFactory* cf, void* data );
+	void _Mesh_HexAlgorithms_Build( void* hexAlgorithms, void* data );
+	void _Mesh_HexAlgorithms_Initialise( void* hexAlgorithms, void* data );
+	void _Mesh_HexAlgorithms_Execute( void* hexAlgorithms, void* data );
+	void _Mesh_HexAlgorithms_Destroy( void* hexAlgorithms, void* data );
+
+	void Mesh_HexAlgorithms_Subsample( void* hexAlgorithms, void* dstMesh );
+
+	/*--------------------------------------------------------------------------------------------------------------------------
+	** Public functions
+	*/
+
+	/*--------------------------------------------------------------------------------------------------------------------------
+	** Private Member functions
+	*/
+
+#endif /* __Discretisaton_Mesh_Mesh_HexAlgorithms_h__ */

Added: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexAlgorithms.meta
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexAlgorithms.meta	2007-01-05 19:36:34 UTC (rev 5669)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexAlgorithms.meta	2007-01-05 19:36:36 UTC (rev 5670)
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE StGermainData SYSTEM "stgermain.dtd">
+<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
+
+<param name="Name">Mesh_HexAlgorithms</param>
+<param name="Organisation">VPAC</param>
+<param name="Project">StGermain</param>
+<param name="Location">./StGermain/Discretisation/Utils/src/</param>
+<param name="Project Web">https://csd.vpac.org/twiki/bin/view/Stgermain/WebHome</param>
+<param name="Copyright">StGermain Framework. Copyright (C) 2003-2005 VPAC.</param>
+<param name="License">The Gnu Lesser General Public License http://www.gnu.org/licenses/lgpl.html</param>
+<param name="Parent">Stg_Component</param>
+<param name="Description">...</param>
+
+</StGermainData>

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexType.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexType.c	2007-01-05 19:36:34 UTC (rev 5669)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_HexType.c	2007-01-05 19:36:36 UTC (rev 5670)
@@ -111,7 +111,7 @@
 	FreeArray( self->tetInds );
 
 	/* Delete the parent. */
-	_Stg_Class_Delete( self );
+	_Mesh_ElementType_Delete( self );
 }
 
 void _Mesh_HexType_Print( void* elementType, Stream* stream ) {
@@ -122,7 +122,7 @@
 
 	/* Print parent */
 	Journal_Printf( stream, "Mesh_HexType (ptr): (%p)\n", self );
-	_Stg_Class_Print( self, stream );
+	_Mesh_ElementType_Print( self, stream );
 }
 
 

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_RegularAlgorithms.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_RegularAlgorithms.c	2007-01-05 19:36:34 UTC (rev 5669)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Mesh_RegularAlgorithms.c	2007-01-05 19:36:36 UTC (rev 5670)
@@ -69,7 +69,8 @@
 					    _Mesh_Algorithms_GetMinimumSeparation, 
 					    _Mesh_Algorithms_GetLocalCoordRange, 
 					    _Mesh_Algorithms_GetDomainCoordRange, 
-					    _Mesh_Algorithms_GetGlobalCoordRange );
+					    _Mesh_Algorithms_GetGlobalCoordRange, 
+					    _Mesh_Algorithms_Subsample );
 }
 
 Mesh_RegularAlgorithms* _Mesh_RegularAlgorithms_New( MESH_REGULARALGORITHMS_DEFARGS ) {

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/types.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/types.h	2007-01-05 19:36:34 UTC (rev 5669)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/types.h	2007-01-05 19:36:36 UTC (rev 5670)
@@ -136,8 +136,11 @@
 	typedef struct MeshTopology			MeshTopology;
 	typedef struct Mesh_ElementType			Mesh_ElementType;
 	typedef struct Mesh_HexType			Mesh_HexType;
+	typedef struct Mesh_CentroidType		Mesh_CentroidType;
 	typedef struct Mesh_Algorithms			Mesh_Algorithms;
+	typedef struct Mesh_HexAlgorithms		Mesh_HexAlgorithms;
 	typedef struct Mesh_RegularAlgorithms		Mesh_RegularAlgorithms;
+	typedef struct Mesh_CentroidAlgorithms		Mesh_CentroidAlgorithms;
 	typedef struct Mesh				Mesh;
 	typedef struct MeshGenerator			MeshGenerator;
 	typedef struct CartesianGenerator		CartesianGenerator;



More information about the cig-commits mailing list