[cig-commits] commit: merging changes for meta files

Mercurial hg at geodynamics.org
Mon Nov 24 11:35:30 PST 2008


changeset:   132:a7c1a91e1ea8
branch:      v1.2.x
parent:      128:f622818b56a4
parent:      131:32e3e7405781
user:        Julian Giordani <julian.giordani at sci.monash.edu.au>
date:        Wed Nov 05 14:51:19 2008 +1100
description:
merging changes for meta files


diff -r f622818b56a4 -r a7c1a91e1ea8 MaterialPoints/src/IntegrationPointMapper.meta
--- a/MaterialPoints/src/IntegrationPointMapper.meta	Wed Nov 05 12:25:14 2008 +1100
+++ b/MaterialPoints/src/IntegrationPointMapper.meta	Wed Nov 05 14:51:19 2008 +1100
@@ -13,10 +13,7 @@
 <param name="Parent">Stg_Component</param>
 <param name="Reference">...</param>
 <param name="Summary">...</param>
-<param name="Description">...</param>
-
-<!--Now the interesting stuff-->
-
+<param name="Description">IntegrationPointMapper is an abstract class which enables a mapping between PIC integration points (used for assembly of numerical objects) and material points (advecting particle which store the constitutive information of the fluid). This abstract class defines basic data structures and methods which all mappers have in common, thus this is a handy API for developers.</param>
 
 <list name="Params">
 
@@ -27,12 +24,11 @@
 		<param name="Essential">True</param>
 		<param name="Name">IntegrationPointsSwarm</param>
 		<param name="Type">IntegrationPointsSwarm</param>
-		<param name="Description">...</param>
+		<param name="Description">The integration point swarm, which will me mapped.</param>
 	</struct>
 
 
 </list>
-<!-- Add an exmaple XML if possible -->
-<param name="Example">...</param>
+<param name="Example">N/A</param>
 
 </StGermainData>
diff -r f622818b56a4 -r a7c1a91e1ea8 MaterialPoints/src/IntegrationPointsSwarm.meta
--- a/MaterialPoints/src/IntegrationPointsSwarm.meta	Wed Nov 05 12:25:14 2008 +1100
+++ b/MaterialPoints/src/IntegrationPointsSwarm.meta	Wed Nov 05 14:51:19 2008 +1100
@@ -15,8 +15,6 @@
 <param name="Summary">...</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>
@@ -56,6 +54,18 @@ it with the physical material swarm(s) o
 	</struct>
 
 </list>
-<param name="Example">...</param>
+<param name="Example">
+<![CDATA[
+	<struct name="picIntegrationPoints">
+		<param name="Type">IntegrationPointsSwarm</param>
+		<param name="CellLayout">elementCellLayout</param>
+		<param name="ParticleLayout">localLayout</param>
+		<param name="FeMesh">elementMesh</param>
+		<param name="WeightsCalculator">weights</param>
+		<param name="TimeIntegrator">timeIntegrator</param>
+		<param name="IntegrationPointMapper">mapper</param>
+	</struct>
+	]]>
+</param>
 
 </StGermainData>
diff -r f622818b56a4 -r a7c1a91e1ea8 MaterialPoints/src/MaterialPointsSwarm.meta
--- a/MaterialPoints/src/MaterialPointsSwarm.meta	Wed Nov 05 12:25:14 2008 +1100
+++ b/MaterialPoints/src/MaterialPointsSwarm.meta	Wed Nov 05 14:51:19 2008 +1100
@@ -14,11 +14,10 @@
 <param name="Reference">...</param>
 <param name="Summary">...</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.
+and can be population controlled for load balancing purposes. This component adds 2 variables to a generic swarm point data structure: <br/>
+(1) the global position: called "PositionX", "PositionY", "PositionZ"<br/>
+(2) the material index of the point: called "MaterialIndex".
 </param>
-
-<!--Now the interesting stuff-->
-
 
 <list name="Params">
 </list>
@@ -59,7 +58,26 @@ and can be population controlled for loa
 		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>
+<param name="Example">
+
+<![CDATA[
+	<struct name="materialSwarm">
+		<param name="Type">MaterialPointsSwarm</param>
+		<param name="CellLayout">elementCellLayout</param>
+		<param name="ParticleLayout">materialSwarmParticleLayout</param>
+		<param name="FeMesh">elementMesh</param>
+		<!-- this list comes from a swarm definition -->
+		<list name="ParticleCommHandlers">
+			<param>pMovementHandler</param>
+			<param>pShadowSync</param>
+		</list>
+
+		<!-- These guys may or may not be created -->
+		<param name="SplittingRoutine">splittingRoutine</param>
+		<param name="RemovalRoutine">removalRoutine</param>
+		<param name="EscapedRoutine">escapedRoutine</param>
+	</struct>
+	]]>
+</param>
 
 </StGermainData>
diff -r f622818b56a4 -r a7c1a91e1ea8 MaterialPoints/src/ParticleFeVariable.c
--- a/MaterialPoints/src/ParticleFeVariable.c	Wed Nov 05 12:25:14 2008 +1100
+++ b/MaterialPoints/src/ParticleFeVariable.c	Wed Nov 05 14:51:19 2008 +1100
@@ -225,13 +225,10 @@ void _ParticleFeVariable_Build( void* ma
 	ParticleFeVariable* self = (ParticleFeVariable*) materialFeVariable;
 	int dataSize;
 
+	ForceTerm_SetAssembleElementFunction( self->assemblyTerm, ParticleFeVariable_AssembleElement );
 #if 0
 	if( self->useDeriv )
-#endif
 	   ForceTerm_SetAssembleElementFunction( self->assemblyTerm, ParticleFeVariable_AssembleElement_Deriv );
-#if 0
-	else
-	   ForceTerm_SetAssembleElementFunction( self->assemblyTerm, ParticleFeVariable_AssembleElement );
 #endif
 	
 	Stg_Component_Build( self->feMesh, data, False );
@@ -322,7 +319,8 @@ void ParticleFeVariable_AssembleElement(
 	Node_Index                 node_I;
 	Dof_Index                  dofCount          = self->fieldComponentCount;
 	Dof_Index                  dof_I;
-	double                     shapeFunc[8];
+	Dof_Index                  dim               = self->dim;
+	double                     shapeFunc[8], detJac;
 	double                     particleValue[9];
 
 	cellParticleCount = swarm->cellParticleCountTbl[ cell_I ];
@@ -334,16 +332,55 @@ void ParticleFeVariable_AssembleElement(
 		self->currentParticleIndex = swarm->cellParticleTbl[cell_I][cParticle_I];
 		ParticleFeVariable_ValueAtParticle( self, swarm, lElement_I, particle, particleValue );
 
+		/* get shape function and detJac */
 		ElementType_EvaluateShapeFunctionsAt( elementType, particle->xi, shapeFunc );
+		detJac = ElementType_JacobianDeterminant( elementType, mesh, lElement_I, particle->xi, dim );
 
 		for ( dof_I = 0 ; dof_I < dofCount ; dof_I++ ) {
 			for ( node_I = 0 ; node_I < elementNodeCount ; node_I++ ) {
-				elForceVector[ node_I * dofCount + dof_I ] += shapeFunc[ node_I ] * particleValue[ dof_I ]; 
+				elForceVector[ node_I * dofCount + dof_I ] += particle->weight * detJac * shapeFunc[ node_I ] * particleValue[ dof_I ]; 
 			}
 		}
 	}
 }
 
+void ParticleFeVariable_AssembleElementShapeFunc( void* _forceTerm, ForceVector* forceVector, Element_LocalIndex lElement_I, double* elForceVector ) {
+	ForceTerm*                 forceTerm         = (ForceTerm*) _forceTerm;
+	ParticleFeVariable*        self              = Stg_CheckType( forceVector->feVariable, ParticleFeVariable );
+	Swarm*                     swarm             = forceTerm->integrationSwarm;
+	FeMesh*        		   mesh              = self->feMesh;
+	Element_NodeIndex          elementNodeCount  = FeMesh_GetElementNodeSize( mesh, lElement_I );
+	ElementType*               elementType       = FeMesh_GetElementType( mesh, lElement_I );
+	Cell_Index                 cell_I            = CellLayout_MapElementIdToCellId( swarm->cellLayout, lElement_I );
+	int                        dim = Mesh_GetDimSize( mesh );
+	Particle_InCellIndex       cellParticleCount;
+	Particle_InCellIndex       cParticle_I;
+	IntegrationPoint*          particle;
+	double                     detJac;
+	double                     shapeFunc[8];
+	Node_Index                 node_I;
+	Dof_Index                  dofCount          = self->fieldComponentCount;
+	Dof_Index                  dof_I;
+
+	cellParticleCount = swarm->cellParticleCountTbl[ cell_I ];
+	
+	for( cParticle_I = 0 ; cParticle_I < cellParticleCount; cParticle_I++ ) {
+		/* Find this particle in the element */
+		particle = (IntegrationPoint*) Swarm_ParticleInCellAt( swarm, cell_I, cParticle_I );
+
+		ElementType_EvaluateShapeFunctionsAt( elementType, particle->xi, shapeFunc );
+		detJac = ElementType_JacobianDeterminant( elementType, mesh, lElement_I, particle->xi, dim );
+
+		for ( dof_I = 0 ; dof_I < dofCount ; dof_I++ ) {
+			for ( node_I = 0 ; node_I < elementNodeCount ; node_I++ ) {
+			   elForceVector[ node_I * dofCount + dof_I ] += particle->weight * detJac * shapeFunc[node_I];
+			}
+		}
+	}
+}
+
+#if 0
+Commented out 31Oct08, by Julian. I don't think this is the way this guy should work
 void ParticleFeVariable_AssembleElement_Deriv( void* _forceTerm, ForceVector* forceVector, Element_LocalIndex lElement_I, double* elForceVector ) 
 {
 	ForceTerm*                 forceTerm         = (ForceTerm*) _forceTerm;
@@ -383,44 +420,6 @@ void ParticleFeVariable_AssembleElement_
 			}
 		}
 	}
-
 	Memory_Free( self->GNx );
 }
-
-void ParticleFeVariable_AssembleElementShapeFunc( void* _forceTerm, ForceVector* forceVector, Element_LocalIndex lElement_I, double* elForceVector ) 
-{
-	ForceTerm*                 forceTerm         = (ForceTerm*) _forceTerm;
-	ParticleFeVariable*        self              = Stg_CheckType( forceVector->feVariable, ParticleFeVariable );
-	Swarm*                     swarm             = forceTerm->integrationSwarm;
-	FeMesh*        		   mesh              = self->feMesh;
-	Element_NodeIndex          elementNodeCount  = FeMesh_GetElementNodeSize( mesh, lElement_I );
-	ElementType*               elementType       = FeMesh_GetElementType( mesh, lElement_I );
-	Cell_Index                 cell_I            = CellLayout_MapElementIdToCellId( swarm->cellLayout, lElement_I );
-	int                        dim = Mesh_GetDimSize( mesh );
-	Particle_InCellIndex       cellParticleCount;
-	Particle_InCellIndex       cParticle_I;
-	IntegrationPoint*          particle;
-	double                     detJac;
-	Node_Index                 node_I;
-	Dof_Index                  dofCount          = self->fieldComponentCount;
-	Dof_Index                  dof_I;
-
-	self->GNx = Memory_Alloc_2DArray( double, dim, elementNodeCount, "GNx" );
-	cellParticleCount = swarm->cellParticleCountTbl[ cell_I ];
-	
-	for( cParticle_I = 0 ; cParticle_I < cellParticleCount; cParticle_I++ ) {
-		/* Find this particle in the element */
-		particle = (IntegrationPoint*) Swarm_ParticleInCellAt( swarm, cell_I, cParticle_I );
-
-		ElementType_ShapeFunctionsGlobalDerivs( elementType, mesh, lElement_I,
-							particle->xi, dim, &detJac, self->GNx );
-
-		for ( dof_I = 0 ; dof_I < dofCount ; dof_I++ ) {
-			for ( node_I = 0 ; node_I < elementNodeCount ; node_I++ ) {
-			   elForceVector[ node_I * dofCount + dof_I ] += particle->weight * detJac;
-			}
-		}
-	}
-
-	Memory_Free( self->GNx );
-}
+#endif
diff -r f622818b56a4 -r a7c1a91e1ea8 MaterialPoints/src/ParticleFeVariable.meta
--- a/MaterialPoints/src/ParticleFeVariable.meta	Wed Nov 05 12:25:14 2008 +1100
+++ b/MaterialPoints/src/ParticleFeVariable.meta	Wed Nov 05 14:51:19 2008 +1100
@@ -13,10 +13,7 @@
 <param name="Parent">FeVariable</param>
 <param name="Reference">...</param>
 <param name="Summary">...</param>
-<param name="Description">...</param>
-
-<!--Now the interesting stuff-->
-
+<param name="Description">An abstract class which maps particle variables onto a mesh through the operator $\hat{\phi} = \frac{\sum_{n}N(\zeta)\phi(\zeta)}{\sum_{n}N(\zeta)}$<br/>, where $\hat{\phi}$ is the new mesh variable, $N$ are shape functions and $\phi$ is a particle value. <br/>This class sets up a domain-wide massMatrix (really a vector), forceVector and solutionVector. The massMatrix is the denominator of the equation, while the foceVector is the numerator. <br>This variable is evaluated at the end of the Solve_EP</param>
 
 <list name="Params">
 
@@ -27,32 +24,23 @@
 		<param name="Essential">True</param>
 		<param name="Name">Swarm</param>
 		<param name="Type">Swarm</param>
-		<param name="Description">...</param>
+		<param name="Description">The swarm to take shape function and particle values from</param>
 	</struct>
-
-<!-- PLEASE, check the above struct information is accurate, in line number 162 of the c file and then remove this comment afterwards -->
 
 	<struct>
 		<param name="Essential">True</param>
 		<param name="Name">Context</param>
 		<param name="Type">FiniteElementContext</param>
-		<param name="Description">...</param>
+		<param name="Description">The context, is required for adding an EP</param>
 	</struct>
-
-<!-- PLEASE, check the above struct information is accurate, in line number 163 of the c file and then remove this comment afterwards -->
 
 	<struct>
 		<param name="Essential">True</param>
 		<param name="Name">Mesh</param>
 		<param name="Type">FeMesh</param>
-		<param name="Description">...</param>
+		<param name="Description">The mesh to map the particle values to.</param>
 	</struct>
-
-<!-- PLEASE, check the above struct information is accurate, in line number 164 of the c file and then remove this comment afterwards -->
-
-
 </list>
-<!-- Add an exmaple XML if possible -->
-<param name="Example">...</param>
+<param name="Example">N/A, see ViscosityField</param>
 
 </StGermainData>
diff -r f622818b56a4 -r a7c1a91e1ea8 Utils/src/MaterialSwarmVariable.meta
--- a/Utils/src/MaterialSwarmVariable.meta	Wed Nov 05 12:25:14 2008 +1100
+++ b/Utils/src/MaterialSwarmVariable.meta	Wed Nov 05 14:51:19 2008 +1100
@@ -21,6 +21,6 @@
 <list name="Dependencies">
 </list>
 <!-- Add an exmaple XML if possible -->
-<param name="Example">...</param>
+<param name="Example">N/A</param>
 
 </StGermainData>
diff -r f622818b56a4 -r a7c1a91e1ea8 Weights/src/ConstantWeights.meta
--- a/Weights/src/ConstantWeights.meta	Wed Nov 05 12:25:14 2008 +1100
+++ b/Weights/src/ConstantWeights.meta	Wed Nov 05 14:51:19 2008 +1100
@@ -13,10 +13,7 @@
 <param name="Parent">WeightsCalculator</param>
 <param name="Reference">...</param>
 <param name="Summary">...</param>
-<param name="Description">...</param>
-
-<!--Now the interesting stuff-->
-
+<param name="Description">This sets the integration weight of each particle, within a cell, to be an equal share of the cell's weight.</param>
 
 <list name="Params">
 
@@ -25,7 +22,6 @@
 <list name="Dependencies">
 
 </list>
-<!-- Add an exmaple XML if possible -->
-<param name="Example">...</param>
+<param name="Example">N/A</param>
 
 </StGermainData>
diff -r f622818b56a4 -r a7c1a91e1ea8 Weights/src/IterativeWeights.meta
--- a/Weights/src/IterativeWeights.meta	Wed Nov 05 12:25:14 2008 +1100
+++ b/Weights/src/IterativeWeights.meta	Wed Nov 05 14:51:19 2008 +1100
@@ -11,31 +11,29 @@
 <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">ConstantWeights</param>
-<param name="Reference">...</param>
+<param name="Reference">IterativeWeights is an implementation of Frederic Dufour's weights routine from Ellipsis which is described
+ * in his PhD Thesis Section 2.6.1 pp. 63-66</param>
 <param name="Summary">...</param>
-<param name="Description">...</param>
-
-<!--Now the interesting stuff-->
-
+<param name="Description">This performs Dufour's iterative weights calculation over the particles in a cell. See Reference for details</param>
 
 <list name="Params">
 	<struct>
 		<param name="Name">maxIterations</param>
 		<param name="Type">UnsignedInt</param>
 		<param name="Default">10</param>
-		<param name="Description">...</param>
+		<param name="Description">Iterations of algorithm to run over the cell</param>
 	</struct>
 	<struct>
 		<param name="Name">tolerance</param>
 		<param name="Type">Double</param>
 		<param name="Default">0.01</param>
-		<param name="Description">...</param>
+		<param name="Description">Tolerance of constraint error</param>
 	</struct>
 	<struct>
 		<param name="Name">alpha</param>
 		<param name="Type">Double</param>
 		<param name="Default">0.8</param>
-		<param name="Description">...</param>
+		<param name="Description">Weight adjustment factor</param>
 	</struct>
 
 </list>
@@ -45,14 +43,19 @@
 		<param name="Essential">No</param>
 		<param name="Name">InitialWeights</param>
 		<param name="Type">WeightsCalculator</param>
-		<param name="Description">...</param>
+		<param name="Description">An optional initial weighting for the algorithm</param>
 	</struct>
 
-<!-- PLEASE, check the above struct information is accurate, in line number 173 of the c file and then remove this comment afterwards -->
-
 
 </list>
-<!-- Add an exmaple XML if possible -->
-<param name="Example">...</param>
+<param name="Example">
+<![CDATA[
+	<struct name="weights">
+			<param name="Type">IterativeWeights</param>
+			<param name="maxIterations">100</param>
+			<param name="tolerance">0.001</param>
+		</struct>
+]]>
+</param>
 
 </StGermainData>



More information about the CIG-COMMITS mailing list