[cig-commits] commit: Cleaned-up a lot of compile-warnings.
Mercurial
hg at geodynamics.org
Fri Feb 5 12:09:52 PST 2010
changeset: 584:36afba1d4768
branch: 1.4.x
parent: 575:92ee57abdec6
user: JericoRevote
date: Thu Jan 14 17:42:34 2010 +1100
files: Geometry/src/ComplexVectorMath.c Geometry/src/Delaunay.c Geometry/src/Dimension.c Geometry/src/Finalise.c Geometry/src/Init.c Geometry/src/TensorMath.c Geometry/src/TensorMultMath.c Geometry/src/TrigMath.c Geometry/src/VectorMath.c Geometry/tests/ComplexMathSuite.c Geometry/tests/ComplexVectorMathSuite.c Geometry/tests/DimensionMacrosSuite.c Geometry/tests/EdgeSuite.c Geometry/tests/TensorMathSuite.c Geometry/tests/TensorMultMathSuite.c Geometry/tests/VectorMathSuite.c Mesh/src/CartesianGenerator.c Mesh/src/CompressionAdaptor.c Mesh/src/Finalise.c Mesh/src/Grid.c Mesh/src/Init.c Mesh/src/MeshAdaptor.c Mesh/src/MeshClass.c Mesh/src/MeshGenerator.c Mesh/src/MeshVariable.c Mesh/src/Mesh_Algorithms.c Mesh/src/Mesh_CentroidAlgorithms.c Mesh/src/Mesh_CentroidType.c Mesh/src/Mesh_ElementType.c Mesh/src/Mesh_HexAlgorithms.c Mesh/src/Mesh_HexType.c Mesh/src/Mesh_RegularAlgorithms.c Mesh/src/Remesher.c Mesh/src/SurfaceAdaptor.c Mesh/src/linearSpaceAdaptor.c Python/Bindings/Mesh/bindings.c Shape/src/BelowCosinePlane.c Shape/src/BelowPlane.c Shape/src/Box.c Shape/src/ConvexHull.c Shape/src/Cylinder.c Shape/src/Everywhere.c Shape/src/Finalise.c Shape/src/Init.c Shape/src/Intersection.c Shape/src/PolygonShape.c Shape/src/PythonShape.c Shape/src/ShapeClass.c Shape/src/Sphere.c Shape/src/Superellipsoid.c Shape/src/Union.c Shape/tests/ShapeSuite.c Swarm/src/CellLayout.c Swarm/src/ElementCellLayout.c Swarm/src/FileParticleLayout.c Swarm/src/Finalise.c Swarm/src/GaussParticleLayout.c Swarm/src/GlobalParticleLayout.c Swarm/src/Init.c Swarm/src/LineParticleLayout.c Swarm/src/ManualParticleLayout.c Swarm/src/MeshParticleLayout.c Swarm/src/OperatorSwarmVariable.c Swarm/src/ParticleCommHandler.c Swarm/src/ParticleLayout.c Swarm/src/ParticleMovementHandler.c Swarm/src/PlaneParticleLayout.c Swarm/src/RandomParticleLayout.c Swarm/src/SingleCellLayout.c Swarm/src/SpaceFillerParticleLayout.c Swarm/src/SwarmClass.c Swarm/src/SwarmDump.c Swarm/src/SwarmOutput.c Swarm/src/SwarmShapeVC.c Swarm/src/SwarmVariable.c Swarm/src/Swarm_Register.c Swarm/src/TriSingleCellLayout.c Swarm/src/UnionParticleLayout.c Swarm/src/WithinShapeParticleLayout.c Swarm/tests/Bouncer/Bouncer.c Swarm/tests/GaussLayoutSingleCellSuite.c Swarm/tests/GaussLayoutSuite.c Swarm/tests/ManualParticleLayoutSuite.c Swarm/tests/ParticleCoordsSuite.c Swarm/tests/ShadowSyncSuite.c Swarm/tests/SingleAttractor/SingleAttractor.c Swarm/tests/SingleAttractorSuite.c Swarm/tests/SpaceFillerParticleLayoutSuite.c Swarm/tests/Spinner/Spinner.c Swarm/tests/SwarmDumpAndLoadSuite.c Swarm/tests/SwarmOutputSuite.c Swarm/tests/SwarmSuite.c Swarm/tests/VaryingCornerAttractors/VaryingCornerAttractors.c Utils/src/AllElementsVC.c Utils/src/AllNodesVC.c Utils/src/ContactVC.c Utils/src/CornerVC.c Utils/src/DofLayout.c Utils/src/DomainContext.c Utils/src/FieldVariable.c Utils/src/Finalise.c Utils/src/Init.c Utils/src/InnerWallVC.c Utils/src/MeshBoundaryShape.c Utils/src/MeshShapeVC.c Utils/src/Operator.c Utils/src/OperatorFieldVariable.c Utils/src/RegularMeshUtils.c Utils/src/RegularRemesherCmpt.c Utils/src/ShapeAdvector.c Utils/src/SobolGenerator.c Utils/src/TimeIntegrand.c Utils/src/TimeIntegrator.c Utils/src/WallVC.c Utils/tests/AllNodesVCSuite.c Utils/tests/CompositeVCSuite.c Utils/tests/CornerVCSuite.c Utils/tests/DofLayoutSuite.c Utils/tests/OperatorFieldVariableSuite.c Utils/tests/RegularMeshUtilsSuite.c Utils/tests/SobolGeneratorSuite.c Utils/tests/TimeIntegrationSuite.c Utils/tests/WallVCSuite.c libStgDomain/Toolbox/Toolbox.c libStgDomain/src/Finalise.c libStgDomain/src/Init.c libStgDomain/tests/LibDiscretisationSuite.c
description:
Cleaned-up a lot of compile-warnings.
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/src/ComplexVectorMath.c
--- a/Geometry/src/ComplexVectorMath.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/src/ComplexVectorMath.c Thu Jan 14 17:42:34 2010 +1100
@@ -289,9 +289,9 @@ void StGermain_RotateCoordinateAxisCompl
Cmplx_Add(r_1, r_2, rotatedVector[2]) ;
return;
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "ComplexVectorMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"ComplexVectorMath" );
Journal_Printf( error, "Impossible axis to rotate around in %s.", __func__);
- Journal_Firewall( False, Journal_Register( Error_Type, "ComplexVectorMath" ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)"ComplexVectorMath" ),
"Error in '%s':Impossible axis to rotate around. \n", __func__);
}
}
@@ -530,7 +530,7 @@ void ComplexVector_ToVector(CoordC compl
Dimension_Index index;
for (index = 0; index < dim; index++) {
if (complexVector[index][IMAG_PART] != 0.0) {
- Journal_Firewall( False, Journal_Register( Error_Type, "ComplexVectorMath" ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)"ComplexVectorMath" ),
"Error in '%s': Complex value in complex vector at index '%s' \n", __func__, index );
}
else {
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/src/Delaunay.c
--- a/Geometry/src/Delaunay.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/src/Delaunay.c Thu Jan 14 17:42:34 2010 +1100
@@ -317,18 +317,18 @@ void _Delaunay_AssignFromXML( void* dela
self = (Delaunay*) delaunay;
- self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !self->context )
- self->context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !self->context )
+ self->context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
pointerRegister = self->context->pointer_Register;
- assert( pointerRegister );
+ assert( pointerRegister );
- points = Stg_ObjectList_Get( pointerRegister, "dataPoints" );
- attr = Stg_ObjectList_Get( pointerRegister, "delaunayAttributes" );
+ points = Stg_ObjectList_Get( pointerRegister, (Name)"dataPoints" );
+ attr = Stg_ObjectList_Get( pointerRegister, (Name)"delaunayAttributes" );
- numSites = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "numSites", 0 );
+ numSites = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"numSites", 0 );
_Delaunay_Init( self, points, attr, numSites, idOffset, cf->rootDict, True );
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/src/Dimension.c
--- a/Geometry/src/Dimension.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/src/Dimension.c Thu Jan 14 17:42:34 2010 +1100
@@ -46,8 +46,8 @@ void Dimension_3DTo1D_3_Func( Index dim0
#if DEBUG
{
- Stream* dimensionError = Journal_Register( Error_Type, "DimensionMacros" );
- Journal_Firewall( (dim0 < dimSizes[0]), dimensionError, "Error: Given coordinate[0] value %d >= "
+ Stream* dimensionError = Journal_Register( Error_Type, (Name)"DimensionMacros" );
+ Journal_Firewall( (dim0 < dimSizes[0] ), dimensionError, "Error: Given coordinate[0] value %d >= "
"regionSize[0] %d\n", dim0, dimSizes[0] );
Journal_Firewall( (dim1 < dimSizes[1]), dimensionError, "Error: Given coordinate[1] value %d >= "
"regionSize[1] %d\n", dim1, dimSizes[1] );
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/src/Finalise.c
--- a/Geometry/src/Finalise.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/src/Finalise.c Thu Jan 14 17:42:34 2010 +1100
@@ -39,7 +39,7 @@
#include <stdio.h>
Bool StgDomainGeometry_Finalise( void ) {
- Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
+ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
return True;
}
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/src/Init.c
--- a/Geometry/src/Init.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/src/Init.c Thu Jan 14 17:42:34 2010 +1100
@@ -41,11 +41,11 @@
#include <stdio.h>
Bool StgDomainGeometry_Init( int* argc, char** argv[] ) {
- Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
+ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Delaunay_Type, "0", (Stg_Component_DefaultConstructorFunction*)Delaunay_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), ParallelDelaunay_Type, "0", (Stg_Component_DefaultConstructorFunction*)ParallelDelaunay_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Delaunay_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)Delaunay_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), ParallelDelaunay_Type, "0", (Stg_Component_DefaultConstructorFunction*)ParallelDelaunay_DefaultNew );
RegisterParent( Delaunay_Type, Stg_Component_Type );
RegisterParent( ParallelDelaunay_Type, Delaunay_Type );
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/src/TensorMath.c
--- a/Geometry/src/TensorMath.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/src/TensorMath.c Thu Jan 14 17:42:34 2010 +1100
@@ -71,9 +71,9 @@ int TensorArray_TensorMap(Dimension_Inde
return TensorMapFT2D[ row_I ][ col_I ];
}
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMath" );
Journal_Printf( error, "Cannot get tensor value for dimension %d in %s.\n", dim, __func__);
- Journal_Firewall( dim, Journal_Register( Error_Type, "TensorMath" ),
+ Journal_Firewall( dim, Journal_Register( Error_Type, (Name)"TensorMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );
}
@@ -94,9 +94,9 @@ int SymmetricTensor_TensorMap(Dimension_
return TensorMapST2D[ row_I ][ col_I ];
}
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMath" );
Journal_Printf( error, "Cannot get tensor value for dimension %d in %s.\n", dim, __func__);
- Journal_Firewall( dim, Journal_Register( Error_Type, "TensorMath" ),
+ Journal_Firewall( dim, Journal_Register( Error_Type, (Name)"TensorMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );
}
@@ -125,7 +125,7 @@ void StGermain_SymmetricTensor_ToTensorA
StGermain_SymmetricTensor_ToTensorArray2D(symTensor, fullTensor);
return;
default: {
- Journal_Firewall( False, Journal_Register( Error_Type, "TensorMath" ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)"TensorMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );
}
}
@@ -169,7 +169,7 @@ void TensorArray_ToMatrix( TensorArray t
matrix[2][0] = tensor[FT3D_20]; matrix[2][1] = tensor[FT3D_21]; matrix[2][2] = tensor[FT3D_22];
}
else {
- Journal_Firewall( False, Journal_Register( Error_Type, "TensorMath" ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)"TensorMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );
}
}
@@ -234,9 +234,9 @@ void TensorArray_GetAntisymmetricPart( T
antiSymmetric[ TensorMapFT2D[0][0] ] = 0.0;
return;
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMath" );
Journal_Printf( error, "Cannot store tensor for dimension %d in %s.\n", dim, __func__);
- Journal_Firewall( False, Journal_Register( Error_Type, "TensorMath" ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)"TensorMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );
}
}
@@ -285,9 +285,9 @@ void TensorArray_GetSymmetricPart( Tenso
0.5 * (tensor[ TensorMapFT3D[1][2] ] + tensor[ TensorMapFT3D[2][1] ]);
return;
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMath" );
Journal_Printf( error, "Cannot store tensor for dimension %d in %s.\n", dim, __func__);
- Journal_Firewall( False, Journal_Register( Error_Type, "TensorMath" ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)"TensorMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );
}
}
@@ -320,9 +320,9 @@ void TensorArray_GetTrace( TensorArray t
*trace = tensor[FT3D_00] + tensor[FT3D_11] + tensor[FT3D_22];
break;
default:{
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMath" );
Journal_Printf( error, "Cannot compute trace for tensor in dimension %d (in %s) since dim < 1.\n", dim, __func__);
- Journal_Firewall( False, Journal_Register( Error_Type, "TensorMath" ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)"TensorMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );
break;
}
@@ -342,9 +342,9 @@ void SymmetricTensor_GetTrace( Symmetric
*trace = symmTensor[ST3D_00] + symmTensor[ST3D_11] + symmTensor[ST3D_22];
break;
default:{
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMath" );
Journal_Printf( error, "Cannot compute trace for symmetric tensor in dimension %d (in %s) since dim is not in the range [1, 3].\n", dim, __func__);
- Journal_Firewall( False, Journal_Register( Error_Type, "TensorMath" ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)"TensorMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );
break;
}
@@ -417,9 +417,9 @@ double TensorArray_2ndInvariant( TensorA
invariant += tensor[0] * tensor[0];
break;
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMath" );
Journal_Printf( error, "Cannot read tensor for dimension %d in %s.\n", dim, __func__);
- Journal_Firewall( False, Journal_Register( Error_Type, "TensorMath" ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)"TensorMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );
}
}
@@ -449,9 +449,9 @@ double SymmetricTensor_2ndInvariant( Sym
tensor[ TensorMapST2D[0][1] ] * tensor[ TensorMapST2D[1][0] ] ;
break;
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMath" );
Journal_Printf( error, "Cannot read tensor for dimension %d in %s.\n", dim, __func__);
- Journal_Firewall( False, Journal_Register( Error_Type, "TensorMath" ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)"TensorMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );
}
}
@@ -487,9 +487,9 @@ double TensorArray_MultiplyByVectors( Te
a[1] * tensor[ FT2D_11 ] * b[1] ;
break;
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMath" );
Journal_Printf( error, "Cannot read tensor for dimension %d in %s.\n", dim, __func__);
- Journal_Firewall( False, Journal_Register( Error_Type, "TensorMath" ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)"TensorMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );
}
}
@@ -525,9 +525,9 @@ void SymmetricTensor_ApplyOnVector( Symm
tensor[ TensorMapST2D[1][1] ] * vector[1] ;
break;
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMath" );
Journal_Printf( error, "Cannot read tensor for dimension %d in %s.\n", dim, __func__);
- Journal_Firewall( False, Journal_Register( Error_Type, "TensorMath" ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)"TensorMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );
}
}
@@ -562,9 +562,9 @@ double SymmetricTensor_MultiplyByVectors
a[1] * tensor[ TensorMapST2D[1][1] ] * b[1] ;
break;
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMath" );
Journal_Printf( error, "Cannot read tensor for dimension %d in %s.\n", dim, __func__);
- Journal_Firewall( False, Journal_Register( Error_Type, "TensorMath" ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)"TensorMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );
}
}
@@ -582,7 +582,7 @@ void SymmetricTensor_ToMatrix( Symmetric
matrix[2][0] = tensor[ST3D_02]; matrix[2][1] = tensor[ST3D_12]; matrix[2][2] = tensor[ST3D_22];
}
else {
- Journal_Firewall( False, Journal_Register( Error_Type, "TensorMath" ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)"TensorMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );
}
}
@@ -780,7 +780,7 @@ void SymmetricTensor_CalcAllEigenvectors
void SymmetricTensor_CalcAllEigenvectorsJacobi( SymmetricTensor tensor, Dimension_Index dim, Eigenvector* eigenvectorList ){
- double** matrix = Memory_Alloc_2DArray( double, dim, dim, "Matrix" );
+ double** matrix = Memory_Alloc_2DArray( double, dim, dim, (Name)"Matrix" );
SymmetricTensor_ToMatrix( tensor, dim, matrix);
Matrix_CalcAllEigenvectorsJacobi( matrix, dim, eigenvectorList );
@@ -928,9 +928,9 @@ double StGermain_MatrixDeterminant_AxisI
+ matrix[A_axis][C_axis] *
( matrix[B_axis][A_axis]*matrix[C_axis][B_axis] - matrix[B_axis][B_axis]*matrix[C_axis][A_axis] );
default: {
- Stream* error = Journal_Register( Error_Type , CURR_MODULE_NAME );
+ Stream* error = Journal_Register( Error_Type , (Name)CURR_MODULE_NAME );
Journal_Printf(error, "Function %s doesn't support dimension %d.\n", __func__, dim);
- Journal_Firewall( False, Journal_Register( Error_Type, "TensorMath" ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)"TensorMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );
}
}
@@ -963,7 +963,7 @@ void CubicSolver_OnlyRealRoots( double a
rootList[1] = rootList[2] = -a2/3.0 - halfB;
return;
}
- Journal_Firewall( D <= 0.0, Journal_Register( Error_Type, "CubicSolver" ),
+ Journal_Firewall( D <= 0.0, Journal_Register( Error_Type, (Name)"CubicSolver" ),
"In func %s - Polynomial discrimanent %g is positive which means there are complex solutions.\nCannot solve equation x^3 + %.4f x^2 + %.4f x + %.4f = 0\n", __func__ , D, a2, a1, a0 );
@@ -1038,7 +1038,7 @@ void TensorArray_SolveSystem( TensorArra
default:
Journal_Firewall(
False,
- Journal_Register( Error_Type, CURR_MODULE_NAME ),
+ Journal_Register( Error_Type, (Name)CURR_MODULE_NAME ),
"Function %s - doesn't understand dim = %u\n", __func__, dim );
}
}
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/src/TensorMultMath.c
--- a/Geometry/src/TensorMultMath.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/src/TensorMultMath.c Thu Jan 14 17:42:34 2010 +1100
@@ -50,7 +50,7 @@ void TensorArray_Identity(Dimension_Inde
Dimension_Index index;
/* Check dimension */
if ( (dim != 2)&&(dim != 3) ) {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMultMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" );
Journal_Printf( error, "Cannot get tensor value for dimension %d in %s.\n", dim, __func__);
Journal_Firewall( dim, error,
"In func '%s' don't understand dim = %u\n", __func__, dim );
@@ -72,7 +72,7 @@ void SymmetricTensor_Identity(Dimension_
Dimension_Index index;
/* Check dimension */
if ( (dim != 2)&&(dim != 3) ) {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMultMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" );
Journal_Printf( error, "Cannot get tensor value for dimension %d in %s.\n", dim, __func__);
Journal_Firewall( dim, error,
"In func '%s' don't understand dim = %u\n", __func__, dim );
@@ -109,7 +109,7 @@ switch (dim) {
result[FT2D_11] = tensor[FT2D_11];
break;
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMultMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" );
Journal_Printf( error, "Cannot read tensor for dimension %d in %s.\n", dim, __func__);
Journal_Firewall( dim, error,
"In func '%s' don't understand dim = %u\n", __func__, dim );;
@@ -122,7 +122,7 @@ void TensorArray_Add(TensorArray tensorA
Dimension_Index index;
if ( (dim != 2)&&(dim != 3) ) {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMultMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" );
Journal_Printf( error, "Cannot get tensor value for dimension %d in %s.\n", dim, __func__);
Journal_Firewall( dim, error,
"In func '%s' don't understand dim = %u\n", __func__, dim );
@@ -139,7 +139,7 @@ void TensorArray_Subtract( TensorArray t
Dimension_Index index;
if ( (dim != 2)&&(dim != 3) ) {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMultMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" );
Journal_Printf( error, "Cannot get tensor value for dimension %d in %s.\n", dim, __func__);
Journal_Firewall( dim, error,
"In func '%s' don't understand dim = %u\n", __func__, dim );
@@ -204,9 +204,9 @@ void TensorArray_MultiplyByTensorArray(
+ tensorA[FT2D_11] * tensorB[FT2D_11];
return;
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMultMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" );
Journal_Printf( error, "Cannot read tensor for dimension %d in %s.\n", dim, __func__);
- Journal_Firewall( dim, Journal_Register( Error_Type, "TensorMultMath" ),
+ Journal_Firewall( dim, Journal_Register( Error_Type, (Name)"TensorMultMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );;
}
}
@@ -304,9 +304,9 @@ switch (dim) {
+ tensorArray[FT2D_11] * symmetricTensor[ST2D_11];
return;
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMultMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" );
Journal_Printf( error, "Cannot read tensor for dimension %d in %s.\n", dim, __func__);
- Journal_Firewall( dim, Journal_Register( Error_Type, "TensorMultMath" ),
+ Journal_Firewall( dim, Journal_Register( Error_Type, (Name)"TensorMultMath" ),
"In func '%s' don't understand dim = %u\n", __func__, dim );;
}
}
@@ -349,7 +349,7 @@ void TensorArray_MultiplyByLeftVector( T
+ vector[1] * tensorArray[FT2D_11];
return;
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMultMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" );
Journal_Printf( error, "Cannot get tensor value for dimension %d in %s.\n", dim, __func__);
Journal_Firewall( dim, error,
"In func '%s' don't understand dim = %u\n", __func__, dim );
@@ -384,7 +384,7 @@ void TensorArray_MultiplyByRightVector(
tensorArray[FT2D_11] * vector[1];
return;
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMultMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" );
Journal_Printf( error, "Cannot get tensor value for dimension %d in %s.\n", dim, __func__);
Journal_Firewall( dim, error,
"In func '%s' don't understand dim = %u\n", __func__, dim );
@@ -417,7 +417,7 @@ double TensorArray_CalcDeterminant(Tenso
return determinant;
}
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMultMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" );
Journal_Printf( error, "Cannot get tensor value for dimension %d in %s.\n", dim, __func__);
Journal_Firewall( dim, error,
"In func '%s' don't understand dim = %u\n", __func__, dim );
@@ -445,12 +445,12 @@ void TensorArray_CalcInverseWithDetermin
/* Check if determinant is zero or close to zero*/
errorValue = STG_TENSORMULT_ERROR;
if (fabs(determinant) <= errorValue) {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMultMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" );
Journal_Printf( error, "Error in '%s', Cannot calculate inverse of singular tensorArray:\n",
__func__);
Journal_PrintTensorArray( error, tensor, dim);
Journal_Printf( error, "Determinant, %g is zero or near zero. \n", determinant);
- Journal_Firewall( False, Journal_Register( ErrorStream_Type, "TensorMultMath" ),
+ Journal_Firewall( False, Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" ),
"In func '%s',TensorArray is singular, cannot divide by zero determinant, %g\n", __func__, determinant );
return;
}
@@ -488,7 +488,7 @@ void TensorArray_CalcInverseWithDetermin
result[FT2D_11] = tensor[FT2D_00] / determinant;
break;
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMultMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" );
Journal_Printf( error, "Cannot get tensor value for dimension %d in %s.\n", dim, __func__);
Journal_Firewall( dim, error,
"In func '%s' don't understand dim = %u\n", __func__, dim );
@@ -504,7 +504,7 @@ double TensorArray_DoubleContraction(Ten
/** \[\sigma:\epsilon=\sum_{i=1}^{n}\sum_{i=1}^{n}\sigma_{ij}\epsilon_{ij}\] */
/* Check dimension */
if ( (dim != 2)&&(dim != 3) ) {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMultMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" );
Journal_Printf( error, "Cannot get tensor value for dimension %d in %s.\n", dim, __func__);
Journal_Firewall( dim, error,
"In func '%s' don't understand dim = %u\n", __func__, dim );
@@ -531,7 +531,7 @@ double SymmetricTensor_DoubleContraction
/* Check dimension */
if ( (dim != 2)&&(dim != 3) ) {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMultMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" );
Journal_Printf( error, "Cannot get tensor value for dimension %d in %s.\n", dim, __func__);
Journal_Firewall( dim, error,
"In func '%s' don't understand dim = %u\n", __func__, dim );
@@ -558,7 +558,7 @@ void NonSquareMatrix_Transpose( double**
Dimension_Index colDimOrig, double** newMatrix ) {
Dimension_Index row_I, col_I;
if ((rowDimOrig <=0) || (colDimOrig <=0)) {
- Stream* error = Journal_Register( ErrorStream_Type, "TensorMultMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" );
Journal_Firewall( False, error,
"In func '%s' don't understand rows = %u or cols = %u\n",
@@ -600,10 +600,10 @@ void NonSquareMatrix_CumulativeMultiplic
int row_I, col_I; /* location with resultMatrix */
int counter; /* counter which facilitates the multiplication of AMatrix and BMatrix */
/** Error Checking Code */
- Journal_Firewall( (colDimA == rowDimB), Journal_Register( ErrorStream_Type, "TensorMultMath" ),
+ Journal_Firewall( (colDimA == rowDimB), Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" ),
"In func '%s' row dimension B, %u != column dimension A, %u\n",
__func__, rowDimB, colDimA );
- Journal_Firewall( (AMatrix && BMatrix && resultMatrix), Journal_Register( ErrorStream_Type, "TensorMultMath" ),
+ Journal_Firewall( (AMatrix && BMatrix && resultMatrix), Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" ),
"In func '%s', Input matrices: %s %s, or Output matrix: %s is NULL \n",
__func__, AMatrix, BMatrix, resultMatrix);
@@ -635,10 +635,10 @@ void NonSquareMatrix_CumulativeMatrixVec
double* BVec, int rowsInB, double* resultVector ) {
int row_I, col_I; /* counters through matrix rows and columns respectively */
/** Error Checking Code */
- Journal_Firewall( ( colsInA == rowsInB ), Journal_Register( ErrorStream_Type, "TensorMultMath" ),
+ Journal_Firewall( ( colsInA == rowsInB ), Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" ),
"In func '%s' column dimensions of A_Matrix = %d is not equal to the row dimensions of B_Vec = %d\n",
__func__, colsInA, rowsInB );
- Journal_Firewall( (resultVector && AMatrix && BVec) , Journal_Register( ErrorStream_Type, "TensorMultMath" ),
+ Journal_Firewall( (resultVector && AMatrix && BVec) , Journal_Register( ErrorStream_Type, (Name)"TensorMultMath" ),
"In func '%s', Input matrices: %p %p, or Output matrix: %p is NULL \n",
__func__, AMatrix, BVec, resultVector);
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/src/TrigMath.c
--- a/Geometry/src/TrigMath.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/src/TrigMath.c Thu Jan 14 17:42:34 2010 +1100
@@ -73,7 +73,7 @@ void StGermain_RectangularToSpherical(do
theta_sin_solution1 = asin( Y/(RADIUS*sin(PHI)) ); /* Solution is between -PI/2 and PI/2 i.e. quadrant 1 and 4 */
}
else {
- Stream* error = Journal_Register( Error_Type , __FILE__ );
+ Stream* error = Journal_Register( Error_Type , (Name)__FILE__ );
Journal_Printf( error, "Func %s does not work with dimension %u\n", __func__, dim );
exit(EXIT_FAILURE);
}
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/src/VectorMath.c
--- a/Geometry/src/VectorMath.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/src/VectorMath.c Thu Jan 14 17:42:34 2010 +1100
@@ -148,7 +148,7 @@ void StGermain_RotateCoordinateAxis( dou
rotatedVector[2] = -vector[0]*sin(theta) + vector[2]*cos(theta);
return;
default: {
- Stream* error = Journal_Register( ErrorStream_Type, "VectorMath" );
+ Stream* error = Journal_Register( ErrorStream_Type, (Name)"VectorMath" );
Journal_Printf( error, "Impossible axis to rotate around in %s.", __func__);
exit(EXIT_FAILURE);
}
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/tests/ComplexMathSuite.c
--- a/Geometry/tests/ComplexMathSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/tests/ComplexMathSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -77,7 +77,7 @@ void ComplexMathSuite_TestComplexJournal
Cmplx v = {1.5, -3};
Cmplx i = {0, 1};
char expected_file[PCU_PATH_MAX];
- Stream* stream = Journal_Register( InfoStream_Type, "ComplexMathPrintingMacro" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"ComplexMathPrintingMacro" );
Stream_RedirectFile( stream, "testComplexMathPrintingMacro.dat" );
Journal_Printf(stream, "----------------- Testing Complex Journal Printing Macro -----------------\n" );
@@ -103,7 +103,7 @@ void ComplexMathSuite_TestAddition( Comp
Cmplx y = {-1.5, 3};
Cmplx dest = {0, 0};
char expected_file[PCU_PATH_MAX];
- Stream* stream = Journal_Register( InfoStream_Type, "ComplexMathAddition" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"ComplexMathAddition" );
Stream_RedirectFile( stream, "testComplexMathAddition.dat" );
Journal_Printf(stream, "----------------- Testing Addition -----------------\n" );
@@ -128,7 +128,7 @@ void ComplexMathSuite_TestSubtraction( C
Cmplx y = {-1.5, 3};
Cmplx dest = {0, 0};
char expected_file[PCU_PATH_MAX];
- Stream* stream = Journal_Register( InfoStream_Type, "ComplexMathSubtraction" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"ComplexMathSubtraction" );
Stream_RedirectFile( stream, "testComplexMathSubtraction.dat" );
Journal_Printf(stream, "----------------- Testing Subtraction -----------------\n" );
@@ -153,7 +153,7 @@ void ComplexMathSuite_TestMultiplication
Cmplx y = {-1.5, 3};
Cmplx dest = {0, 0};
char expected_file[PCU_PATH_MAX];
- Stream* stream = Journal_Register( InfoStream_Type, "ComplexMathMultiplication" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"ComplexMathMultiplication" );
Stream_RedirectFile( stream, "testComplexMathMultiplication.dat" );
Journal_Printf(stream, "----------------- Testing Multiplication -----------------\n" );
@@ -178,7 +178,7 @@ void ComplexMathSuite_TestDivision( Comp
Cmplx y = {-1.5, 3};
Cmplx dest = {0, 0};
char expected_file[PCU_PATH_MAX];
- Stream* stream = Journal_Register( InfoStream_Type, "ComplexMathDivision" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"ComplexMathDivision" );
Stream_RedirectFile( stream, "testComplexMathDivision.dat" );
Journal_Printf(stream, "----------------- Testing Division -----------------\n" );
@@ -202,7 +202,7 @@ void ComplexMathSuite_TestRealNumber( Co
Cmplx y = {-1.5, 3};
Cmplx dest = {0, 0};
char expected_file[PCU_PATH_MAX];
- Stream* stream = Journal_Register( InfoStream_Type, "ComplexMathRealNumber" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"ComplexMathRealNumber" );
Stream_RedirectFile( stream, "testComplexMathRealNumber.dat" );
Journal_Printf(stream, "----------------- Testing Real Number Math stuff -----------------\n" );
@@ -239,7 +239,7 @@ void ComplexMathSuite_TestConjugate( Com
if (data->rank == procToWatch) {
Cmplx x = {1, 2};
char expected_file[PCU_PATH_MAX];
- Stream* stream = Journal_Register( InfoStream_Type, "ComplexMathConjugate" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"ComplexMathConjugate" );
Stream_RedirectFile( stream, "testComplexMathConjugate.dat" );
Journal_Printf(stream, "----------------- Testing Conjugate -----------------\n" );
@@ -268,7 +268,7 @@ void ComplexMathSuite_TestPolar( Complex
Cmplx minus_i = {0, -1};
double mod, theta;
char expected_file[PCU_PATH_MAX];
- Stream* stream = Journal_Register( InfoStream_Type, "ComplexMathPolar" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"ComplexMathPolar" );
Stream_RedirectFile( stream, "testComplexMathPolar.dat" );
Journal_Printf(stream, "----------------- Testing Complex Polar Stuff -----------------\n" );
@@ -307,7 +307,7 @@ void ComplexMathSuite_TestPower( Complex
Cmplx y = {-1.5, 3};
Cmplx dest = {0, 0};
char expected_file[PCU_PATH_MAX];
- Stream* stream = Journal_Register( InfoStream_Type, "ComplexMathPower" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"ComplexMathPower" );
Stream_RedirectFile( stream, "testComplexMathPower.dat" );
Journal_Printf(stream, "----------------- Testing Complex to real Power Stuff -----------------\n" );
@@ -345,7 +345,7 @@ void ComplexMathSuite_TestBeautifulEquat
Cmplx ipi = {0, M_PI};
Cmplx dest = {0, 0};
char expected_file[PCU_PATH_MAX];
- Stream* stream = Journal_Register( InfoStream_Type, "ComplexMathBeautifulEquation" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"ComplexMathBeautifulEquation" );
Stream_RedirectFile( stream, "testComplexMathBeautifulEquation.dat" );
Journal_Printf(stream, "----------------- Testing The Most Beautiful Equation in Mathematics e^{i \\pi} + 1 = 0 -----------------\n" );
@@ -375,7 +375,7 @@ void ComplexMathSuite_TestExponential( C
Cmplx ipi = {0, M_PI};
Cmplx dest = {0, 0};
char expected_file[PCU_PATH_MAX];
- Stream* stream = Journal_Register( InfoStream_Type, "ComplexMathExponential" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"ComplexMathExponential" );
Stream_RedirectFile( stream, "testComplexMathExponential.dat" );
Journal_Printf(stream, "----------------- Testing Exponential -----------------\n" );
@@ -414,7 +414,7 @@ void ComplexMathSuite_TestCopyAndZero( C
Cmplx x = {1, 2};
Cmplx dest = {0, 0};
char expected_file[PCU_PATH_MAX];
- Stream* stream = Journal_Register( InfoStream_Type, "ComplexMathCopyAndZero" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"ComplexMathCopyAndZero" );
Stream_RedirectFile( stream, "testComplexMathCopyAndZero.dat" );
Journal_Printf(stream, "----------------- Testing Copy and Zero -----------------\n" );
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/tests/ComplexVectorMathSuite.c
--- a/Geometry/tests/ComplexVectorMathSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/tests/ComplexVectorMathSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -68,12 +68,12 @@ void ComplexVectorMathSuite_Teardown( Co
void ComplexVectorMathSuite_TestComplexVectorMathBasic( ComplexVectorMathSuiteData* data ) {
unsigned procToWatch;
- Stream* stream = Journal_Register( Info_Type, "VectorMathBasicStream" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"VectorMathBasicStream" );
char expected_file[PCU_PATH_MAX];
procToWatch = data->nProcs >=2 ? 1 : 0;
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
CoordC a, b, c;
CoordC d = { {1.0, 1.0}, {1.0, 0.0}, {0.0, 1.0} };
CoordC e = { {1.0, 0.0}, {2.0, 2.0}, {-3.0, -1.0} };
@@ -212,12 +212,12 @@ void ComplexVectorMathSuite_TestComplexV
void ComplexVectorMathSuite_TestComplexVectorMathOperations( ComplexVectorMathSuiteData* data ) {
unsigned procToWatch;
- Stream* stream = Journal_Register( Info_Type, "VectorMathOperationsStream" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"VectorMathOperationsStream" );
char expected_file[PCU_PATH_MAX];
procToWatch = data->nProcs >=2 ? 1 : 0;
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
#define STG_COMPLEXVECTOR_TOL 1e-16;
Cmplx i[] = {{1.00000000, 0.000000000},{0.00000000, 0.000000000},{0.000000000, 0.00000000}};
@@ -477,7 +477,7 @@ void ComplexVectorMathSuite_TestComplexV
Journal_Printf( stream, "\n****************************\n");
Journal_Printf( stream, "Check StGermain_ComplexScalarTripleProduct \n");
- matrix = Memory_Alloc_2DArray( Cmplx, 3, 3, "matrix" );
+ matrix = Memory_Alloc_2DArray( Cmplx, 3, 3, (Name)"matrix" );
matrix[0][0][REAL_PART] = 1.0; matrix[0][0][IMAG_PART] = 1.0;
matrix[0][1][REAL_PART] = 2.0; matrix[0][1][IMAG_PART] = 0.0;
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/tests/DimensionMacrosSuite.c
--- a/Geometry/tests/DimensionMacrosSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/tests/DimensionMacrosSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -77,7 +77,7 @@ void DimensionMacrosSuite_Teardown( Dime
void DimensionMacrosSuite_TestDimensionMacros( DimensionMacrosSuiteData* data ) {
char expected_file[PCU_PATH_MAX];
- Stream* stream = Journal_Register( Info_Type, "DimensionMacrosStream" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"DimensionMacrosStream" );
IJK coord;
IJK meshSize;
Index i, j, k;
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/tests/EdgeSuite.c
--- a/Geometry/tests/EdgeSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/tests/EdgeSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -76,7 +76,7 @@ void EdgeSuite_TestEdge( EdgeSuiteData*
Triangle_Index tri_I;
Edge_Index edge_I;
- stream = Journal_Register(Info_Type, "EdgeStream");
+ stream = Journal_Register( Info_Type, (Name)"EdgeStream" );
Stream_RedirectFile( stream, "testEdge.dat" );
tri[0][0] = 0;
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/tests/TensorMathSuite.c
--- a/Geometry/tests/TensorMathSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/tests/TensorMathSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -84,7 +84,7 @@ void TensorMathSuite_TestSymmetricTensor
if (data->rank == procToWatch) {
int dim;
- Stream* stream = Journal_Register( InfoStream_Type, "SymmetricTensorVectorComponents" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"SymmetricTensorVectorComponents" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathSymmetricTensorVectorComponents.dat" );
@@ -108,9 +108,9 @@ void TensorMathSuite_TestJournalPrintTen
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
if (data->rank == procToWatch) {
- double **tensor = Memory_Alloc_2DArray( double , 5, 5, "Tensor" );
+ double **tensor = Memory_Alloc_2DArray( double , 5, 5, (Name)"Tensor" );
TensorArray tensorArray;
- Stream* stream = Journal_Register( InfoStream_Type, "JournalPrintTensorArray" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"JournalPrintTensorArray" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathJournalPrintTensorArray.dat" );
@@ -140,7 +140,7 @@ void TensorMathSuite_TestTensorToTensorA
if (data->rank == procToWatch) {
SymmetricTensor symmTensor;
TensorArray tensorArray;
- Stream* stream = Journal_Register( InfoStream_Type, "TensorToTensorArrayFunction" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"TensorToTensorArrayFunction" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathArrayFunction.dat" );
@@ -189,9 +189,9 @@ void TensorMathSuite_TestMathArrayToMatr
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
if (data->rank == procToWatch) {
- double **tensor = Memory_Alloc_2DArray( double , 5, 5, "Tensor" );
+ double **tensor = Memory_Alloc_2DArray( double , 5, 5, (Name)"Tensor" );
TensorArray tensorArray;
- Stream* stream = Journal_Register( InfoStream_Type, "TensorArrayToMatrix" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"TensorArrayToMatrix" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathArrayToMatrix.dat" );
@@ -229,9 +229,9 @@ void TensorMathSuite_TestSymmetricTensor
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
if (data->rank == procToWatch) {
- double **tensor = Memory_Alloc_2DArray( double , 5, 5, "Tensor" );
+ double **tensor = Memory_Alloc_2DArray( double , 5, 5, (Name)"Tensor" );
SymmetricTensor symmTensor;
- Stream* stream = Journal_Register( InfoStream_Type, "SymmetricTensorToMatrix" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"SymmetricTensorToMatrix" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathSymmetricTensorToMatrix.dat" );
@@ -275,11 +275,11 @@ void TensorMathSuite_TestGetAntisymmetri
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
if (data->rank == procToWatch) {
- double **tensor = Memory_Alloc_2DArray( double , 5, 5, "Tensor" );
+ double **tensor = Memory_Alloc_2DArray( double , 5, 5, (Name)"Tensor" );
TensorArray tensorArray;
TensorArray tensor2;
int dim;
- Stream* stream = Journal_Register( InfoStream_Type, "GetAntisymmetricPart" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"GetAntisymmetricPart" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathGetAntisymmetricPart.dat" );
@@ -317,11 +317,11 @@ void TensorMathSuite_TestGetSymmetricPar
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
if (data->rank == procToWatch) {
- double **tensor = Memory_Alloc_2DArray( double , 5, 5, "Tensor" );
+ double **tensor = Memory_Alloc_2DArray( double , 5, 5, (Name)"Tensor" );
SymmetricTensor symmTensor;
TensorArray tensorArray;
int dim;
- Stream* stream = Journal_Register( InfoStream_Type, "GetSymmetricPart" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"GetSymmetricPart" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathGetSymmetricPart.dat" );
@@ -359,11 +359,11 @@ void TensorMathSuite_Test2ndInvariant( T
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
if (data->rank == procToWatch) {
- double **tensor = Memory_Alloc_2DArray( double , 5, 5, "Tensor" );
+ double **tensor = Memory_Alloc_2DArray( double , 5, 5, (Name)"Tensor" );
SymmetricTensor symmTensor;
TensorArray tensorArray;
int dim;
- Stream* stream = Journal_Register( InfoStream_Type, "2ndInvariant" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"2ndInvariant" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMath2ndInvariant.dat" );
@@ -403,12 +403,12 @@ void TensorMathSuite_TestVectorTensorVec
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
if (data->rank == procToWatch) {
- double **tensor = Memory_Alloc_2DArray( double , 5, 5, "Tensor" );
+ double **tensor = Memory_Alloc_2DArray( double , 5, 5, (Name)"Tensor" );
TensorArray tensorArray;
int dim;
double a[] = {2,3,6,-2,9.1};
double b[] = {1,-3,2.6,-2.2,-1.91};
- Stream* stream = Journal_Register( InfoStream_Type, "VectorTensorVector" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"VectorTensorVector" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathVectorTensorVector.dat" );
@@ -443,7 +443,7 @@ void TensorMathSuite_TestZeroTensor( Ten
if (data->rank == procToWatch) {
SymmetricTensor symmTensor;
TensorArray tensor2;
- Stream* stream = Journal_Register( InfoStream_Type, "ZeroTensor" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"ZeroTensor" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathZeroTensor.dat" );
@@ -469,9 +469,9 @@ void TensorMathSuite_TestMatrixDetermina
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
if (data->rank == procToWatch) {
- double **tensor = Memory_Alloc_2DArray( double , 5, 5, "Tensor" );
+ double **tensor = Memory_Alloc_2DArray( double , 5, 5, (Name)"Tensor" );
double determinant;
- Stream* stream = Journal_Register( InfoStream_Type, "MatrixDeterminant" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"MatrixDeterminant" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathMatrixDeterminant.dat" );
@@ -515,7 +515,7 @@ void TensorMathSuite_TestCubicSolver( Te
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
if (data->rank == procToWatch) {
- Stream* stream = Journal_Register( InfoStream_Type, "CubicSolver" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"CubicSolver" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathCubicSolver.dat" );
@@ -540,7 +540,7 @@ void TensorMathSuite_TestMappingFunction
if (data->rank == procToWatch) {
SymmetricTensor symmTensor;
TensorArray tensorArray;
- Stream* stream = Journal_Register( InfoStream_Type, "MappingFunctions" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"MappingFunctions" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathMappingFunctions.dat" );
@@ -663,7 +663,7 @@ void TensorMathSuite_TestEigenVectorList
if (data->rank == procToWatch) {
Eigenvector eigenvectorList[3];
- Stream* stream = Journal_Register( InfoStream_Type, "EigenVectorListSort" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"EigenVectorListSort" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathEigenVectorListSort.dat" );
@@ -741,7 +741,7 @@ void TensorMathSuite_TestEigenVector1( T
if (data->rank == procToWatch) {
SymmetricTensor symmTensor;
Eigenvector eigenvectorList[3];
- Stream* stream = Journal_Register( InfoStream_Type, "EigenVector1" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"EigenVector1" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathEigenVector1.dat" );
@@ -781,7 +781,7 @@ void TensorMathSuite_TestEigenVector2( T
if (data->rank == procToWatch) {
SymmetricTensor symmTensor;
Eigenvector eigenvectorList[3];
- Stream* stream = Journal_Register( InfoStream_Type, "EigenVector2" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"EigenVector2" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathEigenVector2.dat" );
@@ -818,7 +818,7 @@ void TensorMathSuite_TestEigenVector3( T
if (data->rank == procToWatch) {
SymmetricTensor symmTensor;
Eigenvector eigenvectorList[3];
- Stream* stream = Journal_Register( InfoStream_Type, "EigenVector3" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"EigenVector3" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathEigenVector3.dat" );
@@ -864,7 +864,7 @@ void TensorMathSuite_TestEigenVector4( T
XYZ rightHandSide;
XYZ solution;
int dim;
- Stream* stream = Journal_Register( InfoStream_Type, "EigenVector4" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"EigenVector4" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorMathEigenVector4.dat" );
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/tests/TensorMultMathSuite.c
--- a/Geometry/tests/TensorMultMathSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/tests/TensorMultMathSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -67,7 +67,7 @@ void TensorMultMathSuite_TestTensorArray
if (data->rank == procToWatch) {
TensorArray tensorArray;
- Stream* stream = Journal_Register( InfoStream_Type, "TensorArrayIdentity" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"TensorArrayIdentity" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorArrayIdentity.dat" );
@@ -95,7 +95,7 @@ void TensorMultMathSuite_TestSymmetricTe
if (data->rank == procToWatch) {
SymmetricTensor symmTensor;
- Stream* stream = Journal_Register( InfoStream_Type, "SymmetricTensorIdentity" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"SymmetricTensorIdentity" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testSymmetricTensorIdentity.dat" );
@@ -124,7 +124,7 @@ void TensorMultMathSuite_TestTensorArray
if (data->rank == procToWatch) {
TensorArray tensorArray, tensorResult;
- Stream* stream = Journal_Register( InfoStream_Type, "TensorArrayTranspose" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"TensorArrayTranspose" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorArrayTranspose.dat" );
@@ -162,7 +162,7 @@ void TensorMultMathSuite_TestTensorArray
if (data->rank == procToWatch) {
TensorArray tensorArray, tensorArray2, tensorResult;
- Stream* stream = Journal_Register( InfoStream_Type, "TensorArrayAdd" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"TensorArrayAdd" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorArrayAdd.dat" );
@@ -209,7 +209,7 @@ void TensorMultMathSuite_TestTensorArray
if (data->rank == procToWatch) {
TensorArray tensorArray, tensorArray2, tensorResult;
- Stream* stream = Journal_Register( InfoStream_Type, "TensorArraySubstract" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"TensorArraySubstract" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorArraySubstract.dat" );
@@ -256,7 +256,7 @@ void TensorMultMathSuite_TestTensorArray
if (data->rank == procToWatch) {
TensorArray tensorArray, tensorArray2, tensorResult;
- Stream* stream = Journal_Register( InfoStream_Type, "TensorArrayMultiplyByTensorArray" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"TensorArrayMultiplyByTensorArray" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorArrayMultiplyByTensorArray.dat" );
@@ -305,7 +305,7 @@ void TensorMultMathSuite_TestTensorArray
if (data->rank == procToWatch) {
SymmetricTensor symmTensorResult;
TensorArray tensorArray;
- Stream* stream = Journal_Register( InfoStream_Type, "TensorArrayMultiplyByRightTranspose" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"TensorArrayMultiplyByRightTranspose" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorArrayMultiplyByRightTranspose.dat" );
@@ -347,7 +347,7 @@ void TensorMultMathSuite_TestTensorArray
if (data->rank == procToWatch) {
SymmetricTensor symmTensorResult;
TensorArray tensorArray;
- Stream* stream = Journal_Register( InfoStream_Type, "TensorArrayMultiplyByLeftTranspose" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"TensorArrayMultiplyByLeftTranspose" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorArrayMultiplyByLeftTranspose.dat" );
@@ -389,7 +389,7 @@ void TensorMultMathSuite_TestTensorArray
if (data->rank == procToWatch) {
SymmetricTensor symmTensor;
TensorArray tensorArray, tensorResult;
- Stream* stream = Journal_Register( InfoStream_Type, "TensorArrayMultiplyBySymmetricTensor" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"TensorArrayMultiplyBySymmetricTensor" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorArrayMultiplyBySymemtricTensor.dat" );
@@ -436,7 +436,7 @@ void TensorMultMathSuite_TestTensorArray
if (data->rank == procToWatch) {
XYZ vector, vectorResult;
TensorArray tensorArray;
- Stream* stream = Journal_Register( InfoStream_Type, "TensorArrayMultiplyByLeftVector" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"TensorArrayMultiplyByLeftVector" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorArrayMultiplyByLeftVector.dat" );
@@ -482,7 +482,7 @@ void TensorMultMathSuite_TestTensorArray
if (data->rank == procToWatch) {
XYZ vector, vectorResult;
TensorArray tensorArray;
- Stream* stream = Journal_Register( InfoStream_Type, "TensorArrayMultiplyByRightVector" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"TensorArrayMultiplyByRightVector" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTensorArrayMultiplyByRightVector.dat" );
@@ -528,7 +528,7 @@ void TensorMultMathSuite_TestCalcDetermi
if (data->rank == procToWatch) {
TensorArray tensorArray;
double result;
- Stream* stream = Journal_Register( InfoStream_Type, "CalcDeterminant" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"CalcDeterminant" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testCalcDeterminant.dat" );
@@ -572,7 +572,7 @@ void TensorMultMathSuite_TestCalcInverse
double result, errorValue;
Dimension_Index row, col;
Bool tensorMultMathTest_Flag;
- Stream* stream = Journal_Register( InfoStream_Type, "CalcInverseWithDeterminant" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"CalcInverseWithDeterminant" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testCalcInverseWithDeterminant.dat" );
@@ -673,7 +673,7 @@ void TensorMultMathSuite_TestCalcInverse
double errorValue;
Dimension_Index row, col;
Bool tensorMultMathTest_Flag;
- Stream* stream = Journal_Register( InfoStream_Type, "CalcInverse" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"CalcInverse" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testCalcInverse.dat" );
@@ -772,7 +772,7 @@ void TensorMultMathSuite_TestTensorArray
if (data->rank == procToWatch) {
TensorArray tensorArray, tensorArray2;
double result;
- Stream* stream = Journal_Register( InfoStream_Type, "TensorArrayDoubleContraction" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"TensorArrayDoubleContraction" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testTADoubleContraction.dat" );
@@ -823,7 +823,7 @@ void TensorMultMathSuite_TestSymmetricTe
if (data->rank == procToWatch) {
SymmetricTensor symmTensor, symmTensor2;
double result;
- Stream* stream = Journal_Register( InfoStream_Type, "SymmetricTensorDoubleContraction" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"SymmetricTensorDoubleContraction" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testSTDoubleContraction.dat" );
@@ -869,7 +869,7 @@ void TensorMultMathSuite_TestPrintNonSqu
if (data->rank == procToWatch) {
double **nonSquareMatrixA, **nonSquareMatrixB;
double **nonSquareMatrixResult, **nonSquareMatrixAT;
- Stream* stream = Journal_Register( InfoStream_Type, "PrintNonSquareMatrix" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"PrintNonSquareMatrix" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testPrintNonSquareMatrix.dat" );
@@ -877,10 +877,10 @@ void TensorMultMathSuite_TestPrintNonSqu
Journal_Printf(stream, "******************* Test 17 ************************\n");
Journal_Printf( stream, "Test function Journal_PrintNonSquareMatrix \n\n");
- nonSquareMatrixA = Memory_Alloc_2DArray(double, 3, 4, "NonSquareMatrixA" );
- nonSquareMatrixB = Memory_Alloc_2DArray(double, 4, 2, "NonSquareMatrixB" );
- nonSquareMatrixAT = Memory_Alloc_2DArray(double, 4, 3, "NonSquareMatrixAT" );
- nonSquareMatrixResult = Memory_Alloc_2DArray(double, 3, 2, "NonSquareMatrixResult" );
+ nonSquareMatrixA = Memory_Alloc_2DArray( double, 3, 4, (Name)"NonSquareMatrixA" );
+ nonSquareMatrixB = Memory_Alloc_2DArray( double, 4, 2, (Name)"NonSquareMatrixB" );
+ nonSquareMatrixAT = Memory_Alloc_2DArray( double, 4, 3, (Name)"NonSquareMatrixAT" );
+ nonSquareMatrixResult = Memory_Alloc_2DArray( double, 3, 2, (Name)"NonSquareMatrixResult" );
/* Matrix A */
nonSquareMatrixA[0][0] = 0; nonSquareMatrixA[1][0] = 4;
nonSquareMatrixA[0][1] = 1; nonSquareMatrixA[1][1] = 5;
@@ -918,7 +918,7 @@ void TensorMultMathSuite_TestNonSquareMa
if (data->rank == procToWatch) {
double **nonSquareMatrixA, **nonSquareMatrixB;
double **nonSquareMatrixResult, **nonSquareMatrixAT;
- Stream* stream = Journal_Register( InfoStream_Type, "NonSquareMatrixTranspose" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"NonSquareMatrixTranspose" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testNonSquareMatrixTranspose.dat" );
@@ -926,10 +926,10 @@ void TensorMultMathSuite_TestNonSquareMa
Journal_Printf(stream, "******************* Test 18 ************************\n");
Journal_Printf( stream, "Test function NonSquareMatrix_Transpose \n\n");
- nonSquareMatrixA = Memory_Alloc_2DArray(double, 3, 4, "NonSquareMatrixA" );
- nonSquareMatrixB = Memory_Alloc_2DArray(double, 4, 2, "NonSquareMatrixB" );
- nonSquareMatrixAT = Memory_Alloc_2DArray(double, 4, 3, "NonSquareMatrixAT" );
- nonSquareMatrixResult = Memory_Alloc_2DArray(double, 3, 2, "NonSquareMatrixResult" );
+ nonSquareMatrixA = Memory_Alloc_2DArray( double, 3, 4, (Name)"NonSquareMatrixA" );
+ nonSquareMatrixB = Memory_Alloc_2DArray( double, 4, 2, (Name)"NonSquareMatrixB" );
+ nonSquareMatrixAT = Memory_Alloc_2DArray( double, 4, 3, (Name)"NonSquareMatrixAT" );
+ nonSquareMatrixResult = Memory_Alloc_2DArray( double, 3, 2, (Name)"NonSquareMatrixResult" );
/* Matrix A */
nonSquareMatrixA[0][0] = 0; nonSquareMatrixA[1][0] = 4;
nonSquareMatrixA[0][1] = 1; nonSquareMatrixA[1][1] = 5;
@@ -968,7 +968,7 @@ void TensorMultMathSuite_TestMultiplicat
if (data->rank == procToWatch) {
double **nonSquareMatrixA, **nonSquareMatrixB;
double **nonSquareMatrixResult, **nonSquareMatrixAT;
- Stream* stream = Journal_Register( InfoStream_Type, "MultiplicationByNonSquareMatrix" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"MultiplicationByNonSquareMatrix" );
char expected_file[PCU_PATH_MAX];
Stream_RedirectFile( stream, "testMultiplicationByNonSquareMatrix.dat" );
@@ -976,10 +976,10 @@ void TensorMultMathSuite_TestMultiplicat
Journal_Printf(stream, "******************* Test 19 ************************\n");
Journal_Printf( stream, "Test function NonSquareMatrix_MultiplicationByNonSquareMatrix \n\n");
- nonSquareMatrixA = Memory_Alloc_2DArray(double, 3, 4, "NonSquareMatrixA" );
- nonSquareMatrixB = Memory_Alloc_2DArray(double, 4, 2, "NonSquareMatrixB" );
- nonSquareMatrixAT = Memory_Alloc_2DArray(double, 4, 3, "NonSquareMatrixAT" );
- nonSquareMatrixResult = Memory_Alloc_2DArray(double, 3, 2, "NonSquareMatrixResult" );
+ nonSquareMatrixA = Memory_Alloc_2DArray( double, 3, 4, (Name)"NonSquareMatrixA" );
+ nonSquareMatrixB = Memory_Alloc_2DArray( double, 4, 2, (Name)"NonSquareMatrixB" );
+ nonSquareMatrixAT = Memory_Alloc_2DArray( double, 4, 3, (Name)"NonSquareMatrixAT" );
+ nonSquareMatrixResult = Memory_Alloc_2DArray( double, 3, 2, (Name)"NonSquareMatrixResult" );
/* Matrix A */
nonSquareMatrixA[0][0] = 0; nonSquareMatrixA[1][0] = 4;
nonSquareMatrixA[0][1] = 1; nonSquareMatrixA[1][1] = 5;
@@ -1024,7 +1024,7 @@ void TensorMultMathSuite_TestMatrixVecto
double **nonSquareMatrixA, **nonSquareMatrixAT;
double solutionVector[4], solutionVectorCompare[4];
Dimension_Index row;
- Stream* stream = Journal_Register( InfoStream_Type, "MatrixVectorMultiplication" );
+ Stream* stream = Journal_Register( InfoStream_Type, (Name)"MatrixVectorMultiplication" );
char expected_file[PCU_PATH_MAX];
#define STG_TENSORMULTMATHTEST_ERROR 1.0e-14;
@@ -1034,8 +1034,8 @@ void TensorMultMathSuite_TestMatrixVecto
Journal_Printf( stream, "Test function NonSquareMatrix_MatrixVectorMultiplication \n\n");
Journal_Printf( stream, "Tested against solutions at http://www.uni-bonn.de/~manfear/solve_lineq.php\n\n");
- nonSquareMatrixA = Memory_Alloc_2DArray(double, 3, 4, "NonSquareMatrixA" );
- nonSquareMatrixAT = Memory_Alloc_2DArray(double, 4, 3, "NonSquareMatrixAT" );
+ nonSquareMatrixA = Memory_Alloc_2DArray( double, 3, 4, (Name)"NonSquareMatrixA" );
+ nonSquareMatrixAT = Memory_Alloc_2DArray( double, 4, 3, (Name)"NonSquareMatrixAT" );
/* Matrix A */
nonSquareMatrixA[0][0] = 0; nonSquareMatrixA[1][0] = 4;
nonSquareMatrixA[0][1] = 1; nonSquareMatrixA[1][1] = 5;
diff -r 92ee57abdec6 -r 36afba1d4768 Geometry/tests/VectorMathSuite.c
--- a/Geometry/tests/VectorMathSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Geometry/tests/VectorMathSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -62,10 +62,10 @@ void VectorMathSuite_Teardown( VectorMat
void VectorMathSuite_BasicTest( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "BasicTest" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"BasicTest" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
Coord a, b, c;
Coord d = { 1.0, 1.0, 1.0 };
Coord e = { 1.0, 2.0, -3.0 };
@@ -107,10 +107,10 @@ void VectorMathSuite_BasicTest( VectorMa
void VectorMathSuite_CompleteTest( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "CompleteTest" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"CompleteTest" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
Coord a, b, c;
Index i;
@@ -148,10 +148,10 @@ void VectorMathSuite_CompleteTest( Vecto
void VectorMathSuite_TestVectorFunctions( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "CompleteTest" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"CompleteTest" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
double i[] = {1.0,0.0,0.0};
double j[] = {0.0,1.0,0.0};
double k[] = {0.0,0.0,1.0};
@@ -220,10 +220,10 @@ void VectorMathSuite_TestVectorFunctions
void VectorMathSuite_TestMagnitudeFunction( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "MagnitudeFunction" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"MagnitudeFunction" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
double A[] = { 7.4, 2 , 5 , 1, 3 , -42};
double B[] = { 4 , 2.3, 5.8, 6, -12, 39289};
int d;
@@ -248,10 +248,10 @@ void VectorMathSuite_TestMagnitudeFuncti
void VectorMathSuite_TestDotProductFunction( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "DotProductFunction" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"DotProductFunction" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
double A[] = { 7.4, 2 , 5 , 1, 3 , -42};
double B[] = { 4 , 2.3, 5.8, 6, -12, 39289};
int d;
@@ -274,10 +274,10 @@ void VectorMathSuite_TestDotProductFunct
void VectorMathSuite_TestCrossProductFunction( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "CrossProductFunction" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"CrossProductFunction" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
double A[] = { 7.4, 2 , 5 , 1, 3 , -42};
double B[] = { 4 , 2.3, 5.8, 6, -12, 39289};
double vector[6];
@@ -301,10 +301,10 @@ void VectorMathSuite_TestCrossProductFun
void VectorMathSuite_TestDistancePointsFunction( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "DistancePointsFunction" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"DistancePointsFunction" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
double A[] = { 7.4, 2 , 5 , 1, 3 , -42};
double B[] = { 4 , 2.3, 5.8, 6, -12, 39289};
int d;
@@ -327,10 +327,10 @@ void VectorMathSuite_TestDistancePointsF
void VectorMathSuite_TestNormalToPlaneFunction( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "NormalToPlaneFunction" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"NormalToPlaneFunction" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
double A[] = { 7.4, 2 , 5 , 1, 3 , -42};
double B[] = { 4 , 2.3, 5.8, 6, -12, 39289};
double C[] = {23 , 5 , -14 , 32, -21, 78};
@@ -355,10 +355,10 @@ void VectorMathSuite_TestNormalToPlaneFu
void VectorMathSuite_TestCentroidFunction( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "CentroidFunction" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"CentroidFunction" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
double A[] = { 7.4, 2 , 5 , 1, 3 , -42};
double B[] = { 4 , 2.3, 5.8, 6, -12, 39289};
double C[] = {23 , 5 , -14 , 32, -21, 78};
@@ -386,10 +386,10 @@ void VectorMathSuite_TestCentroidFunctio
void VectorMathSuite_TestTriangleArea( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "TriangleArea" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"TriangleArea" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
double A[] = { 7.4, 2 , 5 , 1, 3 , -42};
double B[] = { 4 , 2.3, 5.8, 6, -12, 39289};
double C[] = {23 , 5 , -14 , 32, -21, 78};
@@ -413,10 +413,10 @@ void VectorMathSuite_TestTriangleArea( V
void VectorMathSuite_TestNormalisationFunction( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "NormalisationFunction" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"NormalisationFunction" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
double A[] = { 7.4, 2 , 5 , 1, 3 , -42};
double B[] = { 4 , 2.3, 5.8, 6, -12, 39289};
double C[] = {23 , 5 , -14 , 32, -21, 78};
@@ -452,10 +452,10 @@ void VectorMathSuite_TestNormalisationFu
void VectorMathSuite_TestVectorCrossProductMagnitude( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "VectorCrossProductMagnitude" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"VectorCrossProductMagnitude" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
double A[] = { 7.4, 2 , 5 , 1, 3 , -42};
double B[] = { 4 , 2.3, 5.8, 6, -12, 39289};
@@ -480,10 +480,10 @@ void VectorMathSuite_TestVectorCrossProd
void VectorMathSuite_TestConvexQuadrilateralArea( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "ConvexQuadrilateralArea" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"ConvexQuadrilateralArea" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
double A[] = { 7.4, 2 , 5 , 1, 3 , -42};
double B[] = { 4 , 2.3, 5.8, 6, -12, 39289};
double C[] = {23 , 5 , -14 , 32, -21, 78};
@@ -510,17 +510,17 @@ void VectorMathSuite_TestConvexQuadrilat
void VectorMathSuite_TestScalarTripleProduct( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "ScalarTripleProduct" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"ScalarTripleProduct" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
double **matrix;
Stream_RedirectFile( stream, "testScalarTripleProduct.dat" );
Journal_Printf( stream, "****************************\n");
Journal_Printf( stream, "Check StGermain_ScalarTripleProduct \n");
- matrix = Memory_Alloc_2DArray( double, 3, 3, "matrix" );
+ matrix = Memory_Alloc_2DArray( double, 3, 3, (Name)"matrix" );
matrix[0][0] = 1.0; matrix[0][1] = 2.0 ; matrix[0][2] = 3.0;
matrix[1][0] = 4.0; matrix[1][1] = 5.0 ; matrix[1][2] = 6.0;
matrix[2][0] = 7.0; matrix[2][1] = 8.0 ; matrix[2][2] = 11.0;
@@ -540,10 +540,10 @@ void VectorMathSuite_TestScalarTriplePro
void VectorMathSuite_TestParallelPipedVolume( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "ParallelPipedVolume" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"ParallelPipedVolume" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
double A[] = { 7.4, 2 , 5 , 1, 3 , -42};
double B[] = { 4 , 2.3, 5.8, 6, -12, 39289};
double C[] = {23 , 5 , -14 , 32, -21, 78};
@@ -569,10 +569,10 @@ void VectorMathSuite_TestParallelPipedVo
void VectorMathSuite_TestAverageCoord( VectorMathSuiteData* data ) {
unsigned procToWatch = data->nProcs >=2 ? 1 : 0;
- Stream* stream = Journal_Register( Info_Type, "AverageCoord" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"AverageCoord" );
char expected_file[PCU_PATH_MAX];
- if (data->rank == procToWatch) {
+ if (data->rank == procToWatch ) {
double A[] = { 7.4, 2 , 5 , 1, 3 , -42};
double B[] = { 4 , 2.3, 5.8, 6, -12, 39289};
double C[] = {23 , 5 , -14 , 32, -21, 78};
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/CartesianGenerator.c
--- a/Mesh/src/CartesianGenerator.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/CartesianGenerator.c Thu Jan 14 17:42:34 2010 +1100
@@ -133,7 +133,7 @@ void _CartesianGenerator_Init( Cartesian
assert( self && Stg_CheckType( self, CartesianGenerator ) );
- stream = Journal_Register( Info_Type, self->type );
+ stream = Journal_Register( Info_Type, (Name)self->type );
Stream_SetPrintingRank( stream, 0 );
self->comm = NULL;
@@ -174,7 +174,7 @@ void _CartesianGenerator_Print( void* me
/* Set the Journal for printing informations */
Stream* meshGeneratorStream;
- meshGeneratorStream = Journal_Register( InfoStream_Type, "CartesianGeneratorStream" );
+ meshGeneratorStream = Journal_Register( InfoStream_Type, (Name)"CartesianGeneratorStream" );
assert( self && Stg_CheckType( self, CartesianGenerator ) );
@@ -196,7 +196,7 @@ void _CartesianGenerator_AssignFromXML(
unsigned* size;
unsigned shadowDepth;
Stream* stream;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
unsigned d_i;
unsigned restartTimestep;
AbstractContext* context;
@@ -208,56 +208,56 @@ void _CartesianGenerator_AssignFromXML(
assert( cf );
/* get the context which is required for filename determination */
- context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data ) ;
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data ) ;
/* Call parent construct. */
_MeshGenerator_AssignFromXML( self, cf, data );
/* Rip out the components structure as a dictionary. */
- dict = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( cf->componentDict, self->name ) );
+ dict = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( cf->componentDict, (Dictionary_Entry_Key)self->name ) );
/* Read the sizes. */
- sizeList = Dictionary_Get( dict, "size" );
+ sizeList = Dictionary_Get( dict, (Dictionary_Entry_Key)"size" );
assert( sizeList );
- assert( Dictionary_Entry_Value_GetCount( sizeList ) >= self->nDims );
+ assert( Dictionary_Entry_Value_GetCount( sizeList ) >= self->nDims );
size = Memory_Alloc_Array_Unnamed( unsigned, self->nDims );
for( d_i = 0; d_i < self->nDims; d_i++ ) {
tmp = Dictionary_Entry_Value_GetElement( sizeList, d_i );
rootKey = Dictionary_Entry_Value_AsString( tmp );
- if( !Stg_StringIsNumeric( rootKey ) )
- tmp = Dictionary_Get( cf->rootDict, rootKey );
- size[d_i] = Dictionary_Entry_Value_AsUnsignedInt( tmp );
+ if( !Stg_StringIsNumeric( (char *)rootKey ) )
+ tmp = Dictionary_Get( cf->rootDict, (Dictionary_Entry_Key)rootKey );
+ size[d_i] = Dictionary_Entry_Value_AsUnsignedInt( tmp );
}
/* Read decomposition restrictions. */
- maxDecompDims = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "maxDecomposedDims", 0 );
+ maxDecompDims = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"maxDecomposedDims", 0 );
- minList = Dictionary_Get( dict, "minDecompositions" );
- if( minList ) {
+ minList = Dictionary_Get( dict, (Dictionary_Entry_Key)"minDecompositions" );
+ if( minList ) {
minDecomp = AllocArray( unsigned, self->nDims );
for( d_i = 0; d_i < self->nDims; d_i++ ) {
tmp = Dictionary_Entry_Value_GetElement( minList, d_i );
rootKey = Dictionary_Entry_Value_AsString( tmp );
- if( !Stg_StringIsNumeric( rootKey ) )
- tmp = Dictionary_Get( cf->rootDict, rootKey );
- minDecomp[d_i] = Dictionary_Entry_Value_AsUnsignedInt( tmp );
+ if( !Stg_StringIsNumeric( (char *)rootKey ) )
+ tmp = Dictionary_Get( cf->rootDict, (Dictionary_Entry_Key)rootKey );
+ minDecomp[d_i] = Dictionary_Entry_Value_AsUnsignedInt( tmp );
}
}
else
minDecomp = NULL;
- maxList = Dictionary_Get( dict, "maxDecompositions" );
- if( maxList ) {
+ maxList = Dictionary_Get( dict, (Dictionary_Entry_Key)"maxDecompositions" );
+ if( maxList ) {
maxDecomp = AllocArray( unsigned, self->nDims );
for( d_i = 0; d_i < self->nDims; d_i++ ) {
tmp = Dictionary_Entry_Value_GetElement( maxList, d_i );
rootKey = Dictionary_Entry_Value_AsString( tmp );
- if( !Stg_StringIsNumeric( rootKey ) )
- tmp = Dictionary_Get( cf->rootDict, rootKey );
- maxDecomp[d_i] = Dictionary_Entry_Value_AsUnsignedInt( tmp );
+ if( !Stg_StringIsNumeric( (char *)rootKey ) )
+ tmp = Dictionary_Get( cf->rootDict, (Dictionary_Entry_Key)rootKey );
+ maxDecomp[d_i] = Dictionary_Entry_Value_AsUnsignedInt( tmp );
}
}
else
@@ -267,22 +267,22 @@ void _CartesianGenerator_AssignFromXML(
CartesianGenerator_SetTopologyParams( self, size, maxDecompDims, minDecomp, maxDecomp );
/* Contact stuff. */
- self->contactDepth[0][0] = Stg_ComponentFactory_GetInt( cf, self->name, "contactDepth-left", 0 );
- self->contactDepth[0][1] = Stg_ComponentFactory_GetInt( cf, self->name, "contactDepth-right", 0 );
- self->contactDepth[1][0] = Stg_ComponentFactory_GetInt( cf, self->name, "contactDepth-bottom", 0 );
- self->contactDepth[1][1] = Stg_ComponentFactory_GetInt( cf, self->name, "contactDepth-top", 0 );
- self->contactDepth[2][0] = Stg_ComponentFactory_GetInt( cf, self->name, "contactDepth-back", 0 );
- self->contactDepth[2][1] = Stg_ComponentFactory_GetInt( cf, self->name, "contactDepth-front", 0 );
- self->contactGeom[0] = Stg_ComponentFactory_GetDouble( cf, self->name, "contactGeometry-x", 0.0 );
- self->contactGeom[1] = Stg_ComponentFactory_GetDouble( cf, self->name, "contactGeometry-y", 0.0 );
- self->contactGeom[2] = Stg_ComponentFactory_GetDouble( cf, self->name, "contactGeometry-z", 0.0 );
+ self->contactDepth[0][0] = Stg_ComponentFactory_GetInt( cf, self->name, (Dictionary_Entry_Key)"contactDepth-left", 0 );
+ self->contactDepth[0][1] = Stg_ComponentFactory_GetInt( cf, self->name, (Dictionary_Entry_Key)"contactDepth-right", 0 );
+ self->contactDepth[1][0] = Stg_ComponentFactory_GetInt( cf, self->name, (Dictionary_Entry_Key)"contactDepth-bottom", 0 );
+ self->contactDepth[1][1] = Stg_ComponentFactory_GetInt( cf, self->name, (Dictionary_Entry_Key)"contactDepth-top", 0 );
+ self->contactDepth[2][0] = Stg_ComponentFactory_GetInt( cf, self->name, (Dictionary_Entry_Key)"contactDepth-back", 0 );
+ self->contactDepth[2][1] = Stg_ComponentFactory_GetInt( cf, self->name, (Dictionary_Entry_Key)"contactDepth-front", 0 );
+ self->contactGeom[0] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"contactGeometry-x", 0.0 );
+ self->contactGeom[1] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"contactGeometry-y", 0.0 );
+ self->contactGeom[2] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"contactGeometry-z", 0.0 );
/* Read geometry. */
- minList = Dictionary_Get( dict, "minCoord" );
- maxList = Dictionary_Get( dict, "maxCoord" );
+ minList = Dictionary_Get( dict, (Dictionary_Entry_Key)"minCoord" );
+ maxList = Dictionary_Get( dict, (Dictionary_Entry_Key)"maxCoord" );
if( minList && maxList ) {
assert( Dictionary_Entry_Value_GetCount( minList ) >= self->nDims );
- assert( Dictionary_Entry_Value_GetCount( maxList ) >= self->nDims );
+ assert( Dictionary_Entry_Value_GetCount( maxList ) >= self->nDims );
crdMin = Memory_Alloc_Array_Unnamed( double, 3 );
crdMax = Memory_Alloc_Array_Unnamed( double, 3 );
for( d_i = 0; d_i < self->nDims; d_i++ ) {
@@ -290,19 +290,19 @@ void _CartesianGenerator_AssignFromXML(
tmp = Dictionary_Entry_Value_GetElement( minList, d_i );
rootKey = Dictionary_Entry_Value_AsString( tmp );
- if( !Stg_StringIsNumeric( rootKey ) )
- tmp = Dictionary_Get( cf->rootDict, rootKey );
- crdMin[d_i] = Dictionary_Entry_Value_AsDouble( tmp );
+ if( !Stg_StringIsNumeric( (char *)rootKey ) )
+ tmp = Dictionary_Get( cf->rootDict, (Dictionary_Entry_Key)rootKey );
+ crdMin[d_i] = Dictionary_Entry_Value_AsDouble( tmp );
tmp = Dictionary_Entry_Value_GetElement( maxList, d_i );
rootKey = Dictionary_Entry_Value_AsString( tmp );
- if( !Stg_StringIsNumeric( rootKey ) )
- tmp = Dictionary_Get( cf->rootDict, rootKey );
+ if( !Stg_StringIsNumeric( (char *)rootKey ) )
+ tmp = Dictionary_Get( cf->rootDict, (Dictionary_Entry_Key)rootKey );
crdMax[d_i] = Dictionary_Entry_Value_AsDouble( tmp );
/* test to ensure provided domain is valid */
maxVal = (abs(crdMax[d_i]) > abs(crdMin[d_i])) ? abs(crdMax[d_i]) : abs(crdMin[d_i]);
- if( maxVal == 0 ) maxVal = 1; /* if maxVal is zero, then both numbers must be zero, set to one as next test will fail */
+ if( maxVal == 0 ) maxVal = 1; /* if maxVal is zero, then both numbers must be zero, set to one as next test will fail */
Journal_Firewall( ( ( (crdMax[d_i] - crdMin[d_i])/maxVal) > 1E-10 ), errorStream,
"\n\nError in %s for %s '%s'\n\n"
"Dimension of domain (min = %f, max = %f) for component number %u is not valid.\n\n",
@@ -310,8 +310,8 @@ void _CartesianGenerator_AssignFromXML(
crdMin[d_i], crdMax[d_i], d_i);
}
- restartTimestep = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, "restartTimestep", 0 );
- if( restartTimestep ) {
+ restartTimestep = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, (Dictionary_Entry_Key)"restartTimestep", 0 );
+ if( restartTimestep ) {
char* meshReadFileName;
char* meshReadFileNamePart;
self->readFromFile = True;
@@ -467,22 +467,19 @@ void _CartesianGenerator_AssignFromXML(
}
/* Read and set shadow depth. */
- shadowDepth = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "shadowDepth", 1 );
+ shadowDepth = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"shadowDepth", 1 );
CartesianGenerator_SetShadowDepth( self, shadowDepth );
/* Read regular flag. */
- self->regular = Stg_ComponentFactory_GetBool( cf, self->name, "regular", True );
+ self->regular = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"regular", True );
/* Read periodic flags. */
- self->periodic[0] = Stg_ComponentFactory_GetBool( cf, self->name,
- "periodic_x", False );
- self->periodic[1] = Stg_ComponentFactory_GetBool( cf, self->name,
- "periodic_y", False );
- self->periodic[2] = Stg_ComponentFactory_GetBool( cf, self->name,
- "periodic_z", False );
+ self->periodic[0] = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"periodic_x", False );
+ self->periodic[1] = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"periodic_y", False );
+ self->periodic[2] = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"periodic_z", False );
/* Read a general dictionary flag for which processor to watch. */
- stream = Journal_Register( Info_Type, self->type );
+ stream = Journal_Register( Info_Type, (Name)self->type );
Stream_SetPrintingRank( stream, Dictionary_GetUnsignedInt_WithDefault( cf->rootDict, "rankToWatch", 0 ) );
/* Free stuff. */
@@ -524,8 +521,8 @@ void CartesianGenerator_SetDimSize( void
void CartesianGenerator_Generate( void* meshGenerator, void* _mesh, void* data ) {
CartesianGenerator* self = (CartesianGenerator*)meshGenerator;
- Stream* stream = Journal_Register( Info_Type, self->type );
- Mesh* mesh = (Mesh*)_mesh;
+ Stream* stream = Journal_Register( Info_Type, (Name)self->type );
+ Mesh* mesh = (Mesh* )_mesh;
Grid** grid;
unsigned *localRange, *localOrigin;
Bool *periodic;
@@ -571,28 +568,28 @@ void CartesianGenerator_Generate( void*
}
/* Add extensions to the mesh and fill with cartesian information. */
- ExtensionManager_Add( mesh->info, "vertexGrid", sizeof(Grid*) );
- grid = (Grid**)ExtensionManager_Get( mesh->info, mesh, ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
- *grid = Grid_New();
+ ExtensionManager_Add( mesh->info, (Name)"vertexGrid", sizeof(Grid*) );
+ grid = (Grid** )ExtensionManager_Get( mesh->info, mesh, ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
+ *grid = Grid_New( );
Grid_SetNumDims( *grid, self->vertGrid->nDims );
Grid_SetSizes( *grid, self->vertGrid->sizes );
- ExtensionManager_Add( mesh->info, "elementGrid", sizeof(Grid*) );
- grid = (Grid**)ExtensionManager_Get( mesh->info, mesh, ExtensionManager_GetHandle( mesh->info, "elementGrid" ) );
- *grid = Grid_New();
+ ExtensionManager_Add( mesh->info, (Name)"elementGrid", sizeof(Grid*) );
+ grid = (Grid** )ExtensionManager_Get( mesh->info, mesh, ExtensionManager_GetHandle( mesh->info, (Name)"elementGrid" ) );
+ *grid = Grid_New( );
Grid_SetNumDims( *grid, self->elGrid->nDims );
Grid_SetSizes( *grid, self->elGrid->sizes );
ExtensionManager_AddArray( mesh->info, "localOrigin", sizeof(unsigned), Mesh_GetDimSize( mesh ) );
- localOrigin = (unsigned*)ExtensionManager_Get( mesh->info, mesh, ExtensionManager_GetHandle( mesh->info, "localOrigin" ) );
+ localOrigin = (unsigned*)ExtensionManager_Get( mesh->info, mesh, ExtensionManager_GetHandle( mesh->info, (Name)"localOrigin" ) );
memcpy( localOrigin, self->origin, Mesh_GetDimSize( mesh ) * sizeof(unsigned) );
ExtensionManager_AddArray( mesh->info, "localRange", sizeof(unsigned), Mesh_GetDimSize( mesh ) );
- localRange = (unsigned*)ExtensionManager_Get( mesh->info, mesh, ExtensionManager_GetHandle( mesh->info, "localRange" ) );
+ localRange = (unsigned*)ExtensionManager_Get( mesh->info, mesh, ExtensionManager_GetHandle( mesh->info, (Name)"localRange" ) );
memcpy( localRange, self->range, Mesh_GetDimSize( mesh ) * sizeof(unsigned) );
ExtensionManager_AddArray( mesh->info, "periodic", sizeof(Bool), 3 );
- periodic = (Bool*)ExtensionManager_Get( mesh->info, mesh, ExtensionManager_GetHandle( mesh->info, "periodic" ));
+ periodic = (Bool*)ExtensionManager_Get( mesh->info, mesh, ExtensionManager_GetHandle( mesh->info, (Name)"periodic" ) );
memcpy( periodic, self->periodic, 3 * sizeof(Bool) );
Stream_UnIndent( stream );
@@ -643,7 +640,7 @@ void _CartesianGenerator_SetTopologyPara
void _CartesianGenerator_GenElements( void* meshGenerator, IGraph* topo, Grid*** grids ) {
CartesianGenerator* self = (CartesianGenerator*)meshGenerator;
- Stream* stream = Journal_Register( Info_Type, self->type );
+ Stream* stream = Journal_Register( Info_Type, (Name)self->type );
Grid* grid;
unsigned nEls;
unsigned* els;
@@ -687,7 +684,7 @@ void _CartesianGenerator_GenElements( vo
void _CartesianGenerator_GenVertices( void* meshGenerator, IGraph* topo, Grid*** grids ) {
CartesianGenerator* self = (CartesianGenerator*)meshGenerator;
- Stream* stream = Journal_Register( Info_Type, self->type );
+ Stream* stream = Journal_Register( Info_Type, (Name)self->type );
unsigned rank;
Grid* globalGrid;
Grid* grid;
@@ -772,7 +769,7 @@ void _CartesianGenerator_GenVertices( vo
void _CartesianGenerator_GenEdges( void* meshGenerator, IGraph* topo, Grid*** grids ) {
CartesianGenerator* self = (CartesianGenerator*)meshGenerator;
- Stream* stream = Journal_Register( Info_Type, self->type );
+ Stream* stream = Journal_Register( Info_Type, (Name)self->type );
assert( self && Stg_CheckType( self, CartesianGenerator ) );
assert( topo );
@@ -794,7 +791,7 @@ void _CartesianGenerator_GenEdges( void*
void _CartesianGenerator_GenFaces( void* meshGenerator, IGraph* topo, Grid*** grids ) {
CartesianGenerator* self = (CartesianGenerator*)meshGenerator;
- Stream* stream = Journal_Register( Info_Type, self->type );
+ Stream* stream = Journal_Register( Info_Type, (Name)self->type );
Grid* globalGrid;
unsigned nGlobalEls[2];
Grid* grid;
@@ -897,7 +894,7 @@ void _CartesianGenerator_GenFaces( void*
void _CartesianGenerator_GenElementVertexInc( void* meshGenerator, IGraph* topo, Grid*** grids ) {
CartesianGenerator* self = (CartesianGenerator*)meshGenerator;
- Stream* stream = Journal_Register( Info_Type, self->type );
+ Stream* stream = Journal_Register( Info_Type, (Name)self->type );
int nDomainEls;
unsigned* incEls;
unsigned* dimInds;
@@ -973,7 +970,7 @@ void _CartesianGenerator_GenElementVerte
void _CartesianGenerator_GenVolumeEdgeInc( void* meshGenerator, IGraph* topo, Grid*** grids ) {
CartesianGenerator* self = (CartesianGenerator*)meshGenerator;
- Stream* stream = Journal_Register( Info_Type, self->type );
+ Stream* stream = Journal_Register( Info_Type, (Name)self->type );
unsigned nIncEls;
unsigned* incEls;
unsigned* dimInds;
@@ -1050,7 +1047,7 @@ void _CartesianGenerator_GenVolumeEdgeIn
void _CartesianGenerator_GenVolumeFaceInc( void* meshGenerator, IGraph* topo, Grid*** grids ) {
CartesianGenerator* self = (CartesianGenerator*)meshGenerator;
- Stream* stream = Journal_Register( Info_Type, self->type );
+ Stream* stream = Journal_Register( Info_Type, (Name)self->type );
unsigned nIncEls;
unsigned* incEls;
unsigned* dimInds;
@@ -1105,7 +1102,7 @@ void _CartesianGenerator_GenVolumeFaceIn
void _CartesianGenerator_GenFaceVertexInc( void* meshGenerator, IGraph* topo, Grid*** grids ) {
CartesianGenerator* self = (CartesianGenerator*)meshGenerator;
- Stream* stream = Journal_Register( Info_Type, self->type );
+ Stream* stream = Journal_Register( Info_Type, (Name)self->type );
unsigned nIncEls;
unsigned* incEls;
unsigned* dimInds;
@@ -1198,7 +1195,7 @@ void _CartesianGenerator_GenFaceVertexIn
void _CartesianGenerator_GenFaceEdgeInc( void* meshGenerator, IGraph* topo, Grid*** grids ) {
CartesianGenerator* self = (CartesianGenerator*)meshGenerator;
- Stream* stream = Journal_Register( Info_Type, self->type );
+ Stream* stream = Journal_Register( Info_Type, (Name)self->type );
unsigned nIncEls;
unsigned* incEls;
unsigned* dimInds;
@@ -1285,7 +1282,7 @@ void _CartesianGenerator_GenFaceEdgeInc(
void _CartesianGenerator_GenEdgeVertexInc( void* meshGenerator, IGraph* topo, Grid*** grids ) {
CartesianGenerator* self = (CartesianGenerator*)meshGenerator;
- Stream* stream = Journal_Register( Info_Type, self->type );
+ Stream* stream = Journal_Register( Info_Type, (Name)self->type );
unsigned nIncEls;
unsigned* incEls;
unsigned* dimInds;
@@ -1361,7 +1358,7 @@ void _CartesianGenerator_GenElementTypes
assert( self && Stg_CheckType( self, CartesianGenerator ) );
- stream = Journal_Register( Info_Type, self->type );
+ stream = Journal_Register( Info_Type, (Name)self->type );
Journal_Printf( stream, "Generating element types...\n" );
Stream_Indent( stream );
@@ -1991,7 +1988,7 @@ void CartesianGenerator_GenBndVerts( Car
}
void CartesianGenerator_CompleteVertexNeighbours( CartesianGenerator* self, IGraph* topo, Grid*** grids ) {
- Stream* stream = Journal_Register( Info_Type, self->type );
+ Stream* stream = Journal_Register( Info_Type, (Name)self->type );
const Sync* sync;
unsigned nDims;
unsigned nVerts;
@@ -2110,12 +2107,12 @@ void CartesianGenerator_MapToDomain( Car
#define MAX_LINE_LENGTH 1024
void CartesianGenerator_GenGeom( CartesianGenerator* self, Mesh* mesh, void* data ) {
- Stream* stream = Journal_Register( Info_Type, self->type );
+ Stream* stream = Journal_Register( Info_Type, (Name)self->type );
Sync* sync;
AbstractContext* context = (AbstractContext*)data;
assert( self );
- assert( mesh );
+ assert( mesh );
Journal_Printf( stream, "Generating geometry...\n" );
Stream_Indent( stream );
@@ -2258,7 +2255,7 @@ void CartesianGenerator_ReadFromHDF5( C
hid_t attrib_id, group_id;
herr_t status;
char* verticeName;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
/* Open the file and data set. */
file = H5Fopen( filename, H5F_ACC_RDONLY, H5P_DEFAULT );
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/CompressionAdaptor.c
--- a/Mesh/src/CompressionAdaptor.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/CompressionAdaptor.c Thu Jan 14 17:42:34 2010 +1100
@@ -124,7 +124,7 @@ void _CompressionAdaptor_Print( void* ad
/* Set the Journal for printing informations */
Stream* adaptorStream;
- adaptorStream = Journal_Register( InfoStream_Type, "CompressionAdaptorStream" );
+ adaptorStream = Journal_Register( InfoStream_Type, (Name)"CompressionAdaptorStream" );
/* Print parent */
Journal_Printf( stream, "CompressionAdaptor (ptr): (%p)\n", self );
@@ -140,10 +140,10 @@ void _CompressionAdaptor_AssignFromXML(
/* Call parent construct. */
_MeshAdaptor_AssignFromXML( self, cf, data );
- self->compressionfactor = Stg_ComponentFactory_GetDouble( cf, self->name, "compressionfactor", 0.0 );
+ self->compressionfactor = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"compressionfactor", 0.0 );
if(self->compressionfactor == 0.0){
printf("cannot have a zero compression factor exiting program\n");
- abort();
+ abort( );
}
}
@@ -187,7 +187,7 @@ void CompressionAdaptor_Generate( void*
/* Extract the cartesian information. */
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
inds = AllocArray( unsigned, Mesh_GetDimSize( mesh ) );
//get factor b so that there is always a 1 to 1 relationship with the top position normally and top position when compressed
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/Finalise.c
--- a/Mesh/src/Finalise.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/Finalise.c Thu Jan 14 17:42:34 2010 +1100
@@ -41,7 +41,7 @@
#include <stdio.h>
Bool StgDomainMesh_Finalise( void ) {
- Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
+ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
return True;
}
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/Grid.c
--- a/Mesh/src/Grid.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/Grid.c Thu Jan 14 17:42:34 2010 +1100
@@ -106,7 +106,7 @@ void _Grid_Print( void* grid, Stream* st
/* Set the Journal for printing informations */
Stream* gridStream;
- gridStream = Journal_Register( InfoStream_Type, "GridStream" );
+ gridStream = Journal_Register( InfoStream_Type, (Name)"GridStream" );
/* Print parent */
Journal_Printf( stream, "Grid (ptr): (%p)\n", self );
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/Init.c
--- a/Mesh/src/Init.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/Init.c Thu Jan 14 17:42:34 2010 +1100
@@ -44,25 +44,25 @@ Stream* Mesh_Error = NULL;
Bool StgDomainMesh_Init( int* argc, char** argv[] ) {
- Mesh_VerboseConfig = Journal_Register( Info_Type, "Mesh_VerboseConfig" );
- Mesh_Debug = Journal_Register( Debug_Type, "Mesh" );
- Mesh_Warning = Journal_Register( Error_Type, "Mesh" );
- Mesh_Error = Journal_Register( Error_Type, "Mesh" );
+ Mesh_VerboseConfig = Journal_Register( Info_Type, (Name)"Mesh_VerboseConfig" );
+ Mesh_Debug = Journal_Register( Debug_Type, (Name)"Mesh" );
+ Mesh_Warning = Journal_Register( Error_Type, (Name)"Mesh" );
+ Mesh_Error = Journal_Register( Error_Type, (Name)"Mesh" );
- Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
+ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
- 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_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(), Mesh_RegularAlgorithms_Type, "0", (Stg_Component_DefaultConstructorFunction*)Mesh_RegularAlgorithms_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 );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Mesh_Type, "0", (Stg_Component_DefaultConstructorFunction*)Mesh_New );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), SurfaceAdaptor_Type, "0", (Stg_Component_DefaultConstructorFunction*)SurfaceAdaptor_New );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), CompressionAdaptor_Type, "0", (Stg_Component_DefaultConstructorFunction*)CompressionAdaptor_New );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), LinearSpaceAdaptor_Type, "0", (Stg_Component_DefaultConstructorFunction*)LinearSpaceAdaptor_New );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), MeshVariable_Type, "0", (Stg_Component_DefaultConstructorFunction*)MeshVariable_New );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Remesher_Type, "0", (Stg_Component_DefaultConstructorFunction*)_Remesher_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Mesh_Algorithms_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)Mesh_Algorithms_New );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), Mesh_HexAlgorithms_Type, "0", (Stg_Component_DefaultConstructorFunction*)Mesh_HexAlgorithms_New );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Mesh_CentroidAlgorithms_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)Mesh_CentroidAlgorithms_New );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), Mesh_RegularAlgorithms_Type, "0", (Stg_Component_DefaultConstructorFunction*)Mesh_RegularAlgorithms_New );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), MeshTopology_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)MeshTopology_New );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), CartesianGenerator_Type, "0", (Stg_Component_DefaultConstructorFunction*)CartesianGenerator_New );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Mesh_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)Mesh_New );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), SurfaceAdaptor_Type, "0", (Stg_Component_DefaultConstructorFunction*)SurfaceAdaptor_New );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), CompressionAdaptor_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)CompressionAdaptor_New );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), LinearSpaceAdaptor_Type, "0", (Stg_Component_DefaultConstructorFunction*)LinearSpaceAdaptor_New );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), MeshVariable_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)MeshVariable_New );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), Remesher_Type, "0", (Stg_Component_DefaultConstructorFunction*)_Remesher_DefaultNew );
RegisterParent( Mesh_ElementType_Type, Stg_Class_Type );
RegisterParent( Mesh_HexType_Type, Mesh_ElementType_Type );
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/MeshAdaptor.c
--- a/Mesh/src/MeshAdaptor.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/MeshAdaptor.c Thu Jan 14 17:42:34 2010 +1100
@@ -88,7 +88,7 @@ void _MeshAdaptor_Print( void* adaptor,
/* Set the Journal for printing informations */
Stream* adaptorStream;
- adaptorStream = Journal_Register( InfoStream_Type, "MeshAdaptorStream" );
+ adaptorStream = Journal_Register( InfoStream_Type, (Name)"MeshAdaptorStream" );
/* Print parent */
Journal_Printf( stream, "MeshAdaptor (ptr): (%p)\n", self );
@@ -101,11 +101,10 @@ void _MeshAdaptor_AssignFromXML( void* a
_MeshGenerator_AssignFromXML( self, cf, data );
/* There could be either a generator or a mesh to use as a template. Prefer the mesh. */
- self->srcMesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, "sourceMesh", Mesh, False, data );
- if( !self->srcMesh ) {
+ self->srcMesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"sourceMesh", Mesh, False, data );
+ if( !self->srcMesh ) {
/* Read the source generator. */
- self->generator = Stg_ComponentFactory_ConstructByKey( cf, self->name, "sourceGenerator",
- MeshGenerator, True, data );
+ self->generator = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"sourceGenerator", MeshGenerator, True, data );
}
}
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/MeshClass.c
--- a/Mesh/src/MeshClass.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/MeshClass.c Thu Jan 14 17:42:34 2010 +1100
@@ -131,7 +131,7 @@ void _Mesh_Print( void* mesh, Stream* st
/* Set the Journal for printing informations */
Stream* meshStream;
- meshStream = Journal_Register( InfoStream_Type, "MeshStream" );
+ meshStream = Journal_Register( InfoStream_Type, (Name)"MeshStream" );
/* Print parent */
Journal_Printf( stream, "Mesh (ptr): (%p)\n", self );
@@ -142,9 +142,9 @@ void _Mesh_AssignFromXML( void* mesh, St
Mesh* self = (Mesh*)mesh;
AbstractContext* context = NULL;
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
_Mesh_Init( self, context );
}
@@ -527,16 +527,16 @@ Bool Mesh_HasExtension( void* mesh, cons
assert( self );
- return (ExtensionManager_GetHandle( self->info, name ) != -1) ? True : False;
+ return (ExtensionManager_GetHandle( self->info, (Name)name ) != -1 ) ? True : False;
}
void* _Mesh_GetExtension( void* mesh, const char* name ) {
Mesh* self = (Mesh*)mesh;
assert( self );
- assert( ExtensionManager_GetHandle( self->info, name ) != -1 );
+ assert( ExtensionManager_GetHandle( self->info, (Name)name ) != -1 );
- return ExtensionManager_Get( self->info, self, ExtensionManager_GetHandle( self->info, name ) );
+ return ExtensionManager_Get( self->info, self, ExtensionManager_GetHandle( self->info, (Name)name ) );
}
void* Mesh_GetTopologyData( void* mesh, MeshTopology_Dim dim ) {
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/MeshGenerator.c
--- a/Mesh/src/MeshGenerator.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/MeshGenerator.c Thu Jan 14 17:42:34 2010 +1100
@@ -94,7 +94,7 @@ void _MeshGenerator_Print( void* meshGen
/* Set the Journal for printing informations */
Stream* meshGeneratorStream;
- meshGeneratorStream = Journal_Register( InfoStream_Type, "MeshGeneratorStream" );
+ meshGeneratorStream = Journal_Register( InfoStream_Type, (Name)"MeshGeneratorStream" );
/* Print parent */
Journal_Printf( stream, "MeshGenerator (ptr): (%p)\n", self );
@@ -113,42 +113,42 @@ void _MeshGenerator_AssignFromXML( void*
assert( cf );
/* Rip out the components structure as a dictionary. */
- dict = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( cf->componentDict, self->name ) );
+ dict = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( cf->componentDict, (Dictionary_Entry_Key)self->name ) );
/* Set the communicator to a default. */
MeshGenerator_SetMPIComm( self, MPI_COMM_WORLD );
- self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !self->context )
- self->context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !self->context )
+ self->context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
/* Read the individual mesh if specified. */
- mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, "mesh", Mesh, False, data );
- if( mesh )
+ mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"mesh", Mesh, False, data );
+ if( mesh )
MeshGenerator_AddMesh( self, mesh );
/* Read the mesh list, if it's there. */
- meshList = Dictionary_Get( dict, "meshes" );
+ meshList = Dictionary_Get( dict, (Dictionary_Entry_Key)"meshes" );
if( meshList ) {
unsigned nMeshes;
char* name;
unsigned m_i;
nMeshes = Dictionary_Entry_Value_GetCount( meshList );
- for( m_i = 0; m_i < nMeshes; m_i++ ) {
+ for( m_i = 0; m_i < nMeshes; m_i++ ) {
Mesh* mesh;
name = Dictionary_Entry_Value_AsString( Dictionary_Entry_Value_GetElement( meshList, m_i ) );
- mesh = Stg_ComponentFactory_ConstructByName( cf, name, Mesh, True, data );
+ mesh = Stg_ComponentFactory_ConstructByName( cf, (Name)name, Mesh, True, data );
MeshGenerator_AddMesh( self, mesh );
}
}
/* Read dimensions and state. */
- nDims = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "dims", 2 );
+ nDims = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"dims", 2 );
MeshGenerator_SetDimSize( self, nDims );
- enabledDimsList = Dictionary_Get( dict, "enabledDims" );
- enabledIncList = Dictionary_Get( dict, "enabledIncidence" );
+ enabledDimsList = Dictionary_Get( dict, (Dictionary_Entry_Key)"enabledDims" );
+ enabledIncList = Dictionary_Get( dict, (Dictionary_Entry_Key)"enabledIncidence" );
/* Clear dims/incidence flags */
unsigned d_i;
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/MeshVariable.c
--- a/Mesh/src/MeshVariable.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/MeshVariable.c Thu Jan 14 17:42:34 2010 +1100
@@ -116,7 +116,7 @@ void _MeshVariable_Print( void* meshVari
/* Set the Journal for printing informations */
Stream* meshVariableStream;
- meshVariableStream = Journal_Register( InfoStream_Type, "MeshVariableStream" );
+ meshVariableStream = Journal_Register( InfoStream_Type, (Name)"MeshVariableStream" );
/* Print parent */
Journal_Printf( stream, "MeshVariable (ptr): (%p)\n", self );
@@ -135,36 +135,36 @@ void _MeshVariable_AssignFromXML( void*
void* variableRegister = NULL;
void* pointerRegister = NULL;
Name* names = NULL;
- Stream* error = Journal_Register( Error_Type, self->type );
+ Stream* error = Journal_Register( Error_Type, (Name)self->type );
Mesh* mesh;
AbstractContext* context;
assert( self );
componentDict = cf->componentDict;
- assert( componentDict );
+ assert( componentDict );
thisComponentDict = Dictionary_GetDictionary( componentDict, self->name );
assert( thisComponentDict );
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
/* Grab Registers */
variableRegister = context->variable_Register;
assert( variableRegister );
pointerRegister = context->pointer_Register;
- assert( pointerRegister );
+ assert( pointerRegister );
/* Construct the mesh. */
- mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, "mesh", Mesh, True, data );
+ mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"mesh", Mesh, True, data );
MeshVariable_SetMesh( self, mesh );
/* Get the topological element we're intereseted in. */
- self->topoDim = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "topologicalDim", 0 );
+ self->topoDim = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"topologicalDim", 0 );
/* Get Type of Variable */
- dataTypeName = Dictionary_GetString( thisComponentDict, "DataType" );
+ dataTypeName = Dictionary_GetString( thisComponentDict, (Dictionary_Entry_Key)"DataType" );
if ( !strcasecmp( dataTypeName, "Double" ) )
dataTypes[0] = Variable_DataType_Double;
else if ( !strcasecmp( dataTypeName, "Float" ) )
@@ -179,7 +179,7 @@ void _MeshVariable_AssignFromXML( void*
Journal_Firewall( False, error, "Variable '%s' cannot understand data type '%s'\n", self->name, dataTypeName );
/* Get Rank of Variable - i.e. Scalar or Vector */
- rankName = Dictionary_GetString( thisComponentDict, "Rank" );
+ rankName = Dictionary_GetString( thisComponentDict, (Dictionary_Entry_Key)"Rank" );
if( !strcasecmp( rankName, "Scalar" ) ){
dataTypeCounts[0] = 1;
}
@@ -188,16 +188,16 @@ void _MeshVariable_AssignFromXML( void*
Index nameCount = 0;
/* Get Names from list */
- if (( list = Dictionary_Get( thisComponentDict, "names" ) )) {
+ if (( list = Dictionary_Get( thisComponentDict, (Dictionary_Entry_Key)"names" ) )) {
Index entry_I;
- nameCount = Dictionary_Entry_Value_GetCount( list );
+ nameCount = Dictionary_Entry_Value_GetCount( list );
names = Memory_Alloc_Array( Name, nameCount, "Variable Names" );
for ( entry_I = 0 ; entry_I < nameCount ; entry_I++ )
names[ entry_I ] = Dictionary_Entry_Value_AsString( Dictionary_Entry_Value_GetElement(list, entry_I ) );
}
- dataTypeCounts[0] = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "VectorComponentCount", nameCount );
+ dataTypeCounts[0] = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"VectorComponentCount", nameCount );
Journal_Firewall( nameCount >= dataTypeCounts[0], error, "Variable '%s' has too few names in list for %d vector components.\n", self->name, dataTypeCounts[0] );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/Mesh_Algorithms.c
--- a/Mesh/src/Mesh_Algorithms.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/Mesh_Algorithms.c Thu Jan 14 17:42:34 2010 +1100
@@ -126,7 +126,7 @@ void _Mesh_Algorithms_Print( void* algor
/* Set the Journal for printing informations */
Stream* algorithmsStream;
- algorithmsStream = Journal_Register( InfoStream_Type, "Mesh_AlgorithmsStream" );
+ algorithmsStream = Journal_Register( InfoStream_Type, (Name)"Mesh_AlgorithmsStream" );
/* Print parent */
Journal_Printf( stream, "Mesh_Algorithms (ptr): (%p)\n", self );
@@ -137,9 +137,9 @@ void _Mesh_Algorithms_AssignFromXML( voi
Mesh_Algorithms* self = (Mesh_Algorithms*)algorithms;
AbstractContext* context = NULL;
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
_Mesh_Algorithms_Init( self, context );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/Mesh_CentroidAlgorithms.c
--- a/Mesh/src/Mesh_CentroidAlgorithms.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/Mesh_CentroidAlgorithms.c Thu Jan 14 17:42:34 2010 +1100
@@ -114,7 +114,7 @@ void _Mesh_CentroidAlgorithms_Print( voi
/* Set the Journal for printing informations */
Stream* centroidAlgorithmsStream;
- centroidAlgorithmsStream = Journal_Register( InfoStream_Type, "Mesh_CentroidAlgorithmsStream" );
+ centroidAlgorithmsStream = Journal_Register( InfoStream_Type, (Name)"Mesh_CentroidAlgorithmsStream" );
/* Print parent */
Journal_Printf( stream, "Mesh_CentroidAlgorithms (ptr): (%p)\n", self );
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/Mesh_CentroidType.c
--- a/Mesh/src/Mesh_CentroidType.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/Mesh_CentroidType.c Thu Jan 14 17:42:34 2010 +1100
@@ -110,7 +110,7 @@ void _Mesh_CentroidType_Print( void* cen
Mesh_CentroidType* self = (Mesh_CentroidType*)centroidType;
Stream* centroidTypeStream;
- centroidTypeStream = Journal_Register( InfoStream_Type, "Mesh_CentroidTypeStream" );
+ centroidTypeStream = Journal_Register( InfoStream_Type, (Name)"Mesh_CentroidTypeStream" );
/* Print parent */
Journal_Printf( stream, "Mesh_CentroidType (ptr): (%p)\n", self );
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/Mesh_ElementType.c
--- a/Mesh/src/Mesh_ElementType.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/Mesh_ElementType.c Thu Jan 14 17:42:34 2010 +1100
@@ -87,7 +87,7 @@ void _Mesh_ElementType_Print( void* elem
Mesh_ElementType* self = (Mesh_ElementType*)elementType;
Stream* elementTypeStream;
- elementTypeStream = Journal_Register( InfoStream_Type, "Mesh_ElementTypeStream" );
+ elementTypeStream = Journal_Register( InfoStream_Type, (Name)"Mesh_ElementTypeStream" );
/* Print parent */
Journal_Printf( stream, "Mesh_ElementType (ptr): (%p)\n", self );
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/Mesh_HexAlgorithms.c
--- a/Mesh/src/Mesh_HexAlgorithms.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/Mesh_HexAlgorithms.c Thu Jan 14 17:42:34 2010 +1100
@@ -109,7 +109,7 @@ void _Mesh_HexAlgorithms_Print( void* he
/* Set the Journal for printing informations */
Stream* hexAlgorithmsStream;
- hexAlgorithmsStream = Journal_Register( InfoStream_Type, "Mesh_HexAlgorithmsStream" );
+ hexAlgorithmsStream = Journal_Register( InfoStream_Type, (Name)"Mesh_HexAlgorithmsStream" );
/* Print parent */
Journal_Printf( stream, "Mesh_HexAlgorithms (ptr): (%p)\n", self );
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/Mesh_HexType.c
--- a/Mesh/src/Mesh_HexType.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/Mesh_HexType.c Thu Jan 14 17:42:34 2010 +1100
@@ -136,7 +136,7 @@ void _Mesh_HexType_Print( void* elementT
Mesh_HexType* self = (Mesh_HexType*)elementType;
Stream* elementTypeStream;
- elementTypeStream = Journal_Register( InfoStream_Type, "Mesh_HexTypeStream" );
+ elementTypeStream = Journal_Register( InfoStream_Type, (Name)"Mesh_HexTypeStream" );
/* Print parent */
Journal_Printf( stream, "Mesh_HexType (ptr): (%p)\n", self );
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/Mesh_RegularAlgorithms.c
--- a/Mesh/src/Mesh_RegularAlgorithms.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/Mesh_RegularAlgorithms.c Thu Jan 14 17:42:34 2010 +1100
@@ -115,7 +115,7 @@ void _Mesh_RegularAlgorithms_Print( void
/* Set the Journal for printing informations */
Stream* algorithmsStream;
- algorithmsStream = Journal_Register( InfoStream_Type, "Mesh_RegularAlgorithmsStream" );
+ algorithmsStream = Journal_Register( InfoStream_Type, (Name)"Mesh_RegularAlgorithmsStream" );
/* Print parent */
Journal_Printf( stream, "Mesh_RegularAlgorithms (ptr): (%p)\n", self );
@@ -212,8 +212,8 @@ Bool Mesh_RegularAlgorithms_SearchElemen
mesh = self->mesh;
nDims = Mesh_GetDimSize( mesh );
elGrid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "elementGrid" ) );
- for( d_i = 0; d_i < nDims; d_i++ ) {
+ ExtensionManager_GetHandle( mesh->info, (Name)"elementGrid" ) );
+ for( d_i = 0; d_i < nDims; d_i++ ) {
if( Num_Approx( point[d_i] - self->maxCrd[d_i], 0.0 ) )
inds[d_i] = elGrid->sizes[d_i] - 1;
else if( point[d_i] < self->minCrd[d_i] || point[d_i] > self->maxCrd[d_i] )
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/Remesher.c
--- a/Mesh/src/Remesher.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/Remesher.c Thu Jan 14 17:42:34 2010 +1100
@@ -105,7 +105,7 @@ void _Remesher_Print( void* remesher, St
Stream* myStream;
/* Set the Journal for printing informations */
- myStream = Journal_Register( InfoStream_Type, "RemesherStream" );
+ myStream = Journal_Register( InfoStream_Type, (Name)"RemesherStream" );
/* Print parent */
_Stg_Component_Print( self, stream );
@@ -127,11 +127,11 @@ void _Remesher_AssignFromXML( void* reme
assert( cf );
assert( cf->componentDict );
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
- mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, "mesh", Mesh, True, data );
+ mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"mesh", Mesh, True, data );
_Remesher_Init ( self, context, mesh );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/SurfaceAdaptor.c
--- a/Mesh/src/SurfaceAdaptor.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/SurfaceAdaptor.c Thu Jan 14 17:42:34 2010 +1100
@@ -125,7 +125,7 @@ void _SurfaceAdaptor_Print( void* adapto
/* Set the Journal for printing informations */
Stream* adaptorStream;
- adaptorStream = Journal_Register( InfoStream_Type, "SurfaceAdaptorStream" );
+ adaptorStream = Journal_Register( InfoStream_Type, (Name)"SurfaceAdaptorStream" );
/* Print parent */
Journal_Printf( stream, "SurfaceAdaptor (ptr): (%p)\n", self );
@@ -144,23 +144,23 @@ void _SurfaceAdaptor_AssignFromXML( void
_MeshAdaptor_AssignFromXML( self, cf, data );
/* Rip out the components structure as a dictionary. */
- dict = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( cf->componentDict, self->name ) );
+ dict = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( cf->componentDict, (Dictionary_Entry_Key)self->name ) );
/* Check if we want to keep a certain depth at the bottom reserved for
contact elements. */
- self->contactDepth = Stg_ComponentFactory_GetInt( cf, self->name, "contactDepth", 0 );
+ self->contactDepth = Stg_ComponentFactory_GetInt( cf, self->name, (Dictionary_Entry_Key)"contactDepth", 0 );
/* What kind of surface do we want? */
- surfaceType = Stg_ComponentFactory_GetString( cf, self->name, "surfaceType", "" );
+ surfaceType = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"surfaceType", "" );
if( !strcmp( surfaceType, "wedge" ) ) {
self->surfaceType = SurfaceAdaptor_SurfaceType_Wedge;
- self->info.wedge.offs[0] = Stg_ComponentFactory_GetDouble( cf, self->name, "beginOffset", 0.0 );
- self->info.wedge.endOffs[0] = Stg_ComponentFactory_GetDouble( cf, self->name, "endOffset", 1.0 );
- self->info.wedge.grad[0] = Stg_ComponentFactory_GetDouble( cf, self->name, "gradient", 0.5 );
+ self->info.wedge.offs[0] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"beginOffset", 0.0 );
+ self->info.wedge.endOffs[0] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"endOffset", 1.0 );
+ self->info.wedge.grad[0] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"gradient", 0.5 );
/* get the parameters for the z-axis */
- self->info.wedge.offs[1] = Stg_ComponentFactory_GetDouble( cf, self->name, "beginOffsetZ", 0.0 );
- self->info.wedge.endOffs[1] = Stg_ComponentFactory_GetDouble( cf, self->name, "endOffsetZ", 1.0 );
- self->info.wedge.grad[1] = Stg_ComponentFactory_GetDouble( cf, self->name, "gradientZ", 0.5 );
+ self->info.wedge.offs[1] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"beginOffsetZ", 0.0 );
+ self->info.wedge.endOffs[1] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"endOffsetZ", 1.0 );
+ self->info.wedge.grad[1] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"gradientZ", 0.5 );
}
else if( !strcmp( surfaceType, "sine" ) || !strcmp( surfaceType, "cosine" ) ) {
Dictionary_Entry_Value* originList;
@@ -170,13 +170,13 @@ void _SurfaceAdaptor_AssignFromXML( void
else
self->surfaceType = SurfaceAdaptor_SurfaceType_Cosine;
- originList = Dictionary_Get( dict, "origin" );
+ originList = Dictionary_Get( dict, (Dictionary_Entry_Key)"origin" );
if( originList ) {
unsigned nDims;
unsigned d_i;
nDims = Dictionary_Entry_Value_GetCount( originList );
- for( d_i = 0; d_i < nDims; d_i++ ) {
+ for( d_i = 0; d_i < nDims; d_i++ ) {
Dictionary_Entry_Value* val;
val = Dictionary_Entry_Value_GetElement( originList, d_i );
@@ -186,11 +186,11 @@ void _SurfaceAdaptor_AssignFromXML( void
else
memset( self->info.trig.origin, 0, sizeof(double) * 2 );
- self->info.trig.amp = Stg_ComponentFactory_GetDouble( cf, self->name, "amplitude", 1.0 );
- self->info.trig.freq = Stg_ComponentFactory_GetDouble( cf, self->name, "frequency", 1.0 );
+ self->info.trig.amp = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"amplitude", 1.0 );
+ self->info.trig.freq = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"frequency", 1.0 );
}
else
- _SurfaceAdaptor_Init( self );
+ _SurfaceAdaptor_Init( self );
}
void _SurfaceAdaptor_Build( void* adaptor, void* data ) {
@@ -259,7 +259,7 @@ void SurfaceAdaptor_Generate( void* adap
/* Extract the cartesian information. */
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
inds = AllocArray( unsigned, Mesh_GetDimSize( mesh ) );
/* Loop over domain nodes. */
diff -r 92ee57abdec6 -r 36afba1d4768 Mesh/src/linearSpaceAdaptor.c
--- a/Mesh/src/linearSpaceAdaptor.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Mesh/src/linearSpaceAdaptor.c Thu Jan 14 17:42:34 2010 +1100
@@ -127,7 +127,7 @@ void _LinearSpaceAdaptor_Print( void* ad
/* Set the Journal for printing informations */
Stream* adaptorStream;
- adaptorStream = Journal_Register( InfoStream_Type, "LinearSpaceAdaptorStream" );
+ adaptorStream = Journal_Register( InfoStream_Type, (Name)"LinearSpaceAdaptorStream" );
/* Print parent */
Journal_Printf( stream, "LinearSpaceAdaptor (ptr): (%p)\n", self );
@@ -147,29 +147,29 @@ void _LinearSpaceAdaptor_AssignFromXML(
assert( self );
assert( cf );
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, True, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, True, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
self->loadFromCheckPoint = context->loadFromCheckPoint;
- if( self->loadFromCheckPoint )
+ if( self->loadFromCheckPoint )
return;
/* Call parent construct. */
_MeshAdaptor_AssignFromXML( self, cf, data );
- self->minX = Dictionary_Entry_Value_AsDouble( Dictionary_Get( cf->rootDict, "minX" ) );
- self->maxX = Dictionary_Entry_Value_AsDouble( Dictionary_Get( cf->rootDict, "maxX" ) );
- self->minY = Dictionary_Entry_Value_AsDouble( Dictionary_Get( cf->rootDict, "minY" ) );
- self->maxY = Dictionary_Entry_Value_AsDouble( Dictionary_Get( cf->rootDict, "maxY" ) );
- self->minZ = Dictionary_Entry_Value_AsDouble( Dictionary_Get( cf->rootDict, "minZ" ) );
- self->maxZ = Dictionary_Entry_Value_AsDouble( Dictionary_Get( cf->rootDict, "maxZ" ) );
+ self->minX = Dictionary_Entry_Value_AsDouble( Dictionary_Get( cf->rootDict, (Dictionary_Entry_Key)"minX" ) );
+ self->maxX = Dictionary_Entry_Value_AsDouble( Dictionary_Get( cf->rootDict, (Dictionary_Entry_Key)"maxX" ) );
+ self->minY = Dictionary_Entry_Value_AsDouble( Dictionary_Get( cf->rootDict, (Dictionary_Entry_Key)"minY" ) );
+ self->maxY = Dictionary_Entry_Value_AsDouble( Dictionary_Get( cf->rootDict, (Dictionary_Entry_Key)"maxY" ) );
+ self->minZ = Dictionary_Entry_Value_AsDouble( Dictionary_Get( cf->rootDict, (Dictionary_Entry_Key)"minZ" ) );
+ self->maxZ = Dictionary_Entry_Value_AsDouble( Dictionary_Get( cf->rootDict, (Dictionary_Entry_Key)"maxZ" ) );
/* Read maping functions - X axis*/
- optionsList = Dictionary_Get( dictionary, "mappingFunctionX" );
+ optionsList = Dictionary_Get( dictionary, (Dictionary_Entry_Key)"mappingFunctionX" );
if( optionsList ) {
- segmentCount = Dictionary_Entry_Value_GetCount(optionsList);
+ segmentCount = Dictionary_Entry_Value_GetCount(optionsList );
self->nSegmentsx = segmentCount;
self->tablex = Memory_Alloc_Array( segment , segmentCount, "mapping table x" );
@@ -178,8 +178,8 @@ void _LinearSpaceAdaptor_AssignFromXML(
for ( segment_I = 0 ; segment_I < segmentCount ; segment_I++) {
optionSet = Dictionary_Entry_Value_GetElement(optionsList, segment_I );
seg = &(self->tablex[segment_I]);
- seg->x = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, "point" ) );
- seg->y = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, "mappedTo" ) );
+ seg->x = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, (Dictionary_Entry_Key)"point" ) );
+ seg->y = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, (Dictionary_Entry_Key)"mappedTo" ) );
}
LinearSpaceAdaptor_FillTable( self->tablex, segmentCount );
} else {
@@ -188,10 +188,10 @@ void _LinearSpaceAdaptor_AssignFromXML(
/* Read maping functions - Y axis*/
- optionsList = Dictionary_Get( dictionary, "mappingFunctionY" );
+ optionsList = Dictionary_Get( dictionary, (Dictionary_Entry_Key)"mappingFunctionY" );
if( optionsList ) {
- segmentCount = Dictionary_Entry_Value_GetCount(optionsList);
+ segmentCount = Dictionary_Entry_Value_GetCount(optionsList );
self->nSegmentsy = segmentCount;
self->tabley = Memory_Alloc_Array( segment , segmentCount, "mapping table y" );
@@ -200,8 +200,8 @@ void _LinearSpaceAdaptor_AssignFromXML(
for ( segment_I = 0; segment_I < segmentCount; segment_I++) {
optionSet = Dictionary_Entry_Value_GetElement(optionsList, segment_I );
seg = &(self->tabley[segment_I]);
- seg->x = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, "point" ) );
- seg->y = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, "mappedTo" ) );
+ seg->x = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, (Dictionary_Entry_Key)"point" ) );
+ seg->y = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, (Dictionary_Entry_Key)"mappedTo" ) );
}
LinearSpaceAdaptor_FillTable( self->tabley, segmentCount );
} else {
@@ -210,10 +210,10 @@ void _LinearSpaceAdaptor_AssignFromXML(
/* Read maping functions - Z axis*/
- optionsList = Dictionary_Get( dictionary, "mappingFunctionZ" );
+ optionsList = Dictionary_Get( dictionary, (Dictionary_Entry_Key)"mappingFunctionZ" );
if( optionsList ) {
- segmentCount = Dictionary_Entry_Value_GetCount(optionsList);
+ segmentCount = Dictionary_Entry_Value_GetCount(optionsList );
self->nSegmentsz = segmentCount;
self->tablez = Memory_Alloc_Array( segment , segmentCount, "mapping table x" );
@@ -222,8 +222,8 @@ void _LinearSpaceAdaptor_AssignFromXML(
for ( segment_I = 0 ; segment_I < segmentCount ; segment_I++) {
optionSet = Dictionary_Entry_Value_GetElement(optionsList, segment_I );
seg = &(self->tablez[segment_I]);
- seg->x = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, "point" ) );
- seg->y = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, "mappedTo" ) );
+ seg->x = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, (Dictionary_Entry_Key)"point" ) );
+ seg->y = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, (Dictionary_Entry_Key)"mappedTo" ) );
}
LinearSpaceAdaptor_FillTable( self->tablez, segmentCount );
} else {
diff -r 92ee57abdec6 -r 36afba1d4768 Python/Bindings/Mesh/bindings.c
--- a/Python/Bindings/Mesh/bindings.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Python/Bindings/Mesh/bindings.c Thu Jan 14 17:42:34 2010 +1100
@@ -64,7 +64,7 @@ PyObject* Mesh_Python_Print( PyObject* s
PyObject* Mesh_Python_Print( PyObject* self, PyObject* args ) {
PyObject* pyMesh;
Mesh* mesh;
- Stream* stream = Journal_Register (Info_Type, "myStream");
+ Stream* stream = Journal_Register( Info_Type, (Name)"myStream" );
/* Obtain arguements */
if( !PyArg_ParseTuple( args, "O:", &pyMesh ) ) {
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/src/BelowCosinePlane.c
--- a/Shape/src/BelowCosinePlane.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/src/BelowCosinePlane.c Thu Jan 14 17:42:34 2010 +1100
@@ -157,9 +157,9 @@ void _BelowCosinePlane_AssignFromXML( vo
_BelowPlane_AssignFromXML( self, cf, data );
- amplitude = Stg_ComponentFactory_GetDouble( cf, self->name, "amplitude", 0.1 );
- wavelength = Stg_ComponentFactory_GetDouble( cf, self->name, "wavelength", 2*M_PI );
- phase = Stg_ComponentFactory_GetDouble( cf, self->name, "phase", 0.0 );
+ amplitude = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"amplitude", 0.1 );
+ wavelength = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"wavelength", 2*M_PI );
+ phase = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"phase", 0.0 );
_BelowCosinePlane_Init( self, self->width, amplitude, wavelength, phase );
}
@@ -233,7 +233,7 @@ double _BelowCosinePlane_CalculateVolume
}
void _BelowCosinePlane_DistanceFromCenterAxis( void* shape, Coord coord, double* disVec ) {
Stg_Shape* self = (Stg_Shape*)shape;
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"Error in function %s: This functions hasn't been implemented.",
"Please inform underworld-dev at vpac.org you've received this error.\n", __func__ );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/src/BelowPlane.c
--- a/Shape/src/BelowPlane.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/src/BelowPlane.c Thu Jan 14 17:42:34 2010 +1100
@@ -150,15 +150,15 @@ void _BelowPlane_AssignFromXML( void* be
_Stg_Shape_AssignFromXML( self, cf, data );
- offset = Stg_ComponentFactory_GetDouble( cf, self->name, "offset", 0.5 );
+ offset = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"offset", 0.5 );
- minValue[ I_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, "minX", 0.0 );
- minValue[ J_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, "minY", 0.0 );
- minValue[ K_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, "minZ", 0.0 );
+ minValue[ I_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"minX", 0.0 );
+ minValue[ J_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"minY", 0.0 );
+ minValue[ K_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"minZ", 0.0 );
- maxValue[ I_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, "maxX", 1.0 );
- maxValue[ J_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, "maxY", 1.0 );
- maxValue[ K_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, "maxZ", 1.0 );
+ maxValue[ I_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"maxX", 1.0 );
+ maxValue[ J_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"maxY", 1.0 );
+ maxValue[ K_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"maxZ", 1.0 );
width[ I_AXIS ] = maxValue[ I_AXIS ] - minValue[ I_AXIS ] ;
width[ J_AXIS ] = maxValue[ J_AXIS ] - minValue[ J_AXIS ] ;
@@ -225,7 +225,7 @@ double _BelowPlane_CalculateVolume( void
void _BelowPlane_DistanceFromCenterAxis( void* shape, Coord coord, double* disVec ){
Stg_Shape* self = (Stg_Shape*)shape;
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"Error in function %s: This functions hasn't been implemented.",
"Please inform underworld-dev at vpac.org you've received this error.\n", __func__ );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/src/Box.c
--- a/Shape/src/Box.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/src/Box.c Thu Jan 14 17:42:34 2010 +1100
@@ -159,20 +159,20 @@ void _Box_AssignFromXML( void* shape, St
*widthCharPtr = axisLetters[ dim_I ];
/* Check to see whether the user wants to specify the start and end explicitly */
- if ( Dictionary_Get( dictionary, startKey ) && Dictionary_Get( dictionary, endKey ) ) {
- start = Stg_ComponentFactory_GetDouble( cf, self->name, startKey, 0.0 );
- end = Stg_ComponentFactory_GetDouble( cf, self->name, endKey, 0.0 );
+ if ( Dictionary_Get( dictionary, (Dictionary_Entry_Key)startKey ) && Dictionary_Get( dictionary, (Dictionary_Entry_Key)endKey ) ) {
+ start = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)startKey, 0.0 );
+ end = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)endKey, 0.0 );
width[ dim_I ] = end - start;
self->centre[ dim_I ] = start + 0.5 * width[dim_I];
}
else
- width[ dim_I ] = Stg_ComponentFactory_GetDouble( cf, self->name, widthKey, 0.0 );
+ width[ dim_I ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)widthKey, 0.0 );
}
Memory_Free( startKey );
Memory_Free( endKey );
- Memory_Free( widthKey );
+ Memory_Free( widthKey );
_Box_Init( self, width );
}
@@ -235,7 +235,7 @@ void _Box_DistanceFromCenterAxis( void*
void _Box_DistanceFromCenterAxis( void* shape, Coord coord, double* disVec ) {
/* To be implemented */
Stg_Shape* self = (Stg_Shape*)shape;
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"Error in function %s: This functions hasn't been implemented.",
"Please inform underworld-dev at vpac.org you've received this error.\n", __func__ );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/src/ConvexHull.c
--- a/Shape/src/ConvexHull.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/src/ConvexHull.c Thu Jan 14 17:42:34 2010 +1100
@@ -211,14 +211,14 @@ void _ConvexHull_AssignFromXML( void* co
_Stg_Shape_AssignFromXML( self, cf, data );
- optionsList = Dictionary_Get( dictionary, "verticies" );
+ optionsList = Dictionary_Get( dictionary, (Dictionary_Entry_Key)"verticies" );
Journal_Firewall( optionsList != NULL,
- Journal_Register( Error_Type, self->type ),
+ Journal_Register( Error_Type, (Name)self->type ),
"In func %s: The list 'verticies' specifying the convexHull is NULL.\n", __func__);
vertexCount = Dictionary_Entry_Value_GetCount(optionsList);
Journal_Firewall( ( self->dim == 2 && vertexCount < 4 ) || ( self->dim == 3 && vertexCount < 5 ),
- Journal_Register( Error_Type, self->type ),
+ Journal_Register( Error_Type, (Name)self->type ),
"In func %s: Sorry, but we got lazy, you can only specify 3 (2D) or 4 (3D) points. "
"Please feel free to hassle developers for this feature.\n", __func__);
@@ -232,13 +232,13 @@ void _ConvexHull_AssignFromXML( void* co
coord = vertexList[vertex_I];
/* Read Vertex */
- coord[ I_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, "x"));
- coord[ J_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, "y"));
+ coord[ I_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, (Dictionary_Entry_Key)"x") );
+ coord[ J_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, (Dictionary_Entry_Key)"y") );
- coord[ K_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, "z"));
+ coord[ K_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, (Dictionary_Entry_Key)"z"));
optionSet = optionSet->next;
}
- Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
_ConvexHull_Init( self, vertexList, vertexCount);
@@ -300,7 +300,7 @@ double _ConvexHull_CalculateVolume( void
}
void _ConvecHull_DistanceFromCenterAxis( void* shape, Coord coord, double* disVec ) {
Stg_Shape* self = (Stg_Shape*)shape;
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"Error in function %s: This functions hasn't been implemented.",
"Please inform underworld-dev at vpac.org you've received this error.\n", __func__ );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/src/Cylinder.c
--- a/Shape/src/Cylinder.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/src/Cylinder.c Thu Jan 14 17:42:34 2010 +1100
@@ -157,17 +157,17 @@ void _Cylinder_AssignFromXML( void* cyli
_Stg_Shape_AssignFromXML( self, cf, data );
- radius = Stg_ComponentFactory_GetDouble( cf, self->name, "radius", 0.0 );
+ radius = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"radius", 0.0 );
- start[ I_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "startX", -BIG );
- start[ J_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "startY", -BIG );
- start[ K_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "startZ", -BIG );
- end[ I_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "endX", BIG );
- end[ J_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "endY", BIG );
- end[ K_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "endZ", BIG );
+ start[ I_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"startX", -BIG );
+ start[ J_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"startY", -BIG );
+ start[ K_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"startZ", -BIG );
+ end[ I_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"endX", BIG );
+ end[ J_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"endY", BIG );
+ end[ K_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"endZ", BIG );
- perpendicularAxisName = Stg_ComponentFactory_GetString( cf, self->name, "alongAxis", "x" );
- switch ( perpendicularAxisName[0] ) {
+ perpendicularAxisName = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"alongAxis", "x" );
+ switch ( perpendicularAxisName[0] ) {
case 'x': case 'X': case 'i': case 'I': case '0':
alongAxis = I_AXIS; break;
case 'y': case 'Y': case 'j': case 'J': case '1':
@@ -175,7 +175,7 @@ void _Cylinder_AssignFromXML( void* cyli
case 'z': case 'Z': case 'k': case 'K': case '2':
alongAxis = K_AXIS; break;
default:
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"Cannot understand alongAxis '%s'\n", perpendicularAxisName );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/src/Everywhere.c
--- a/Shape/src/Everywhere.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/src/Everywhere.c Thu Jan 14 17:42:34 2010 +1100
@@ -169,7 +169,7 @@ double _Everywhere_CalculateVolume( void
}
void _Everywhere_DistanceFromCenterAxis( void* shape, Coord coord, double* disVec ){
Stg_Shape* self = (Stg_Shape*)shape;
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"Error in function %s: This functions hasn't been implemented.",
"Please inform underworld-dev at vpac.org you've received this error.\n", __func__ );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/src/Finalise.c
--- a/Shape/src/Finalise.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/src/Finalise.c Thu Jan 14 17:42:34 2010 +1100
@@ -39,7 +39,7 @@
#include <stdio.h>
Bool StgDomainShape_Finalise( void ) {
- Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
+ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
return True;
}
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/src/Init.c
--- a/Shape/src/Init.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/src/Init.c Thu Jan 14 17:42:34 2010 +1100
@@ -40,23 +40,23 @@ Bool StgDomainShape_Init( int* argc, cha
Bool StgDomainShape_Init( int* argc, char** argv[] ) {
Stg_ComponentRegister* componentRegister = Stg_ComponentRegister_Get_ComponentRegister();
- Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
+ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
- Stg_ComponentRegister_Add( componentRegister, Superellipsoid_Type, "0", _Superellipsoid_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, Box_Type, "0", _Box_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, Everywhere_Type, "0", _Everywhere_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, ConvexHull_Type, "0", _ConvexHull_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, Sphere_Type, "0", _Sphere_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, PolygonShape_Type, "0", _PolygonShape_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, Union_Type, "0", _Union_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, Intersection_Type, "0", _Intersection_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, Cylinder_Type, "0", _Cylinder_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, Superellipsoid_Type, (Name)"0", _Superellipsoid_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, Box_Type, (Name)"0", _Box_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, Everywhere_Type, (Name)"0", _Everywhere_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, ConvexHull_Type, (Name)"0", _ConvexHull_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, Sphere_Type, (Name)"0", _Sphere_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, PolygonShape_Type, (Name)"0", _PolygonShape_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, Union_Type, (Name)"0", _Union_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, Intersection_Type, (Name)"0", _Intersection_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, Cylinder_Type, (Name)"0", _Cylinder_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, BelowPlane_Type, "0", _BelowPlane_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, BelowCosinePlane_Type, "0", _BelowCosinePlane_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, BelowPlane_Type, (Name)"0", _BelowPlane_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, BelowCosinePlane_Type, (Name)"0", _BelowCosinePlane_DefaultNew );
#ifdef HAVE_PYTHON
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), PythonShape_Type, "0", _PythonShape_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), PythonShape_Type, "0", _PythonShape_DefaultNew );
RegisterParent( PythonShape_Type, Stg_Shape_Type);
#endif
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/src/Intersection.c
--- a/Shape/src/Intersection.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/src/Intersection.c Thu Jan 14 17:42:34 2010 +1100
@@ -165,13 +165,13 @@ void _Intersection_AssignFromXML( void*
Dictionary_Entry_Value* optionsList;
Dictionary* dictionary = Dictionary_GetDictionary( cf->componentDict, self->name );
char* nameShape;
- Stream* stream = Journal_Register( Info_Type, CURR_MODULE_NAME );
+ Stream* stream = Journal_Register( Info_Type, (Name)CURR_MODULE_NAME );
_Stg_Shape_AssignFromXML( self, cf, data );
- optionsList = Dictionary_Get( dictionary, "shapes" );
+ optionsList = Dictionary_Get( dictionary, (Dictionary_Entry_Key)"shapes" );
/* Journal_Firewall( vertexList != NULL,
- Journal_Register( Error_Type, self->type ),
+ Journal_Register( Error_Type, (Name)self->type ),
"In func %s: vertexList specifying the intersection is NULL.\n",
__func__);
@@ -195,16 +195,16 @@ void _Intersection_AssignFromXML( void*
nameShape = Dictionary_Entry_Value_AsString( Dictionary_Entry_Value_GetElement( optionsList, shape_I));
if ( nameShape[0] == '!' ) {
- shapeList[ shape_I ] = Stg_ComponentFactory_ConstructByName( cf, &nameShape[1], Stg_Shape, True, data ) ;
+ shapeList[ shape_I ] = Stg_ComponentFactory_ConstructByName( cf, (Name)&nameShape[1], Stg_Shape, True, data ) ;
isComplement[ shape_I ] = True;
}
else {
- shapeList[ shape_I ] = Stg_ComponentFactory_ConstructByName( cf, nameShape, Stg_Shape, True, data ) ;
+ shapeList[ shape_I ] = Stg_ComponentFactory_ConstructByName( cf, (Name)nameShape, Stg_Shape, True, data ) ;
isComplement[ shape_I ] = False;
}
}
- Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
_Intersection_Init( self, shapeList, shapeCount, isComplement );
@@ -278,7 +278,7 @@ double _Intersection_CalculateVolume( vo
}
void _Intersection_DistanceFromCenterAxis( void* shape, Coord coord, double* disVec ){
Stg_Shape* self = (Stg_Shape*)shape;
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"Error in function %s: This functions hasn't been implemented.",
"Please inform underworld-dev at vpac.org you've received this error.\n", __func__ );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/src/PolygonShape.c
--- a/Shape/src/PolygonShape.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/src/PolygonShape.c Thu Jan 14 17:42:34 2010 +1100
@@ -166,19 +166,19 @@ void _PolygonShape_AssignFromXML( void*
Dictionary_Entry_Value* optionsList;
Dictionary* dictionary = Dictionary_GetDictionary( cf->componentDict, self->name );
Stream* stream = cf->infoStream;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
_Stg_Shape_AssignFromXML( self, cf, data );
- start[I_AXIS] = Stg_ComponentFactory_GetDouble( cf, self->name, "startX", 0.0 );
- end[I_AXIS] = Stg_ComponentFactory_GetDouble( cf, self->name, "endX", 0.0 );
- start[J_AXIS] = Stg_ComponentFactory_GetDouble( cf, self->name, "startY", 0.0 );
- end[J_AXIS] = Stg_ComponentFactory_GetDouble( cf, self->name, "endY", 0.0 );
- start[K_AXIS] = Stg_ComponentFactory_GetDouble( cf, self->name, "startZ", 0.0 );
- end[K_AXIS] = Stg_ComponentFactory_GetDouble( cf, self->name, "endZ", 0.0 );
+ start[I_AXIS] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"startX", 0.0 );
+ end[I_AXIS] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"endX", 0.0 );
+ start[J_AXIS] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"startY", 0.0 );
+ end[J_AXIS] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"endY", 0.0 );
+ start[K_AXIS] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"startZ", 0.0 );
+ end[K_AXIS] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"endZ", 0.0 );
- perpendicularAxisName = Stg_ComponentFactory_GetString( cf, self->name, "perpendicularAxis", "z" );
- switch ( perpendicularAxisName[0] ) {
+ perpendicularAxisName = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"perpendicularAxis", "z" );
+ switch ( perpendicularAxisName[0] ) {
case 'x': case 'X': case 'i': case 'I': case '0':
perpendicularAxis = I_AXIS; break;
case 'y': case 'Y': case 'j': case 'J': case '1':
@@ -186,19 +186,19 @@ void _PolygonShape_AssignFromXML( void*
case 'z': case 'Z': case 'k': case 'K': case '2':
perpendicularAxis = K_AXIS; break;
default:
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"Cannot understand perpendicularAxis '%s'\n", perpendicularAxisName );
}
if( self->dim == 3 && ( start[perpendicularAxis] == 0 && end[perpendicularAxis] == 0 ) ) {
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"Problem with %s.\n"
"You've set the perpendicular axis to be %s, but you've not given the polygon any depth in that axis\n",
self->name, perpendicularAxisName );
}
- optionsList = Dictionary_Get( dictionary, "verticies" );
+ optionsList = Dictionary_Get( dictionary, (Dictionary_Entry_Key)"verticies" );
- vertexCount = Dictionary_Entry_Value_GetCount(optionsList);
+ vertexCount = Dictionary_Entry_Value_GetCount(optionsList );
Journal_Firewall( vertexCount >= 3, errorStream,
"To few verticies given in trying to build shape '%s' named '%s'.\n"
"A polygon needs at least three verticies.\n",
@@ -214,11 +214,11 @@ void _PolygonShape_AssignFromXML( void*
coord = vertexList[vertex_I];
/* Read Vertex */
if( perpendicularAxis != I_AXIS )
- coord[ I_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, "x"));
- if( perpendicularAxis != J_AXIS )
- coord[ J_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, "y"));
- if( perpendicularAxis != K_AXIS )
- coord[ K_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, "z"));
+ coord[ I_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, (Dictionary_Entry_Key)"x"));
+ if( perpendicularAxis != J_AXIS )
+ coord[ J_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, (Dictionary_Entry_Key)"y"));
+ if( perpendicularAxis != K_AXIS )
+ coord[ K_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( optionSet, (Dictionary_Entry_Key)"z") );
/* Print Position */
Journal_PrintfL( stream, 2, "(%0.3g, %0.3g, %0.3g)\n", coord[I_AXIS], coord[J_AXIS], coord[K_AXIS] );
@@ -328,7 +328,7 @@ double _PolygonShape_CalculateVolume( vo
void _PolygonShape_DistanceFromCenterAxis( void* shape, Coord coord, double* disVec ){
Stg_Shape* self = (Stg_Shape*)shape;
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"Error in function %s: This functions hasn't been implemented.",
"Please inform underworld-dev at vpac.org you've received this error.\n", __func__ );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/src/PythonShape.c
--- a/Shape/src/PythonShape.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/src/PythonShape.c Thu Jan 14 17:42:34 2010 +1100
@@ -179,7 +179,7 @@ void _PythonShape_AssignFromXML( void* p
_Stg_Shape_AssignFromXML( self, cf, data );
- conditionFunction = Stg_ComponentFactory_GetString( cf, self->name, "Function", "0" );
+ conditionFunction = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"Function", "0" );
_PythonShape_Init( self, conditionFunction );
}
@@ -241,7 +241,7 @@ Bool _PythonShape_IsCoordInside( void* p
testConditionValue = PyMapping_GetItemString(pythonDictionary, PYTHONSHAPE_TEST_CONDITION_NAME);
Journal_Firewall(
testConditionValue != NULL,
- Journal_Register( Error_Type, self->type),
+ Journal_Register( Error_Type, (Name)self->type ),
"In func %s: Cannot Evalutate Function '%s'.\n", __func__, self->testCondition );
return PyObject_IsTrue( testConditionValue );
@@ -253,7 +253,7 @@ double _PythonShape_CalculateVolume( voi
}
void _PythonShape_DistanceFromCenterAxis( void* shape, Coord coord, double* disVec ){
Stg_Shape* self = (Stg_Shape*)shape;
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"Error in function %s: This functions hasn't been implemented.",
"Please inform underworld-dev at vpac.org you've received this error.\n", __func__ );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/src/ShapeClass.c
--- a/Shape/src/ShapeClass.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/src/ShapeClass.c Thu Jan 14 17:42:34 2010 +1100
@@ -148,21 +148,21 @@ void _Stg_Shape_AssignFromXML( void* sha
Bool invert = False;
double alpha, beta, gamma;
- self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !self->context )
- self->context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !self->context )
+ self->context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
- dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, "dim", 0 );
+ dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, (Dictionary_Entry_Key)"dim", 0 );
- centre[ I_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "CentreX", 0.0 );
- centre[ J_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "CentreY", 0.0 );
- centre[ K_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "CentreZ", 0.0 );
+ centre[ I_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"CentreX", 0.0 );
+ centre[ J_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"CentreY", 0.0 );
+ centre[ K_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"CentreZ", 0.0 );
- invert = Stg_ComponentFactory_GetBool( cf, self->name, "invert", False );
+ invert = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"invert", False );
- alpha = Stg_ComponentFactory_GetDouble( cf, self->name, "alpha", 0.0 );
- beta = Stg_ComponentFactory_GetDouble( cf, self->name, "beta", 0.0 );
- gamma = Stg_ComponentFactory_GetDouble( cf, self->name, "gamma", 0.0 );
+ alpha = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"alpha", 0.0 );
+ beta = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"beta", 0.0 );
+ gamma = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"gamma", 0.0 );
_Stg_Shape_Init( self, dim, centre, invert, alpha, beta, gamma );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/src/Sphere.c
--- a/Shape/src/Sphere.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/src/Sphere.c Thu Jan 14 17:42:34 2010 +1100
@@ -152,7 +152,7 @@ void _Sphere_AssignFromXML( void* sphere
_Stg_Shape_AssignFromXML( self, cf, data );
- radius = Stg_ComponentFactory_GetDouble( cf, self->name, "radius", 0.0 );
+ radius = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"radius", 0.0 );
_Sphere_Init( self, radius );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/src/Superellipsoid.c
--- a/Shape/src/Superellipsoid.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/src/Superellipsoid.c Thu Jan 14 17:42:34 2010 +1100
@@ -158,12 +158,12 @@ void _Superellipsoid_AssignFromXML( void
_Stg_Shape_AssignFromXML( self, cf, data );
- radius[ I_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "radiusX", 1.0 );
- radius[ J_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "radiusY", 1.0 );
- radius[ K_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "radiusZ", 1.0 );
+ radius[ I_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"radiusX", 1.0 );
+ radius[ J_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"radiusY", 1.0 );
+ radius[ K_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"radiusZ", 1.0 );
- epsilon1 = Stg_ComponentFactory_GetDouble( cf, self->name, "epsilon1", 1.0 );
- epsilon2 = Stg_ComponentFactory_GetDouble( cf, self->name, "epsilon2", 1.0 );
+ epsilon1 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"epsilon1", 1.0 );
+ epsilon2 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"epsilon2", 1.0 );
_Superellipsoid_Init( self, epsilon1, epsilon2, radius );
}
@@ -230,7 +230,7 @@ double _Superellipsoid_CalculateVolume(
void _Superellipsoid_DistanceFromCenterAxis( void* shape, Coord coord, double* disVec ){
Stg_Shape* self = (Stg_Shape*)shape;
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"Error in function %s: This functions hasn't been implemented.",
"Please inform underworld-dev at vpac.org you've received this error.\n", __func__ );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/src/Union.c
--- a/Shape/src/Union.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/src/Union.c Thu Jan 14 17:42:34 2010 +1100
@@ -164,13 +164,13 @@ void _Union_AssignFromXML( void* combina
Dictionary_Entry_Value* optionsList;
Dictionary* dictionary = Dictionary_GetDictionary( cf->componentDict, self->name );
char* nameShape;
- Stream* stream = Journal_Register( Info_Type, CURR_MODULE_NAME );
+ Stream* stream = Journal_Register( Info_Type, (Name)CURR_MODULE_NAME );
_Stg_Shape_AssignFromXML( self, cf, data );
- optionsList = Dictionary_Get( dictionary, "shapes" );
+ optionsList = Dictionary_Get( dictionary, (Dictionary_Entry_Key)"shapes" );
- shapeCount = Dictionary_Entry_Value_GetCount(optionsList);
+ shapeCount = Dictionary_Entry_Value_GetCount(optionsList );
/* Allocate space */
shapeList = Memory_Alloc_Array( Stg_Shape* , shapeCount, "Shape Array" );
@@ -184,16 +184,16 @@ void _Union_AssignFromXML( void* combina
nameShape = Dictionary_Entry_Value_AsString( Dictionary_Entry_Value_GetElement( optionsList, shape_I));
if ( nameShape[0] == '!' ) {
- shapeList[ shape_I ] = Stg_ComponentFactory_ConstructByName( cf, &nameShape[1], Stg_Shape, True, data ) ;
+ shapeList[ shape_I ] = Stg_ComponentFactory_ConstructByName( cf, (Name)&nameShape[1], Stg_Shape, True, data ) ;
isComplement[ shape_I ] = True;
}
else {
- shapeList[ shape_I ] = Stg_ComponentFactory_ConstructByName( cf, nameShape, Stg_Shape, True, data ) ;
+ shapeList[ shape_I ] = Stg_ComponentFactory_ConstructByName( cf, (Name)nameShape, Stg_Shape, True, data ) ;
isComplement[ shape_I ] = False;
}
}
- Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
_Union_Init( self, shapeList, shapeCount, isComplement );
@@ -271,7 +271,7 @@ double _Union_CalculateVolume( void* com
void _Union_DistanceFromCenterAxis( void* shape, Coord coord, double* disVec ) {
Stg_Shape* self = (Stg_Shape*)shape;
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"Error in function %s: This functions hasn't been implemented.",
"Please inform underworld-dev at vpac.org you've received this error.\n", __func__ );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Shape/tests/ShapeSuite.c
--- a/Shape/tests/ShapeSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Shape/tests/ShapeSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -26,23 +26,23 @@ void ShapeSuite_GeneratePoints( ShapeSui
unsigned testCoordCount, index;
Name outputPath;
Coord coord;
- Stream* stream = Journal_Register( Info_Type, inputFileName );
+ Stream* stream = Journal_Register( Info_Type, (Name)inputFileName );
char xml_input[PCU_PATH_MAX];
- Journal_Enable_AllTypedStream( False );
+ Journal_Enable_AllTypedStream( False );
/* read in the xml input file */
pcu_filename_input( inputFileName, xml_input );
data->cf = cf = stgMainInitFromXML( xml_input, MPI_COMM_WORLD, NULL );
stgMainBuildAndInitialise( cf );
- context = (DomainContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (DomainContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
dictionary = context->dictionary;
- outputPath = Dictionary_GetString( dictionary, "outputPath" );
+ outputPath = Dictionary_GetString( dictionary, (Dictionary_Entry_Key)"outputPath" );
Stream_RedirectFile_WithPrependedPath( stream, outputPath, "test.dat" );
- shape = (Stg_Shape*) LiveComponentRegister_Get( context->CF->LCRegister, "shape" );
- assert( shape );
+ shape = (Stg_Shape*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"shape" );
+ assert( shape );
testCoordCount = Dictionary_GetUnsignedInt_WithDefault( dictionary, "testCoordCount", 10000 );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/CellLayout.c
--- a/Swarm/src/CellLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/CellLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -133,9 +133,9 @@ void _CellLayout_AssignFromXML( void* ce
CellLayout* self = (CellLayout*)cellLayout;
AbstractContext* context;
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
_CellLayout_Init( self, context );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/ElementCellLayout.c
--- a/Swarm/src/ElementCellLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/ElementCellLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -166,7 +166,7 @@ void _ElementCellLayout_AssignFromXML( v
_CellLayout_AssignFromXML( self, cf, data );
- mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Mesh", Mesh, True, data ) ;
+ mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Mesh", Mesh, True, data ) ;
_ElementCellLayout_Init( self, mesh );
}
@@ -177,7 +177,7 @@ void _ElementCellLayout_Build( void *ele
Stg_Component_Build( self->mesh, NULL, False );
if( !Mesh_HasIncidence( self->mesh, Mesh_GetDimSize( self->mesh ), MT_VERTEX ) ) {
- Stream* elementCellLayoutStream = Journal_Register( ErrorStream_Type, self->type );
+ Stream* elementCellLayoutStream = Journal_Register( ErrorStream_Type, (Name)self->type );
Journal_Printf( elementCellLayoutStream, "Warning: Mesh not configured to build element node table. "
"Activating it now.\n" );
abort();
@@ -246,7 +246,7 @@ Cell_Index _ElementCellLayout_MapElement
#ifdef CAUTIOUS
{
ElementCellLayout* self = (ElementCellLayout*)elementCellLayout;
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
Journal_Firewall( element_dI < Mesh_GetDomainSize( self->mesh, Mesh_GetDimSize( self->mesh ) ), errorStr, "Error - in %s(): User asked "
"for cell corresponding to element %d, but the mesh that this cell layout is based on only "
"has %d elements.\n", __func__, element_dI, Mesh_GetDomainSize( self->mesh, Mesh_GetDimSize( self->mesh ) ) );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/FileParticleLayout.c
--- a/Swarm/src/FileParticleLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/FileParticleLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -176,8 +176,8 @@ void _FileParticleLayout_AssignFromXML(
_GlobalParticleLayout_AssignFromXML( self, cf, data );
- filename = Stg_ComponentFactory_GetString( cf, self->name, "filename", "Swarm" );
- checkpointfiles = Stg_ComponentFactory_GetInt( cf, self->name, "checkpointfiles", 1 );
+ filename = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"filename", "Swarm" );
+ checkpointfiles = Stg_ComponentFactory_GetInt( cf, self->name, (Dictionary_Entry_Key)"checkpointfiles", 1 );
#ifdef READ_HDF5
/* if doing checkpoint restart, grab number of particles swarmdump previously stored against */
@@ -346,8 +346,8 @@ void _FileParticleLayout_InitialiseParti
/* Allocate space to store arrays of dataspaces */
assert( swarm->swarmVariable_Register );
- self->fileData = Memory_Alloc_2DArray( hid_t, swarm->swarmVariable_Register->objects->count, self->checkpointfiles, "fileData" );
- self->fileSpace = Memory_Alloc_2DArray( hid_t, swarm->swarmVariable_Register->objects->count, self->checkpointfiles, "fileSpace" );
+ self->fileData = Memory_Alloc_2DArray( hid_t, swarm->swarmVariable_Register->objects->count, self->checkpointfiles, (Name)"fileData" );
+ self->fileSpace = Memory_Alloc_2DArray( hid_t, swarm->swarmVariable_Register->objects->count, self->checkpointfiles, (Name)"fileSpace" );
/* set these spaces to null initially */
for( jj = 0 ; jj < swarm->swarmVariable_Register->objects->count ; jj++)
for( kk = 0 ; kk < self->checkpointfiles ; kk++){
@@ -359,7 +359,7 @@ void _FileParticleLayout_InitialiseParti
for( ii = 1 ; ii <= self->checkpointfiles ; ii++ ){
char* filenameTemp = NULL;
/* Open the swarm checkpointing file */
- if(self->checkpointfiles == 1)
+ if(self->checkpointfiles == 1 )
Stg_asprintf( &filenameTemp, "%s.h5", self->filename );
else
Stg_asprintf( &filenameTemp, "%s.%dof%d.h5", self->filename, ii, self->checkpointfiles );
@@ -547,7 +547,7 @@ Index _FileParticleLayout_GetFileCountFr
AbstractContext* context = (AbstractContext*)_context;
char* timeInfoFileName = NULL;
char* timeInfoFileNamePart = NULL;
- Stream* errorStr = Journal_Register( Error_Type, FileParticleLayout_Type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)FileParticleLayout_Type );
hid_t file, fileSpace, fileData;
Index checkpointnproc;
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/Finalise.c
--- a/Swarm/src/Finalise.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/Finalise.c Thu Jan 14 17:42:34 2010 +1100
@@ -45,7 +45,7 @@
#include <stdio.h>
Bool StgDomainSwarm_Finalise( void ) {
- Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
+ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
Stg_Class_Delete( stgSwarm_Register );
return True;
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/GaussParticleLayout.c
--- a/Swarm/src/GaussParticleLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/GaussParticleLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -170,14 +170,14 @@ void _GaussParticleLayout_AssignFromXML(
_PerCellParticleLayout_AssignFromXML( self, cf, data );
- dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, "dim", 0 );
+ dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, (Dictionary_Entry_Key)"dim", 0 );
- defaultVal = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "gaussParticles", 2 );
+ defaultVal = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"gaussParticles", 2 );
- particlesPerDim[ I_AXIS ] = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "gaussParticlesX", defaultVal );
- particlesPerDim[ J_AXIS ] = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "gaussParticlesY", defaultVal );
- if ( dim == 3 )
- particlesPerDim[ K_AXIS ] = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "gaussParticlesZ", defaultVal );
+ particlesPerDim[ I_AXIS ] = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"gaussParticlesX", defaultVal );
+ particlesPerDim[ J_AXIS ] = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"gaussParticlesY", defaultVal );
+ if ( dim == 3 )
+ particlesPerDim[ K_AXIS ] = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"gaussParticlesZ", defaultVal );
else
particlesPerDim[ K_AXIS ] = 1;
@@ -345,7 +345,7 @@ void GaussParticleLayout_GetAbscissaAndW
default:
Journal_Firewall(
pointCount <= 5,
- Journal_Register( Error_Type, GaussParticleLayout_Type ),
+ Journal_Register( Error_Type, (Name)GaussParticleLayout_Type ),
"In func %s: Cannot give values for '%u' gauss points\n.",
__func__,
pointCount );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/GlobalParticleLayout.c
--- a/Swarm/src/GlobalParticleLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/GlobalParticleLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -112,17 +112,9 @@ void _GlobalParticleLayout_AssignFromXM
_ParticleLayout_AssignFromXML( self, cf, data );
- totalInitialParticles = Stg_ComponentFactory_GetUnsignedInt(
- cf,
- self->name,
- "totalInitialParticles",
- GlobalParticleLayout_Invalid );
+ totalInitialParticles = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"totalInitialParticles", GlobalParticleLayout_Invalid );
- averageInitialParticlesPerCell = (double)Stg_ComponentFactory_GetUnsignedInt(
- cf,
- self->name,
- "averageInitialParticlesPerCell",
- GlobalParticleLayout_Invalid );
+ averageInitialParticlesPerCell = (double )Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"averageInitialParticlesPerCell", GlobalParticleLayout_Invalid );
_GlobalParticleLayout_Init( component, totalInitialParticles, averageInitialParticlesPerCell );
}
@@ -193,7 +185,7 @@ void _GlobalParticleLayout_SetInitialCou
self->totalInitialParticles );
}
else {
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
Journal_Firewall( self->totalInitialParticles || self->averageInitialParticlesPerCell,
errorStream, "Error - in %s(), ParticleLayout \"%s\" (of type %s): neither "
@@ -240,7 +232,7 @@ void _GlobalParticleLayout_InitialisePar
Particle_Index globalParticlesInitialisedCount=0;
Progress* prog;
int nRanks;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
Journal_DPrintf( self->debug, "In %s(): for ParticleLayout \"%s\" (of type %s):\n",
__func__, self->name, self->type );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/Init.c
--- a/Swarm/src/Init.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/Init.c Thu Jan 14 17:42:34 2010 +1100
@@ -50,38 +50,38 @@ Stream* Swarm_Error = NULL;
Bool StgDomainSwarm_Init( int* argc, char** argv[] ) {
- Swarm_VerboseConfig = Journal_Register( Info_Type, "Swarm_VerboseConfig" );
- Swarm_Debug = Journal_Register( Debug_Type, "Swarm" );
- Swarm_Warning = Journal_Register( Error_Type, "Swarm" );
- Swarm_Error = Journal_Register( Error_Type, "Swarm" );
+ Swarm_VerboseConfig = Journal_Register( Info_Type, (Name)"Swarm_VerboseConfig" );
+ Swarm_Debug = Journal_Register( Debug_Type, (Name)"Swarm" );
+ Swarm_Warning = Journal_Register( Error_Type, (Name)"Swarm" );
+ Swarm_Error = Journal_Register( Error_Type, (Name)"Swarm" );
- Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
+ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
VariableCondition_Register_Add( variableCondition_Register, SwarmShapeVC_Type, SwarmShapeVC_Factory );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), GaussParticleLayout_Type, "0", _GaussParticleLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), TriGaussParticleLayout_Type, "0", _TriGaussParticleLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), GaussBorderParticleLayout_Type, "0", _GaussBorderParticleLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), RandomParticleLayout_Type, "0", _RandomParticleLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), MeshParticleLayout_Type, "0", _MeshParticleLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), SpaceFillerParticleLayout_Type, "0", _SpaceFillerParticleLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), UnionParticleLayout_Type, "0", _UnionParticleLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), WithinShapeParticleLayout_Type, "0", _WithinShapeParticleLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), PlaneParticleLayout_Type, "0", _PlaneParticleLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), ManualParticleLayout_Type, "0", _ManualParticleLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), LineParticleLayout_Type, "0", _LineParticleLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), FileParticleLayout_Type, "0", _FileParticleLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), SingleCellLayout_Type, "0", _SingleCellLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), ElementCellLayout_Type, "0", _ElementCellLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), TriSingleCellLayout_Type, "0", (Stg_Component_DefaultConstructorFunction*)_TriSingleCellLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Swarm_Type, "0", (Stg_Component_DefaultConstructorFunction*)_Swarm_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), SwarmVariable_Type, "0", _SwarmVariable_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), OperatorSwarmVariable_Type, "0", _OperatorSwarmVariable_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), SwarmOutput_Type, "0", _SwarmOutput_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), SwarmDump_Type, "0", _SwarmDump_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), ParticleShadowSync_Type, "0", ParticleShadowSync_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), ParticleMovementHandler_Type, "0", ParticleMovementHandler_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), SwarmShapeVC_Type, "0", _SwarmShapeVC_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), GaussParticleLayout_Type, (Name)"0", _GaussParticleLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), TriGaussParticleLayout_Type, "0", _TriGaussParticleLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), GaussBorderParticleLayout_Type, (Name)"0", _GaussBorderParticleLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), RandomParticleLayout_Type, "0", _RandomParticleLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), MeshParticleLayout_Type, (Name)"0", _MeshParticleLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), SpaceFillerParticleLayout_Type, "0", _SpaceFillerParticleLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), UnionParticleLayout_Type, (Name)"0", _UnionParticleLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), WithinShapeParticleLayout_Type, "0", _WithinShapeParticleLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), PlaneParticleLayout_Type, (Name)"0", _PlaneParticleLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), ManualParticleLayout_Type, "0", _ManualParticleLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), LineParticleLayout_Type, (Name)"0", _LineParticleLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), FileParticleLayout_Type, "0", _FileParticleLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), SingleCellLayout_Type, (Name)"0", _SingleCellLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), ElementCellLayout_Type, "0", _ElementCellLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), TriSingleCellLayout_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)_TriSingleCellLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), Swarm_Type, "0", (Stg_Component_DefaultConstructorFunction*)_Swarm_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), SwarmVariable_Type, (Name)"0", _SwarmVariable_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), OperatorSwarmVariable_Type, "0", _OperatorSwarmVariable_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), SwarmOutput_Type, (Name)"0", _SwarmOutput_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), SwarmDump_Type, "0", _SwarmDump_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), ParticleShadowSync_Type, (Name)"0", ParticleShadowSync_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), ParticleMovementHandler_Type, "0", ParticleMovementHandler_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), SwarmShapeVC_Type, (Name)"0", _SwarmShapeVC_DefaultNew );
RegisterParent( CellLayout_Type, Stg_Component_Type );
RegisterParent( ElementCellLayout_Type, CellLayout_Type );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/LineParticleLayout.c
--- a/Swarm/src/LineParticleLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/LineParticleLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -206,11 +206,11 @@ void _LineParticleLayout_AssignFromXML(
_GlobalParticleLayout_AssignFromXML( self, cf, data );
- dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, "dim", 0 );
+ dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, (Dictionary_Entry_Key)"dim", 0 );
/* Read list of verticies of each of the different line segments from the dictionary */
- list = Dictionary_Get( dictionary, "verticies" );
- vertexCount = Dictionary_Entry_Value_GetCount( list );
+ list = Dictionary_Get( dictionary, (Dictionary_Entry_Key)"verticies" );
+ vertexCount = Dictionary_Entry_Value_GetCount( list );
vertexList = Memory_Alloc_Array( Coord , vertexCount, "Vertex Array" );
memset( vertexList, 0, vertexCount * sizeof(Coord) );
@@ -219,10 +219,10 @@ void _LineParticleLayout_AssignFromXML(
entry = Dictionary_Entry_Value_GetElement( list, vertex_I );
coord = vertexList[vertex_I];
/* Read Vertex */
- coord[ I_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( entry, "x"));
- coord[ J_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( entry, "y"));
- if (dim == 3 ) {
- coord[ K_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( entry, "z"));
+ coord[ I_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( entry, (Dictionary_Entry_Key)"x") );
+ coord[ J_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( entry, (Dictionary_Entry_Key)"y"));
+ if (dim == 3 ) {
+ coord[ K_AXIS ] = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( entry, (Dictionary_Entry_Key)"z") );
}
/* Print Position */
@@ -230,7 +230,7 @@ void _LineParticleLayout_AssignFromXML(
}
Stream_UnIndent( stream );
- totalInitialParticles = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "totalInitialParticles", 2 );
+ totalInitialParticles = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"totalInitialParticles", 2 );
_LineParticleLayout_Init( self, dim, vertexCount, vertexList );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/ManualParticleLayout.c
--- a/Swarm/src/ManualParticleLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/ManualParticleLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -92,7 +92,7 @@ void _ManualParticleLayout_Init( void* m
self->isConstructed = True;
self->dictionary = dictionary;
- manualParticlePositions = Dictionary_Get( self->dictionary, "manualParticlePositions" );
+ manualParticlePositions = Dictionary_Get( self->dictionary, (Dictionary_Entry_Key)"manualParticlePositions" );
self->totalInitialParticles = Dictionary_Entry_Value_GetCount( manualParticlePositions );
self->averageInitialParticlesPerCell = 0;
}
@@ -100,7 +100,7 @@ void _ManualParticleLayout_Delete( void*
void _ManualParticleLayout_Delete( void* manualParticleLayout ) {
ManualParticleLayout* self = (ManualParticleLayout*)manualParticleLayout;
- _GlobalParticleLayout_Delete( self );
+ _GlobalParticleLayout_Delete( self );
}
void _ManualParticleLayout_Print( void* manualParticleLayout, Stream* stream ) {
@@ -188,12 +188,12 @@ void _ManualParticleLayout_InitialisePar
Dictionary* particlePositionDict = NULL;
GlobalParticle* particle = (GlobalParticle*)_particle;
- manualParticlePositions = Dictionary_Get( self->dictionary, "manualParticlePositions" );
+ manualParticlePositions = Dictionary_Get( self->dictionary, (Dictionary_Entry_Key)"manualParticlePositions" );
particlePositionEntry = Dictionary_Entry_Value_GetElement( manualParticlePositions, newParticle_I );
particlePositionDict = Dictionary_Entry_Value_AsDictionary( particlePositionEntry );
- particle->coord[I_AXIS] = Dictionary_GetDouble_WithDefault( particlePositionDict, "x", 0.0 );
- particle->coord[J_AXIS] = Dictionary_GetDouble_WithDefault( particlePositionDict, "y", 0.0 );
- particle->coord[K_AXIS] = Dictionary_GetDouble_WithDefault( particlePositionDict, "z", 0.0 );
+ particle->coord[I_AXIS] = Dictionary_GetDouble_WithDefault( particlePositionDict, (Dictionary_Entry_Key)"x", 0.0 );
+ particle->coord[J_AXIS] = Dictionary_GetDouble_WithDefault( particlePositionDict, (Dictionary_Entry_Key)"y", 0.0 );
+ particle->coord[K_AXIS] = Dictionary_GetDouble_WithDefault( particlePositionDict, (Dictionary_Entry_Key)"z", 0.0 );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/MeshParticleLayout.c
--- a/Swarm/src/MeshParticleLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/MeshParticleLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -173,9 +173,9 @@ void _MeshParticleLayout_AssignFromXML(
_PerCellParticleLayout_AssignFromXML( self, cf, data );
- cellParticleCount = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "cellParticleCount", 0 );
- seed = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "seed", 13 );
- mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, "mesh", Mesh, True, data );
+ cellParticleCount = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"cellParticleCount", 0 );
+ seed = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"seed", 13 );
+ mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"mesh", Mesh, True, data );
_MeshParticleLayout_Init( self, mesh, cellParticleCount, seed );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/OperatorSwarmVariable.c
--- a/Swarm/src/OperatorSwarmVariable.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/OperatorSwarmVariable.c Thu Jan 14 17:42:34 2010 +1100
@@ -156,7 +156,7 @@ void _OperatorSwarmVariable_Init( void*
OperatorSwarmVariable* self = (OperatorSwarmVariable*)_swarmVariable;
SwarmVariable* swarmVariable;
Index swarmVariable_I;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
self->_operator = Operator_NewFromName( operatorName, swarmVariableList[0]->dofCount, self->dim );
self->dofCount = self->_operator->resultDofs; /* reset value */
@@ -213,17 +213,17 @@ void _OperatorSwarmVariable_AssignFromXM
_SwarmVariable_AssignFromXML( self, cf, data );
swarmVariable_Register = self->swarm->swarmVariable_Register;
- operatorName = Stg_ComponentFactory_GetString( cf, self->name, "Operator", "" );
+ operatorName = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"Operator", "" );
- list = Dictionary_Get( dictionary, "SwarmVariables" );
+ list = Dictionary_Get( dictionary, (Dictionary_Entry_Key)"SwarmVariables" );
- swarmVariableCount = ( list ? Dictionary_Entry_Value_GetCount(list) : 1 );
+ swarmVariableCount = ( list ? Dictionary_Entry_Value_GetCount(list) : 1 );
swarmVariableList = Memory_Alloc_Array( SwarmVariable*, swarmVariableCount, "SwarmVars" );
for ( swarmVariable_I = 0 ; swarmVariable_I < swarmVariableCount ; swarmVariable_I++ ) {
swarmVariableName = (list ?
Dictionary_Entry_Value_AsString( Dictionary_Entry_Value_GetElement( list, swarmVariable_I ) ) :
- Dictionary_GetString( dictionary, "SwarmVariable" ) );
+ Dictionary_GetString( dictionary, (Dictionary_Entry_Key)"SwarmVariable" ) );
/* Check in swarmVariable_Register first before assuming in LiveComponentRegister */
Journal_PrintfL( cf->infoStream, 2, "Looking for SwarmVariable '%s' in swarmVariable_Register.\n",
@@ -233,7 +233,7 @@ void _OperatorSwarmVariable_AssignFromXM
if ( !swarmVariableList[swarmVariable_I] )
swarmVariableList[swarmVariable_I] =
- Stg_ComponentFactory_ConstructByName( cf, swarmVariableName, SwarmVariable, True, data );
+ Stg_ComponentFactory_ConstructByName( cf, (Name)swarmVariableName, SwarmVariable, True, data );
}
_SwarmVariable_AssignFromXML( self, cf, data );
@@ -286,7 +286,7 @@ void _OperatorSwarmVariable_ValueAt( voi
case 2:
self->_valueAt = _OperatorSwarmVariable_BinaryValueAt; break;
default:
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"Can't use func '%s' with swarmVariableCount = %d\n", __func__, self->swarmVariableCount );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/ParticleCommHandler.c
--- a/Swarm/src/ParticleCommHandler.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/ParticleCommHandler.c Thu Jan 14 17:42:34 2010 +1100
@@ -157,9 +157,9 @@ void _ParticleCommHandler_AssignFromXML(
void _ParticleCommHandler_AssignFromXML( void* pCommHandler, Stg_ComponentFactory* cf, void* data ){
ParticleCommHandler* self = (ParticleCommHandler*)pCommHandler;
- self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !self->context )
- self->context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !self->context )
+ self->context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
}
void _ParticleCommHandler_Build( void* pCommsHandler, void *data ){
@@ -494,7 +494,7 @@ void _ParticleCommHandler_BeginSendingPa
#if CAUTIOUS
Bool* cellsClearedForTransfer = NULL;
Neighbour_Index* cellsClearedForTransferDests = NULL;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
#endif
Journal_DPrintfL( self->debug, 1, "In %s():\n", __func__ );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/ParticleLayout.c
--- a/Swarm/src/ParticleLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/ParticleLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -132,9 +132,9 @@ void _ParticleLayout_AssignFromXML( void
ParticleLayout* self = (ParticleLayout*) particleLayout;
AbstractContext* context=NULL;
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
_ParticleLayout_Init( self, context, GlobalCoordSystem, False );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/ParticleMovementHandler.c
--- a/Swarm/src/ParticleMovementHandler.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/ParticleMovementHandler.c Thu Jan 14 17:42:34 2010 +1100
@@ -244,7 +244,7 @@ void ParticleMovementHandler_HandleParti
void ParticleMovementHandler_HandleParticleMovementBetweenProcs( ParticleCommHandler* pCommsHandler ) {
ParticleMovementHandler* self = (ParticleMovementHandler*)pCommsHandler;
double startTime = 0;
- Stream* info = Journal_Register( Info_Type, self->type );
+ Stream* info = Journal_Register( Info_Type, (Name)self->type );
Journal_DPrintfL( self->debug, 1, "In %s(), for swarm \"%s\":\n", __func__, self->swarm->name );
if ( 1 == self->swarm->nProc ) {
@@ -534,7 +534,7 @@ void ParticleMovementHandler_EnsureParti
1, MPI_UNSIGNED, MPI_SUM, 0, self->swarm->comm );
if ( 0 == self->swarm->myRank ) {
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
Journal_Firewall( totalParticlesFoundEnteringDomains == self->globalParticlesOutsideDomainTotal,
errorStream, "Error - in %s(): %d particles were found across all processors to be "
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/PlaneParticleLayout.c
--- a/Swarm/src/PlaneParticleLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/PlaneParticleLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -181,11 +181,11 @@ void _PlaneParticleLayout_AssignFromXML(
_SpaceFillerParticleLayout_AssignFromXML( self, cf, data );
- planeAxisString = Stg_ComponentFactory_GetString( cf, self->name, "planeAxis", "" );
- planeCoord = Stg_ComponentFactory_GetDouble( cf, self->name, "planeCoord", 0.0 );
+ planeAxisString = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"planeAxis", "" );
+ planeCoord = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"planeCoord", 0.0 );
/* Check to make sure that some value is given for plane axis */
- Journal_Firewall( strlen( planeAxisString ) > 0, Journal_MyStream( Error_Type, self ),
+ Journal_Firewall( strlen( planeAxisString ) > 0, Journal_MyStream( Error_Type, self ),
"Error for %s '%s': No axis given in param 'planeAxis'.\n", self->type, self->name );
/* Make axis case insensitive */
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/RandomParticleLayout.c
--- a/Swarm/src/RandomParticleLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/RandomParticleLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -163,8 +163,8 @@ void _RandomParticleLayout_AssignFromXML
_PerCellParticleLayout_AssignFromXML( self, cf, data );
- cellParticleCount = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "cellParticleCount", 0 );
- seed = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "seed", 13 );
+ cellParticleCount = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"cellParticleCount", 0 );
+ seed = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"seed", 13 );
_RandomParticleLayout_Init( self, cellParticleCount, seed );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/SingleCellLayout.c
--- a/Swarm/src/SingleCellLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/SingleCellLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -204,8 +204,8 @@ void* _SingleCellLayout_Copy( void* sing
if( (newSingleCellLayout->cellPointCoords = PtrMap_Find( map, self->cellPointCoords )) == NULL && self->cellPointCoords ) {
unsigned p_i;
- newSingleCellLayout->cellPointCoords = Memory_Alloc_2DArray( double, newSingleCellLayout->pointCount, 3, "SingleCellLayout->cellPoints" );
- for( p_i = 0; p_i < newSingleCellLayout->pointCount; p_i++ )
+ newSingleCellLayout->cellPointCoords = Memory_Alloc_2DArray( double, newSingleCellLayout->pointCount, 3, (Name)"SingleCellLayout->cellPoints" );
+ for( p_i = 0; p_i < newSingleCellLayout->pointCount; p_i++ )
memcpy( newSingleCellLayout->cellPointCoords[p_i], self->cellPointCoords[p_i],
sizeof(double) * 3 * newSingleCellLayout->pointCount );
PtrMap_Append( map, self->cellPointCoords, newSingleCellLayout->cellPointCoords );
@@ -231,19 +231,19 @@ void _SingleCellLayout_AssignFromXML( vo
_CellLayout_AssignFromXML( self, cf, data );
- dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, "dim", 0 );
+ dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, (Dictionary_Entry_Key)"dim", 0 );
- dimExists[ I_AXIS ] = Stg_ComponentFactory_GetBool( cf, self->name, "dimExistsI", True );
- dimExists[ J_AXIS ] = Stg_ComponentFactory_GetBool( cf, self->name, "dimExistsJ", True );
- dimExists[ K_AXIS ] = Stg_ComponentFactory_GetBool( cf, self->name, "dimExistsK", (dim == 3) );
+ dimExists[ I_AXIS ] = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"dimExistsI", True );
+ dimExists[ J_AXIS ] = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"dimExistsJ", True );
+ dimExists[ K_AXIS ] = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"dimExistsK", (dim == 3) );
- min[ I_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "minX", -1.0 );
- min[ J_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "minY", -1.0 );
- min[ K_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "minZ", -1.0 );
+ min[ I_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"minX", -1.0 );
+ min[ J_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"minY", -1.0 );
+ min[ K_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"minZ", -1.0 );
- max[ I_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "maxX", 1.0 );
- max[ J_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "maxY", 1.0 );
- max[ K_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "maxZ", 1.0 );
+ max[ I_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"maxX", 1.0 );
+ max[ J_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"maxY", 1.0 );
+ max[ K_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"maxZ", 1.0 );
_SingleCellLayout_Init( self, dimExists, min, max );
}
@@ -309,7 +309,7 @@ void _SingleCellLayout_InitialiseGlobalC
tempCoord[1] = self->min[J_AXIS];
tempCoord[2] = self->min[K_AXIS];
- self->cellPointCoords = Memory_Alloc_2DArray( double, self->pointCount, 3, "SingleCellLayout->cellPoints" );
+ self->cellPointCoords = Memory_Alloc_2DArray( double, self->pointCount, 3, (Name)"SingleCellLayout->cellPoints" );
/* Now generate the coordinates */
for ( k=0; k <= self->dimExists[K_AXIS]; k++ ) {
@@ -328,7 +328,7 @@ void _SingleCellLayout_InitialiseGlobalC
tempCoord[J_AXIS] = ( self->min[J_AXIS] == tempCoord[J_AXIS] ) ? self->max[J_AXIS] : self->min[J_AXIS];
}
/* flip/flop the k for next time */
- tempCoord[K_AXIS] = ( self->min[K_AXIS] == tempCoord[K_AXIS] ) ? self->max[K_AXIS] : self->min[K_AXIS];
+ tempCoord[K_AXIS] = ( self->min[K_AXIS] == tempCoord[K_AXIS] ) ? self->max[K_AXIS] : self->min[K_AXIS];
}
}
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/SpaceFillerParticleLayout.c
--- a/Swarm/src/SpaceFillerParticleLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/SpaceFillerParticleLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -180,7 +180,7 @@ void _SpaceFillerParticleLayout_AssignFr
_GlobalParticleLayout_AssignFromXML( self, cf, data );
- dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, "dim", 0 );
+ dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, (Dictionary_Entry_Key)"dim", 0 );
_SpaceFillerParticleLayout_Init( self, dim );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/SwarmClass.c
--- a/Swarm/src/SwarmClass.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/SwarmClass.c Thu Jan 14 17:42:34 2010 +1100
@@ -147,7 +147,7 @@ void _Swarm_Init(
void* ics )
{
StandardParticle particle;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
LiveComponentRegister* lcReg = NULL;
self->debug = Stream_RegisterChild( Swarm_Debug, self->type );
@@ -576,43 +576,35 @@ void _Swarm_AssignFromXML( void* swarm,
Variable_Register* variable_Register = NULL;
VariableCondition* ic = NULL;
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
- dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, "dim", 0 );
+ dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, (Dictionary_Entry_Key)"dim", 0 );
- particleType = Stg_ComponentFactory_GetString( cf, self->name, "ParticleType", IntegrationPoint_Type );
+ particleType = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"ParticleType", IntegrationPoint_Type );
- cellLayout = Stg_ComponentFactory_ConstructByKey( cf, self->name, CellLayout_Type, CellLayout, True, data ) ;
- particleLayout = Stg_ComponentFactory_ConstructByKey( cf, self->name, ParticleLayout_Type, ParticleLayout, True, data );
+ cellLayout = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)CellLayout_Type, CellLayout, True, data ) ;
+ particleLayout = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)ParticleLayout_Type, ParticleLayout, True, data );
extensionManagerRegister = extensionMgr_Register;
assert( extensionManagerRegister );
variable_Register = context->variable_Register;
- assert( variable_Register );
+ assert( variable_Register );
cellParticleTblDelta =
- Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "cellParticleTblDelta", DEFAULT_CELL_PARTICLE_TBL_DELTA);
+ Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"cellParticleTblDelta", DEFAULT_CELL_PARTICLE_TBL_DELTA );
extraParticlesFactor =
- Stg_ComponentFactory_GetDouble( cf, self->name, "extraParticlesFactor", DEFAULT_EXTRA_PARTICLES_FACTOR );
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"extraParticlesFactor", DEFAULT_EXTRA_PARTICLES_FACTOR );
{
unsigned int count = 0;
int i = 0;
Stg_Component **components = NULL;
- components = (Stg_Component**)Stg_ComponentFactory_ConstructByList(
- cf,
- self->name,
- "ParticleCommHandlers",
- Stg_ComponentFactory_Unlimited,
- ParticleCommHandler,
- False,
- &count,
- data );
+ components = (Stg_Component** )Stg_ComponentFactory_ConstructByList( cf, self->name, (Dictionary_Entry_Key)"ParticleCommHandlers", Stg_ComponentFactory_Unlimited, ParticleCommHandler, False, &count, data );
- if( count == 0 ){
+ if( count == 0 ){
Journal_Printf( self->debug, "Warning: Swarm has 0 Communication handlers..!\n" );
}
else{
@@ -624,7 +616,7 @@ void _Swarm_AssignFromXML( void* swarm,
}
/* construct the variable condition IC */
- ic = Stg_ComponentFactory_ConstructByKey( cf, self->name, "IC", VariableCondition, False, data );
+ ic = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"IC", VariableCondition, False, data );
_Swarm_Init(
self, context,
@@ -967,7 +959,7 @@ void Swarm_UpdateParticleOwner( void* sw
}
#ifdef CAUTIOUS
else if ( newOwningCell >= self->cellDomainCount ) {
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
Journal_Firewall( 0, errorStream,
"Error - in %s(): particle %u's new domain cell calculated as "
@@ -1010,7 +1002,7 @@ void Swarm_DeleteParticle( void* swarm,
GlobalParticle* lastParticle = NULL;
GlobalParticle* particleToDelete = NULL;
SizeT particleSize = self->particleExtensionMgr->finalSize;
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
Journal_Firewall( particleToDelete_lI < self->particleLocalCount, errorStr,
"Error- in %s(): particleToDelete_lI passed in (%u) is >= swarm's local particle count %u.\n",
@@ -1061,7 +1053,7 @@ void Swarm_DeleteParticleAndReplaceWithN
Swarm* self = (Swarm*)swarm;
Particle_InCellIndex cParticle_I = 0;
GlobalParticle* particleToDelete = NULL;
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
Journal_Firewall( particleToDelete_lI < self->particleLocalCount, errorStr,
"Error- in %s(): particleToDelete_lI passed in (%u) is >= swarm's local particle count %u.\n",
@@ -1089,7 +1081,7 @@ void Swarm_AddParticleToCell( void* swar
Particle_InCellIndex* newCountPtr = &self->cellParticleCountTbl[dCell_I];
Particle_InCellIndex* newSizePtr = &self->cellParticleSizeTbl[dCell_I];
#ifdef CAUTIOUS
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
#endif
Journal_DPrintfL( self->debug, 3, "Adding particle %d to cell %d: cell's particle count now %d",
@@ -1121,7 +1113,7 @@ void Swarm_AddShadowParticleToShadowCell
if( self->shadowTablesBuilt ){
Particle_InCellIndex* newCountPtr = &self->shadowCellParticleCountTbl[dCell_I-self->cellLocalCount];
#ifdef CAUTIOUS
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
#endif
Journal_DPrintfL( self->debug, 3, "Adding shadow particle %d to shadow cell %d: shadow cell's particle count now %d",
@@ -1381,7 +1373,7 @@ SwarmVariable* Swarm_NewScalarVariable(
if ( swarmVariable_Register )
variable_Register = swarmVariable_Register->variable_Register;
- name = Stg_Object_AppendSuffix( self, nameExt );
+ name = Stg_Object_AppendSuffix( self, (Name)nameExt );
variable = Variable_New(
name,
self->context,
@@ -1438,7 +1430,7 @@ SwarmVariable* Swarm_NewVectorVariable(
dataNames = Memory_Alloc_Array( Name, dataTypeCount, "dataNames" );
va_start( ap, dataTypeCount );
for( vector_I = 0; vector_I < dataTypeCount; vector_I++ ) {
- dataNames[vector_I] = Stg_Object_AppendSuffix( self, (Name) va_arg( ap, Name ) );
+ dataNames[vector_I] = Stg_Object_AppendSuffix( self, (Name)(Name ) va_arg( ap, Name ) );
}
va_end( ap );
@@ -1535,13 +1527,13 @@ void Swarm_CheckCoordsAreFinite( void* s
Swarm* self = (Swarm*) swarm;
GlobalParticle* particle;
double* coord;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
Dimension_Index dim = self->dim;
Particle_Index particleLocalCount = self->particleLocalCount;
Particle_Index lParticle_I;
for ( lParticle_I = 0 ; lParticle_I < particleLocalCount ; lParticle_I++ ) {
- particle = (GlobalParticle*)Swarm_ParticleAt( self, lParticle_I );
+ particle = (GlobalParticle* )Swarm_ParticleAt( self, lParticle_I );
coord = particle->coord;
Journal_Firewall(
@@ -1561,7 +1553,7 @@ void Swarm_AssignIndexWithinShape( void*
Journal_Firewall(
self->particleLocalCount == variableToAssign->arraySize,
- Journal_Register( Error_Type, self->type ),
+ Journal_Register( Error_Type, (Name)self->type ),
"In func %s: Trying to assign to variable '%s' with a different number of values \
than the number of particles in swarm '%s'.\n",
__func__, variableToAssign->name, self->name );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/SwarmDump.c
--- a/Swarm/src/SwarmDump.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/SwarmDump.c Thu Jan 14 17:42:34 2010 +1100
@@ -175,20 +175,12 @@ void _SwarmDump_AssignFromXML( void* swa
Bool newFileEachTime;
Index swarmCount;
- self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !self->context )
- self->context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !self->context )
+ self->context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
- swarmList = Stg_ComponentFactory_ConstructByList(
- cf,
- self->name,
- "Swarm",
- Stg_ComponentFactory_Unlimited,
- Swarm,
- True,
- &swarmCount,
- data ) ;
- newFileEachTime = Stg_ComponentFactory_GetBool( cf, self->name, "newFileEachTime", True );
+ swarmList = Stg_ComponentFactory_ConstructByList( cf, self->name, (Dictionary_Entry_Key)"Swarm", Stg_ComponentFactory_Unlimited, Swarm, True, &swarmCount, data ) ;
+ newFileEachTime = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"newFileEachTime", True );
_SwarmDump_Init(
self,
@@ -225,7 +217,7 @@ void _SwarmDump_Execute( void* swarmDump
SizeT particleSize;
Index swarm_I;
Swarm* swarm;
- Stream* info = Journal_Register( Info_Type, self->type );
+ Stream* info = Journal_Register( Info_Type, (Name)self->type );
Processor_Index rank_I;
Journal_DPrintf( info, "Proc %d: beginning Swarm binary checkpoint in %s():\n", self->swarmList[0]->myRank, __func__ );
@@ -304,7 +296,7 @@ void SwarmDump_DumpToHDF5( SwarmDump* se
int attribData;
hsize_t count[2];
Particle_Index lParticle_I = 0;
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
SwarmVariable* swarmVar;
Index swarmVar_I;
char dataSpaceName[1024];
@@ -373,7 +365,7 @@ void SwarmDump_DumpToHDF5( SwarmDump* se
sprintf( dataSpaceName, "/%s", swarmVar->name + strlen(swarm->name)+1 );
if( swarmVar->variable->dataTypes[0] == Variable_DataType_Int ) {
/* Allocate space for the values to be written to file */
- int** value = Memory_Alloc_2DArray( int, swarm->particleLocalCount, swarmVar->dofCount, "swarmVariableValue" );
+ int** value = Memory_Alloc_2DArray( int, swarm->particleLocalCount, swarmVar->dofCount, (Name)"swarmVariableValue" );
#if H5_VERS_MAJOR == 1 && H5_VERS_MINOR < 8
fileData = H5Dcreate( file, dataSpaceName, H5T_NATIVE_INT, fileSpace, props );
@@ -394,7 +386,7 @@ void SwarmDump_DumpToHDF5( SwarmDump* se
else if( swarmVar->variable->dataTypes[0] == Variable_DataType_Char) {
char** value;
/* Allocate space for the values to be written to file */
- value = Memory_Alloc_2DArray( char, swarm->particleLocalCount, swarmVar->dofCount, "swarmVariableValue" );
+ value = Memory_Alloc_2DArray( char, swarm->particleLocalCount, swarmVar->dofCount, (Name)"swarmVariableValue" );
#if H5_VERS_MAJOR == 1 && H5_VERS_MINOR < 8
fileData = H5Dcreate( file, dataSpaceName, H5T_NATIVE_CHAR, fileSpace, props );
@@ -415,7 +407,7 @@ void SwarmDump_DumpToHDF5( SwarmDump* se
else if( swarmVar->variable->dataTypes[0] == Variable_DataType_Float ) {
float** value;
/* Allocate space for the values to be written to file */
- value = Memory_Alloc_2DArray( float, swarm->particleLocalCount, swarmVar->dofCount, "swarmVariableValue" );
+ value = Memory_Alloc_2DArray( float, swarm->particleLocalCount, swarmVar->dofCount, (Name)"swarmVariableValue" );
#if H5_VERS_MAJOR == 1 && H5_VERS_MINOR < 8
fileData = H5Dcreate( file, dataSpaceName, H5T_NATIVE_FLOAT, fileSpace, props );
@@ -436,7 +428,7 @@ void SwarmDump_DumpToHDF5( SwarmDump* se
else {
double** value;
/* Allocate space for the values to be written to file */
- value = Memory_Alloc_2DArray( double, swarm->particleLocalCount, swarmVar->dofCount, "swarmVariableValue" );
+ value = Memory_Alloc_2DArray( double, swarm->particleLocalCount, swarmVar->dofCount, (Name)"swarmVariableValue" );
#if H5_VERS_MAJOR == 1 && H5_VERS_MINOR < 8
fileData = H5Dcreate( file, dataSpaceName, H5T_NATIVE_DOUBLE, fileSpace, props );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/SwarmOutput.c
--- a/Swarm/src/SwarmOutput.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/SwarmOutput.c Thu Jan 14 17:42:34 2010 +1100
@@ -100,7 +100,7 @@ void _SwarmOutput_Init(
self->swarm = swarm;
self->baseFilename = baseFilename;
- handle = ExtensionManager_Add( swarm->particleExtensionMgr, SwarmOutput_Type, sizeof( int ) );
+ handle = ExtensionManager_Add( swarm->particleExtensionMgr, (Name)SwarmOutput_Type, sizeof( int ) );
swarmVariable = Swarm_NewScalarVariable(
swarm,
"globalIndexVariable",
@@ -193,21 +193,21 @@ void _SwarmOutput_AssignFromXML( void* s
Swarm* swarm;
Name baseFilename;
- self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !self->context )
- self->context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !self->context )
+ self->context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
- swarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Swarm", Swarm, True, data ) ;
- baseFilename = Stg_ComponentFactory_GetString( cf, self->name, "baseFilename", self->name );
+ swarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Swarm", Swarm, True, data ) ;
+ baseFilename = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"baseFilename", self->name );
_SwarmOutput_Init(
self,
(AbstractContext*)self->context,
swarm,
baseFilename,
- Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "columnWidth", 12 ),
- Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "decimalLength", 6 ),
- Stg_ComponentFactory_GetString( cf, self->name, "borderString", " " ) );
+ Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"columnWidth", 12 ),
+ Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"decimalLength", 6 ),
+ Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"borderString", " " ) );
}
void _SwarmOutput_Build( void* swarmOutput, void* data ) {
@@ -223,7 +223,7 @@ void _SwarmOutput_Initialise( void* swar
Variable* globalIndexVariable = self->globalIndexVariable;
Particle_Index lParticle_I;
Name filename;
- Stream* stream = Journal_Register( Info_Type, SwarmOutput_Type );
+ Stream* stream = Journal_Register( Info_Type, (Name)SwarmOutput_Type );
/* re-enable printing from current rank process */
Stream_SetPrintingRank( stream, context->rank );
@@ -254,7 +254,7 @@ void _SwarmOutput_Execute( void* swarmOu
Variable* globalIndexVariable = self->globalIndexVariable;
Particle_Index lParticle_I;
Name filename;
- Stream* stream = Journal_Register( Info_Type, SwarmOutput_Type );
+ Stream* stream = Journal_Register( Info_Type, (Name)SwarmOutput_Type );
/* re-enable printing from current rank process */
Stream_SetPrintingRank( stream, context->rank );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/SwarmShapeVC.c
--- a/Swarm/src/SwarmShapeVC.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/SwarmShapeVC.c Thu Jan 14 17:42:34 2010 +1100
@@ -279,14 +279,14 @@ void _SwarmShapeVC_AssignFromXML( void*
void* variable_Register = NULL;
AbstractContext* context;
- self = Stg_ComponentFactory_ConstructByName( cf, self->name, SwarmShapeVC, False, data );
+ self = Stg_ComponentFactory_ConstructByName( cf, (Name)self->name, SwarmShapeVC, False, data );
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
variable_Register = context->variable_Register;
- assert( variable_Register );
+ assert( variable_Register );
self->variable_Register = variable_Register;
_VariableCondition_Init( self, context, variable_Register, conFunc_Register, NULL );
@@ -300,11 +300,11 @@ void _SwarmShapeVC_Build( void* variabl
assert( context && Stg_Class_IsInstance( context, AbstractContext_Type ) );
- self->_swarm = Stg_ComponentFactory_ConstructByKey( context->CF, self->name, "Swarm", Swarm, True, 0 ) ;
- assert( self->_swarm );
+ self->_swarm = Stg_ComponentFactory_ConstructByKey( context->CF, self->name, (Dictionary_Entry_Key)"Swarm", Swarm, True, 0 ) ;
+ assert( self->_swarm );
- self->_shape = Stg_ComponentFactory_ConstructByKey( context->CF, self->name, "Shape", Stg_Shape, True, 0 /* dummy */ ) ;
- assert( self->_shape );
+ self->_shape = Stg_ComponentFactory_ConstructByKey( context->CF, self->name, (Dictionary_Entry_Key)"Shape", Stg_Shape, True, 0 /* dummy */ ) ;
+ assert( self->_shape );
_VariableCondition_Build( self, data );
@@ -319,9 +319,9 @@ void _SwarmShapeVC_BuildSelf( void* var
assert( context && Stg_Class_IsInstance( context, AbstractContext_Type ) );
/* dave - 06.08.07 */
- /*self->shapeName = Stg_ComponentFactory_GetString( context->CF, self->name, "Shape", "" );
+ /*self->shapeName = Stg_ComponentFactory_GetString( context->CF, self->name, (Dictionary_Entry_Key)"Shape", "" );
*/
- /*Journal_Firewall( strlen( self->shapeName ) > 0, Journal_MyStream( Error_Type, self ),
+ /*Journal_Firewall( strlen( self->shapeName ) > 0, Journal_MyStream( Error_Type, self ),
"You need to fill out the 'Shape' dictionary entry for this SwarmShapeVC.\n" );*/
/*assert( self->shapeName );*/
@@ -354,7 +354,7 @@ void _SwarmShapeVC_ReadDictionary( void*
/* Find dictionary entry */
if (self->_dictionaryEntryName)
- vcDictVal = Dictionary_Get(dictionary, self->_dictionaryEntryName);
+ vcDictVal = Dictionary_Get( dictionary, (Dictionary_Entry_Key)self->_dictionaryEntryName );
else {
vcDictVal = &_vcDictVal;
Dictionary_Entry_Value_InitFromStruct(vcDictVal, dictionary);
@@ -363,25 +363,25 @@ void _SwarmShapeVC_ReadDictionary( void*
if (vcDictVal) {
/* Get Name of Shape from dictionary - Grab pointer to shape later on */
self->shapeName = StG_Strdup(
- Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(vcDictVal, "Shape" )) );
+ Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"Shape" )) );
/* Obtain the variable entries */
- self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember(vcDictVal, "variables"));
+ self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables") );
self->_entryTbl = Memory_Alloc_Array( SwarmShapeVC_Entry, self->_entryCount, "SwarmShapeVC->_entryTbl" );
- varsVal = Dictionary_Entry_Value_GetMember(vcDictVal, "variables");
+ varsVal = Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables");
- for (entry_I = 0; entry_I < self->_entryCount; entry_I++) {
+ for (entry_I = 0; entry_I < self->_entryCount; entry_I++ ) {
char* valType;
Dictionary_Entry_Value* valueEntry;
Dictionary_Entry_Value* varDictListVal;
varDictListVal = Dictionary_Entry_Value_GetElement(varsVal, entry_I);
- valueEntry = Dictionary_Entry_Value_GetMember(varDictListVal, "value");
+ valueEntry = Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"value" );
self->_entryTbl[entry_I].varName = Dictionary_Entry_Value_AsString(
- Dictionary_Entry_Value_GetMember(varDictListVal, "name"));
+ Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"name") );
- valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(varDictListVal, "type"));
+ valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"type") );
if (0 == strcasecmp(valType, "func")) {
char* funcName = Dictionary_Entry_Value_AsString(valueEntry);
Index cfIndex;
@@ -389,7 +389,7 @@ void _SwarmShapeVC_ReadDictionary( void*
self->_entryTbl[entry_I].value.type = VC_ValueType_CFIndex;
cfIndex = ConditionFunction_Register_GetIndex( self->conFunc_Register, funcName);
if ( cfIndex == (Index) -1 ) {
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
Journal_Printf( errorStr, "Error- in %s: While parsing "
"definition of swarmShapeVC \"%s\" (applies to shape \"%s\"), the cond. func. applied to "
@@ -445,7 +445,7 @@ void _SwarmShapeVC_ReadDictionary( void*
else {
/* Assume double */
Journal_DPrintf(
- Journal_Register( InfoStream_Type, "myStream" ),
+ Journal_Register( InfoStream_Type, (Name)"myStream" ),
"Type to variable on variable condition not given, assuming double\n" );
self->_entryTbl[entry_I].value.type = VC_ValueType_Double;
self->_entryTbl[entry_I].value.as.typeDouble = Dictionary_Entry_Value_AsDouble( valueEntry );
@@ -492,14 +492,14 @@ Variable_Index _SwarmShapeVC_GetVariable
Variable_Index _SwarmShapeVC_GetVariableIndex(void* variableCondition, Index globalIndex, VariableCondition_VariableIndex varIndex) {
SwarmShapeVC* self = (SwarmShapeVC*)variableCondition;
Variable_Index searchedIndex = 0;
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
Name varName;
Swarm* swarm = self->_swarm;
char* swarmVarName;
varName = self->_entryTbl[varIndex].varName;
- swarmVarName = (char*)calloc( strlen(swarm->name) + 1 + strlen(varName) + 1, sizeof(char) );
+ swarmVarName = (char*)calloc( strlen(swarm->name) + 1 + strlen(varName ) + 1, sizeof(char) );
strcat( swarmVarName, swarm->name );
strcat( swarmVarName, "-" );
strcat( swarmVarName, varName );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/SwarmVariable.c
--- a/Swarm/src/SwarmVariable.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/SwarmVariable.c Thu Jan 14 17:42:34 2010 +1100
@@ -176,13 +176,13 @@ void _SwarmVariable_AssignFromXML( void*
Index dofCount;
AbstractContext* context;
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
- swarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Swarm", Swarm, True, data );
- variable = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Variable", Variable, False, data );
- dofCount = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "dofCount", 0 );
+ swarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Swarm", Swarm, True, data );
+ variable = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Variable", Variable, False, data );
+ dofCount = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"dofCount", 0 );
_SwarmVariable_Init( self, context, swarm, variable, dofCount );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/Swarm_Register.c
--- a/Swarm/src/Swarm_Register.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/Swarm_Register.c Thu Jan 14 17:42:34 2010 +1100
@@ -172,7 +172,7 @@ Swarm* Swarm_Register_Get( Swarm_Registe
{
assert( self );
- return (Swarm*)Stg_ObjectList_Get( self->swarmList, name );
+ return (Swarm*)Stg_ObjectList_Get( self->swarmList, (Name)name );
}
Swarm* Swarm_Register_At( void* swarmRegister, Index index ) {
@@ -214,9 +214,9 @@ void Swarm_Register_SaveAllRegisteredSwa
Index swarmsToDumpCount = 0;
SwarmDump* swarmDumper;
Swarm* swarm;
- Stream* info = Journal_Register( Info_Type, self->type );
+ Stream* info = Journal_Register( Info_Type, (Name)self->type );
- if ( swarmCount == 0 ) {
+ if ( swarmCount == 0 ) {
return;
}
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/TriSingleCellLayout.c
--- a/Swarm/src/TriSingleCellLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/TriSingleCellLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -152,10 +152,10 @@ void _TriSingleCellLayout_AssignFromXML(
_CellLayout_AssignFromXML( self, cf, data );
- dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, "dim", 0 );
+ dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, (Dictionary_Entry_Key)"dim", 0 );
assert( dim );
- _TriSingleCellLayout_Init( (TriSingleCellLayout*)self, cf->rootDict, dim );
+ _TriSingleCellLayout_Init( (TriSingleCellLayout* )self, cf->rootDict, dim );
}
void _TriSingleCellLayout_Build( void* triSingleCellLayout, void* data ){
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/UnionParticleLayout.c
--- a/Swarm/src/UnionParticleLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/UnionParticleLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -158,15 +158,7 @@ void _UnionParticleLayout_AssignFromXML(
_GlobalParticleLayout_AssignFromXML( self, cf, data );
- particleLayoutList = Stg_ComponentFactory_ConstructByList(
- cf,
- self->name,
- "ParticleLayoutList",
- Stg_ComponentFactory_Unlimited,
- GlobalParticleLayout,
- True,
- &particleLayoutCount,
- data );
+ particleLayoutList = Stg_ComponentFactory_ConstructByList( cf, self->name, (Dictionary_Entry_Key)"ParticleLayoutList", Stg_ComponentFactory_Unlimited, GlobalParticleLayout, True, &particleLayoutCount, data );
_UnionParticleLayout_Init( self, particleLayoutList, particleLayoutCount );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/src/WithinShapeParticleLayout.c
--- a/Swarm/src/WithinShapeParticleLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/src/WithinShapeParticleLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -172,7 +172,7 @@ void _WithinShapeParticleLayout_AssignFr
_SpaceFillerParticleLayout_AssignFromXML( self, cf, data );
- shape = Stg_ComponentFactory_ConstructByKey( cf, self->name, "shape", Stg_Shape, True, data ) ;
+ shape = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"shape", Stg_Shape, True, data ) ;
_WithinShapeParticleLayout_Init( self, shape );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/tests/Bouncer/Bouncer.c
--- a/Swarm/tests/Bouncer/Bouncer.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/tests/Bouncer/Bouncer.c Thu Jan 14 17:42:34 2010 +1100
@@ -28,17 +28,17 @@ void StGermain_Bouncer_UpdatePositions(
Particle_InCellIndex cParticle_I;
Particle* currParticle;
Index dim_I;
- Swarm* swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, "swarm" );
+ Swarm* swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"swarm" );
BlockGeometry* blockGeom;
- Stream* stream = Journal_Register( Debug_Type, "particleUpdate" );
+ Stream* stream = Journal_Register( Debug_Type, (Name)"particleUpdate" );
unsigned int movementSpeedDivisor = 5;
Particle_Index lParticle_I = 0;
Stream_SetPrintingRank( stream, Dictionary_GetUnsignedInt_WithDefault( context->dictionary, "procToWatch", 0 ) );
- blockGeom = (BlockGeometry*) LiveComponentRegister_Get( context->CF->LCRegister, "geometry" );
+ blockGeom = (BlockGeometry*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"geometry" );
- if ( context->timeStep == 1 ) {
+ if ( context->timeStep == 1 ) {
/* for each particle, set a random velocity */
for ( lParticle_I=0; lParticle_I < swarm->particleLocalCount; lParticle_I++ ) {
currParticle = (Particle*)Swarm_ParticleAt( swarm, lParticle_I );
@@ -96,7 +96,7 @@ void _StGermain_Bouncer_AssignFromXML( v
void _StGermain_Bouncer_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
DomainContext* context;
- context = Stg_ComponentFactory_ConstructByName( cf, "context", DomainContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", DomainContext, True, data );
ContextEP_ReplaceAll( context, AbstractContext_EP_Solve, StGermain_Bouncer_UpdatePositions );
}
@@ -115,7 +115,7 @@ void* _StGermain_Bouncer_DefaultNew( Nam
}
Index StGermain_Bouncer_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, StGermain_Bouncer_Type, "0", _StGermain_Bouncer_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, StGermain_Bouncer_Type, (Name)"0", _StGermain_Bouncer_DefaultNew );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/tests/GaussLayoutSingleCellSuite.c
--- a/Swarm/tests/GaussLayoutSingleCellSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/tests/GaussLayoutSingleCellSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -83,7 +83,7 @@ void GaussLayoutSingleCellSuite_Test1Par
char expected_file[PCU_PATH_MAX];
if( data->rank == procToWatch ) {
- stream = Journal_Register( Info_Type, "1ParticlePerDim_3D" );
+ stream = Journal_Register( Info_Type, (Name)"1ParticlePerDim_3D" );
Stream_RedirectFile( stream, "1ParticlePerDim_3D.dat" );
nDims = 3;
@@ -147,7 +147,7 @@ void GaussLayoutSingleCellSuite_Test2Par
char expected_file[PCU_PATH_MAX];
if( data->rank == procToWatch ) {
- stream = Journal_Register( Info_Type, "2ParticlesPerDim_3D" );
+ stream = Journal_Register( Info_Type, (Name)"2ParticlesPerDim_3D" );
Stream_RedirectFile( stream, "2ParticlesPerDim_3D.dat" );
nDims = 3;
@@ -211,7 +211,7 @@ void GaussLayoutSingleCellSuite_Test3Par
char expected_file[PCU_PATH_MAX];
if( data->rank == procToWatch ) {
- stream = Journal_Register( Info_Type, "3ParticlesPerDim_3D" );
+ stream = Journal_Register( Info_Type, (Name)"3ParticlesPerDim_3D" );
Stream_RedirectFile( stream, "3ParticlesPerDim_3D.dat" );
nDims = 3;
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/tests/GaussLayoutSuite.c
--- a/Swarm/tests/GaussLayoutSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/tests/GaussLayoutSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -135,7 +135,7 @@ void GaussLayoutSuite_TestDriver( GaussL
count = 0;
Journal_Enable_AllTypedStream( True );
- stream = Journal_Register( Info_Type, name );
+ stream = Journal_Register( Info_Type, (Name)name );
Stream_RedirectFile( stream, output );
/* Checks that the particule count on each cell are the same. */
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/tests/ManualParticleLayoutSuite.c
--- a/Swarm/tests/ManualParticleLayoutSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/tests/ManualParticleLayoutSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -110,34 +110,34 @@ void ManualParticleLayoutSuite_TestManua
/* Dictionary Initialization */
dictionary = Dictionary_New();
particlePositionsList = Dictionary_Entry_Value_NewList();
- Dictionary_Add( dictionary, "manualParticlePositions", particlePositionsList );
+ Dictionary_Add( dictionary, (Dictionary_Entry_Key)"manualParticlePositions", particlePositionsList );
- particlePositionEntry = Dictionary_Entry_Value_NewStruct();
+ particlePositionEntry = Dictionary_Entry_Value_NewStruct( );
Dictionary_Entry_Value_AddElement( particlePositionsList, particlePositionEntry );
- Dictionary_Entry_Value_AddMember( particlePositionEntry, "x", Dictionary_Entry_Value_FromDouble( 0.4 ) );
- Dictionary_Entry_Value_AddMember( particlePositionEntry, "y", Dictionary_Entry_Value_FromDouble( 0.3 ) );
- Dictionary_Entry_Value_AddMember( particlePositionEntry, "z", Dictionary_Entry_Value_FromDouble( 0.2 ) );
+ Dictionary_Entry_Value_AddMember( particlePositionEntry, (Dictionary_Entry_Key)"x", Dictionary_Entry_Value_FromDouble( 0.4 ) );
+ Dictionary_Entry_Value_AddMember( particlePositionEntry, (Dictionary_Entry_Key)"y", Dictionary_Entry_Value_FromDouble( 0.3 ) );
+ Dictionary_Entry_Value_AddMember( particlePositionEntry, (Dictionary_Entry_Key)"z", Dictionary_Entry_Value_FromDouble( 0.2 ) );
- particlePositionEntry = Dictionary_Entry_Value_NewStruct();
+ particlePositionEntry = Dictionary_Entry_Value_NewStruct( );
Dictionary_Entry_Value_AddElement( particlePositionsList, particlePositionEntry );
- Dictionary_Entry_Value_AddMember( particlePositionEntry, "x", Dictionary_Entry_Value_FromDouble( 0.7 ) );
- Dictionary_Entry_Value_AddMember( particlePositionEntry, "y", Dictionary_Entry_Value_FromDouble( 0.6 ) );
- Dictionary_Entry_Value_AddMember( particlePositionEntry, "z", Dictionary_Entry_Value_FromDouble( 0.5 ) );
+ Dictionary_Entry_Value_AddMember( particlePositionEntry, (Dictionary_Entry_Key)"x", Dictionary_Entry_Value_FromDouble( 0.7 ) );
+ Dictionary_Entry_Value_AddMember( particlePositionEntry, (Dictionary_Entry_Key)"y", Dictionary_Entry_Value_FromDouble( 0.6 ) );
+ Dictionary_Entry_Value_AddMember( particlePositionEntry, (Dictionary_Entry_Key)"z", Dictionary_Entry_Value_FromDouble( 0.5 ) );
- particlePositionEntry = Dictionary_Entry_Value_NewStruct();
+ particlePositionEntry = Dictionary_Entry_Value_NewStruct( );
Dictionary_Entry_Value_AddElement( particlePositionsList, particlePositionEntry );
- Dictionary_Entry_Value_AddMember( particlePositionEntry, "x", Dictionary_Entry_Value_FromDouble( 0.8 ) );
- Dictionary_Entry_Value_AddMember( particlePositionEntry, "y", Dictionary_Entry_Value_FromDouble( 0.1 ) );
- Dictionary_Entry_Value_AddMember( particlePositionEntry, "z", Dictionary_Entry_Value_FromDouble( 0.3 ) );
+ Dictionary_Entry_Value_AddMember( particlePositionEntry, (Dictionary_Entry_Key)"x", Dictionary_Entry_Value_FromDouble( 0.8 ) );
+ Dictionary_Entry_Value_AddMember( particlePositionEntry, (Dictionary_Entry_Key)"y", Dictionary_Entry_Value_FromDouble( 0.1 ) );
+ Dictionary_Entry_Value_AddMember( particlePositionEntry, (Dictionary_Entry_Key)"z", Dictionary_Entry_Value_FromDouble( 0.3 ) );
- particlePositionEntry = Dictionary_Entry_Value_NewStruct();
+ particlePositionEntry = Dictionary_Entry_Value_NewStruct( );
Dictionary_Entry_Value_AddElement( particlePositionsList, particlePositionEntry );
- Dictionary_Entry_Value_AddMember( particlePositionEntry, "x", Dictionary_Entry_Value_FromDouble( 0.9 ) );
- Dictionary_Entry_Value_AddMember( particlePositionEntry, "y", Dictionary_Entry_Value_FromDouble( 0.4 ) );
- Dictionary_Entry_Value_AddMember( particlePositionEntry, "z", Dictionary_Entry_Value_FromDouble( 0.1 ) );
+ Dictionary_Entry_Value_AddMember( particlePositionEntry, (Dictionary_Entry_Key)"x", Dictionary_Entry_Value_FromDouble( 0.9 ) );
+ Dictionary_Entry_Value_AddMember( particlePositionEntry, (Dictionary_Entry_Key)"y", Dictionary_Entry_Value_FromDouble( 0.4 ) );
+ Dictionary_Entry_Value_AddMember( particlePositionEntry, (Dictionary_Entry_Key)"z", Dictionary_Entry_Value_FromDouble( 0.1 ) );
/* Init mesh */
- extensionMgr_Register = ExtensionManager_Register_New();
+ extensionMgr_Register = ExtensionManager_Register_New( );
mesh = ManualParticleLayoutSuite_BuildMesh( nDims, meshSize, minCrds, maxCrds, extensionMgr_Register );
/* Configure the element-cell-layout */
@@ -159,7 +159,7 @@ void ManualParticleLayoutSuite_TestManua
Stg_Component_Initialise( swarm, 0, False );
Journal_Enable_AllTypedStream( True );
- stream = Journal_Register( Info_Type, "ManualParticle" );
+ stream = Journal_Register( Info_Type, (Name)"ManualParticle" );
/* Print out the particles on all cells */
Stream_RedirectFile( stream, "testManualParticle.dat" );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/tests/ParticleCoordsSuite.c
--- a/Swarm/tests/ParticleCoordsSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/tests/ParticleCoordsSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -86,14 +86,14 @@ void ParticleCoordsSuite_TestLineParticl
pcu_filename_input( "testLineParticleLayout.xml", input_file );
cf = stgMainInitFromXML( input_file, data->comm, NULL );
stgMainBuildAndInitialise( cf );
- context = (DomainContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (DomainContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
dictionary = context->dictionary;
- swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, "swarm" );
+ swarm = (Swarm* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"swarm" );
pcu_check_true( swarm );
- Journal_Enable_AllTypedStream( True );
- stream = Journal_Register( Info_Type, "LinearParticleStream" );
+ Journal_Enable_AllTypedStream( True );
+ stream = Journal_Register( Info_Type, (Name)"LinearParticleStream" );
Stream_RedirectFile( stream, "linearParticle.dat" );
Swarm_PrintParticleCoords( swarm, stream );
Journal_Enable_AllTypedStream( False );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/tests/ShadowSyncSuite.c
--- a/Swarm/tests/ShadowSyncSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/tests/ShadowSyncSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -96,7 +96,7 @@ void ShadowSyncSuite_TestShadowSync( Sha
pcu_filename_input( "testSwarmParticleShadowSync.xml", input_file );
cf = stgMainInitFromXML( input_file, data->comm, NULL );
- context = (DomainContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (DomainContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
Stream_Enable( cf->infoStream, False );
Stream_Enable( context->info, False );
Stream_Enable( context->debug, False );
@@ -104,15 +104,15 @@ void ShadowSyncSuite_TestShadowSync( Sha
dictionary = context->dictionary;
Journal_ReadFromDictionary( dictionary );
- Dictionary_Add( dictionary, "procToWatch", Dictionary_Entry_Value_FromUnsignedInt( procToWatch ) );
+ Dictionary_Add( dictionary, (Dictionary_Entry_Key)"procToWatch", Dictionary_Entry_Value_FromUnsignedInt( procToWatch ) );
componentDict = Dictionary_GetDictionary( dictionary, "components" );
assert( componentDict );
KeyCall( context, context->constructExtensionsK, EntryPoint_VoidPtr_CallCast* )( KeyHandle(context,context->constructExtensionsK), context );
- swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, "swarm" );
- ExtensionManager_Add( swarm->particleExtensionMgr, "ParticleVelocity", sizeof(double[3]) );
- ExtensionManager_Add( swarm->particleExtensionMgr, "ParticleColour", sizeof(double) );
+ swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"swarm" );
+ ExtensionManager_Add( swarm->particleExtensionMgr, (Name)"ParticleVelocity", sizeof(double[3]) );
+ ExtensionManager_Add( swarm->particleExtensionMgr, (Name)"ParticleColour", sizeof(double) );
Swarm_NewVectorVariable(
swarm,
@@ -170,11 +170,11 @@ void ShadowSyncSuite_listDeleteFunction(
void ShadowSyncSuite_ValidateShadowing( DomainContext* context ) {
DomainContext *self = context;
- Swarm* swarm = (Swarm*) LiveComponentRegister_Get( self->CF->LCRegister, "swarm" );
+ Swarm* swarm = (Swarm*) LiveComponentRegister_Get( self->CF->LCRegister, (Name)"swarm" );
Swarm_UpdateAllParticleOwners( swarm );
- if(swarm->nProc > 1) {
+ if(swarm->nProc > 1 ) {
int ii = 0, jj = 0;
ShadowInfo* cellShadowInfo = CellLayout_GetShadowInfo( swarm->cellLayout );
ProcNbrInfo* procNbrInfo = cellShadowInfo->procNbrInfo;
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/tests/SingleAttractor/SingleAttractor.c
--- a/Swarm/tests/SingleAttractor/SingleAttractor.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/tests/SingleAttractor/SingleAttractor.c Thu Jan 14 17:42:34 2010 +1100
@@ -28,19 +28,19 @@ void StGermain_SingleAttractor_UpdatePos
Particle_InCellIndex cParticle_I;
Particle* currParticle;
Index dim_I;
- Swarm* swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, "swarm" );
+ Swarm* swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"swarm" );
Coord attractorPoint;
Mesh* mesh;
- Stream* stream = Journal_Register( Info_Type, "particleUpdate" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"particleUpdate" );
unsigned int movementSpeedDivisor = 0;
int movementSign = 1;
unsigned int explosionPeriod = 20;
double minCrd[3], maxCrd[3];
Stream_SetPrintingRank( stream, Dictionary_GetUnsignedInt_WithDefault( context->dictionary, "procToWatch", 0 ) );
- movementSpeedDivisor = Dictionary_GetDouble_WithDefault( context->dictionary, "movementSpeedDivisor", 10 );
+ movementSpeedDivisor = Dictionary_GetDouble_WithDefault( context->dictionary, (Dictionary_Entry_Key)"movementSpeedDivisor", 10 );
- mesh = (Mesh*)LiveComponentRegister_Get( context->CF->LCRegister, "mesh-linear" );
+ mesh = (Mesh* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)"mesh-linear" );
Mesh_GetGlobalCoordRange( mesh, minCrd, maxCrd );
for ( dim_I=0; dim_I < 3; dim_I++ ) {
attractorPoint[dim_I] = (maxCrd[dim_I] - minCrd[dim_I]) / 3;
@@ -97,9 +97,9 @@ void _StGermain_SingleAttractor_AssignFr
void _StGermain_SingleAttractor_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
DomainContext* context;
- context = Stg_ComponentFactory_ConstructByName( cf, "context", DomainContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", DomainContext, True, data );
Stream_SetPrintingRank(
- Journal_Register( Info_Type, "Context" ),
+ Journal_Register( Info_Type, (Name)"Context" ),
Dictionary_GetUnsignedInt_WithDefault( context->dictionary, "procToWatch", 0 ) );
ContextEP_ReplaceAll( context, AbstractContext_EP_Solve, StGermain_SingleAttractor_UpdatePositions );
@@ -119,7 +119,7 @@ void* _StGermain_SingleAttractor_Default
}
Index StGermain_SingleAttractor_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, StGermain_SingleAttractor_Type, "0", _StGermain_SingleAttractor_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, StGermain_SingleAttractor_Type, (Name)"0", _StGermain_SingleAttractor_DefaultNew );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/tests/SingleAttractorSuite.c
--- a/Swarm/tests/SingleAttractorSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/tests/SingleAttractorSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -93,7 +93,7 @@ void SingleAttractorSuite_TestSingleAttr
pcu_filename_input( "testSwarmParticleAdvectionSingleAttractor.xml", input_file );
cf = stgMainInitFromXML( input_file, data->comm, NULL );
- context = (DomainContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (DomainContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
Stream_Enable( cf->infoStream, False );
Stream_Enable( context->info, False );
Stream_Enable( context->verbose, False );
@@ -106,9 +106,9 @@ void SingleAttractorSuite_TestSingleAttr
KeyCall( context, context->constructExtensionsK, EntryPoint_VoidPtr_CallCast* )( KeyHandle(context,context->constructExtensionsK), context );
- swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, "swarm" );
- ExtensionManager_Add( swarm->particleExtensionMgr, "ParticleVelocity", sizeof(double[3]) );
- ExtensionManager_Add( swarm->particleExtensionMgr, "ParticleColour", sizeof(double) );
+ swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"swarm" );
+ ExtensionManager_Add( swarm->particleExtensionMgr, (Name)"ParticleVelocity", sizeof(double[3]) );
+ ExtensionManager_Add( swarm->particleExtensionMgr, (Name)"ParticleColour", sizeof(double) );
Swarm_NewVectorVariable(
swarm,
@@ -166,10 +166,10 @@ void SingleAttractorSuite_SingleAttracto
Particle_InCellIndex cParticle_I;
Particle* currParticle;
Index dim_I;
- Swarm* swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, "swarm" );
+ Swarm* swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"swarm" );
Coord attractorPoint;
Mesh* mesh;
- Stream* stream = Journal_Register( Info_Type, "particleUpdate" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"particleUpdate" );
unsigned int movementSpeedDivisor = 0;
int movementSign = 1;
unsigned int explosionPeriod = 20;
@@ -178,9 +178,9 @@ void SingleAttractorSuite_SingleAttracto
Stream_RedirectFile( stream, "testSingleAttractor.dat" );
Stream_SetPrintingRank( stream, Dictionary_GetUnsignedInt_WithDefault( context->dictionary, "procToWatch", 0 ) );
- movementSpeedDivisor = Dictionary_GetDouble_WithDefault( context->dictionary, "movementSpeedDivisor", 10 );
+ movementSpeedDivisor = Dictionary_GetDouble_WithDefault( context->dictionary, (Dictionary_Entry_Key)"movementSpeedDivisor", 10 );
- mesh = (Mesh*)LiveComponentRegister_Get( context->CF->LCRegister, "mesh-linear" );
+ mesh = (Mesh* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)"mesh-linear" );
Mesh_GetGlobalCoordRange( mesh, minCrd, maxCrd );
for ( dim_I=0; dim_I < 3; dim_I++ ) {
attractorPoint[dim_I] = (maxCrd[dim_I] - minCrd[dim_I]) / 3;
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/tests/SpaceFillerParticleLayoutSuite.c
--- a/Swarm/tests/SpaceFillerParticleLayoutSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/tests/SpaceFillerParticleLayoutSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -125,7 +125,7 @@ void SpaceFillerParticleLayoutSuite_Test
Stg_Component_Initialise( swarm, 0, False );
Journal_Enable_AllTypedStream( True );
- stream = Journal_Register( Info_Type, "TestSpaceFillerParticle" );
+ stream = Journal_Register( Info_Type, (Name)"TestSpaceFillerParticle" );
Stream_RedirectFile( stream, "spaceFillerParticle.dat" );
Swarm_PrintParticleCoords_ByCell( swarm, stream );
Journal_Enable_AllTypedStream( False );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/tests/Spinner/Spinner.c
--- a/Swarm/tests/Spinner/Spinner.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/tests/Spinner/Spinner.c Thu Jan 14 17:42:34 2010 +1100
@@ -31,9 +31,9 @@ void StGermain_Spinner_UpdatePositions(
Particle_InCellIndex cParticle_I;
Particle* currParticle;
Index dim_I;
- Swarm* swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, "swarm" );
+ Swarm* swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"swarm" );
BlockGeometry* blockGeom;
- Stream* stream = Journal_Register( Debug_Type, "particleUpdate" );
+ Stream* stream = Journal_Register( Debug_Type, (Name)"particleUpdate" );
unsigned int movementSpeedDivisor = 100;
double x, y;
Bool reverseMode = False;
@@ -48,9 +48,9 @@ void StGermain_Spinner_UpdatePositions(
Stream_SetPrintingRank( stream, Dictionary_GetUnsignedInt_WithDefault( context->dictionary, "procToWatch", 0 ) );
- blockGeom = (BlockGeometry*) LiveComponentRegister_Get( context->CF->LCRegister, "geometry" );
+ blockGeom = (BlockGeometry*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"geometry" );
- for ( lCell_I=0; lCell_I < swarm->cellLocalCount; lCell_I++ ) {
+ for ( lCell_I=0; lCell_I < swarm->cellLocalCount; lCell_I++ ) {
Journal_Printf( stream, "\tUpdating Particles positions in local cell %d:\n", lCell_I );
for ( cParticle_I=0; cParticle_I < swarm->cellParticleCountTbl[lCell_I]; cParticle_I++ ) {
Coord movementVector = {0,0,0};
@@ -95,7 +95,7 @@ void _StGermain_Spinner_AssignFromXML( v
void _StGermain_Spinner_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
DomainContext* context;
- context = Stg_ComponentFactory_ConstructByName( cf, "context", DomainContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", DomainContext, True, data );
ContextEP_ReplaceAll( context, AbstractContext_EP_Solve, StGermain_Spinner_UpdatePositions );
}
@@ -114,7 +114,7 @@ void* _StGermain_Spinner_DefaultNew( Nam
}
Index StGermain_Spinner_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, StGermain_Spinner_Type, "0", _StGermain_Spinner_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, StGermain_Spinner_Type, (Name)"0", _StGermain_Spinner_DefaultNew );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/tests/SwarmDumpAndLoadSuite.c
--- a/Swarm/tests/SwarmDumpAndLoadSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/tests/SwarmDumpAndLoadSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -93,22 +93,22 @@ void SwarmDumpAndLoadSuite_TestSwarmDump
SwarmVariable* posVariable;
SwarmVariable* posVariableNew;
Variable_Register* varReg = Variable_Register_New();
- stream = Journal_Register (Info_Type, "SwarmDumpStream");
+ stream = Journal_Register( Info_Type, (Name)"SwarmDumpStream" );
Journal_Enable_TypedStream( DebugStream_Type, False );
Stream_EnableBranch( Swarm_Debug, False );
- Stream_Enable( Journal_Register( Info_Type, ParticleCommHandler_Type ), False );
- Stream_Enable( Journal_Register( Info_Type, SwarmDump_Type ), False );
+ Stream_Enable( Journal_Register( Info_Type, (Name)ParticleCommHandler_Type ), False );
+ Stream_Enable( Journal_Register( Info_Type, (Name)SwarmDump_Type ), False );
pcu_filename_input( "testSwarmDump.xml", input_file );
/* setup from XML */
cf = stgMainInitFromXML( input_file, data->comm, NULL );
- context = (DomainContext*) LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (DomainContext*) LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
dictionary = context->dictionary;
- swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, "swarm" );
+ swarm = (Swarm* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"swarm" );
/* create a swarmVariable, as this will be required for the HDF5 checkpointing (else it doesn't know about the required variable to save) */
posVariable = Swarm_NewVectorVariable(swarm, "Position", GetOffsetOfMember( integrationPoint, xi ),Variable_DataType_Double, swarm->dim, "PositionX", "PositionY", "PositionZ" );
posVariable->isCheckpointedAndReloaded = True;
@@ -133,7 +133,7 @@ void SwarmDumpAndLoadSuite_TestSwarmDump
fileParticleLayout = FileParticleLayout_New( "fileParticleLayout", NULL, GlobalCoordSystem, False, 0, 0.0, output_file, data->nProcs );
Stg_Component_AssignFromXML( fileParticleLayout, cf, 0, False );
- newSwarm = Swarm_New( "testSwarm2", (AbstractContext*)context, (ElementCellLayout*) LiveComponentRegister_Get( context->CF->LCRegister, "elementCellLayout" ),
+ newSwarm = Swarm_New( "testSwarm2", (AbstractContext*)context, (ElementCellLayout*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"elementCellLayout" ),
fileParticleLayout, 3, sizeof(Particle), extensionMgr_Register, varReg, data->comm, NULL );
/* as with for the swarmDump, create a swarmVariable, as this will be required for the HDF5 checkpointing (else it doesn't know about the required variable to save) */
posVariableNew = Swarm_NewVectorVariable( newSwarm, "Position", GetOffsetOfMember( integrationPoint, xi ), Variable_DataType_Double, newSwarm->dim, "PositionX", "PositionY", "PositionZ" );
@@ -216,8 +216,8 @@ void SwarmDumpAndLoadSuite_UpdateParticl
Particle_InCellIndex cParticle_I;
Particle* currParticle;
Index dim_I;
- Mesh* mesh = (Mesh*) LiveComponentRegister_Get( context->CF->LCRegister, "mesh-linear" );
- Swarm* swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, "swarm" );
+ Mesh* mesh = (Mesh*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"mesh-linear" );
+ Swarm* swarm = (Swarm* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"swarm" );
Coord attractorPoint;
double minCrds[3], maxCrds[3];
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/tests/SwarmOutputSuite.c
--- a/Swarm/tests/SwarmOutputSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/tests/SwarmOutputSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -61,7 +61,7 @@ void _SwarmOutputSuite_SetDt( void* cont
}
void SwarmOutputSuite_MoveParticles( DomainContext* context ) {
- Swarm* swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, "swarm" );
+ Swarm* swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"swarm" );
Particle_Index lParticle_I;
GlobalParticle* particle;
double x,y;
@@ -106,11 +106,11 @@ void SwarmOutputSuite_TestSwarmOutput( S
pcu_filename_input( "testSwarmOutput.xml", input_file );
cf = stgMainInitFromXML( input_file, data->comm, NULL );
- context = (DomainContext*) LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (DomainContext*) LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
dictionary = context->dictionary;
Journal_ReadFromDictionary( dictionary );
- stgMainBuildAndInitialise( cf );
+ stgMainBuildAndInitialise( cf );
ContextEP_Append( context, AbstractContext_EP_Dt, SwarmOutputSuite_Dt );
ContextEP_Append( context, AbstractContext_EP_Step, SwarmOutputSuite_MoveParticles );
@@ -121,13 +121,13 @@ void SwarmOutputSuite_TestSwarmOutput( S
AbstractContext_Dump( context );
Stg_Component_Execute( context, 0, False );
- particleLayout = (SpaceFillerParticleLayout*) LiveComponentRegister_Get( context->CF->LCRegister, "particleLayout" );
- swarmOutput = (SwarmOutput*) LiveComponentRegister_Get( context->CF->LCRegister, "swarmOutput" );
- swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, "swarm" );
+ particleLayout = (SpaceFillerParticleLayout*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"particleLayout" );
+ swarmOutput = (SwarmOutput* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"swarmOutput" );
+ swarm = (Swarm* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"swarm" );
pcu_check_true( particleLayout->isConstructed && particleLayout->isBuilt && particleLayout->isInitialised );
pcu_check_true( swarmOutput->isConstructed && swarmOutput->isBuilt && swarmOutput->isInitialised );
- pcu_check_true( swarm->isConstructed && swarm->isBuilt && swarm->isInitialised );
+ pcu_check_true( swarm->isConstructed && swarm->isBuilt && swarm->isInitialised );
pcu_check_streq( swarm->name, swarmOutput->swarm->name );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/tests/SwarmSuite.c
--- a/Swarm/tests/SwarmSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/tests/SwarmSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -165,13 +165,13 @@ void SwarmSuite_TestParticleSearch( Swar
void SwarmSuite_TestParticleSearch( SwarmSuiteData* data ) {
double coord[3];
int procToWatch = data->nProcs > 1 ? 1 : 0;
- Stream* stream = Journal_Register (Info_Type, "TestParticleSearch");
+ Stream* stream = Journal_Register( Info_Type, (Name)"TestParticleSearch");
if( data->rank == procToWatch ) {
if( data->nProcs == 1 ) {
coord[0] = 0.60*( data->maxCrds[0] - data->minCrds[0] );
coord[1] = 0.20*( data->maxCrds[1] - data->minCrds[1] );
- coord[2] = 0.82*( data->maxCrds[2] - data->minCrds[2] );
+ coord[2] = 0.82*( data->maxCrds[2] - data->minCrds[2] );
pcu_check_true( SwarmSuite_TestParticleSearchFunc( data->swarm, coord, stream ) );
coord[0] = 0.20*( data->maxCrds[0] - data->minCrds[0] );
@@ -189,7 +189,7 @@ void SwarmSuite_TestParticleCoords( Swar
if( data->rank == procToWatch ) {
Journal_Enable_AllTypedStream( True );
- stream = Journal_Register (Info_Type, "TestParticleCorrds");
+ stream = Journal_Register( Info_Type, (Name)"TestParticleCorrds" );
Stream_RedirectFile( stream, "testParticleCoords.dat" );
Swarm_PrintParticleCoords( data->swarm, stream );
Journal_Printf( stream, "\n" );
diff -r 92ee57abdec6 -r 36afba1d4768 Swarm/tests/VaryingCornerAttractors/VaryingCornerAttractors.c
--- a/Swarm/tests/VaryingCornerAttractors/VaryingCornerAttractors.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Swarm/tests/VaryingCornerAttractors/VaryingCornerAttractors.c Thu Jan 14 17:42:34 2010 +1100
@@ -28,14 +28,14 @@ void StGermain_VaryingCornerAttractors_U
Particle_InCellIndex cParticle_I;
Particle* currParticle;
Index dim_I;
- Swarm* swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, "swarm" );
+ Swarm* swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"swarm" );
Coord attractorPoint;
BlockGeometry* blockGeometry;
- Stream* stream = Journal_Register( Debug_Type, "particleUpdate" );
+ Stream* stream = Journal_Register( Debug_Type, (Name)"particleUpdate" );
unsigned int movementSpeedDivisor = 10;
int movementSign = 1;
unsigned int cornerPeriod = 10;
- unsigned int numCorners = (swarm->dim-1)*4;
+ unsigned int numCorners = (swarm->dim-1 )*4;
unsigned int explosionPeriod = numCorners*cornerPeriod;
Coord cornerCoords[8];
int modValue = 0;
@@ -43,7 +43,7 @@ void StGermain_VaryingCornerAttractors_U
Stream_SetPrintingRank( stream, Dictionary_GetUnsignedInt_WithDefault( context->dictionary, "procToWatch", 0 ) );
- blockGeometry = (BlockGeometry*) LiveComponentRegister_Get( context->CF->LCRegister, "geometry" );
+ blockGeometry = (BlockGeometry*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"geometry" );
/* Bottom left corner */
cornerCoords[0][I_AXIS] = blockGeometry->min[I_AXIS];
@@ -79,7 +79,7 @@ void StGermain_VaryingCornerAttractors_U
cornerCoords[7][K_AXIS] = blockGeometry->max[K_AXIS];
/* calculate which corner */
- modValue = (context->timeStep - 1) % (numCorners * cornerPeriod);
+ modValue = (context->timeStep - 1) % (numCorners * cornerPeriod );
cornerIndex = modValue / cornerPeriod;
memcpy( attractorPoint, cornerCoords[cornerIndex], 3 * sizeof(double) );
Journal_Printf( stream, "Calculated attractor point is at (%f,%f,%f):\n", attractorPoint[0], attractorPoint[1], attractorPoint[2] );
@@ -137,7 +137,7 @@ void _StGermain_VaryingCornerAttractors_
void _StGermain_VaryingCornerAttractors_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
DomainContext* context;
- context = Stg_ComponentFactory_ConstructByName( cf, "context", DomainContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", DomainContext, True, data );
ContextEP_ReplaceAll( context, AbstractContext_EP_Solve, StGermain_VaryingCornerAttractors_UpdatePositions );
}
@@ -156,8 +156,7 @@ void* _StGermain_VaryingCornerAttractors
}
Index StGermain_VaryingCornerAttractors_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, StGermain_VaryingCornerAttractors_Type, "0",
- _StGermain_VaryingCornerAttractors_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, StGermain_VaryingCornerAttractors_Type, (Name)"0", _StGermain_VaryingCornerAttractors_DefaultNew );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/AllElementsVC.c
--- a/Utils/src/AllElementsVC.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/AllElementsVC.c Thu Jan 14 17:42:34 2010 +1100
@@ -144,7 +144,7 @@ void _AllElementsVC_ReadDictionary( void
/* Find dictionary entry */
if (self->_dictionaryEntryName)
- vcDictVal = Dictionary_Get( dictionary, self->_dictionaryEntryName );
+ vcDictVal = Dictionary_Get( dictionary, (Dictionary_Entry_Key)self->_dictionaryEntryName );
else {
vcDictVal = &_vcDictVal;
Dictionary_Entry_Value_InitFromStruct( vcDictVal, dictionary );
@@ -152,21 +152,21 @@ void _AllElementsVC_ReadDictionary( void
if (vcDictVal) {
/* Obtain the variable entries */
- self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember(vcDictVal, "variables"));
+ self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables") );
self->_entryTbl = Memory_Alloc_Array( AllElementsVC_Entry, self->_entryCount, "AllElementsVC->_entryTbl" );
- varsVal = Dictionary_Entry_Value_GetMember(vcDictVal, "variables");
+ varsVal = Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables");
- for (entry_I = 0; entry_I < self->_entryCount; entry_I++) {
+ for (entry_I = 0; entry_I < self->_entryCount; entry_I++ ) {
char* valType;
Dictionary_Entry_Value* valueEntry;
Dictionary_Entry_Value* varDictListVal;
varDictListVal = Dictionary_Entry_Value_GetElement(varsVal, entry_I);
- valueEntry = Dictionary_Entry_Value_GetMember(varDictListVal, "value");
+ valueEntry = Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"value" );
- self->_entryTbl[entry_I].varName = Dictionary_Entry_Value_AsString( Dictionary_Entry_Value_GetMember(varDictListVal, "name"));
+ self->_entryTbl[entry_I].varName = Dictionary_Entry_Value_AsString( Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"name") );
- valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(varDictListVal, "type"));
+ valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"type") );
if (0 == strcasecmp(valType, "func")) {
char* funcName = Dictionary_Entry_Value_AsString(valueEntry);
@@ -176,7 +176,7 @@ void _AllElementsVC_ReadDictionary( void
cfIndex = ConditionFunction_Register_GetIndex( self->conFunc_Register, funcName);
if ( cfIndex == (unsigned)-1 ) {
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
Journal_Printf( errorStr, "Error- in %s: While parsing "
"definition of allElementsVC \"%s\", the cond. func. applied to "
@@ -228,7 +228,7 @@ void _AllElementsVC_ReadDictionary( void
else {
/* Assume double */
Journal_DPrintf(
- Journal_Register( InfoStream_Type, "myStream" ),
+ Journal_Register( InfoStream_Type, (Name)"myStream" ),
"Type to variable on variable condition not given, assuming double\n" );
self->_entryTbl[entry_I].value.type = VC_ValueType_Double;
self->_entryTbl[entry_I].value.as.typeDouble = Dictionary_Entry_Value_AsDouble( valueEntry );
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/AllNodesVC.c
--- a/Utils/src/AllNodesVC.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/AllNodesVC.c Thu Jan 14 17:42:34 2010 +1100
@@ -147,7 +147,7 @@ void _AllNodesVC_ReadDictionary( void* v
/* Find dictionary entry */
if (self->_dictionaryEntryName)
- vcDictVal = Dictionary_Get( dictionary, self->_dictionaryEntryName );
+ vcDictVal = Dictionary_Get( dictionary, (Dictionary_Entry_Key)self->_dictionaryEntryName );
else {
vcDictVal = &_vcDictVal;
Dictionary_Entry_Value_InitFromStruct( vcDictVal, dictionary );
@@ -155,21 +155,21 @@ void _AllNodesVC_ReadDictionary( void* v
if (vcDictVal) {
/* Obtain the variable entries */
- self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember(vcDictVal, "variables"));
+ self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables") );
self->_entryTbl = Memory_Alloc_Array( AllNodesVC_Entry, self->_entryCount, "AllNodesVC->_entryTbl" );
- varsVal = Dictionary_Entry_Value_GetMember(vcDictVal, "variables");
+ varsVal = Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables");
- for (entry_I = 0; entry_I < self->_entryCount; entry_I++) {
+ for (entry_I = 0; entry_I < self->_entryCount; entry_I++ ) {
char* valType;
Dictionary_Entry_Value* valueEntry;
Dictionary_Entry_Value* varDictListVal;
varDictListVal = Dictionary_Entry_Value_GetElement(varsVal, entry_I);
- valueEntry = Dictionary_Entry_Value_GetMember(varDictListVal, "value");
+ valueEntry = Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"value" );
- self->_entryTbl[entry_I].varName = Dictionary_Entry_Value_AsString( Dictionary_Entry_Value_GetMember(varDictListVal, "name"));
+ self->_entryTbl[entry_I].varName = Dictionary_Entry_Value_AsString( Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"name") );
- valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(varDictListVal, "type"));
+ valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"type") );
if (0 == strcasecmp(valType, "func")) {
char* funcName = Dictionary_Entry_Value_AsString(valueEntry);
@@ -179,7 +179,7 @@ void _AllNodesVC_ReadDictionary( void* v
cfIndex = ConditionFunction_Register_GetIndex( self->conFunc_Register, funcName);
if ( cfIndex == (unsigned)-1 ) {
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
Journal_Printf( errorStr, "Error- in %s: While parsing "
"definition of %s \"%s\", the cond. func. applied to "
@@ -231,7 +231,7 @@ void _AllNodesVC_ReadDictionary( void* v
else {
/* Assume double */
Journal_Printf(
- Journal_Register( InfoStream_Type, "myStream" ),
+ Journal_Register( InfoStream_Type, (Name)"myStream" ),
"Type to variable on variable condition not given, assuming double\n" );
self->_entryTbl[entry_I].value.type = VC_ValueType_Double;
self->_entryTbl[entry_I].value.as.typeDouble = Dictionary_Entry_Value_AsDouble( valueEntry );
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/ContactVC.c
--- a/Utils/src/ContactVC.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/ContactVC.c Thu Jan 14 17:42:34 2010 +1100
@@ -142,7 +142,7 @@ void _ContactVC_ReadDictionary( void* va
/* Find dictionary entry */
if (self->_dictionaryEntryName)
- vcDictVal = Dictionary_Get(dictionary, self->_dictionaryEntryName);
+ vcDictVal = Dictionary_Get( dictionary, (Dictionary_Entry_Key)self->_dictionaryEntryName );
else
{
vcDictVal = &_vcDictVal;
@@ -150,7 +150,7 @@ void _ContactVC_ReadDictionary( void* va
}
if (vcDictVal) {
- entryVal = Dictionary_Entry_Value_GetMember( vcDictVal, "deep" );
+ entryVal = Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"deep" );
if( entryVal )
self->deep = Dictionary_Entry_Value_AsBool( entryVal );
}
@@ -164,7 +164,7 @@ void _ContactVC_Delete(void* wallVC) {
ContactVC* self = (ContactVC*)wallVC;
/* Stg_Class_Delete parent */
- _WallVC_Delete( self );
+ _WallVC_Delete( self );
}
void _ContactVC_Destroy(void* wallVC, void* data) {
@@ -196,21 +196,21 @@ IndexSet* _ContactVC_GetSet(void* variab
IndexSet* _ContactVC_GetSet(void* variableCondition) {
ContactVC* self = (ContactVC*)variableCondition;
IndexSet* set = NULL;
- Stream* warningStr = Journal_Register( Error_Type, self->type );
+ Stream* warningStr = Journal_Register( Error_Type, (Name)self->type );
unsigned nDims;
Grid* vertGrid;
CartesianGenerator* gen;
nDims = Mesh_GetDimSize( self->_mesh );
- gen = (CartesianGenerator*)self->_mesh->generator;
+ gen = (CartesianGenerator* )self->_mesh->generator;
if( strcmp( gen->type, CartesianGenerator_Type ) )
abort();
- vertGrid = *(Grid**)ExtensionManager_Get( self->_mesh->info, self->_mesh, ExtensionManager_GetHandle( self->_mesh->info, "vertexGrid" ) );
+ vertGrid = *(Grid**)ExtensionManager_Get( self->_mesh->info, self->_mesh, ExtensionManager_GetHandle( self->_mesh->info, (Name)"vertexGrid" ) );
switch (self->_wall) {
case WallVC_Wall_Front:
- if ( nDims < 3 || !vertGrid->sizes[2] ) {
+ if ( nDims < 3 || !vertGrid->sizes[2] ) {
Journal_Printf( warningStr, "Warning - in %s: Can't build a %s wall VC "
"when mesh has no elements in the %s axis. Returning an empty set.\n", __func__,
WallVC_WallEnumToStr[self->_wall], "K" );
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/CornerVC.c
--- a/Utils/src/CornerVC.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/CornerVC.c Thu Jan 14 17:42:34 2010 +1100
@@ -157,7 +157,7 @@ void _CornerVC_ReadDictionary( void* var
/* Find dictionary entry */
if (self->_dictionaryEntryName) {
- vcDictVal = Dictionary_Get(dictionary, self->_dictionaryEntryName);
+ vcDictVal = Dictionary_Get( dictionary, (Dictionary_Entry_Key)self->_dictionaryEntryName );
}
else {
vcDictVal = &_vcDictVal;
@@ -168,7 +168,7 @@ void _CornerVC_ReadDictionary( void* var
char* cornerStr;
/* Obtain which corner */
- cornerStr = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(vcDictVal, "corner" ));
+ cornerStr = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"corner" ) );
if (!strcasecmp(cornerStr, "bottomLeftFront"))
self->_corner = CornerVC_Corner_BottomLeftFront;
@@ -192,21 +192,21 @@ void _CornerVC_ReadDictionary( void* var
}
/* Obtain the variable entries */
- self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember(vcDictVal, "variables"));
+ self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables") );
self->_entryTbl = Memory_Alloc_Array( CornerVC_Entry, self->_entryCount, "CornerVC->_entryTbl" );
- varsVal = Dictionary_Entry_Value_GetMember(vcDictVal, "variables");
+ varsVal = Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables");
- for (entry_I = 0; entry_I < self->_entryCount; entry_I++) {
+ for (entry_I = 0; entry_I < self->_entryCount; entry_I++ ) {
char* valType;
Dictionary_Entry_Value* valueEntry;
Dictionary_Entry_Value* varDictListVal;
varDictListVal = Dictionary_Entry_Value_GetElement(varsVal, entry_I);
- valueEntry = Dictionary_Entry_Value_GetMember(varDictListVal, "value");
+ valueEntry = Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"value" );
- self->_entryTbl[entry_I].varName = Dictionary_Entry_Value_AsString( Dictionary_Entry_Value_GetMember(varDictListVal, "name") );
+ self->_entryTbl[entry_I].varName = Dictionary_Entry_Value_AsString( Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"name") );
- valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(varDictListVal, "type"));
+ valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"type") );
if (0 == strcasecmp(valType, "func")) {
char* funcName = Dictionary_Entry_Value_AsString(valueEntry);
@@ -216,7 +216,7 @@ void _CornerVC_ReadDictionary( void* var
cfIndex = ConditionFunction_Register_GetIndex( self->conFunc_Register, funcName);
if ( cfIndex == (unsigned)-1 ) {
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
Journal_Printf( errorStr, "Error- in %s: While parsing "
"definition of cornerVC \"%s\" (applies to corner \"%s\"), the cond. func. applied to "
@@ -269,7 +269,7 @@ void _CornerVC_ReadDictionary( void* var
else {
/* Assume double */
Journal_DPrintf(
- Journal_Register( InfoStream_Type, "myStream" ),
+ Journal_Register( InfoStream_Type, (Name)"myStream" ),
"Type to variable on variable condition not given, assuming double\n" );
self->_entryTbl[entry_I].value.type = VC_ValueType_Double;
self->_entryTbl[entry_I].value.as.typeDouble = Dictionary_Entry_Value_AsDouble( valueEntry );
@@ -456,18 +456,17 @@ IndexSet* _CornerVC_GetSet(void* variabl
{
CornerVC* self = (CornerVC*)variableCondition;
IndexSet *set = NULL;
- Stream* warningStr = Journal_Register( Error_Type, self->type );
+ Stream* warningStr = Journal_Register( Error_Type, (Name)self->type );
unsigned nDims;
Grid* vertGrid;
nDims = Mesh_GetDimSize( self->_mesh );
- vertGrid = *(Grid**)ExtensionManager_Get( self->_mesh->info, self->_mesh,
- ExtensionManager_GetHandle( self->_mesh->info,
- "vertexGrid" ) );
+ vertGrid = *(Grid** )ExtensionManager_Get( self->_mesh->info, self->_mesh,
+ ExtensionManager_GetHandle( self->_mesh->info, (Name)"vertexGrid" ) );
switch (self->_corner) {
case CornerVC_Corner_BottomLeftFront:
- if ( nDims < 3 || !vertGrid->sizes[2] ) {
+ if ( nDims < 3 || !vertGrid->sizes[2] ) {
Journal_Printf( warningStr, "Warning - in %s: Can't build a %s corner VC "
"when mesh has no elements in the %s axis. Returning an empty set.\n", __func__,
CornerVC_CornerEnumToStr[self->_corner], "K" );
@@ -606,7 +605,7 @@ Variable_Index _CornerVC_GetVariableInde
{
CornerVC* self = (CornerVC*)variableCondition;
Variable_Index searchedIndex = 0;
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
Name varName;
varName = self->_entryTbl[varIndex].varName;
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/DofLayout.c
--- a/Utils/src/DofLayout.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/DofLayout.c Thu Jan 14 17:42:34 2010 +1100
@@ -242,24 +242,24 @@ void _DofLayout_AssignFromXML( void* dof
thisComponentDict = Dictionary_GetDictionary( cf->componentDict, self->name );
assert( thisComponentDict );
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", DomainContext, False, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", DomainContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", DomainContext, False, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", DomainContext, True, data );
/* Get the mesh. */
- mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, "mesh", Mesh, True, data );
+ mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"mesh", Mesh, True, data );
variableRegister = context->variable_Register;
- assert( variableRegister );
+ assert( variableRegister );
- if (( list = Dictionary_Get( thisComponentDict, "BaseVariables" ) )) {
+ if (( list = Dictionary_Get( thisComponentDict, (Dictionary_Entry_Key)"BaseVariables" ) ) ) {
Variable_Index baseVariable_I = 0;
Name variableName;
- baseVariableCount = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "BaseVariableCount", Dictionary_Entry_Value_GetCount( list ) );
+ baseVariableCount = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"BaseVariableCount", Dictionary_Entry_Value_GetCount( list ) );
Journal_Firewall(
- baseVariableCount <= Dictionary_Entry_Value_GetCount( list ),
- Journal_Register( Error_Type, self->type ),
+ baseVariableCount <= Dictionary_Entry_Value_GetCount( list ),
+ Journal_Register( Error_Type, (Name)self->type ),
"BaseVariableCount %u is too large for list given.\n", baseVariableCount );
baseVariableList = Memory_Alloc_Array( Variable*, baseVariableCount, "baseVariableList" );
@@ -271,7 +271,7 @@ void _DofLayout_AssignFromXML( void* dof
baseVariableList[ baseVariable_I ] = Variable_Register_GetByName( variableRegister, variableName );
if ( !baseVariableList[ baseVariable_I ] )
- baseVariableList[ baseVariable_I ] = Stg_ComponentFactory_ConstructByName( cf, variableName, Variable, True, data );
+ baseVariableList[ baseVariable_I ] = Stg_ComponentFactory_ConstructByName( cf, (Name)variableName, Variable, True, data );
}
}
@@ -399,7 +399,7 @@ Dof_Index _DofLayout_AddVariable_ByName(
dof_I = Variable_Register_GetIndex( self->_variableRegister, varName );
Journal_Firewall(
dof_I != (unsigned)-1,
- Journal_Register( Error_Type, DofLayout_Type ),
+ Journal_Register( Error_Type, (Name)DofLayout_Type ),
"Attempting to name a variable as a DOF that is not in the variable registry!\n" );
return _DofLayout_AddVariable_ByIndex( self, dof_I );
}
@@ -434,9 +434,9 @@ void DofLayout_CopyValues( void* dofLayo
DofLayout* dest = (DofLayout*)destDofLayout;
Index ii = 0;
Dof_Index dof_I = 0;
- Stream* error = Journal_Register( Error_Type, self->type );
+ Stream* error = Journal_Register( Error_Type, (Name)self->type );
- Journal_Firewall( (self->_numItemsInLayout == dest->_numItemsInLayout), error,
+ Journal_Firewall( (self->_numItemsInLayout == dest->_numItemsInLayout ), error,
"Error: Number of items in source dof layout (%d) not equal to number of "
"items in destination dof layout (%d).\n",
self->_numItemsInLayout, dest->_numItemsInLayout );
@@ -553,9 +553,9 @@ void DofLayout_AddAllFromVariableArray(
Index item_I;
Index itemCount = self->_numItemsInLayout;
Variable_Index variable_I;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
- for( variable_I = 0; variable_I < variableCount ; variable_I++ ) {
+ for( variable_I = 0; variable_I < variableCount ; variable_I++ ) {
Journal_Firewall( variableArray[variable_I] != NULL, errorStream,
"In func %s for %s '%s' - Variable %d in array is NULL.\n", __func__, self->type, self->name, variable_I);
for( item_I = 0; item_I < itemCount ; item_I++ ) {
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/DomainContext.c
--- a/Utils/src/DomainContext.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/DomainContext.c Thu Jan 14 17:42:34 2010 +1100
@@ -114,7 +114,7 @@ void _DomainContext_AssignFromXML( void*
_AbstractContext_AssignFromXML( context, cf, data );
/* Check if we have been provided a constant to multiply our calculated dt values by. */
- self->dtFactor = Dictionary_GetDouble_WithDefault( self->dictionary, "timestepFactor", 1.0 );
+ self->dtFactor = Dictionary_GetDouble_WithDefault( self->dictionary, (Dictionary_Entry_Key)"timestepFactor", 1.0 );
self->dim = Dictionary_GetUnsignedInt_WithDefault( self->dictionary, "dim", 2 );
_DomainContext_Init( self );
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/FieldVariable.c
--- a/Utils/src/FieldVariable.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/FieldVariable.c Thu Jan 14 17:42:34 2010 +1100
@@ -208,16 +208,16 @@ void _FieldVariable_AssignFromXML( void*
Dictionary_Entry_Value* feVarsList = NULL;
DomainContext* context;
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", DomainContext, False, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", DomainContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", DomainContext, False, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", DomainContext, True, data );
fV_Register = context->fieldVariable_Register;
- assert( fV_Register );
+ assert( fV_Register );
- dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, "dim", 0 );
+ dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, (Dictionary_Entry_Key)"dim", 0 );
- fieldComponentCount = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "fieldComponentCount", 0 );
+ fieldComponentCount = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"fieldComponentCount", 0 );
/* Decide whether this FieldVariable will be checkpointed & reloaded, based on the dictionary list
"fieldVariableToCheckpoint". NB may want to put this in the XML component definintion of a
@@ -226,9 +226,9 @@ void _FieldVariable_AssignFromXML( void*
*/
/* Case insensitive search */
- feVarsList = Dictionary_Get( cf->rootDict, "fieldVariablesToCheckpoint" );
- if ( NULL == feVarsList ) {
- feVarsList = Dictionary_Get( cf->rootDict, "FieldVariablesToCheckpoint" );
+ feVarsList = Dictionary_Get( cf->rootDict, (Dictionary_Entry_Key)"fieldVariablesToCheckpoint" );
+ if ( NULL == feVarsList ) {
+ feVarsList = Dictionary_Get( cf->rootDict, (Dictionary_Entry_Key)"FieldVariablesToCheckpoint" );
}
if (feVarsList != NULL ) {
@@ -238,7 +238,7 @@ void _FieldVariable_AssignFromXML( void*
char* fieldVariableName;
isCheckpointedAndReloaded = False;
- for ( var_I = 0; var_I < listLength; var_I++ ) {
+ for ( var_I = 0; var_I < listLength; var_I++ ) {
feVarDictValue = Dictionary_Entry_Value_GetElement( feVarsList, var_I );
fieldVariableName = Dictionary_Entry_Value_AsString( feVarDictValue );
if ( 0 == strcmp( self->name, fieldVariableName ) ) {
@@ -253,9 +253,9 @@ void _FieldVariable_AssignFromXML( void*
}
feVarsList = NULL;
/** also include check to see if this fevariable should be saved for analysis purposes */
- feVarsList = Dictionary_Get( cf->rootDict, "fieldVariablesToSave" );
- if ( NULL == feVarsList ) {
- feVarsList = Dictionary_Get( cf->rootDict, "FieldVariablesToSave" );
+ feVarsList = Dictionary_Get( cf->rootDict, (Dictionary_Entry_Key)"fieldVariablesToSave" );
+ if ( NULL == feVarsList ) {
+ feVarsList = Dictionary_Get( cf->rootDict, (Dictionary_Entry_Key)"FieldVariablesToSave" );
}
if (feVarsList != NULL ) {
Index listLength = Dictionary_Entry_Value_GetCount( feVarsList );
@@ -263,7 +263,7 @@ void _FieldVariable_AssignFromXML( void*
Dictionary_Entry_Value* feVarDictValue = NULL;
char* fieldVariableName;
- for ( var_I = 0; var_I < listLength; var_I++ ) {
+ for ( var_I = 0; var_I < listLength; var_I++ ) {
feVarDictValue = Dictionary_Entry_Value_GetElement( feVarsList, var_I );
fieldVariableName = Dictionary_Entry_Value_AsString( feVarDictValue );
if ( 0 == strcmp( self->name, fieldVariableName ) ) {
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/Finalise.c
--- a/Utils/src/Finalise.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/Finalise.c Thu Jan 14 17:42:34 2010 +1100
@@ -41,7 +41,7 @@
#include <stdio.h>
Bool StgDomainUtils_Finalise( void ) {
- Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
+ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
return True;
}
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/Init.c
--- a/Utils/src/Init.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/Init.c Thu Jan 14 17:42:34 2010 +1100
@@ -40,7 +40,7 @@
Bool StgDomainUtils_Init( int* argc, char** argv[] ) {
- Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
+ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
VariableCondition_Register_Add( variableCondition_Register, AllElementsVC_Type, AllElementsVC_Factory );
VariableCondition_Register_Add( variableCondition_Register, AllNodesVC_Type, AllNodesVC_Factory );
@@ -50,30 +50,30 @@ Bool StgDomainUtils_Init( int* argc, cha
VariableCondition_Register_Add( variableCondition_Register, InnerWallVC_Type, InnerWallVC_Factory );
VariableCondition_Register_Add( variableCondition_Register, MeshShapeVC_Type, MeshShapeVC_Factory );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), DomainContext_Type, "0", (void* (*)(Name))_DomainContext_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), AllElementsVC_Type, "0", (void* (*)(Name))_AllElementsVC_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), AllNodesVC_Type, "0", (void* (*)(Name))_AllNodesVC_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), DofLayout_Type, "0", (void* (*)(Name))_DofLayout_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), FieldVariable_Type, "0", (void* (*)(Name))_FieldVariable_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), OperatorFieldVariable_Type, "0", (void* (*)(Name))_OperatorFieldVariable_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), WallVC_Type, "0", (void* (*)(Name))_WallVC_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), ContactVC_Type, "0", (void* (*)(Name))_ContactVC_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), CornerVC_Type, "0", (void* (*)(Name))_CornerVC_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), InnerWallVC_Type, "0", (void* (*)(Name))_InnerWallVC_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), MeshShapeVC_Type, "0", (void* (*)(Name))_MeshShapeVC_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), MeshBoundaryShape_Type, "0", (void* (*)(Name))MeshBoundaryShape_New );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), DomainContext_Type, (Name)"0", (void* (*)(Name))_DomainContext_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), AllElementsVC_Type, "0", (void* (*)(Name))_AllElementsVC_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), AllNodesVC_Type, (Name)"0", (void* (*)(Name))_AllNodesVC_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), DofLayout_Type, "0", (void* (*)(Name))_DofLayout_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), FieldVariable_Type, (Name)"0", (void* (*)(Name))_FieldVariable_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), OperatorFieldVariable_Type, "0", (void* (*)(Name))_OperatorFieldVariable_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), WallVC_Type, (Name)"0", (void* (*)(Name))_WallVC_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), ContactVC_Type, "0", (void* (*)(Name))_ContactVC_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), CornerVC_Type, (Name)"0", (void* (*)(Name))_CornerVC_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), InnerWallVC_Type, "0", (void* (*)(Name))_InnerWallVC_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), MeshShapeVC_Type, (Name)"0", (void* (*)(Name))_MeshShapeVC_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), MeshBoundaryShape_Type, "0", (void* (*)(Name))MeshBoundaryShape_New );
#ifdef HAVE_PETSC
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), RegularRemesherCmpt_Type, "0", (void* (*)(Name))_RegularRemesherCmpt_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), RegularRemesherCmpt_Type, (Name)"0", (void* (*)(Name))_RegularRemesherCmpt_DefaultNew );
#endif
/*
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Remesher_Type, "0", (void* (*)(Name))_Remesher_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), StripRemesher_Type, "0", (void* (*)(Name))_StripRemesher_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), CellRemesher_Type, "0", (void* (*)(Name))_CellRemesher_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), Remesher_Type, "0", (void* (*)(Name))_Remesher_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), StripRemesher_Type, (Name)"0", (void* (*)(Name))_StripRemesher_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), CellRemesher_Type, "0", (void* (*)(Name))_CellRemesher_DefaultNew );
*/
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), TimeIntegrator_Type, "0", (void* (*)(Name))_TimeIntegrator_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), TimeIntegrand_Type, "0", (void* (*)(Name))_TimeIntegrand_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), ShapeAdvector_Type, "0", (void* (*)(Name))_ShapeAdvector_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), TimeIntegrator_Type, (Name)"0", (void* (*)(Name))_TimeIntegrator_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), TimeIntegrand_Type, "0", (void* (*)(Name))_TimeIntegrand_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), ShapeAdvector_Type, (Name)"0", (void* (*)(Name))_ShapeAdvector_DefaultNew );
RegisterParent( DomainContext_Type, AbstractContext_Type );
RegisterParent( Operator_Type, Stg_Object_Type );
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/InnerWallVC.c
--- a/Utils/src/InnerWallVC.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/InnerWallVC.c Thu Jan 14 17:42:34 2010 +1100
@@ -158,7 +158,7 @@ void _InnerWallVC_ReadDictionary( void*
/* Find dictionary entry */
if (self->_dictionaryEntryName)
- vcDictVal = Dictionary_Get(dictionary, self->_dictionaryEntryName);
+ vcDictVal = Dictionary_Get( dictionary, (Dictionary_Entry_Key)self->_dictionaryEntryName );
else
{
vcDictVal = &_vcDictVal;
@@ -170,7 +170,7 @@ void _InnerWallVC_ReadDictionary( void*
char* innerWallStr;
/* Obtain which innerWall */
- innerWallStr = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(vcDictVal, "innerWall" ));
+ innerWallStr = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"innerWall" ) );
if (!strcasecmp(innerWallStr, "back"))
self->_innerWall = InnerWallVC_InnerWall_Back;
else if (!strcasecmp(innerWallStr, "left"))
@@ -189,23 +189,23 @@ void _InnerWallVC_ReadDictionary( void*
}
/* Obtain the variable entries */
- self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember(vcDictVal, "variables"));
+ self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables") );
self->_entryTbl = Memory_Alloc_Array( InnerWallVC_Entry, self->_entryCount, "InnerWallVC->_entryTbl" );
- varsVal = Dictionary_Entry_Value_GetMember(vcDictVal, "variables");
+ varsVal = Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables");
- for (entry_I = 0; entry_I < self->_entryCount; entry_I++)
+ for (entry_I = 0; entry_I < self->_entryCount; entry_I++ )
{
char* valType;
Dictionary_Entry_Value* valueEntry;
Dictionary_Entry_Value* varDictListVal;
varDictListVal = Dictionary_Entry_Value_GetElement(varsVal, entry_I);
- valueEntry = Dictionary_Entry_Value_GetMember(varDictListVal, "value");
+ valueEntry = Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"value" );
self->_entryTbl[entry_I].varName = Dictionary_Entry_Value_AsString(
- Dictionary_Entry_Value_GetMember(varDictListVal, "name"));
+ Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"name") );
- valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(varDictListVal, "type"));
+ valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"type") );
if (0 == strcasecmp(valType, "func"))
{
char* funcName = Dictionary_Entry_Value_AsString(valueEntry);
@@ -214,7 +214,7 @@ void _InnerWallVC_ReadDictionary( void*
self->_entryTbl[entry_I].value.type = VC_ValueType_CFIndex;
cfIndex = ConditionFunction_Register_GetIndex( self->conFunc_Register, funcName);
if ( cfIndex == (unsigned)-1 ) {
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
Journal_Printf( errorStr, "Error- in %s: While parsing "
"definition of innerWallVC \"%s\" (applies to innerWall \"%s\"), the cond. func. applied to "
@@ -270,7 +270,7 @@ void _InnerWallVC_ReadDictionary( void*
else {
/* Assume double */
Journal_DPrintf(
- Journal_Register( InfoStream_Type, "myStream" ),
+ Journal_Register( InfoStream_Type, (Name)"myStream" ),
"Type to variable on variable condition not given, assuming double\n" );
self->_entryTbl[entry_I].value.type = VC_ValueType_Double;
self->_entryTbl[entry_I].value.as.typeDouble = Dictionary_Entry_Value_AsDouble( valueEntry );
@@ -458,16 +458,16 @@ IndexSet* _InnerWallVC_GetSet(void* vari
IndexSet* _InnerWallVC_GetSet(void* variableCondition) {
InnerWallVC* self = (InnerWallVC*)variableCondition;
IndexSet *set = NULL;
- Stream* warningStr = Journal_Register( Error_Type, self->type );
+ Stream* warningStr = Journal_Register( Error_Type, (Name)self->type );
unsigned nDims;
Grid* vertGrid;
nDims = Mesh_GetDimSize( self->_mesh );
- vertGrid = *(Grid**)ExtensionManager_Get( self->_mesh->info, self->_mesh, ExtensionManager_GetHandle( self->_mesh->info, "vertexGrid" ) );
+ vertGrid = *(Grid** )ExtensionManager_Get( self->_mesh->info, self->_mesh, ExtensionManager_GetHandle( self->_mesh->info, (Name)"vertexGrid" ) );
switch (self->_innerWall) {
case InnerWallVC_InnerWall_Front:
- if ( nDims < 3 || !vertGrid->sizes[2] ) {
+ if ( nDims < 3 || !vertGrid->sizes[2] ) {
Journal_Printf( warningStr, "Warning - in %s: Can't build a %s wall VC "
"when mesh has no elements in the %s axis. Returning an empty set.\n", __func__,
InnerWallVC_InnerWallEnumToStr[self->_innerWall], "K" );
@@ -560,7 +560,7 @@ Variable_Index _InnerWallVC_GetVariableI
{
InnerWallVC* self = (InnerWallVC*)variableCondition;
Variable_Index searchedIndex = 0;
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
Name varName;
varName = self->_entryTbl[varIndex].varName;
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/MeshBoundaryShape.c
--- a/Utils/src/MeshBoundaryShape.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/MeshBoundaryShape.c Thu Jan 14 17:42:34 2010 +1100
@@ -112,7 +112,7 @@ void _MeshBoundaryShape_AssignFromXML( v
_MeshBoundaryShape_Init( self );
/* Need a mesh with a cartesian generator. */
- self->mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, "mesh", Mesh, True, data );
+ self->mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"mesh", Mesh, True, data );
/* Read in the walls to have friction applied. */
wallList = _Stg_ComponentFactory_GetDictionaryValue( cf, self->name, "walls", NULL );
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/MeshShapeVC.c
--- a/Utils/src/MeshShapeVC.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/MeshShapeVC.c Thu Jan 14 17:42:34 2010 +1100
@@ -289,7 +289,7 @@ void _MeshShapeVC_BuildSelf( void* vari
"You need to fill out the 'Shape' dictionary entry for this MeshShapeVC.\n" );
assert( self->_mesh );
- self->_shape = Stg_ComponentFactory_ConstructByName( context->CF, self->shapeName, Stg_Shape, True, 0 /* dummy */ ) ;
+ self->_shape = Stg_ComponentFactory_ConstructByName( context->CF, (Name)self->shapeName, Stg_Shape, True, 0 /* dummy */ ) ;
Stg_Component_Build( self->_mesh, data, False );
Stg_Component_Build( self->_shape, data, False );
@@ -310,7 +310,7 @@ void _MeshShapeVC_ReadDictionary( void*
/* Find dictionary entry */
if (self->_dictionaryEntryName)
- vcDictVal = Dictionary_Get(dictionary, self->_dictionaryEntryName);
+ vcDictVal = Dictionary_Get( dictionary, (Dictionary_Entry_Key)self->_dictionaryEntryName );
else {
vcDictVal = &_vcDictVal;
Dictionary_Entry_Value_InitFromStruct(vcDictVal, dictionary);
@@ -319,25 +319,25 @@ void _MeshShapeVC_ReadDictionary( void*
if (vcDictVal) {
/* Get Name of Shape from dictionary - Grab pointer to shape later on */
self->shapeName = StG_Strdup(
- Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(vcDictVal, "Shape" )) );
+ Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"Shape" )) );
/* Obtain the variable entries */
- self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember(vcDictVal, "variables"));
+ self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables") );
self->_entryTbl = Memory_Alloc_Array( MeshShapeVC_Entry, self->_entryCount, "MeshShapeVC->_entryTbl" );
- varsVal = Dictionary_Entry_Value_GetMember(vcDictVal, "variables");
+ varsVal = Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables");
- for (entry_I = 0; entry_I < self->_entryCount; entry_I++) {
+ for (entry_I = 0; entry_I < self->_entryCount; entry_I++ ) {
char* valType;
Dictionary_Entry_Value* valueEntry;
Dictionary_Entry_Value* varDictListVal;
varDictListVal = Dictionary_Entry_Value_GetElement(varsVal, entry_I);
- valueEntry = Dictionary_Entry_Value_GetMember(varDictListVal, "value");
+ valueEntry = Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"value" );
self->_entryTbl[entry_I].varName = Dictionary_Entry_Value_AsString(
- Dictionary_Entry_Value_GetMember(varDictListVal, "name"));
+ Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"name") );
- valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(varDictListVal, "type"));
+ valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"type") );
if (0 == strcasecmp(valType, "func")) {
char* funcName = Dictionary_Entry_Value_AsString(valueEntry);
Index cfIndex;
@@ -345,7 +345,7 @@ void _MeshShapeVC_ReadDictionary( void*
self->_entryTbl[entry_I].value.type = VC_ValueType_CFIndex;
cfIndex = ConditionFunction_Register_GetIndex( self->conFunc_Register, funcName);
if ( cfIndex == (Index) -1 ) {
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
Journal_Printf( errorStr, "Error- in %s: While parsing "
"definition of MeshShapeVC \"%s\" (applies to shape \"%s\"), the cond. func. applied to "
@@ -401,7 +401,7 @@ void _MeshShapeVC_ReadDictionary( void*
else {
/* Assume double */
Journal_DPrintf(
- Journal_Register( InfoStream_Type, "myStream" ),
+ Journal_Register( InfoStream_Type, (Name)"myStream" ),
"Type to variable on variable condition not given, assuming double\n" );
self->_entryTbl[entry_I].value.type = VC_ValueType_Double;
self->_entryTbl[entry_I].value.as.typeDouble = Dictionary_Entry_Value_AsDouble( valueEntry );
@@ -442,7 +442,7 @@ Variable_Index _MeshShapeVC_GetVariableI
Variable_Index _MeshShapeVC_GetVariableIndex(void* variableCondition, Index globalIndex, VariableCondition_VariableIndex varIndex) {
MeshShapeVC* self = (MeshShapeVC*)variableCondition;
Variable_Index searchedIndex = 0;
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
Name varName;
varName = self->_entryTbl[varIndex].varName;
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/Operator.c
--- a/Utils/src/Operator.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/Operator.c Thu Jan 14 17:42:34 2010 +1100
@@ -611,7 +611,7 @@ Operator* Operator_NewFromName(
numberOfOperands = 0;
_carryOut = NULL;
- Journal_Printf( Journal_Register( Error_Type, Operator_Type ),
+ Journal_Printf( Journal_Register( Error_Type, (Name)Operator_Type ),
"In func %s: Error trying to create operator from name '%s'.\n",
__func__, name );
abort();
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/OperatorFieldVariable.c
--- a/Utils/src/OperatorFieldVariable.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/OperatorFieldVariable.c Thu Jan 14 17:42:34 2010 +1100
@@ -159,7 +159,7 @@ void _OperatorFieldVariable_Init( void*
OperatorFieldVariable* self = (OperatorFieldVariable*)ofv;
FieldVariable* fieldVariable;
Index fieldVariable_I;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
/* Create operator */
self->_operator = Operator_NewFromName( operatorName, fieldVariableList[0]->fieldComponentCount, self->dim );
@@ -205,17 +205,9 @@ void _OperatorFieldVariable_AssignFromXM
/* Construct Parent */
_FieldVariable_AssignFromXML( self, cf, data );
- operatorName = Stg_ComponentFactory_GetString( cf, self->name, "Operator", "" );
+ operatorName = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"Operator", "" );
- fieldVariableList = Stg_ComponentFactory_ConstructByList(
- cf,
- self->name,
- "FieldVariables",
- Stg_ComponentFactory_Unlimited,
- FieldVariable,
- True,
- &fieldVariableCount,
- data );
+ fieldVariableList = Stg_ComponentFactory_ConstructByList( cf, self->name, (Dictionary_Entry_Key)"FieldVariables", Stg_ComponentFactory_Unlimited, FieldVariable, True, &fieldVariableCount, data );
_OperatorFieldVariable_Init( self, operatorName, fieldVariableCount, fieldVariableList );
@@ -274,7 +266,7 @@ InterpolationResult _OperatorFieldVariab
case 2:
self->_interpolateValueAt = OperatorFieldVariable_BinaryInterpolationFunc; break;
default:
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"Can't use func '%s' with fieldVariableCount = %d\n", __func__, self->fieldVariableCount );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/RegularMeshUtils.c
--- a/Utils/src/RegularMeshUtils.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/RegularMeshUtils.c Thu Jan 14 17:42:34 2010 +1100
@@ -59,7 +59,7 @@ void RegularMeshUtils_Node_1DTo3D( void*
assert( inds );
grid = (Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
Grid_Lift( *grid, global, inds );
}
@@ -71,7 +71,7 @@ unsigned RegularMeshUtils_Node_3DTo1D( v
assert( inds );
grid = (Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
return Grid_Project( *grid, inds );
}
@@ -85,7 +85,7 @@ void RegularMeshUtils_Element_1DTo3D( vo
assert( inds );
grid = (Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "elementGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"elementGrid" ) );
Grid_Lift( *grid, global, inds );
}
@@ -97,7 +97,7 @@ unsigned RegularMeshUtils_Element_3DTo1D
assert( inds );
grid = (Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "elementGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"elementGrid" ) );
return Grid_Project( *grid, inds );
}
@@ -119,7 +119,7 @@ IndexSet* RegularMeshUtils_CreateGlobalT
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -187,7 +187,7 @@ IndexSet* RegularMeshUtils_CreateGlobalR
assert( mesh );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -213,7 +213,7 @@ IndexSet* RegularMeshUtils_CreateGlobalF
assert( Mesh_GetDimSize( mesh ) >= 3 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -262,9 +262,9 @@ IndexSet* RegularMeshUtils_CreateGlobalI
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
- nDims = Mesh_GetDimSize( mesh );
+ nDims = Mesh_GetDimSize( mesh );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -296,9 +296,9 @@ IndexSet* RegularMeshUtils_CreateGlobalI
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
- nDims = Mesh_GetDimSize( mesh );
+ nDims = Mesh_GetDimSize( mesh );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -336,9 +336,9 @@ IndexSet* RegularMeshUtils_CreateGlobalI
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
- nDims = Mesh_GetDimSize( mesh );
+ nDims = Mesh_GetDimSize( mesh );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -370,9 +370,9 @@ IndexSet* RegularMeshUtils_CreateGlobalI
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
- nDims = Mesh_GetDimSize( mesh );
+ nDims = Mesh_GetDimSize( mesh );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -403,7 +403,7 @@ IndexSet* RegularMeshUtils_CreateGlobalI
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -435,7 +435,7 @@ IndexSet* RegularMeshUtils_CreateGlobalI
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -467,7 +467,7 @@ IndexSet* RegularMeshUtils_CreateGlobalB
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -497,7 +497,7 @@ IndexSet* RegularMeshUtils_CreateGlobalB
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -528,9 +528,9 @@ IndexSet* RegularMeshUtils_CreateGlobalT
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
- nDims = Mesh_GetDimSize( mesh );
+ nDims = Mesh_GetDimSize( mesh );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -560,9 +560,9 @@ IndexSet* RegularMeshUtils_CreateGlobalT
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
- nDims = Mesh_GetDimSize( mesh );
+ nDims = Mesh_GetDimSize( mesh );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -592,9 +592,9 @@ IndexSet* RegularMeshUtils_CreateGlobalB
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
- nDims = Mesh_GetDimSize( mesh );
+ nDims = Mesh_GetDimSize( mesh );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -624,9 +624,9 @@ IndexSet* RegularMeshUtils_CreateGlobalB
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
- nDims = Mesh_GetDimSize( mesh );
+ nDims = Mesh_GetDimSize( mesh );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -656,9 +656,9 @@ IndexSet* RegularMeshUtils_CreateGlobalT
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
- nDims = Mesh_GetDimSize( mesh );
+ nDims = Mesh_GetDimSize( mesh );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -688,9 +688,9 @@ IndexSet* RegularMeshUtils_CreateGlobalT
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
- nDims = Mesh_GetDimSize( mesh );
+ nDims = Mesh_GetDimSize( mesh );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -719,7 +719,7 @@ IndexSet* RegularMeshUtils_CreateLocalIn
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
nNodes = Mesh_GetLocalSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -787,7 +787,7 @@ IndexSet* RegularMeshUtils_CreateLocalIn
assert( mesh );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
nNodes = Mesh_GetLocalSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -813,7 +813,7 @@ IndexSet* RegularMeshUtils_CreateLocalIn
assert( Mesh_GetDimSize( mesh ) >= 3 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
nNodes = Mesh_GetLocalSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -998,7 +998,7 @@ Node_DomainIndex RegularMeshUtils_GetDia
Node_Index refNode_eI = 0;
Node_DomainIndex oppositeNode_dI = 0;
Node_Index oppositeNode_eI = 0;
- Stream* errorStrm = Journal_Register( Error_Type, "RegularMeshUtils" );
+ Stream* errorStrm = Journal_Register( Error_Type, (Name)"RegularMeshUtils" );
IArray* inc;
Journal_Firewall( Mesh_GetElementType( mesh, refElement_dI )->type == Mesh_HexType_Type, errorStrm,
@@ -1078,9 +1078,9 @@ IndexSet* RegularMeshUtils_CreateGlobalB
assert( Mesh_GetDimSize( mesh ) >= 2 );
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
- nDims = Mesh_GetDimSize( mesh );
+ nDims = Mesh_GetDimSize( mesh );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/RegularRemesherCmpt.c
--- a/Utils/src/RegularRemesherCmpt.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/RegularRemesherCmpt.c Thu Jan 14 17:42:34 2010 +1100
@@ -119,7 +119,7 @@ void _RegularRemesherCmpt_Print( void* r
Stream* myStream;
/* Set the Journal for printing informations */
- myStream = Journal_Register( InfoStream_Type, "RegularRemesherCmptStream" );
+ myStream = Journal_Register( InfoStream_Type, (Name)"RegularRemesherCmptStream" );
/* Print parent */
_Stg_Component_Print( self, stream );
@@ -145,32 +145,32 @@ void _RegularRemesherCmpt_AssignFromXML(
assert( cf );
regRemesh = RegularRemesher_New();
- mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, "mesh", Mesh, True, data );
+ mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"mesh", Mesh, True, data );
NewRemesher_SetMesh( regRemesh, mesh );
- regRemesh->contactDepth = Stg_ComponentFactory_GetInt( cf, self->name, "contactDepth", 0 );
- regRemesh->contactSize = Stg_ComponentFactory_GetDouble( cf, self->name, "contactSize", 0.0 );
- regRemesh->diffuseCorners = Stg_ComponentFactory_GetBool( cf, self->name, "diffuseCorners", False );
- regRemesh->diffuseSurface = Stg_ComponentFactory_GetBool( cf, self->name, "diffuseSurface", False );
- regRemesh->diffusionCoef = Stg_ComponentFactory_GetDouble( cf, self->name, "diffusionCoef", 1.0 );
- regRemesh->ctx = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ regRemesh->contactDepth = Stg_ComponentFactory_GetInt( cf, self->name, (Dictionary_Entry_Key)"contactDepth", 0 );
+ regRemesh->contactSize = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"contactSize", 0.0 );
+ regRemesh->diffuseCorners = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"diffuseCorners", False );
+ regRemesh->diffuseSurface = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"diffuseSurface", False );
+ regRemesh->diffusionCoef = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"diffusionCoef", 1.0 );
+ regRemesh->ctx = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
- dict = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( cf->componentDict, self->name ) );
- list = Dictionary_Get( dict, "remeshDims" );
+ dict = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( cf->componentDict, (Dictionary_Entry_Key)self->name ) );
+ list = Dictionary_Get( dict, (Dictionary_Entry_Key)"remeshDims" );
if( list ) {
nItms = Dictionary_Entry_Value_GetCount( list );
- for( i_i = 0; i_i < nItms; i_i++ ) {
+ for( i_i = 0; i_i < nItms; i_i++ ) {
dim = Dictionary_Entry_Value_AsInt(
Dictionary_Entry_Value_GetElement( list, i_i ) );
RegularRemesher_SetRemeshState( regRemesh, dim, True );
}
}
- list = Dictionary_Get( dict, "staticWalls" );
+ list = Dictionary_Get( dict, (Dictionary_Entry_Key)"staticWalls" );
if( list ) {
nItms = Dictionary_Entry_Value_GetCount( list );
assert( nItms % 2 == 0 );
- for( i_i = 0; i_i < nItms; i_i += 2 ) {
+ for( i_i = 0; i_i < nItms; i_i += 2 ) {
dim = Dictionary_Entry_Value_AsInt(
Dictionary_Entry_Value_GetElement( list, i_i ) );
wall = Dictionary_Entry_Value_AsInt(
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/ShapeAdvector.c
--- a/Utils/src/ShapeAdvector.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/ShapeAdvector.c Thu Jan 14 17:42:34 2010 +1100
@@ -169,14 +169,14 @@ void _ShapeAdvector_AssignFromXML( void*
Bool allowFallbackToFirstOrder = False;
DomainContext* context;
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", DomainContext, False, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", DomainContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", DomainContext, False, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", DomainContext, True, data );
- timeIntegrator = Stg_ComponentFactory_ConstructByKey( cf, self->name, "TimeIntegrator", TimeIntegrator, True, data ) ;
- velocityField = Stg_ComponentFactory_ConstructByKey( cf, self->name, "VelocityField", FieldVariable, True, data ) ;
- shape = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Shape", Stg_Shape, True, data ) ;
- allowFallbackToFirstOrder = Stg_ComponentFactory_GetBool( cf, self->name, "allowFallbackToFirstOrder", False );
+ timeIntegrator = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"TimeIntegrator", TimeIntegrator, True, data ) ;
+ velocityField = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"VelocityField", FieldVariable, True, data ) ;
+ shape = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Shape", Stg_Shape, True, data ) ;
+ allowFallbackToFirstOrder = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"allowFallbackToFirstOrder", False );
_ShapeAdvector_Init( self, context, timeIntegrator, velocityField, shape, allowFallbackToFirstOrder );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/SobolGenerator.c
--- a/Utils/src/SobolGenerator.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/SobolGenerator.c Thu Jan 14 17:42:34 2010 +1100
@@ -473,7 +473,7 @@ SobolGenerator* SobolGenerator_NewFromTa
/* Make sure that the number generators used from this function is smaller than the number in the table */
Journal_Firewall(
generatorIndex < sizeof(SobolGenerator_PolynomialDegree)/sizeof(unsigned int),
- Journal_Register( Error_Type, SobolGenerator_Type ),
+ Journal_Register( Error_Type, (Name)SobolGenerator_Type ),
"Error in func '%s' - Trying to instantiate a %dth SobolGenerator ('%s') using table, "
"but only %d initial directional numbers have been implemented. Please contact developers.\n",
__func__, generatorIndex + 1, name, sizeof(SobolGenerator_PolynomialDegree)/sizeof(unsigned int) );
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/TimeIntegrand.c
--- a/Utils/src/TimeIntegrand.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/TimeIntegrand.c Thu Jan 14 17:42:34 2010 +1100
@@ -97,7 +97,7 @@ void _TimeIntegrand_Init(
TimeIntegrand* self = (TimeIntegrand*)timeIntegrand;
self->context = context;
- self->debug = Journal_Register( Debug_Type, self->type );
+ self->debug = Journal_Register( Debug_Type, (Name)self->type );
self->variable = variable;
self->dataCount = dataCount;
self->timeIntegrator = timeIntegrator;
@@ -175,22 +175,14 @@ void _TimeIntegrand_AssignFromXML( void*
Bool allowFallbackToFirstOrder = False;
DomainContext* context;
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", DomainContext, False, data );
- if( !self->context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", DomainContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", DomainContext, False, data );
+ if( !self->context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", DomainContext, True, data );
- variable = Stg_ComponentFactory_ConstructByKey( cf, self->name, Variable_Type, Variable, False, data ) ;
- timeIntegrator = Stg_ComponentFactory_ConstructByKey( cf, self->name, TimeIntegrator_Type, TimeIntegrator, True, data ) ;
- initData = Stg_ComponentFactory_ConstructByList(
- cf,
- self->name,
- "data",
- Stg_ComponentFactory_Unlimited,
- Stg_Component,
- False,
- &dataCount,
- data );
- allowFallbackToFirstOrder = Stg_ComponentFactory_GetBool( cf, self->name, "allowFallbackToFirstOrder", False );
+ variable = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)Variable_Type, Variable, False, data ) ;
+ timeIntegrator = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)TimeIntegrator_Type, TimeIntegrator, True, data ) ;
+ initData = Stg_ComponentFactory_ConstructByList( cf, self->name, (Dictionary_Entry_Key)"data", Stg_ComponentFactory_Unlimited, Stg_Component, False, &dataCount, data );
+ allowFallbackToFirstOrder = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"allowFallbackToFirstOrder", False );
_TimeIntegrand_Init( self, context, timeIntegrator, variable, dataCount, initData, allowFallbackToFirstOrder );
@@ -238,7 +230,7 @@ void TimeIntegrand_FirstOrder( void* tim
Index array_I;
Index arrayCount;
Bool successFlag = False;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
Journal_DPrintf( self->debug, "In func %s for %s '%s'\n", __func__, self->type, self->name );
@@ -247,8 +239,8 @@ void TimeIntegrand_FirstOrder( void* tim
Variable_Update( startValue );
arrayCount = variable->arraySize;
- timeDeriv = Memory_Alloc_2DArray( double, arrayCount, componentCount, "Time Deriv" );
- for( array_I = 0; array_I < arrayCount; array_I++ ) {
+ timeDeriv = Memory_Alloc_2DArray( double, arrayCount, componentCount, (Name)"Time Deriv" );
+ for( array_I = 0; array_I < arrayCount; array_I++ ) {
successFlag = TimeIntegrand_CalculateTimeDeriv( self, array_I, timeDeriv[array_I] );
Journal_Firewall( True == successFlag, errorStream,
"Error - in %s(), for TimeIntegrand \"%s\" of type %s: When trying to find time "
@@ -283,7 +275,7 @@ void TimeIntegrand_SecondOrder( void* ti
Index arrayCount;
double startTime = TimeIntegrator_GetTime( self->timeIntegrator );
Bool successFlag = False;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
timeDeriv = Memory_Alloc_Array( double, componentCount, "Time Deriv" );
startData = Memory_Alloc_Array( double, componentCount, "StartData" );
@@ -356,7 +348,7 @@ void TimeIntegrand_FourthOrder( void* ti
Index arrayCount;
double startTime = TimeIntegrator_GetTime( self->timeIntegrator );
Bool successFlag = False;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
timeDeriv = Memory_Alloc_Array( double, componentCount, "Time Deriv" );
startData = Memory_Alloc_Array( double, componentCount, "StartData" );
@@ -514,7 +506,7 @@ Bool _TimeIntegrand_AdvectionTimeDeriv(
( velocityField->dim == 3 && isinf(timeDeriv[2]) ) )
{
#if 0
- Journal_Printf( Journal_Register( Error_Type, self->type ),
+ Journal_Printf( Journal_Register( Error_Type, (Name)self->type ),
"Error in func '%s' for particle with index %u.\n\tPosition (%g, %g, %g)\n\tVelocity here is (%g, %g, %g)."
"\n\tInterpolation result is %s.\n",
__func__, array_I, coord[0], coord[1], coord[2],
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/TimeIntegrator.c
--- a/Utils/src/TimeIntegrator.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/TimeIntegrator.c Thu Jan 14 17:42:34 2010 +1100
@@ -110,10 +110,10 @@ void _TimeIntegrator_Init(
TimeIntegrator* self = (TimeIntegrator*)timeIntegrator;
self->context = (DomainContext*)context;
- self->debug = Journal_Register( Debug_Type, self->type );
- self->info = Journal_Register( Info_Type, self->type );
+ self->debug = Journal_Register( Debug_Type, (Name)self->type );
+ self->info = Journal_Register( Info_Type, (Name)self->type );
- self->integrandRegister = NamedObject_Register_New();
+ self->integrandRegister = NamedObject_Register_New( );
self->order = order;
self->simultaneous = simultaneous;
@@ -187,15 +187,15 @@ void _TimeIntegrator_AssignFromXML( void
EntryPoint_Register* entryPoint_Register;
/** Default for order changed to 2nd order (was 1st order) by Pat Sunter, 10 May 2006 */
- order = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "order", 2 );
- simultaneous = Stg_ComponentFactory_GetBool( cf, self->name, "simultaneous", False );
+ order = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"order", 2 );
+ simultaneous = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"simultaneous", False );
- self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", DomainContext, False, data );
- if( !self->context )
- self->context = Stg_ComponentFactory_ConstructByName( cf, "context", DomainContext, True, data );
+ self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", DomainContext, False, data );
+ if( !self->context )
+ self->context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", DomainContext, True, data );
entryPoint_Register = self->context->entryPoint_Register;
- assert( entryPoint_Register );
+ assert( entryPoint_Register );
_TimeIntegrator_Init( self, order, simultaneous, entryPoint_Register, (AbstractContext*)self->context );
}
@@ -241,7 +241,7 @@ void _TimeIntegrator_Execute( void* time
self->_execute = _TimeIntegrator_ExecuteRK4;
break;
default:
- Journal_Firewall( False, Journal_Register( Error_Type, self->type ),
+ Journal_Firewall( False, Journal_Register( Error_Type, (Name)self->type ),
"%s '%s' cannot handle order %u\n", self->type, self->name, self->order );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/src/WallVC.c
--- a/Utils/src/WallVC.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/src/WallVC.c Thu Jan 14 17:42:34 2010 +1100
@@ -154,7 +154,7 @@ void _WallVC_ReadDictionary( void* varia
/* Find dictionary entry */
if (self->_dictionaryEntryName)
- vcDictVal = Dictionary_Get(dictionary, self->_dictionaryEntryName);
+ vcDictVal = Dictionary_Get( dictionary, (Dictionary_Entry_Key)self->_dictionaryEntryName );
else {
vcDictVal = &_vcDictVal;
Dictionary_Entry_Value_InitFromStruct(vcDictVal, dictionary);
@@ -164,7 +164,7 @@ void _WallVC_ReadDictionary( void* varia
char* wallStr;
/* Obtain which wall */
- wallStr = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(vcDictVal, "wall" ));
+ wallStr = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"wall" ) );
if (!strcasecmp(wallStr, "back"))
self->_wall = WallVC_Wall_Back;
else if (!strcasecmp(wallStr, "left"))
@@ -187,22 +187,22 @@ void _WallVC_ReadDictionary( void* varia
}
/* Obtain the variable entries */
- self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember(vcDictVal, "variables"));
+ self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables") );
self->_entryTbl = Memory_Alloc_Array( WallVC_Entry, self->_entryCount, "WallVC->_entryTbl" );
- varsVal = Dictionary_Entry_Value_GetMember(vcDictVal, "variables");
+ varsVal = Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables");
- for (entry_I = 0; entry_I < self->_entryCount; entry_I++) {
+ for (entry_I = 0; entry_I < self->_entryCount; entry_I++ ) {
char* valType;
Dictionary_Entry_Value* valueEntry;
Dictionary_Entry_Value* varDictListVal;
varDictListVal = Dictionary_Entry_Value_GetElement(varsVal, entry_I);
- valueEntry = Dictionary_Entry_Value_GetMember(varDictListVal, "value");
+ valueEntry = Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"value" );
self->_entryTbl[entry_I].varName = Dictionary_Entry_Value_AsString(
- Dictionary_Entry_Value_GetMember(varDictListVal, "name"));
+ Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"name") );
- valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(varDictListVal, "type"));
+ valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"type") );
if (0 == strcasecmp(valType, "func"))
{
char* funcName = Dictionary_Entry_Value_AsString(valueEntry);
@@ -211,7 +211,7 @@ void _WallVC_ReadDictionary( void* varia
self->_entryTbl[entry_I].value.type = VC_ValueType_CFIndex;
cfIndex = ConditionFunction_Register_GetIndex( self->conFunc_Register, funcName);
if ( cfIndex == (unsigned)-1 ) {
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
Journal_Printf( errorStr, "Error- in %s: While parsing "
"definition of wallVC \"%s\" (applies to wall \"%s\"), the cond. func. applied to "
@@ -267,7 +267,7 @@ void _WallVC_ReadDictionary( void* varia
else {
/* Assume double */
Journal_DPrintf(
- Journal_Register( InfoStream_Type, "myStream" ),
+ Journal_Register( InfoStream_Type, (Name)"myStream" ),
"Type to variable on variable condition not given, assuming double\n" );
self->_entryTbl[entry_I].value.type = VC_ValueType_Double;
self->_entryTbl[entry_I].value.as.typeDouble = Dictionary_Entry_Value_AsDouble( valueEntry );
@@ -456,18 +456,17 @@ IndexSet* _WallVC_GetSet(void* variableC
{
WallVC* self = (WallVC*)variableCondition;
IndexSet* set = NULL;
- Stream* warningStr = Journal_Register( Error_Type, self->type );
+ Stream* warningStr = Journal_Register( Error_Type, (Name)self->type );
unsigned nDims;
Grid* vertGrid;
nDims = Mesh_GetDimSize( self->_mesh );
- vertGrid = *(Grid**)ExtensionManager_Get( self->_mesh->info, self->_mesh,
- ExtensionManager_GetHandle( self->_mesh->info,
- "vertexGrid" ) );
+ vertGrid = *(Grid** )ExtensionManager_Get( self->_mesh->info, self->_mesh,
+ ExtensionManager_GetHandle( self->_mesh->info, (Name)"vertexGrid" ) );
switch (self->_wall) {
case WallVC_Wall_Front:
- if ( nDims < 3 || !vertGrid->sizes[2] ) {
+ if ( nDims < 3 || !vertGrid->sizes[2] ) {
Journal_Printf( warningStr, "Warning - in %s: Can't build a %s wall VC "
"when mesh has no elements in the %s axis. Returning an empty set.\n", __func__,
WallVC_WallEnumToStr[self->_wall], "K" );
@@ -584,7 +583,7 @@ Variable_Index _WallVC_GetVariableIndex(
{
WallVC* self = (WallVC*)variableCondition;
Variable_Index searchedIndex = 0;
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
Name varName;
varName = self->_entryTbl[varIndex].varName;
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/tests/AllNodesVCSuite.c
--- a/Utils/tests/AllNodesVCSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/tests/AllNodesVCSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -114,11 +114,11 @@ void AllNodesVCSuite_TestAllNodesVC( All
io_handler = XML_IO_Handler_New();
- stream = Journal_Register( Info_Type, "AllNodesVCStream" );
+ stream = Journal_Register( Info_Type, (Name)"AllNodesVCStream" );
Stream_RedirectFile( stream, "testAllNodesVC.dat" );
dictionary = Dictionary_New();
- Dictionary_Add(dictionary, "outputPath", Dictionary_Entry_Value_FromString("./output"));
+ Dictionary_Add( dictionary, (Dictionary_Entry_Key)"outputPath", Dictionary_Entry_Value_FromString("./output") );
/* Input file */
pcu_filename_input( "allVC.xml", input_file );
@@ -132,8 +132,8 @@ void AllNodesVCSuite_TestAllNodesVC( All
nDomains = Mesh_GetDomainSize( mesh, MT_VERTEX );
/* Create CF stuff */
- quadCF = ConditionFunction_New(AllNodesVCSuite_quadratic, "quadratic");
- conFunc_Register = ConditionFunction_Register_New();
+ quadCF = ConditionFunction_New( AllNodesVCSuite_quadratic, (Name)"quadratic");
+ conFunc_Register = ConditionFunction_Register_New( );
ConditionFunction_Register_Add(conFunc_Register, quadCF);
/* Create variable register */
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/tests/CompositeVCSuite.c
--- a/Utils/tests/CompositeVCSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/tests/CompositeVCSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -123,11 +123,11 @@ void CompositeVCSuite_TestCompositeVC( C
io_handler = XML_IO_Handler_New();
- stream = Journal_Register( Info_Type, "CompositeVCStream" );
+ stream = Journal_Register( Info_Type, (Name)"CompositeVCStream" );
Stream_RedirectFile( stream, "testCompositeVC.dat" );
dictionary = Dictionary_New();
- Dictionary_Add(dictionary, "outputPath", Dictionary_Entry_Value_FromString("./output"));
+ Dictionary_Add( dictionary, (Dictionary_Entry_Key)"outputPath", Dictionary_Entry_Value_FromString("./output") );
/* Input file */
pcu_filename_input( "wallVC.xml", input_file );
@@ -141,9 +141,9 @@ void CompositeVCSuite_TestCompositeVC( C
nDomains = Mesh_GetDomainSize( mesh, MT_VERTEX );
/* Create CF stuff */
- quadCF = ConditionFunction_New(CompositeVCSuite_quadratic, "quadratic");
- expCF = ConditionFunction_New(CompositeVCSuite_exponential, "exponential");
- conFunc_Register = ConditionFunction_Register_New();
+ quadCF = ConditionFunction_New( CompositeVCSuite_quadratic, (Name)"quadratic" );
+ expCF = ConditionFunction_New( CompositeVCSuite_exponential, (Name)"exponential");
+ conFunc_Register = ConditionFunction_Register_New( );
ConditionFunction_Register_Add(conFunc_Register, quadCF);
ConditionFunction_Register_Add(conFunc_Register, expCF);
@@ -254,11 +254,11 @@ void CompositeVCSuite_TestCompositeVCDic
io_handler = XML_IO_Handler_New();
- stream = Journal_Register( Info_Type, "CompositeVCDictionaryStream" );
+ stream = Journal_Register( Info_Type, (Name)"CompositeVCDictionaryStream" );
Stream_RedirectFile( stream, "testCompositeVCDictionary.dat" );
dictionary = Dictionary_New();
- Dictionary_Add(dictionary, "outputPath", Dictionary_Entry_Value_FromString("./output"));
+ Dictionary_Add( dictionary, (Dictionary_Entry_Key)"outputPath", Dictionary_Entry_Value_FromString("./output") );
/* Input file */
pcu_filename_input( "compositeVC.xml", input_file );
@@ -272,9 +272,9 @@ void CompositeVCSuite_TestCompositeVCDic
nDomains = Mesh_GetDomainSize( mesh, MT_VERTEX );
/* Create CF stuff */
- quadCF = ConditionFunction_New(CompositeVCSuite_quadratic, "quadratic");
- expCF = ConditionFunction_New(CompositeVCSuite_exponential, "exponential");
- conFunc_Register = ConditionFunction_Register_New();
+ quadCF = ConditionFunction_New( CompositeVCSuite_quadratic, (Name)"quadratic" );
+ expCF = ConditionFunction_New( CompositeVCSuite_exponential, (Name)"exponential");
+ conFunc_Register = ConditionFunction_Register_New( );
ConditionFunction_Register_Add(conFunc_Register, quadCF);
ConditionFunction_Register_Add(conFunc_Register, expCF);
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/tests/CornerVCSuite.c
--- a/Utils/tests/CornerVCSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/tests/CornerVCSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -125,11 +125,11 @@ void CornerVCSuite_TestCornerVC( CornerV
io_handler = XML_IO_Handler_New();
- stream = Journal_Register( Info_Type, "CornerVCStream" );
+ stream = Journal_Register( Info_Type, (Name)"CornerVCStream" );
Stream_RedirectFile( stream, "testCornerVC.dat" );
dictionary = Dictionary_New();
- Dictionary_Add(dictionary, "outputPath", Dictionary_Entry_Value_FromString("./output"));
+ Dictionary_Add( dictionary, (Dictionary_Entry_Key)"outputPath", Dictionary_Entry_Value_FromString("./output") );
/* Input file */
pcu_filename_input( "cornerVC.xml", input_file );
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/tests/DofLayoutSuite.c
--- a/Utils/tests/DofLayoutSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/tests/DofLayoutSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -63,11 +63,11 @@ void DofLayoutSuite_TestBasic( DofLayout
void DofLayoutSuite_TestBasic( DofLayoutSuiteData* data ) {
char expected_file[PCU_PATH_MAX];
int procToWatch;
- Stream* stream = Journal_Register( Info_Type, "DofLayoutBasic" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"DofLayoutBasic" );
procToWatch = data->nProcs >=2 ? 1 : 0;
- if( data->rank == procToWatch ) {
+ if( data->rank == procToWatch ) {
DofLayout* dof;
DofLayout* destDof;
Variable_Register* variableRegister;
@@ -228,11 +228,11 @@ void DofLayoutSuite_TestRemap( DofLayout
void DofLayoutSuite_TestRemap( DofLayoutSuiteData* data ) {
char expected_file[PCU_PATH_MAX];
int procToWatch;
- Stream* stream = Journal_Register( Info_Type, "DofLayoutRemap" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"DofLayoutRemap" );
procToWatch = data->nProcs >=2 ? 1 : 0;
- if( data->rank == procToWatch ) {
+ if( data->rank == procToWatch ) {
DofLayout* dof;
double dummyVar;
double* dummyPtr = &dummyVar;
@@ -299,11 +299,11 @@ void DofLayoutSuite_TestSaveAndLoad( Dof
void DofLayoutSuite_TestSaveAndLoad( DofLayoutSuiteData* data ) {
char expected_file[PCU_PATH_MAX];
int procToWatch;
- Stream* stream = Journal_Register( Info_Type, "DofLayoutRemap" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"DofLayoutRemap" );
procToWatch = data->nProcs >=2 ? 1 : 0;
- if( data->rank == procToWatch ) {
+ if( data->rank == procToWatch ) {
DofLayout* dof;
Variable_Register* variableRegister;
Variable* var[6];
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/tests/OperatorFieldVariableSuite.c
--- a/Utils/tests/OperatorFieldVariableSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/tests/OperatorFieldVariableSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -89,7 +89,7 @@ void OperatorFieldVariableSuite_Setup( O
MPI_Comm_rank( data->comm, &data->rank );
MPI_Comm_size( data->comm, &data->nProcs );
- data->stream = Journal_Register( Info_Type, "OperatorFieldVariableStream" );
+ data->stream = Journal_Register( Info_Type, (Name)"OperatorFieldVariableStream" );
Stream_RedirectFile( data->stream, "operatorFieldVariable.dat" );
}
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/tests/RegularMeshUtilsSuite.c
--- a/Utils/tests/RegularMeshUtilsSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/tests/RegularMeshUtilsSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -95,11 +95,11 @@ void RegularMeshUtilsSuite_TestMeshUtils
Stream* stream;
Journal_Enable_NamedStream( Info_Type, CartesianGenerator_Type, False );
- stream = Journal_Register( Info_Type, "RegularMeshUtilsStream" );
+ stream = Journal_Register( Info_Type, (Name)"RegularMeshUtilsStream" );
procToWatch = data->nProcs >=2 ? 1 : 0;
- extensionMgr_Register = ExtensionManager_Register_New();
+ extensionMgr_Register = ExtensionManager_Register_New( );
mesh = RegularMeshUtilsSuite_buildMesh( nDims, meshSize, minCrds, maxCrds, extensionMgr_Register );
if( data->rank == procToWatch ) {
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/tests/SobolGeneratorSuite.c
--- a/Utils/tests/SobolGeneratorSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/tests/SobolGeneratorSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -76,7 +76,7 @@ void SobolGeneratorSuite_TestSobolGenera
procToWatch = data->nProcs >=2 ? 1 : 0;
if( data->rank == procToWatch ) {
- stream = Journal_Register (Info_Type, "SobolGeneratorStream");
+ stream = Journal_Register( Info_Type, (Name)"SobolGeneratorStream" );
Stream_RedirectFile( stream, "testSobolGeneratorRightmostBit.dat" );
Journal_Printf( stream, " *********************** Testing _SobolGenerator_FindRightmostZeroBit *******************\n" );
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/tests/TimeIntegrationSuite.c
--- a/Utils/tests/TimeIntegrationSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/tests/TimeIntegrationSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -115,7 +115,7 @@ TimeIntegrand_CalculateTimeDerivFunction
else if ( strcasecmp( derivName, "Constant2" ) == 0 )
return TimeIntegrationSuite_ConstantTimeDeriv2;
else
- Journal_Firewall( 0 , Journal_Register( Error_Type, CURR_MODULE_NAME ), "Don't understand DerivName '%s'\n", derivName );
+ Journal_Firewall( 0 , Journal_Register( Error_Type, (Name)CURR_MODULE_NAME ), "Don't understand DerivName '%s'\n", derivName );
return NULL;
}
@@ -168,9 +168,9 @@ void TimeIntegrationSuite_TestDriver( Ti
char expected_file[PCU_PATH_MAX];
dictionary = Dictionary_New();
- Dictionary_Add(dictionary, "outputPath", Dictionary_Entry_Value_FromString("./output"));
- Dictionary_Add(dictionary, "DerivName0", Dictionary_Entry_Value_FromString(_DerivName0));
- Dictionary_Add(dictionary, "DerivName1", Dictionary_Entry_Value_FromString(_DerivName1));
+ Dictionary_Add( dictionary, (Dictionary_Entry_Key)"outputPath", Dictionary_Entry_Value_FromString("./output") );
+ Dictionary_Add( dictionary, (Dictionary_Entry_Key)"DerivName0", Dictionary_Entry_Value_FromString(_DerivName0) );
+ Dictionary_Add( dictionary, (Dictionary_Entry_Key)"DerivName1", Dictionary_Entry_Value_FromString(_DerivName1) );
context = DomainContext_New( "context", 0, 0, MPI_COMM_WORLD, NULL );
cf = stgMainConstruct( dictionary, data->comm, context );
@@ -189,15 +189,15 @@ void TimeIntegrationSuite_TestDriver( Ti
timeIntegrandList[1] = TimeIntegrand_New( "testTimeIntegrand1", context, timeIntegrator, variableList[1], 0, NULL, True );
Journal_Enable_AllTypedStream( True );
- stream = Journal_Register( Info_Type, "EulerStream" );
+ stream = Journal_Register( Info_Type, (Name)"EulerStream" );
Stream_RedirectFile( stream, _name );
Stream_Enable( timeIntegrator->info, False );
- derivName = Dictionary_GetString( dictionary, "DerivName0" );
- timeIntegrandList[0]->_calculateTimeDeriv = TimeIntegrationSuite_GetFunctionPtr( derivName );
+ derivName = Dictionary_GetString( dictionary, (Dictionary_Entry_Key)"DerivName0" );
+ timeIntegrandList[0]->_calculateTimeDeriv = TimeIntegrationSuite_GetFunctionPtr( derivName );
Journal_Printf( stream, "DerivName0 - %s\n", derivName );
- derivName = Dictionary_GetString( dictionary, "DerivName1" );
- timeIntegrandList[1]->_calculateTimeDeriv = TimeIntegrationSuite_GetFunctionPtr( derivName );
+ derivName = Dictionary_GetString( dictionary, (Dictionary_Entry_Key)"DerivName1" );
+ timeIntegrandList[1]->_calculateTimeDeriv = TimeIntegrationSuite_GetFunctionPtr( derivName );
Journal_Printf( stream, "DerivName1 - %s\n", derivName );
/* Print Stuff to file */
@@ -263,7 +263,7 @@ void TimeIntegrationSuite_TestDriver( Ti
error += fabs( Variable_GetValueAtDouble( variable, array_I, 1 ) - 3.0 * array_I * ( 0.25 * pow( context->currentTime, 4.0 ) - pow( context->currentTime, 3.0 )/3.0));
}
else
- Journal_Firewall( 0 , Journal_Register( Error_Type, CURR_MODULE_NAME ), "Don't understand _calculateTimeDeriv = %p\n", timeIntegrand->_calculateTimeDeriv );
+ Journal_Firewall( 0 , Journal_Register( Error_Type, (Name)CURR_MODULE_NAME ), "Don't understand _calculateTimeDeriv = %p\n", timeIntegrand->_calculateTimeDeriv );
}
}
}
diff -r 92ee57abdec6 -r 36afba1d4768 Utils/tests/WallVCSuite.c
--- a/Utils/tests/WallVCSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/Utils/tests/WallVCSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -121,11 +121,11 @@ void WallVCSuite_TestWallVC( WallVCSuite
io_handler = XML_IO_Handler_New();
- stream = Journal_Register( Info_Type, "WallVCStream" );
+ stream = Journal_Register( Info_Type, (Name)"WallVCStream" );
Stream_RedirectFile( stream, "testWallVC.dat" );
dictionary = Dictionary_New();
- Dictionary_Add(dictionary, "outputPath", Dictionary_Entry_Value_FromString("./output"));
+ Dictionary_Add( dictionary, (Dictionary_Entry_Key)"outputPath", Dictionary_Entry_Value_FromString("./output") );
/* Input file */
pcu_filename_input( "wallVC.xml", input_file );
@@ -139,9 +139,9 @@ void WallVCSuite_TestWallVC( WallVCSuite
nDomains = Mesh_GetDomainSize( mesh, MT_VERTEX );
/* Create CF stuff */
- quadCF = ConditionFunction_New(WallVCSuite_quadratic, "quadratic");
- expCF = ConditionFunction_New(WallVCSuite_exponential, "exponential");
- conFunc_Register = ConditionFunction_Register_New();
+ quadCF = ConditionFunction_New( WallVCSuite_quadratic, (Name)"quadratic" );
+ expCF = ConditionFunction_New( WallVCSuite_exponential, (Name)"exponential");
+ conFunc_Register = ConditionFunction_Register_New( );
ConditionFunction_Register_Add(conFunc_Register, quadCF);
ConditionFunction_Register_Add(conFunc_Register, expCF);
diff -r 92ee57abdec6 -r 36afba1d4768 libStgDomain/Toolbox/Toolbox.c
--- a/libStgDomain/Toolbox/Toolbox.c Thu Jan 07 16:54:21 2010 +1100
+++ b/libStgDomain/Toolbox/Toolbox.c Thu Jan 14 17:42:34 2010 +1100
@@ -72,11 +72,11 @@ void StgDomain_Toolbox_Finalise( Plugins
void StgDomain_Toolbox_Finalise( PluginsManager* pluginsManager ) {
StgDomain_Finalise();
- Journal_RPrintf( Journal_Register( Info_Type, StgDomain_Toolbox_Type ), "Finalised: StGermain Domain Toolbox.\n" );
+ Journal_RPrintf( Journal_Register( Info_Type, (Name)StgDomain_Toolbox_Type ), "Finalised: StGermain Domain Toolbox.\n" );
}
Index StgDomain_Toolbox_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, StgDomain_Toolbox_Type, "0", _StgDomain_Toolbox_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, StgDomain_Toolbox_Type, (Name)"0", _StgDomain_Toolbox_DefaultNew );
}
diff -r 92ee57abdec6 -r 36afba1d4768 libStgDomain/src/Finalise.c
--- a/libStgDomain/src/Finalise.c Thu Jan 07 16:54:21 2010 +1100
+++ b/libStgDomain/src/Finalise.c Thu Jan 14 17:42:34 2010 +1100
@@ -43,7 +43,7 @@
Bool StgDomain_Finalise( void ) {
if( ToolboxesManager_IsInitialised( stgToolboxesManager, "StgDomain" ) ) {
- Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
+ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
StgDomainSwarm_Finalise();
StgDomainUtils_Finalise();
diff -r 92ee57abdec6 -r 36afba1d4768 libStgDomain/src/Init.c
--- a/libStgDomain/src/Init.c Thu Jan 07 16:54:21 2010 +1100
+++ b/libStgDomain/src/Init.c Thu Jan 14 17:42:34 2010 +1100
@@ -47,14 +47,14 @@ Bool StgDomain_Init( int* argc, char** a
if( !ToolboxesManager_IsInitialised( stgToolboxesManager, "StgDomain" ) ) {
int tmp;
- Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
- tmp = Stream_GetPrintingRank( Journal_Register( InfoStream_Type, "Context" ) );
- Stream_SetPrintingRank( Journal_Register( InfoStream_Type, "Context" ), 0 );
+ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
+ tmp = Stream_GetPrintingRank( Journal_Register( InfoStream_Type, (Name)"Context" ) );
+ Stream_SetPrintingRank( Journal_Register( InfoStream_Type, (Name)"Context" ), 0 );
Journal_Printf( /* DO NOT CHANGE OR REMOVE */
- Journal_Register( InfoStream_Type, "Context" ),
+ Journal_Register( InfoStream_Type, (Name)"Context" ),
"StGermain Domain Library revision %s. Copyright (C) 2003-2007 VPAC.\n", VERSION );
- Stream_Flush( Journal_Register( InfoStream_Type, "Context" ) );
- Stream_SetPrintingRank( Journal_Register( InfoStream_Type, "Context" ), tmp );
+ Stream_Flush( Journal_Register( InfoStream_Type, (Name)"Context" ) );
+ Stream_SetPrintingRank( Journal_Register( InfoStream_Type, (Name)"Context" ), tmp );
StgDomainGeometry_Init( argc, argv );
StgDomainShape_Init( argc, argv );
diff -r 92ee57abdec6 -r 36afba1d4768 libStgDomain/tests/LibDiscretisationSuite.c
--- a/libStgDomain/tests/LibDiscretisationSuite.c Thu Jan 07 16:54:21 2010 +1100
+++ b/libStgDomain/tests/LibDiscretisationSuite.c Thu Jan 14 17:42:34 2010 +1100
@@ -22,18 +22,18 @@ void LibDiscretisationSuite_DirectoryStG
void LibDiscretisationSuite_DirectoryStGermain( LibDiscretisationSuiteData* data ) {
Stg_Object* testDirectoryStGermain;
- testDirectoryStGermain = Stg_ObjectList_Get( Project_XMLSearchPaths, "StGermain" );
+ testDirectoryStGermain = Stg_ObjectList_Get( Project_XMLSearchPaths, (Name)"StGermain" );
pcu_check_true( testDirectoryStGermain != NULL );
}
-void LibDiscretisationSuite_DirectoryDiscretisation( LibDiscretisationSuiteData * data ) {
+void LibDiscretisationSuite_DirectoryDiscretisation( LibDiscretisationSuiteData * data ) {
Stg_Object* testDirectoryStGermain;
Stg_Object* testDirectoryDiscretisation;
- testDirectoryStGermain = Stg_ObjectList_Get( Project_XMLSearchPaths, "StGermain" );
- testDirectoryDiscretisation = Stg_ObjectList_Get( Project_XMLSearchPaths, "StgDomain" );
+ testDirectoryStGermain = Stg_ObjectList_Get( Project_XMLSearchPaths, (Name)"StGermain" );
+ testDirectoryDiscretisation = Stg_ObjectList_Get( Project_XMLSearchPaths, (Name)"StgDomain" );
- pcu_check_true( ( strcmp((char*)LIB_DIR, (char*)testDirectoryStGermain) ) || ( testDirectoryDiscretisation != NULL ) );
+ pcu_check_true( ( strcmp((char* )LIB_DIR, (char*)testDirectoryStGermain) ) || ( testDirectoryDiscretisation != NULL ) );
}
void LibDiscretisationSuite( pcu_suite_t* suite ) {
More information about the CIG-COMMITS
mailing list