[cig-commits] commit: Cleaned-up a lot of compile-warnings.
Mercurial
hg at geodynamics.org
Fri Feb 5 12:10:17 PST 2010
changeset: 811:d7d947597d6d
branch: 1.4.x
parent: 800:55c0e5081456
user: JericoRevote
date: Thu Jan 14 17:41:33 2010 +1100
files: Rheology/src/AlignmentSwarmVariable.c Rheology/src/Anisotropic.c Rheology/src/Arrhenius.c Rheology/src/Byerlee.c Rheology/src/Compressible.c Rheology/src/ConstitutiveMat_Refactored.c Rheology/src/ConstitutiveMatrix.c Rheology/src/ConstitutiveMatrixCartesian.c Rheology/src/DepthDependentViscosity.c Rheology/src/Director.c Rheology/src/DruckerPrager.c Rheology/src/FaultingMoresiMuhlhaus2006.c Rheology/src/Finalise.c Rheology/src/FrankKamenetskii.c Rheology/src/Init.c Rheology/src/LinearViscosity.c Rheology/src/MaterialViscosity.c Rheology/src/MohrCoulomb.c Rheology/src/MultiRheologyMaterial.c Rheology/src/NonNewtonian.c Rheology/src/Orthotropic.c Rheology/src/OrthotropicAligned.c Rheology/src/Pouliquen_etal.c Rheology/src/RheologyClass.c Rheology/src/RheologyMaterial.c Rheology/src/StoreStress.c Rheology/src/StoreViscosity.c Rheology/src/StrainWeakening.c Rheology/src/ViscosityFieldRheology.c Rheology/src/VonMises.c Rheology/src/YieldRheology.c Rheology/tests/ByerleeYieldingSuite.c Rheology/tests/ConstitutiveMatrixSuite.c Rheology/tests/DirectorSuite.c Rheology/tests/LateralViscosityAnalytic/LateralViscosityAnalytic.c Rheology/tests/NonNewtonianShearSolution/NonNewtonianShearSolution.c Rheology/tests/ViscousSuite.c Rheology/tests/VonMisesYieldingSuite.c Rheology/tests/testYieldCriterion/testYieldCriterion.c SysTest/AnalyticPlugins/DepthDependentAnalytic3D/DepthDependentAnalytic3D.c SysTest/AnalyticPlugins/LateralViscosityAnalytic/LateralViscosityAnalytic.c SysTest/AnalyticPlugins/NonNewtonianShearSolution/NonNewtonianShearSolution.c SysTest/AnalyticPlugins/Trubitsyn2006/Trubitsyn2006.c SysTest/AnalyticPlugins/VelicIC/VelicIC.c SysTest/AnalyticPlugins/Velic_solA/Analytic_solA.c SysTest/AnalyticPlugins/Velic_solB/Analytic_solB.c SysTest/AnalyticPlugins/Velic_solC/Analytic_solC.c SysTest/AnalyticPlugins/Velic_solCA/Analytic_solCA.c SysTest/AnalyticPlugins/Velic_solCx/Analytic_solCx.c SysTest/AnalyticPlugins/Velic_solDA/Analytic_solDA.c SysTest/AnalyticPlugins/Velic_solE/Analytic_solE.c SysTest/AnalyticPlugins/Velic_solF/Analytic_solF.c SysTest/AnalyticPlugins/Velic_solG/Analytic_solG.c SysTest/AnalyticPlugins/Velic_solH/Analytic_solH.c SysTest/AnalyticPlugins/Velic_solHA/Analytic_solHA.c SysTest/AnalyticPlugins/Velic_solHAy/Analytic_solHAy.c SysTest/AnalyticPlugins/Velic_solHy/Analytic_solHy.c SysTest/AnalyticPlugins/Velic_solI/Analytic_solI.c SysTest/AnalyticPlugins/Velic_solIA/Analytic_solIA.c SysTest/AnalyticPlugins/Velic_solJ/Analytic_solJ.c SysTest/AnalyticPlugins/Velic_solJA/Analytic_solJA.c SysTest/AnalyticPlugins/Velic_solKx/Analytic_solKx.c SysTest/AnalyticPlugins/Velic_solKz/Analytic_solKz.c SysTest/AnalyticPlugins/Velic_solL/Analytic_solL.c SysTest/AnalyticPlugins/Velic_solS/Analytic_solS.c Utils/src/BaseRecoveryFeVar.c Utils/src/DensityField.c Utils/src/Finalise.c Utils/src/Init.c Utils/src/NodalPressureField.c Utils/src/PressureTemperatureOutput.c Utils/src/REP_Algorithm.c Utils/src/RadiogenicHeatingTerm.c Utils/src/RecoveredFeVariable.c Utils/src/SPR_StrainRate.c Utils/src/SmoothVelGradField.c Utils/src/StressField.c Utils/src/UnderworldContext.c Utils/src/Underworld_SwarmOutput.c Utils/src/ViscosityField.c Utils/src/XDMFGenerator.c libUnderworld/Toolbox/Toolbox.c libUnderworld/src/Finalise.c libUnderworld/src/Init.c libUnderworld/tests/testLibUnderworld.c plugins/DensityChangeAtDepth/DensityChangeAtDepth.c plugins/EulerDeform/EulerDeform.c plugins/ExtractPetscObjects/ExtractPetscObjects.c plugins/IncompressibleExtensionBC/IncompressibleExtensionBC.c plugins/MaterialThermalDiffusivity/MaterialThermalDiffusivity.c plugins/MeshAdvectionCorrection/MeshAdvectionCorrection.c plugins/MovingMesh/MovingMesh.c plugins/MovingMesh/tests/plugins/testMovingMesh.c plugins/Multigrid/Multigrid.c plugins/Output/AverageTemperature/AverageTemperature.c plugins/Output/BoundaryLayers/BoundaryLayers.c plugins/Output/BuoyancyIntegrals/BuoyancyIntegrals.c plugins/Output/ConvectionData/ConvectionData.c plugins/Output/CylinderNodeProfiling/CylinderNodeProfiling.c plugins/Output/Localisation/Localisation.c plugins/Output/MaxTemperature/MaxTemperature.c plugins/Output/MaxVelocity/MaxVelocity.c plugins/Output/Mobility/Mobility.c plugins/Output/Nusselt/Nusselt.c plugins/Output/Nusselt_deltaT/Nusselt_deltaT.c plugins/Output/OutputForSPModel/OutputForSPModel.c plugins/Output/Shfl/Shfl.c plugins/Output/VTKOutput/VTKOutput.c plugins/Output/Vrms/Vrms.c plugins/ScalingChecks/Ra_Scaling/Ra_Scaling.c plugins/VariableConditions/ShapeFemIC/ShapeFemIC.c src/main.c
description:
Cleaned-up a lot of compile-warnings.
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/AlignmentSwarmVariable.c
--- a/Rheology/src/AlignmentSwarmVariable.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/AlignmentSwarmVariable.c Thu Jan 14 17:41:33 2010 +1100
@@ -131,8 +131,8 @@ void _AlignmentSwarmVariable_AssignFromX
_SwarmVariable_AssignFromXML( self, cf, data );
/* AssignFromXML 'AlignmentSwarmVariable' stuff */
- velocityField = Stg_ComponentFactory_ConstructByKey( cf, self->name, "VelocityField", FeVariable, True, data ) ;
- director = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Director", Director, True, data ) ;
+ velocityField = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"VelocityField", FeVariable, True, data ) ;
+ director = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Director", Director, True, data ) ;
_AlignmentSwarmVariable_Init( self, velocityField, director );
}
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/Anisotropic.c
--- a/Rheology/src/Anisotropic.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/Anisotropic.c Thu Jan 14 17:41:33 2010 +1100
@@ -119,12 +119,12 @@ void _Anisotropic_AssignFromXML( void* r
/* Construct Parent */
_Rheology_AssignFromXML( self, cf, data );
- director = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Director", Director, True, data ) ;
+ director = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Director", Director, True, data ) ;
_Anisotropic_Init(
self,
director,
- Stg_ComponentFactory_GetDouble( cf, self->name, "viscosityRatio", 1.0 ) );
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"viscosityRatio", 1.0 ) );
}
void _Anisotropic_Destroy( void* _self, void* data ) {
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/Arrhenius.c
--- a/Rheology/src/Arrhenius.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/Arrhenius.c Thu Jan 14 17:41:33 2010 +1100
@@ -124,18 +124,17 @@ void _Arrhenius_AssignFromXML( void* rhe
_Rheology_AssignFromXML( self, cf, data );
/* TODO: 'KeyFallback' soon to be deprecated/updated */
- temperatureField = Stg_ComponentFactory_ConstructByNameWithKeyFallback(
- cf, self->name, "TemperatureField", "TemperatureField", FeVariable, True, data );
+ temperatureField = Stg_ComponentFactory_ConstructByNameWithKeyFallback( cf, self->name, (Name)"TemperatureField", (Dictionary_Entry_Key)"TemperatureField", FeVariable, True, data );
/*temperatureField = Stg_ComponentFactory_ConstructByKey(
cf, self->name, "TemperatureField", FeVariable, True );*/
_Arrhenius_Init(
self,
temperatureField,
- Stg_ComponentFactory_GetDouble( cf, self->name, "eta0", 1.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "activationEnergy", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "activationVolume", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "referenceTemperature", 1.0 ) );
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"eta0", 1.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"activationEnergy", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"activationVolume", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"referenceTemperature", 1.0 ) );
}
void _Arrhenius_Destroy( void* _self, void* data ) {
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/Byerlee.c
--- a/Rheology/src/Byerlee.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/Byerlee.c Thu Jan 14 17:41:33 2010 +1100
@@ -137,11 +137,9 @@ void _Byerlee_AssignFromXML( void* rheol
_VonMises_AssignFromXML( self, cf, data );
/* TODO: "KeyFallback' soon to be deprecated/updated */
/*
- geometry = Stg_ComponentFactory_ConstructByNameWithKeyFallback(
- cf, self->name, "geometry", "BlockGeometry", BlockGeometry, True, data );
+ geometry = Stg_ComponentFactory_ConstructByNameWithKeyFallback( cf, self->name, (Name)"geometry", (Dictionary_Entry_Key)"BlockGeometry", BlockGeometry, True, data );
*/
- mesh = Stg_ComponentFactory_ConstructByNameWithKeyFallback(
- cf, self->name, "mesh-linear", "FeMesh", FeMesh, True, data );
+ mesh = Stg_ComponentFactory_ConstructByNameWithKeyFallback( cf, self->name, (Name)"mesh-linear", (Dictionary_Entry_Key)"FeMesh", FeMesh, True, data );
/*geometry = Stg_ComponentFactory_ConstructByKey(
cf, self->name, "BlockGeometry", BlockGeometry, True );
mesh = Stg_ComponentFactory_ConstructByKey(
@@ -150,7 +148,7 @@ void _Byerlee_AssignFromXML( void* rheol
_Byerlee_Init(
self,
mesh,
- Stg_ComponentFactory_GetDouble( cf, self->name, "depthCoefficient", 0.0 ) );
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"depthCoefficient", 0.0 ) );
}
void _Byerlee_Destroy( void* rheology, void* data ) {
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/Compressible.c
--- a/Rheology/src/Compressible.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/Compressible.c Thu Jan 14 17:41:33 2010 +1100
@@ -146,9 +146,9 @@ void _Compressible_AssignFromXML( void*
_StiffnessMatrixTerm_AssignFromXML( self, cf, data );
- geometryMesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, "GeometryMesh", FeMesh, True, data );
+ geometryMesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"GeometryMesh", FeMesh, True, data );
- context = (PICelleratorContext*)self->context;
+ context = (PICelleratorContext* )self->context;
assert( Stg_CheckType( context, PICelleratorContext ) );
materials_Register = context->materials_Register;
assert( materials_Register );
@@ -157,7 +157,7 @@ void _Compressible_AssignFromXML( void*
self,
geometryMesh,
materials_Register,
- Stg_ComponentFactory_GetDouble( cf, self->name, "oneOnLambda", 10.0 ) );
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"oneOnLambda", 10.0 ) );
/* Make sure that we are using the correct type of swarm
* SHOULDN'T THIS BEEN DONE AT THE STIFFNESSMATRIXTERM LEVEL? */
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/ConstitutiveMat_Refactored.c
--- a/Rheology/src/ConstitutiveMat_Refactored.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/ConstitutiveMat_Refactored.c Thu Jan 14 17:41:33 2010 +1100
@@ -165,9 +165,9 @@ void* _ConstitutiveMat_Refactored_Copy(
/* TODO */ abort();
if (deep) {
- newConstitutiveMat_Refactored->matrixData = Memory_Alloc_2DArray( double, self->columnSize, self->rowSize, self->name );
+ newConstitutiveMat_Refactored->matrixData = Memory_Alloc_2DArray( double, self->columnSize, self->rowSize, (Name)self->name );
}
- return (void*)newConstitutiveMat_Refactored;
+ return (void* )newConstitutiveMat_Refactored;
}
void _ConstitutiveMat_Refactored_AssignFromXML( void* constitutiveMatrix, Stg_ComponentFactory* cf, void* data ) {
@@ -176,12 +176,12 @@ void _ConstitutiveMat_Refactored_AssignF
Materials_Register* materialsRegister;
PICelleratorContext* context;
- context = (PICelleratorContext*)Stg_ComponentFactory_ConstructByName( cf, "context", PICelleratorContext, True, data );
+ context = (PICelleratorContext*)Stg_ComponentFactory_ConstructByName( cf, (Name)"context", PICelleratorContext, True, data );
materialsRegister = context->materials_Register;
- assert( materialsRegister );
+ assert( materialsRegister );
- dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, "dim", 0 );
+ dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, (Dictionary_Entry_Key)"dim", 0 );
_ConstitutiveMat_Refactored_Init( self, dim, context, materialsRegister );
}
@@ -191,11 +191,11 @@ void _ConstitutiveMat_Refactored_Build(
Material_Index material_I;
Material_Index materialCount = Materials_Register_GetCount( self->materials_Register );
RheologyMaterial* material;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
Journal_DPrintf( self->debug, "In %s - for matrix %s\n", __func__, self->name );
- self->matrixData = Memory_Alloc_2DArray( double, self->columnSize, self->rowSize, self->name );
+ self->matrixData = Memory_Alloc_2DArray( double, self->columnSize, self->rowSize, (Name)self->name );
/*
self->deriv = AllocArray2D( double, (self->dim + 1), (self->dim + 1) );
*/
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/ConstitutiveMatrix.c
--- a/Rheology/src/ConstitutiveMatrix.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/ConstitutiveMatrix.c Thu Jan 14 17:41:33 2010 +1100
@@ -187,9 +187,9 @@ void* _ConstitutiveMatrix_Copy( void* co
/* TODO */ abort();
if (deep) {
- newConstitutiveMatrix->matrixData = Memory_Alloc_2DArray( double, self->columnSize, self->rowSize, self->name );
+ newConstitutiveMatrix->matrixData = Memory_Alloc_2DArray( double, self->columnSize, self->rowSize, (Name)self->name );
}
- return (void*)newConstitutiveMatrix;
+ return (void* )newConstitutiveMatrix;
}
void _ConstitutiveMatrix_AssignFromXML( void* constitutiveMatrix, Stg_ComponentFactory* cf, void* data ) {
@@ -199,9 +199,9 @@ void _ConstitutiveMatrix_AssignFromXML(
_StiffnessMatrixTerm_AssignFromXML( self, cf, data );
- dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, "dim", 0 );
+ dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, (Dictionary_Entry_Key)"dim", 0 );
- storeConstitutiveMatrix = Stg_ComponentFactory_GetBool( cf, self->name, "storeConstitutiveMatrix", False );
+ storeConstitutiveMatrix = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"storeConstitutiveMatrix", False );
_ConstitutiveMatrix_Init( self, dim, storeConstitutiveMatrix );
}
@@ -211,13 +211,13 @@ void _ConstitutiveMatrix_Build( void* co
Material_Index material_I;
Material_Index materialCount = Materials_Register_GetCount( self->materials_Register );
RheologyMaterial* material;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
_StiffnessMatrixTerm_Build( self, data );
Journal_DPrintf( self->debug, "In %s - for matrix %s\n", __func__, self->name );
- self->matrixData = Memory_Alloc_2DArray( double, self->columnSize, self->rowSize, self->name );
+ self->matrixData = Memory_Alloc_2DArray( double, self->columnSize, self->rowSize, (Name)self->name );
/*
self->deriv = AllocArray2D( double, (self->dim + 1), (self->dim + 1) );
*/
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/ConstitutiveMatrixCartesian.c
--- a/Rheology/src/ConstitutiveMatrixCartesian.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/ConstitutiveMatrixCartesian.c Thu Jan 14 17:41:33 2010 +1100
@@ -100,7 +100,7 @@ void _ConstitutiveMatrixCartesian_Init(
ConstitutiveMatrixCartesian* self )
{
self->rowSize = self->columnSize = StGermain_nSymmetricTensorVectorComponents( self->dim );
- self->Dtilda_B = Memory_Alloc_2DArray( double, self->rowSize, self->dim, "D~ times B matrix" );
+ self->Dtilda_B = Memory_Alloc_2DArray( double, self->rowSize, self->dim, (Name)"D~ times B matrix" );
if( self->dim == 2 ) {
self->_setValue = _ConstitutiveMatrixCartesian2D_SetValueInAllEntries;
@@ -127,7 +127,7 @@ void _ConstitutiveMatrixCartesian_Delete
void _ConstitutiveMatrixCartesian_Delete( void* constitutiveMatrix ) {
ConstitutiveMatrixCartesian* self = (ConstitutiveMatrixCartesian*)constitutiveMatrix;
- _ConstitutiveMatrix_Delete( self );
+ _ConstitutiveMatrix_Delete( self );
}
void _ConstitutiveMatrixCartesian_Print( void* constitutiveMatrix, Stream* stream ) {
@@ -259,7 +259,7 @@ void _ConstitutiveMatrixCartesian_Assemb
cellParticleCount = swarm->cellParticleCountTbl[ cell_I ];
/* Determine whether this is the first solve for not */
- Journal_Firewall( sle != NULL, Journal_Register( Error_Type, ConstitutiveMatrix_Type ),
+ Journal_Firewall( sle != NULL, Journal_Register( Error_Type, (Name)ConstitutiveMatrix_Type ),
"In func %s: SLE is NULL.\n", __func__ );
/* Note: we may have deliberately set the previousSolutionExists flag to true in the
@@ -313,7 +313,7 @@ void _ConstitutiveMatrixCartesian_Assemb
double **matrixData;
int ii, jj, kk;
- matrixData = Memory_Alloc_2DArray(double, self->columnSize, self->rowSize, self->name);
+ matrixData = Memory_Alloc_2DArray( double, self->columnSize, self->rowSize, (Name)self->name );
memset(matrixData[0], 0, self->columnSize*self->rowSize*sizeof(double));
ref = OneToManyMapper_GetMaterialRef(((IntegrationPointsSwarm*)swarm)->mapper, particle);
for(ii = 0; ii < ref->numParticles; ii++) {
@@ -726,10 +726,7 @@ void ConstitutiveMatrixCartesian_SetupPa
materialSwarm = materialSwarms[0];
/* add extension to material swarm */
- self->storedConstHandle = ExtensionManager_Add(
- materialSwarm->particleExtensionMgr,
- self->type,
- self->rowSize * self->columnSize * sizeof(double) );
+ self->storedConstHandle = ExtensionManager_Add( materialSwarm->particleExtensionMgr, (Name)self->type, self->rowSize * self->columnSize * sizeof(double) );
cMatrix = ExtensionManager_Get( materialSwarm->particleExtensionMgr, &particle, self->storedConstHandle );
@@ -738,13 +735,11 @@ void ConstitutiveMatrixCartesian_SetupPa
if( self->dim == 2 ) {
/* TODO: clean up this vector logic. The only reson there's an if is because
* * of the list of names the must be given as the final arguments to this function. */
- self->storedConstSwarmVar = Swarm_NewVectorVariable( materialSwarm, "ConstitutiveMatrix",
- (ArithPointer)cMatrix - (ArithPointer)&particle,
+ self->storedConstSwarmVar = Swarm_NewVectorVariable( materialSwarm, (Name)"ConstitutiveMatrix", (ArithPointer)cMatrix - (ArithPointer)&particle,
Variable_DataType_Double, self->rowSize * self->columnSize,
"c00", "c01", "c02", "c10", "c11", "c12", "c20", "c21", "c22" );
} else {
- self->storedConstSwarmVar = Swarm_NewVectorVariable( materialSwarm, "ConstitutiveMatrix",
- (ArithPointer)cMatrix - (ArithPointer)&particle,
+ self->storedConstSwarmVar = Swarm_NewVectorVariable( materialSwarm, (Name)"ConstitutiveMatrix", (ArithPointer)cMatrix - (ArithPointer)&particle,
Variable_DataType_Double, self->rowSize * self->columnSize,
"c00", "c01", "c02", "c03", "c04", "c05",
"c10", "c11", "c12", "c13", "c14", "c15",
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/DepthDependentViscosity.c
--- a/Rheology/src/DepthDependentViscosity.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/DepthDependentViscosity.c Thu Jan 14 17:41:33 2010 +1100
@@ -122,17 +122,17 @@ void _DepthDependentViscosity_AssignFrom
FeMesh* feMesh;
Axis variationAxis = 0;
Name variationAxisName;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
/* Construct Parent */
_Rheology_AssignFromXML( self, cf, data );
- feMesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Mesh", FeMesh, True, data ) ;
+ feMesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Mesh", FeMesh, True, data ) ;
- variationAxisName = Stg_ComponentFactory_GetString( cf, self->name, "variationAxis", "Y" );
+ variationAxisName = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"variationAxis", "Y" );
Journal_Firewall(
- variationAxisName != NULL && strlen( variationAxisName ) >= 1,
+ variationAxisName != NULL && strlen( variationAxisName ) >= 1,
errorStream,
"Error in func %s for %s '%s' - Bad 'variationAxis'\n",
__func__, self->type, self->name );
@@ -155,10 +155,10 @@ void _DepthDependentViscosity_AssignFrom
_DepthDependentViscosity_Init(
self,
feMesh,
- Stg_ComponentFactory_GetDouble( cf, self->name, "eta0", 1.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "gamma", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"eta0", 1.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"gamma", 0.0 ),
variationAxis,
- Stg_ComponentFactory_GetDouble( cf, self->name, "referencePoint", 0.0 ) );
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"referencePoint", 0.0 ) );
}
void _DepthDependentViscosity_Destroy( void* rheology, void* data ) {
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/Director.c
--- a/Rheology/src/Director.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/Director.c Thu Jan 14 17:41:33 2010 +1100
@@ -145,44 +145,37 @@ void _Director_Init(
/****** Setup Variables *****/
/* First check to see if a particle extension has already been created for this swarm */
- self->particleExtHandle = ExtensionManager_GetHandle( materialPointsSwarm->particleExtensionMgr, Director_Type );
+ self->particleExtHandle = ExtensionManager_GetHandle( materialPointsSwarm->particleExtensionMgr, (Name)Director_Type );
/* If there isn't one then create the particle extension - otherwise just use the one already there*/
- if ( self->particleExtHandle == (ExtensionInfo_Index) -1 ) {
+ if ( self->particleExtHandle == (ExtensionInfo_Index) -1 ) {
StandardParticle particle;
Director_ParticleExt* particleExt;
/* Add particle extension */
self->particleExtHandle =
- ExtensionManager_Add( materialPointsSwarm->particleExtensionMgr, Director_Type, sizeof(Director_ParticleExt) );
+ ExtensionManager_Add( materialPointsSwarm->particleExtensionMgr, (Name)Director_Type, sizeof(Director_ParticleExt) );
particleExt = ExtensionManager_Get( materialPointsSwarm->particleExtensionMgr, &particle, self->particleExtHandle );
- self->directorSwarmVariable = Swarm_NewVectorVariable(
- materialPointsSwarm,
- "Director",
- (ArithPointer) &particleExt->director - (ArithPointer) &particle,
+ self->directorSwarmVariable = Swarm_NewVectorVariable( materialPointsSwarm, (Name)"Director", (ArithPointer) &particleExt->director - (ArithPointer) &particle,
Variable_DataType_Double,
materialPointsSwarm->dim,
"DirectorX",
"DirectorY",
"DirectorZ" );
- self->dontUpdateParticle = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "dontUpdateParticle",
- (ArithPointer) &particleExt->dontUpdateParticle - (ArithPointer) &particle,
- Variable_DataType_Int );
+ self->dontUpdateParticle = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"dontUpdateParticle", (ArithPointer) &particleExt->dontUpdateParticle - (ArithPointer) &particle, Variable_DataType_Int );
}
else {
Name variableName;
/* Get Variables already created */
- variableName = Stg_Object_AppendSuffix( materialPointsSwarm, "Director" );
+ variableName = Stg_Object_AppendSuffix( materialPointsSwarm, (Name)"Director" );
self->directorSwarmVariable = SwarmVariable_Register_GetByName( materialPointsSwarm->swarmVariable_Register, variableName );
assert( self->directorSwarmVariable );
Memory_Free( variableName );
/* Get Variables already created */
- variableName = Stg_Object_AppendSuffix( materialPointsSwarm, "dontUpdateParticle" );
+ variableName = Stg_Object_AppendSuffix( materialPointsSwarm, (Name)"dontUpdateParticle" );
self->dontUpdateParticle = SwarmVariable_Register_GetByName( materialPointsSwarm->swarmVariable_Register, variableName );
assert( self->dontUpdateParticle );
Memory_Free( variableName );
@@ -228,14 +221,12 @@ void _Director_AssignFromXML( void* dire
/* Construct 'Director' stuff */
/* TODO: 'KeyFallback' soon to be deprecated/updated */
- velGradField = Stg_ComponentFactory_ConstructByNameWithKeyFallback(
- cf, self->name, "VelocityGradientsField", "VelocityGradientsField", FeVariable, True, data );
+ velGradField = Stg_ComponentFactory_ConstructByNameWithKeyFallback( cf, self->name, (Name)"VelocityGradientsField", (Dictionary_Entry_Key)"VelocityGradientsField", FeVariable, True, data );
/*
velGradField = Stg_ComponentFactory_ConstructByKey(
cf, self->name, "VelocityGradientsField", FeVariable, True );
*/
- materialPointsSwarm = Stg_ComponentFactory_ConstructByKey(
- cf, self->name, "MaterialPointsSwarm", MaterialPointsSwarm, True, data );
+ materialPointsSwarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"MaterialPointsSwarm", MaterialPointsSwarm, True, data );
/* Define the initial Direction type for the problem
@@ -243,7 +234,7 @@ void _Director_AssignFromXML( void* dire
Random direction,
a different direction per material.
*/
- initialDirectionTypeName = Stg_ComponentFactory_GetString(cf, self->name, "initialDirectionType", "global");
+ initialDirectionTypeName = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"initialDirectionType", "global" );
if (0 == strcasecmp(initialDirectionTypeName, "global")) {
initialDirectionType = INIT_DIR_GLOBAL;
}
@@ -254,7 +245,7 @@ void _Director_AssignFromXML( void* dire
initialDirectionType = INIT_DIR_PER_MAT;
}
else {
- Journal_Firewall(False, Journal_Register(Error_Type, "Director" ),
+ Journal_Firewall(False, Journal_Register( Error_Type, (Name)"Director" ),
"Error in '%s', do not understand initialDirectionType = %s\n."
" Options are: \"global\", \"random\" or \"perMaterial\" ", __func__,
initialDirectionTypeName);
@@ -265,11 +256,11 @@ void _Director_AssignFromXML( void* dire
velGradField,
materialPointsSwarm,
initialDirectionType,
- Stg_ComponentFactory_GetDouble( cf, self->name, "initialDirectionX", DIRECTOR_DEFAULT_DIR_X ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "initialDirectionY", DIRECTOR_DEFAULT_DIR_Y ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "initialDirectionZ", DIRECTOR_DEFAULT_DIR_Z ),
- Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "randomInitialDirectionSeed", 1 ),
- Stg_ComponentFactory_GetBool( cf, self->name, "dontUpdate", False ) );
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"initialDirectionX", DIRECTOR_DEFAULT_DIR_X ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"initialDirectionY", DIRECTOR_DEFAULT_DIR_Y ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"initialDirectionZ", DIRECTOR_DEFAULT_DIR_Z ),
+ Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"randomInitialDirectionSeed", 1 ),
+ Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"dontUpdate", False ) );
}
@@ -369,30 +360,18 @@ void _Director_Initialise( void* directo
material = Materials_Register_GetByIndex(
self->materialPointsSwarm->materials_Register,
material_I );
- randomInitialDirections[material_I] = Dictionary_GetBool_WithDefault(
- material->dictionary,
- "randomInitialDirection",
- False);
+ randomInitialDirections[material_I] = Dictionary_GetBool_WithDefault( material->dictionary, (Dictionary_Entry_Key)"randomInitialDirection", False );
/* If no value is set, use default value from this file,
and not the (not-used) global value */
if ( randomInitialDirections[material_I] == False) {
materialDirectionVectors[ material_I ][0] =
- Dictionary_GetDouble_WithDefault(
- material->dictionary,
- "initialDirectionX",
- DIRECTOR_DEFAULT_DIR_X );
+ Dictionary_GetDouble_WithDefault( material->dictionary, (Dictionary_Entry_Key)"initialDirectionX", DIRECTOR_DEFAULT_DIR_X );
materialDirectionVectors[ material_I ][1] =
- Dictionary_GetDouble_WithDefault(
- material->dictionary,
- "initialDirectionY",
- DIRECTOR_DEFAULT_DIR_Y );
+ Dictionary_GetDouble_WithDefault( material->dictionary, (Dictionary_Entry_Key)"initialDirectionY", DIRECTOR_DEFAULT_DIR_Y );
materialDirectionVectors[ material_I ][2] =
- Dictionary_GetDouble_WithDefault(
- material->dictionary,
- "initialDirectionZ",
- DIRECTOR_DEFAULT_DIR_Z );
+ Dictionary_GetDouble_WithDefault( material->dictionary, (Dictionary_Entry_Key)"initialDirectionZ", DIRECTOR_DEFAULT_DIR_Z );
}
else {
/* If no random seed set, then use global value ( which if
@@ -464,7 +443,7 @@ void _Director_Initialise( void* directo
Memory_Free(randomInitialDirectionSeeds);
}
else {
- Journal_Firewall(False, Journal_Register(Error_Type, "Director" ),
+ Journal_Firewall(False, Journal_Register( Error_Type, (Name)"Director" ),
"Error in '%s', do not understand self->initialDirectionType = %u\n"
"initialDirectionType must match enumerated type, 'InitialDirectionType'"
"in Director.h\n", __func__,
@@ -520,7 +499,7 @@ Bool _Director_TimeDerivative( void* dir
if ( result == OTHER_PROC || result == OUTSIDE_GLOBAL || isinf(velGrad[0]) || isinf(velGrad[1]) ||
( self->materialPointsSwarm->dim == 3 && isinf(velGrad[2]) ) )
{
- 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\tVelGrad here is (%g, %g, %g)."
"\n\tInterpolation result is %s.\n",
__func__, lParticle_I, materialPoint->coord[0], materialPoint->coord[1], materialPoint->coord[2],
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/DruckerPrager.c
--- a/Rheology/src/DruckerPrager.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/DruckerPrager.c Thu Jan 14 17:41:33 2010 +1100
@@ -116,8 +116,7 @@ void _DruckerPrager_Init(
DruckerPrager_Particle* particleExt;
StandardParticle materialPoint;
- self->particleExtHandle = ExtensionManager_Add( materialPointsSwarm->particleExtensionMgr,
- DruckerPrager_Type, sizeof(DruckerPrager_Particle) );
+ self->particleExtHandle = ExtensionManager_Add( materialPointsSwarm->particleExtensionMgr, (Name)DruckerPrager_Type, sizeof(DruckerPrager_Particle) );
/* Assign Pointers */
self->pressureField = pressureField;
@@ -125,7 +124,7 @@ void _DruckerPrager_Init(
self->minimumYieldStress = minimumYieldStress;
self->swarmPressure = swarmPressure;
- /* Strain softening of Friction - (linear weakening is assumed) */
+ /* Strain softening of Friction - (linear weakening is assumed ) */
/* needs a softening factor between +0 and 1 and a reference strain > 0 */
self->frictionCoefficientAfterSoftening = frictionCoefficientAfterSoftening;
@@ -136,30 +135,14 @@ void _DruckerPrager_Init(
particleExt = ExtensionManager_Get( materialPointsSwarm->particleExtensionMgr, &materialPoint, self->particleExtHandle );
/* Setup Variables for Visualisation */
- self->brightness = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "DruckerPragerBrightness",
- (ArithPointer) &particleExt->brightness - (ArithPointer) &materialPoint,
- Variable_DataType_Float );
+ self->brightness = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"DruckerPragerBrightness", (ArithPointer) &particleExt->brightness - (ArithPointer) &materialPoint, Variable_DataType_Float );
- self->opacity = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "DruckerPragerOpacity",
- (ArithPointer) &particleExt->opacity - (ArithPointer) &materialPoint,
- Variable_DataType_Float );
+ self->opacity = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"DruckerPragerOpacity", (ArithPointer) &particleExt->opacity - (ArithPointer) &materialPoint, Variable_DataType_Float );
- self->diameter = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "DruckerPragerDiameter",
- (ArithPointer) &particleExt->diameter - (ArithPointer) &materialPoint,
- Variable_DataType_Float );
+ self->diameter = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"DruckerPragerDiameter", (ArithPointer) &particleExt->diameter - (ArithPointer) &materialPoint, Variable_DataType_Float );
/* The tensileFailure variable allows to check whether a materialPoint has failed in tensile mode or not */
- self->tensileFailure = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "DruckerPragerTensileFailure",
- (ArithPointer) &particleExt->tensileFailure - (ArithPointer) &materialPoint,
- Variable_DataType_Char );
+ self->tensileFailure = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"DruckerPragerTensileFailure", (ArithPointer) &particleExt->tensileFailure - (ArithPointer) &materialPoint, Variable_DataType_Char );
self->curFrictionCoef = 0.0;
@@ -186,7 +169,7 @@ void* _DruckerPrager_DefaultNew( Name na
/* Variables that are set to ZERO are variables that will be set either by the current _New function or another parent _New function further up the hierachy */
AllocationType nameAllocationType = NON_GLOBAL /* default value NON_GLOBAL */;
- return (void*) _DruckerPrager_New( DRUCKERPRAGER_PASSARGS );
+ return (void*) _DruckerPrager_New( DRUCKERPRAGER_PASSARGS );
}
void _DruckerPrager_AssignFromXML( void* druckerPrager, Stg_ComponentFactory* cf, void* data ){
@@ -199,24 +182,23 @@ void _DruckerPrager_AssignFromXML( void*
_VonMises_AssignFromXML( self, cf, data );
pressureField = (FeVariable *)
- Stg_ComponentFactory_ConstructByKey( cf, self->name, "PressureField", FeVariable, False, data );
- swarmPressure = Stg_ComponentFactory_ConstructByKey(
- cf, self->name, "swarmPressure", SwarmVariable, False, data );
+ Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"PressureField", FeVariable, False, data );
+ swarmPressure = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"swarmPressure", SwarmVariable, False, data );
Journal_Firewall(
- ( pressureField || swarmPressure),
- Journal_Register( Error_Type, self->type ),
+ ( pressureField || swarmPressure ),
+ Journal_Register( Error_Type, (Name)self->type ),
"\n Error in component type %s, name '%s'.\n Must specify a PressureField OR a swarmPressure, but not both. \n", self->type, self->name );
materialPointsSwarm = (MaterialPointsSwarm*)
- Stg_ComponentFactory_ConstructByKey( cf, self->name, "MaterialPointsSwarm", MaterialPointsSwarm, True, data );
+ Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"MaterialPointsSwarm", MaterialPointsSwarm, True, data );
_DruckerPrager_Init( self,
pressureField,
swarmPressure,
materialPointsSwarm,
- Stg_ComponentFactory_GetDouble( cf, self->name, "minimumYieldStress", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "frictionCoefficient", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "frictionCoefficientAfterSoftening", 0.0 ) );
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"minimumYieldStress", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"frictionCoefficient", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"frictionCoefficientAfterSoftening", 0.0 ) );
}
void _DruckerPrager_Build( void* rheology, void* data ) {
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/FaultingMoresiMuhlhaus2006.c
--- a/Rheology/src/FaultingMoresiMuhlhaus2006.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/FaultingMoresiMuhlhaus2006.c Thu Jan 14 17:41:33 2010 +1100
@@ -89,7 +89,7 @@ FaultingMoresiMuhlhaus2006* FaultingMore
/* Make sure that there is strain weakening */
Journal_Firewall(
strainWeakening != NULL,
- Journal_Register( Error_Type, self->type ),
+ Journal_Register( Error_Type, (Name)self->type ),
"Error in func '%s' for %s '%s': FaultingMoresiMuhlhaus2006 rheology needs strain weakening.\n",
__func__, self->type, self->name );
@@ -157,8 +157,7 @@ void _FaultingMoresiMuhlhaus2006_Init(
self->director = director;
- self->particleExtHandle = ExtensionManager_Add( materialPointsSwarm->particleExtensionMgr,
- FaultingMoresiMuhlhaus2006_Type, sizeof(FaultingMoresiMuhlhaus2006_Particle) );
+ self->particleExtHandle = ExtensionManager_Add( materialPointsSwarm->particleExtensionMgr, (Name)FaultingMoresiMuhlhaus2006_Type, sizeof(FaultingMoresiMuhlhaus2006_Particle) );
self->cohesion = cohesion;
self->frictionCoefficient = frictionCoefficient;
@@ -167,7 +166,7 @@ void _FaultingMoresiMuhlhaus2006_Init(
/* needs a softening factor between +0 and 1 and a reference strain > 0 */
self->cohesionAfterSoftening = cohesionAfterSoftening;
- /* Strain softening of Friction - (linear weakening is assumed) */
+ /* Strain softening of Friction - (linear weakening is assumed ) */
/* needs a softening factor between +0 and 1 and a reference strain > 0 */
self->frictionCoefficientAfterSoftening = frictionCoefficientAfterSoftening;
@@ -187,17 +186,10 @@ void _FaultingMoresiMuhlhaus2006_Init(
/* Add variables for viz purpose */
- self->slipRate = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "SlipRate",
- (ArithPointer) &particleExt->slipRate - (ArithPointer) &materialPoint,
- Variable_DataType_Double );
+ self->slipRate = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"SlipRate", (ArithPointer) &particleExt->slipRate - (ArithPointer) &materialPoint, Variable_DataType_Double );
/* slip vector gives the orientation of the failure plane */
- self->slip = Swarm_NewVectorVariable(
- materialPointsSwarm,
- "SlipVector",
- (ArithPointer) &particleExt->slip - (ArithPointer) &materialPoint,
+ self->slip = Swarm_NewVectorVariable( materialPointsSwarm, (Name)"SlipVector", (ArithPointer) &particleExt->slip - (ArithPointer) &materialPoint,
Variable_DataType_Double,
dim,
"SlipVectorX",
@@ -205,42 +197,18 @@ void _FaultingMoresiMuhlhaus2006_Init(
"SlipVectorZ" );
/* Some visualisation parameters (brightness, opacity, length, thickness) */
- self->brightness = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "FaultingMoresiMuhlhaus2006Brightness",
- (ArithPointer) &particleExt->brightness - (ArithPointer) &materialPoint,
- Variable_DataType_Float );
+ self->brightness = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"FaultingMoresiMuhlhaus2006Brightness", (ArithPointer) &particleExt->brightness - (ArithPointer) &materialPoint, Variable_DataType_Float );
- self->opacity = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "FaultingMoresiMuhlhaus2006Opacity",
- (ArithPointer) &particleExt->opacity - (ArithPointer) &materialPoint,
- Variable_DataType_Float );
+ self->opacity = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"FaultingMoresiMuhlhaus2006Opacity", (ArithPointer) &particleExt->opacity - (ArithPointer) &materialPoint, Variable_DataType_Float );
- self->length = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "FaultingMoresiMuhlhaus2006Length",
- (ArithPointer) &particleExt->length - (ArithPointer) &materialPoint,
- Variable_DataType_Float );
+ self->length = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"FaultingMoresiMuhlhaus2006Length", (ArithPointer) &particleExt->length - (ArithPointer) &materialPoint, Variable_DataType_Float );
- self->thickness = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "FaultingMoresiMuhlhaus2006Thickness",
- (ArithPointer) &particleExt->thickness - (ArithPointer) &materialPoint,
- Variable_DataType_Float );
+ self->thickness = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"FaultingMoresiMuhlhaus2006Thickness", (ArithPointer) &particleExt->thickness - (ArithPointer) &materialPoint, Variable_DataType_Float );
/* The tensileFailure variable allows to check whether a materialPoint has failed in tensile mode or not */
- self->tensileFailure = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "FaultingMoresiMuhlhaus2006TensileFailure",
- (ArithPointer) &particleExt->tensileFailure - (ArithPointer) &materialPoint,
- Variable_DataType_Char );
+ self->tensileFailure = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"FaultingMoresiMuhlhaus2006TensileFailure", (ArithPointer) &particleExt->tensileFailure - (ArithPointer) &materialPoint, Variable_DataType_Char );
- self->fullySoftened = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "FaultingMoresiMuhlhaus2006FullySoftened",
- (ArithPointer) &particleExt->fullySoftened - (ArithPointer) &materialPoint,
- Variable_DataType_Char );
+ self->fullySoftened = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"FaultingMoresiMuhlhaus2006FullySoftened", (ArithPointer) &particleExt->fullySoftened - (ArithPointer) &materialPoint, Variable_DataType_Char );
self->updateOrientations = updateOrientations;
self->isotropicCorrection = isotropicCorrection;
@@ -268,7 +236,7 @@ void* _FaultingMoresiMuhlhaus2006_Defaul
/* Variables that are set to ZERO are variables that will be set either by the current _New function or another parent _New function further up the hierachy */
AllocationType nameAllocationType = NON_GLOBAL /* default value NON_GLOBAL */;
- return (void*) _FaultingMoresiMuhlhaus2006_New( FAULTINGMORESIMUHLHAUS2006_PASSARGS );
+ return (void*) _FaultingMoresiMuhlhaus2006_New( FAULTINGMORESIMUHLHAUS2006_PASSARGS );
}
void _FaultingMoresiMuhlhaus2006_AssignFromXML( void* rheology, Stg_ComponentFactory* cf, void* data ){
@@ -285,19 +253,15 @@ void _FaultingMoresiMuhlhaus2006_AssignF
/* Make sure that there is strain weakening */
Journal_Firewall(
self->strainWeakening != NULL,
- Journal_Register( Error_Type, self->type ),
+ Journal_Register( Error_Type, (Name)self->type ),
"Error in func '%s' for %s '%s': FaultingMoresiMuhlhaus2006 rheology needs strain weakening.\n",
__func__, self->type, self->name );
- context = Stg_ComponentFactory_ConstructByName( cf,
- "context", FiniteElementContext, True, data );
- materialPointsSwarm = Stg_ComponentFactory_ConstructByKey( cf, self->name,
- "MaterialPointsSwarm", MaterialPointsSwarm, True, data );
- pressureField = Stg_ComponentFactory_ConstructByKey( cf, self->name,
- "PressureField", FeVariable, True, data );
- velocityGradientsField = Stg_ComponentFactory_ConstructByKey( cf, self->name,
- "VelocityGradientsField", FeVariable, True, data );
- director = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Director", Director, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", FiniteElementContext, True, data );
+ materialPointsSwarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"MaterialPointsSwarm", MaterialPointsSwarm, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"PressureField", FeVariable, True, data );
+ velocityGradientsField = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"VelocityGradientsField", FeVariable, True, data );
+ director = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Director", Director, True, data );
_FaultingMoresiMuhlhaus2006_Init(
self,
@@ -306,15 +270,15 @@ void _FaultingMoresiMuhlhaus2006_AssignF
materialPointsSwarm,
context,
director,
- Stg_ComponentFactory_GetDouble( cf, self->name, "cohesion", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "cohesionAfterSoftening", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "frictionCoefficient", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "frictionCoefficientAfterSoftening", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "minimumYieldStress", 0.0 ),
- Stg_ComponentFactory_GetBool( cf, self->name, "ignoreOldOrientation", False ),
- Stg_ComponentFactory_GetBool( cf, self->name, "updateOrientationAtMaxSoftness", True ),
- Stg_ComponentFactory_GetBool( cf, self->name, "updateOrientations", True ),
- Stg_ComponentFactory_GetBool( cf, self->name, "isotropicCorrection", False ));
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"cohesion", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"cohesionAfterSoftening", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"frictionCoefficient", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"frictionCoefficientAfterSoftening", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"minimumYieldStress", 0.0 ),
+ Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"ignoreOldOrientation", False ),
+ Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"updateOrientationAtMaxSoftness", True ),
+ Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"updateOrientations", True ),
+ Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"isotropicCorrection", False ) );
}
void _FaultingMoresiMuhlhaus2006_Build( void* rheology, void* data ) {
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/Finalise.c
--- a/Rheology/src/Finalise.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/Finalise.c Thu Jan 14 17:41:33 2010 +1100
@@ -51,7 +51,7 @@
#include <stdio.h>
Bool Underworld_Rheology_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 55c0e5081456 -r d7d947597d6d Rheology/src/FrankKamenetskii.c
--- a/Rheology/src/FrankKamenetskii.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/FrankKamenetskii.c Thu Jan 14 17:41:33 2010 +1100
@@ -120,21 +120,14 @@ void _FrankKamenetskii_AssignFromXML( vo
_Rheology_AssignFromXML( self, cf, data );
/* TODO: KeyFallback soon to be deprecated/updated */
- temperatureField = Stg_ComponentFactory_ConstructByNameWithKeyFallback(
- cf,
- self->name,
- "TemperatureField",
- "TemperatureField",
- FeVariable,
- True,
- data );
+ temperatureField = Stg_ComponentFactory_ConstructByNameWithKeyFallback( cf, self->name, (Name)"TemperatureField", (Dictionary_Entry_Key)"TemperatureField", FeVariable, True, data );
/*temperatureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, "TemperatureField", FeVariable, True ); */
_FrankKamenetskii_Init(
self,
temperatureField,
- Stg_ComponentFactory_GetDouble( cf, self->name, "eta0", 1.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "theta", 0.0 ) );
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"eta0", 1.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"theta", 0.0 ) );
}
void _FrankKamenetskii_Destroy( void* rheology, void* data ) {
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/Init.c
--- a/Rheology/src/Init.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/Init.c Thu Jan 14 17:41:33 2010 +1100
@@ -54,41 +54,41 @@ Bool Underworld_Rheology_Init( int* argc
Bool Underworld_Rheology_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, ConstitutiveMatrixCartesian_Type, "0", _ConstitutiveMatrixCartesian_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, MaterialViscosity_Type, "0", _MaterialViscosity_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, RheologyMaterial_Type, "0", _RheologyMaterial_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, MultiRheologyMaterial_Type, "0", _MultiRheologyMaterial_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, Compressible_Type, "0", _Compressible_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, ConstitutiveMatrixCartesian_Type, (Name)"0", _ConstitutiveMatrixCartesian_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, MaterialViscosity_Type, (Name)"0", _MaterialViscosity_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, RheologyMaterial_Type, (Name)"0", _RheologyMaterial_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, MultiRheologyMaterial_Type, (Name)"0", _MultiRheologyMaterial_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, Compressible_Type, (Name)"0", _Compressible_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, Arrhenius_Type, "0", _Arrhenius_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, FrankKamenetskii_Type, "0", _FrankKamenetskii_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, NonNewtonian_Type, "0", _NonNewtonian_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, LinearViscosity_Type, "0", _LinearViscosity_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, DepthDependentViscosity_Type, "0", _DepthDependentViscosity_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, Anisotropic_Type, "0", _Anisotropic_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, OrthotropicAligned_Type, "0", _OrthotropicAligned_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, Orthotropic_Type, "0", _Orthotropic_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, Arrhenius_Type, (Name)"0", _Arrhenius_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, FrankKamenetskii_Type, (Name)"0", _FrankKamenetskii_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, NonNewtonian_Type, (Name)"0", _NonNewtonian_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, LinearViscosity_Type, (Name)"0", _LinearViscosity_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, DepthDependentViscosity_Type, (Name)"0", _DepthDependentViscosity_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, Anisotropic_Type, (Name)"0", _Anisotropic_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, OrthotropicAligned_Type, (Name)"0", _OrthotropicAligned_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, Orthotropic_Type, (Name)"0", _Orthotropic_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, VonMises_Type, "0", _VonMises_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, Byerlee_Type, "0", _Byerlee_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, DruckerPrager_Type, "0", _DruckerPrager_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, FaultingMoresiMuhlhaus2006_Type, "0", _FaultingMoresiMuhlhaus2006_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, MohrCoulomb_Type, "0", _MohrCoulomb_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, Pouliquen_etal_Type, "0", _Pouliquen_etal_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, VonMises_Type, (Name)"0", _VonMises_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, Byerlee_Type, (Name)"0", _Byerlee_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, DruckerPrager_Type, (Name)"0", _DruckerPrager_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, FaultingMoresiMuhlhaus2006_Type, (Name)"0", _FaultingMoresiMuhlhaus2006_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, MohrCoulomb_Type, (Name)"0", _MohrCoulomb_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, Pouliquen_etal_Type, (Name)"0", _Pouliquen_etal_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, StrainWeakening_Type, "0", _StrainWeakening_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, BuiterStrainWeakening_Type, "0", _BuiterStrainWeakening_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, Director_Type, "0", _Director_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, AlignmentSwarmVariable_Type, "0", _AlignmentSwarmVariable_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, StrainWeakening_Type, (Name)"0", _StrainWeakening_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, BuiterStrainWeakening_Type, (Name)"0", _BuiterStrainWeakening_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, Director_Type, (Name)"0", _Director_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, AlignmentSwarmVariable_Type, (Name)"0", _AlignmentSwarmVariable_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, ViscosityFieldRheology_Type, "0", _ViscosityFieldRheology_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, ViscosityFieldRheology_Type, (Name)"0", _ViscosityFieldRheology_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, StoreStress_Type, "0", _StoreStress_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, StoreVisc_Type, "0", _StoreVisc_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, StoreStress_Type, (Name)"0", _StoreStress_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, StoreVisc_Type, (Name)"0", _StoreVisc_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, ConstitutiveMatCartesian_Refactored_Type, "0", _ConstitutiveMatCartesian_Refactored_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, ConstitutiveMatCartesian_Refactored_Type, (Name)"0", _ConstitutiveMatCartesian_Refactored_DefaultNew );
/* Register Parents for type checking */
RegisterParent( Rheology_Type, Stg_Component_Type );
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/LinearViscosity.c
--- a/Rheology/src/LinearViscosity.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/LinearViscosity.c Thu Jan 14 17:41:33 2010 +1100
@@ -150,14 +150,14 @@ void _LinearViscosity_AssignFromXML( voi
_LinearViscosity_Init(
self,
- Stg_ComponentFactory_GetDouble( cf, self->name, "C", 1.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "X", 1.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "Y", 1.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "Z", 1.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "XY", 1.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "XZ", 1.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "YZ", 1.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "XYZ", 1.0 ) );
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"C", 1.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"X", 1.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"Y", 1.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"Z", 1.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"XY", 1.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"XZ", 1.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"YZ", 1.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"XYZ", 1.0 ) );
}
void _LinearViscosity_ModifyConstitutiveMatrix(
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/MaterialViscosity.c
--- a/Rheology/src/MaterialViscosity.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/MaterialViscosity.c Thu Jan 14 17:41:33 2010 +1100
@@ -121,7 +121,7 @@ void _MaterialViscosity_AssignFromXML( v
/* Construct Parent */
_Rheology_AssignFromXML( self, cf, data );
- _MaterialViscosity_Init( self, Stg_ComponentFactory_GetDouble( cf, self->name, "eta0", 1.0 ) );
+ _MaterialViscosity_Init( self, Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"eta0", 1.0 ) );
}
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/MohrCoulomb.c
--- a/Rheology/src/MohrCoulomb.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/MohrCoulomb.c Thu Jan 14 17:41:33 2010 +1100
@@ -144,19 +144,15 @@ void _MohrCoulomb_AssignFromXML( void* r
/* Make sure that there is strain weakening */
Journal_Firewall(
self->strainWeakening != NULL,
- Journal_Register( Error_Type, self->type ),
+ Journal_Register( Error_Type, (Name)self->type ),
"Error in func '%s' for %s '%s': MohrCoulomb rheology needs strain weakening.\n",
__func__, self->type, self->name );
- materialPointsSwarm = Stg_ComponentFactory_ConstructByKey( cf, self->name,
- "MaterialPointsSwarm", MaterialPointsSwarm, True, data );
- pressureField = Stg_ComponentFactory_ConstructByKey( cf, self->name,
- "PressureField", FeVariable, True, data );
- strainRateField = Stg_ComponentFactory_ConstructByKey( cf, self->name,
- "StrainRateField", FeVariable, True, data );
+ materialPointsSwarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"MaterialPointsSwarm", MaterialPointsSwarm, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"PressureField", FeVariable, True, data );
+ strainRateField = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"StrainRateField", FeVariable, True, data );
- swarmStrainRate = Stg_ComponentFactory_ConstructByKey(
- cf, self->name, "swarmStrainRate", SwarmVariable, False, data );
+ swarmStrainRate = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"swarmStrainRate", SwarmVariable, False, data );
_MohrCoulomb_Init(
self,
@@ -164,11 +160,11 @@ void _MohrCoulomb_AssignFromXML( void* r
strainRateField,
swarmStrainRate,
materialPointsSwarm,
- Stg_ComponentFactory_GetDouble( cf, self->name, "cohesion", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "cohesionAfterSoftening", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "frictionCoefficient", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "frictionCoefficientAfterSoftening", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "minimumYieldStress", 0.0 ) );
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"cohesion", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"cohesionAfterSoftening", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"frictionCoefficient", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"frictionCoefficientAfterSoftening", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"minimumYieldStress", 0.0 ) );
}
void _MohrCoulomb_Build( void* rheology, void* data ) {
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/MultiRheologyMaterial.c
--- a/Rheology/src/MultiRheologyMaterial.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/MultiRheologyMaterial.c Thu Jan 14 17:41:33 2010 +1100
@@ -138,10 +138,10 @@ void _MultiRheologyMaterial_AssignFromXM
_RheologyMaterial_AssignFromXML( self, cf, data );
- multiRheologyList = Dictionary_Get( currDictionary, "MultiRheologies" );
+ multiRheologyList = Dictionary_Get( currDictionary, (Dictionary_Entry_Key)"MultiRheologies" );
Journal_Firewall(
multiRheologyList != NULL,
- Journal_Register( Error_Type, self->type ),
+ Journal_Register( Error_Type, (Name)self->type ),
"Error in func '%s' for %s '%s': MultiRheologyMaterial rheology needs a rheology list.\n",
__func__, self->type, self->name );
@@ -171,11 +171,11 @@ void _MultiRheologyMaterial_AssignFromXM
rheologyList_I, self->type, self->name, rheologyName );
rheologyListList[ rheologyList_I ][ rheology_I ] =
- Stg_ComponentFactory_ConstructByName( cf, rheologyName, Rheology, True, data );
+ Stg_ComponentFactory_ConstructByName( cf, (Name)rheologyName, Rheology, True, data );
}
Stream_UnIndent( stream );
}
- Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
_MultiRheologyMaterial_Init(
self,
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/NonNewtonian.c
--- a/Rheology/src/NonNewtonian.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/NonNewtonian.c Thu Jan 14 17:41:33 2010 +1100
@@ -131,20 +131,13 @@ void _NonNewtonian_AssignFromXML( void*
_Rheology_AssignFromXML( self, cf, data );
/* TODO: 'Keyfallback' soon to be deprecated/updated */
- strainRateInvField = Stg_ComponentFactory_ConstructByNameWithKeyFallback(
- cf,
- self->name,
- "StrainRateInvariantField",
- "StrainRateInvariantField",
- FeVariable,
- True,
- data );
+ strainRateInvField = Stg_ComponentFactory_ConstructByNameWithKeyFallback( cf, self->name, (Name)"StrainRateInvariantField", (Dictionary_Entry_Key)"StrainRateInvariantField", FeVariable, True, data );
/*strainRateInvField = Stg_ComponentFactory_ConstructByKey( cf, self->name,
"StrainRateInvariantField", FeVariable, True);*/
_NonNewtonian_Init(
self,
strainRateInvField,
- Stg_ComponentFactory_GetDouble( cf, self->name, "stressExponent", 1.0 ) );
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"stressExponent", 1.0 ) );
}
void _NonNewtonian_ModifyConstitutiveMatrix(
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/Orthotropic.c
--- a/Rheology/src/Orthotropic.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/Orthotropic.c Thu Jan 14 17:41:33 2010 +1100
@@ -131,24 +131,24 @@ void _Orthotropic_AssignFromXML( void* r
as follows:
1 = x 2 = y 3 = z.
*******************************************************************/
- C11 = Stg_ComponentFactory_GetDouble( cf, self->name, "C11", True );
- C22 = Stg_ComponentFactory_GetDouble( cf, self->name, "C22", True );
- C33 = Stg_ComponentFactory_GetDouble( cf, self->name, "C33", True );
- C44 = Stg_ComponentFactory_GetDouble( cf, self->name, "C44", True );
- C55 = Stg_ComponentFactory_GetDouble( cf, self->name, "C55", True );
- C66 = Stg_ComponentFactory_GetDouble( cf, self->name, "C66", True );
- C12 = Stg_ComponentFactory_GetDouble( cf, self->name, "C12", True );
- C13 = Stg_ComponentFactory_GetDouble( cf, self->name, "C13", True );
- C23 = Stg_ComponentFactory_GetDouble( cf, self->name, "C23", True );
- n[0] = Stg_ComponentFactory_GetDouble( cf, self->name, "n1", True );
- n[1] = Stg_ComponentFactory_GetDouble( cf, self->name, "n2", True );
- n[2] = Stg_ComponentFactory_GetDouble( cf, self->name, "n3", True );
- m[0] = Stg_ComponentFactory_GetDouble( cf, self->name, "m1", True );
- m[1] = Stg_ComponentFactory_GetDouble( cf, self->name, "m2", True );
- m[2] = Stg_ComponentFactory_GetDouble( cf, self->name, "m3", True );
- q[0] = Stg_ComponentFactory_GetDouble( cf, self->name, "q1", True );
- q[1] = Stg_ComponentFactory_GetDouble( cf, self->name, "q2", True );
- q[2] = Stg_ComponentFactory_GetDouble( cf, self->name, "q3", True );
+ C11 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"C11", True );
+ C22 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"C22", True );
+ C33 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"C33", True );
+ C44 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"C44", True );
+ C55 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"C55", True );
+ C66 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"C66", True );
+ C12 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"C12", True );
+ C13 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"C13", True );
+ C23 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"C23", True );
+ n[0] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"n1", True );
+ n[1] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"n2", True );
+ n[2] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"n3", True );
+ m[0] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"m1", True );
+ m[1] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"m2", True );
+ m[2] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"m3", True );
+ q[0] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"q1", True );
+ q[1] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"q2", True );
+ q[2] = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"q3", True );
_Orthotropic_Init(
self,
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/OrthotropicAligned.c
--- a/Rheology/src/OrthotropicAligned.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/OrthotropicAligned.c Thu Jan 14 17:41:33 2010 +1100
@@ -68,8 +68,7 @@ void _OrthotropicAligned_Init( Orthotrop
/* OrthotropicAligned_ParticleExt* particleExt;
StandardParticle materialPoint;
- self->particleExtHandle = ExtensionManager_Add( materialPointsSwarm->particleExtensionMgr,
- OrthotropicAligned_Type, sizeof(OrthotropicAligned_ParticleExt) ); */
+ self->particleExtHandle = ExtensionManager_Add( materialPointsSwarm->particleExtensionMgr, (Name)OrthotropicAligned_Type, sizeof(OrthotropicAligned_ParticleExt) ); */
self->viscosity1 = viscosity1;
self->viscosity2 = viscosity2;
self->viscosity3 = viscosity3;
@@ -96,7 +95,7 @@ void* _OrthotropicAligned_DefaultNew( Na
/* Variables that are set to ZERO are variables that will be set either by the current _New function or another parent _New function further up the hierachy */
AllocationType nameAllocationType = NON_GLOBAL /* default value NON_GLOBAL */;
- return (void*) _OrthotropicAligned_New( ORTHOTROPICALIGNED_PASSARGS );
+ return (void*) _OrthotropicAligned_New( ORTHOTROPICALIGNED_PASSARGS );
}
void _OrthotropicAligned_AssignFromXML( void* rheology, Stg_ComponentFactory* cf, void* data ){
@@ -113,12 +112,12 @@ void _OrthotropicAligned_AssignFromXML(
_Rheology_AssignFromXML( self, cf, data );
/* director = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Director", Director, True ) ; */
- viscosity1 = Stg_ComponentFactory_GetDouble( cf, self->name, "viscosity1", True );
- viscosity2 = Stg_ComponentFactory_GetDouble( cf, self->name, "viscosity2", True );
- viscosity3 = Stg_ComponentFactory_GetDouble( cf, self->name, "viscosity3", True );
- viscosity4 = Stg_ComponentFactory_GetDouble( cf, self->name, "viscosity4", True );
- viscosity5 = Stg_ComponentFactory_GetDouble( cf, self->name, "viscosity5", True );
- viscosity6 = Stg_ComponentFactory_GetDouble( cf, self->name, "viscosity6", True );
+ viscosity1 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"viscosity1", True );
+ viscosity2 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"viscosity2", True );
+ viscosity3 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"viscosity3", True );
+ viscosity4 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"viscosity4", True );
+ viscosity5 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"viscosity5", True );
+ viscosity6 = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"viscosity6", True );
_OrthotropicAligned_Init(
self,
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/Pouliquen_etal.c
--- a/Rheology/src/Pouliquen_etal.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/Pouliquen_etal.c Thu Jan 14 17:41:33 2010 +1100
@@ -97,8 +97,7 @@ void _Pouliquen_etal_Init(
Pouliquen_etal_Particle* particleExt;
StandardParticle materialPoint;
- self->particleExtHandle = ExtensionManager_Add( materialPointsSwarm->particleExtensionMgr,
- Pouliquen_etal_Type, sizeof(Pouliquen_etal_Particle) );
+ self->particleExtHandle = ExtensionManager_Add( materialPointsSwarm->particleExtensionMgr, (Name)Pouliquen_etal_Type, sizeof(Pouliquen_etal_Particle) );
/* Assign Pointers */
self->pressureField = pressureField;
@@ -107,7 +106,7 @@ void _Pouliquen_etal_Init(
self->frictionCoefficient = frictionCoefficient;
self->minimumYieldStress = minimumYieldStress;
- /* Strain softening of Friction - (linear weakening is assumed) */
+ /* Strain softening of Friction - (linear weakening is assumed ) */
/* needs a softening factor between +0 and 1 and a reference strain > 0 */
self->frictionCoefficientAfterSoftening = frictionCoefficientAfterSoftening;
@@ -128,30 +127,14 @@ void _Pouliquen_etal_Init(
particleExt = ExtensionManager_Get( materialPointsSwarm->particleExtensionMgr, &materialPoint, self->particleExtHandle );
/* Setup Variables for Visualisation */
- self->brightness = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "Pouliquen_etalBrightness",
- (ArithPointer) &particleExt->brightness - (ArithPointer) &materialPoint,
- Variable_DataType_Float );
+ self->brightness = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"Pouliquen_etalBrightness", (ArithPointer) &particleExt->brightness - (ArithPointer) &materialPoint, Variable_DataType_Float );
- self->opacity = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "Pouliquen_etalOpacity",
- (ArithPointer) &particleExt->opacity - (ArithPointer) &materialPoint,
- Variable_DataType_Float );
+ self->opacity = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"Pouliquen_etalOpacity", (ArithPointer) &particleExt->opacity - (ArithPointer) &materialPoint, Variable_DataType_Float );
- self->diameter = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "Pouliquen_etalDiameter",
- (ArithPointer) &particleExt->diameter - (ArithPointer) &materialPoint,
- Variable_DataType_Float );
+ self->diameter = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"Pouliquen_etalDiameter", (ArithPointer) &particleExt->diameter - (ArithPointer) &materialPoint, Variable_DataType_Float );
/* The tensileFailure variable allows to check whether a materialPoint has failed in tensile mode or not */
- self->tensileFailure = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "Pouliquen_etalTensileFailure",
- (ArithPointer) &particleExt->tensileFailure - (ArithPointer) &materialPoint,
- Variable_DataType_Char );
+ self->tensileFailure = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"Pouliquen_etalTensileFailure", (ArithPointer) &particleExt->tensileFailure - (ArithPointer) &materialPoint, Variable_DataType_Char );
}
@@ -176,7 +159,7 @@ void* _Pouliquen_etal_DefaultNew( Name n
/* Variables that are set to ZERO are variables that will be set either by the current _New function or another parent _New function further up the hierachy */
AllocationType nameAllocationType = NON_GLOBAL /* default value NON_GLOBAL */;
- return (void*) _Pouliquen_etal_New( POULIQUEN_ETAL_PASSARGS );
+ return (void*) _Pouliquen_etal_New( POULIQUEN_ETAL_PASSARGS );
}
void _Pouliquen_etal_AssignFromXML( void* pouliquen_etal, Stg_ComponentFactory* cf, void* data ){
@@ -189,30 +172,30 @@ void _Pouliquen_etal_AssignFromXML( void
_VonMises_AssignFromXML( self, cf, data );
pressureField = (FeVariable *)
- Stg_ComponentFactory_ConstructByKey( cf, self->name, "PressureField", FeVariable, True, data );
+ Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"PressureField", FeVariable, True, data );
- strainRateInvField = (FeVariable *)
- Stg_ComponentFactory_ConstructByKey( cf, self->name, "StrainRateInvariantField", FeVariable, True, data );
+ strainRateInvField = (FeVariable * )
+ Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"StrainRateInvariantField", FeVariable, True, data );
- materialPointsSwarm = (MaterialPointsSwarm*)
- Stg_ComponentFactory_ConstructByKey( cf, self->name, "MaterialPointsSwarm", MaterialPointsSwarm, True, data );
+ materialPointsSwarm = (MaterialPointsSwarm* )
+ Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"MaterialPointsSwarm", MaterialPointsSwarm, True, data );
_Pouliquen_etal_Init( self,
pressureField,
strainRateInvField,
materialPointsSwarm,
- Stg_ComponentFactory_GetDouble( cf, self->name, "minimumYieldStress", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "frictionCoefficient", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "frictionCoefficientAfterSoftening", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "grainDiameter", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "Io", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "rho_s", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "mu_2", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "mu_s", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "mu_2_afterSoftening", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "mu_s_afterSoftening", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "maxViscosity", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "minViscosity", 0.0 ) );
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"minimumYieldStress", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"frictionCoefficient", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"frictionCoefficientAfterSoftening", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"grainDiameter", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"Io", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"rho_s", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"mu_2", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"mu_s", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"mu_2_afterSoftening", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"mu_s_afterSoftening", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"maxViscosity", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"minViscosity", 0.0 ) );
}
void _Pouliquen_etal_Build( void* rheology, void* data ) {
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/RheologyClass.c
--- a/Rheology/src/RheologyClass.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/RheologyClass.c Thu Jan 14 17:41:33 2010 +1100
@@ -83,13 +83,13 @@ void _Rheology_Init( void* rheology, PIC
Rheology* self = (Rheology*)rheology;
self->context = context;
- self->debug = Journal_Register( Debug_Type, self->type ); /* TODO make child of Underworld_Debug */
+ self->debug = Journal_Register( Debug_Type, (Name)self->type ); /* TODO make child of Underworld_Debug */
}
void _Rheology_Delete( void* rheology ) {
Rheology* self = (Rheology*)rheology;
- _Stg_Component_Delete( self );
+ _Stg_Component_Delete( self );
}
void _Rheology_Print( void* rheology, Stream* stream ) {}
@@ -105,9 +105,9 @@ void _Rheology_AssignFromXML( void* rheo
Rheology* self = (Rheology*)rheology;
PICelleratorContext* context;
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", PICelleratorContext, False, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", PICelleratorContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", PICelleratorContext, False, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", PICelleratorContext, True, data );
_Rheology_Init( self, context );
}
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/RheologyMaterial.c
--- a/Rheology/src/RheologyMaterial.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/RheologyMaterial.c Thu Jan 14 17:41:33 2010 +1100
@@ -137,26 +137,12 @@ void _RheologyMaterial_AssignFromXML( vo
rheologyList = NULL;
}
else {
- rheologyList = Stg_ComponentFactory_ConstructByList(
- cf,
- self->name,
- "Rheology",
- Stg_ComponentFactory_Unlimited,
- Rheology,
- True,
- &rheologyCount,
- data );
+ rheologyList = Stg_ComponentFactory_ConstructByList( cf, self->name, (Dictionary_Entry_Key)"Rheology", Stg_ComponentFactory_Unlimited, Rheology, True, &rheologyCount, data );
}
- compressible = Stg_ComponentFactory_ConstructByKey(
- cf,
- self->name,
- "Compressible",
- Compressible,
- False,
- data ) ;
+ compressible = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Compressible", Compressible, False, data ) ;
- isCompressible = Stg_ComponentFactory_GetBool( cf, self->name, "isCompressible", False );
+ isCompressible = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"isCompressible", False );
_RheologyMaterial_Init( self, rheologyList, rheologyCount, compressible, isCompressible );
@@ -189,7 +175,7 @@ void _RheologyMaterial_Init(
Rheology_Register_Add( self->rheology_Register, rheologyList[ rheology_I ] );
}
- /* self->debug = Journal_Register( Debug_Type, self->type ); /* TODO make child of Underworld_Debug */
+ /* self->debug = Journal_Register( Debug_Type, (Name)self->type ); /* TODO make child of Underworld_Debug */
}
@@ -197,7 +183,7 @@ void _RheologyMaterial_Delete( void* rhe
RheologyMaterial* self = (RheologyMaterial*)rheologyMaterial;
Stg_Class_Delete( self->rheology_Register );
- _Material_Delete( self );
+ _Material_Delete( self );
}
@@ -302,7 +288,7 @@ Bool RheologyMaterial_IsNonLinear( void*
Journal_DFirewall(
rheologyCount > 0,
- Journal_Register( Error_Type, self->type ),
+ Journal_Register( Error_Type, (Name)self->type ),
"No rheologies registered on %s '%s'.\n", self->type, self->name );
for( rheology_I = 0; rheology_I < rheologyCount ; rheology_I++ ) {
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/StoreStress.c
--- a/Rheology/src/StoreStress.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/StoreStress.c Thu Jan 14 17:41:33 2010 +1100
@@ -84,7 +84,7 @@ void _StoreStress_Init(
self->materialPointsSwarm = materialPointsSwarm;
self->strainRateField = strainRateField;
- self->particleExtHandle = ExtensionManager_Add( materialPointsSwarm->particleExtensionMgr, self->type, sizeof( StoreStress_ParticleExt ) );
+ self->particleExtHandle = ExtensionManager_Add( materialPointsSwarm->particleExtensionMgr, (Name)self->type, sizeof( StoreStress_ParticleExt ) );
/* Add SwarmVariables for plotting */
particleExt = ExtensionManager_Get( materialPointsSwarm->particleExtensionMgr, &particle, self->particleExtHandle );
@@ -103,10 +103,7 @@ void _StoreStress_Init(
variableName[5] = StG_Strdup( "tau_yz" );
}
- self->materialPointsSwarmVariable = Swarm_NewVectorVariable(
- materialPointsSwarm,
- "StressTensor",
- (ArithPointer) &particleExt->stress - (ArithPointer) &particle,
+ self->materialPointsSwarmVariable = Swarm_NewVectorVariable( materialPointsSwarm, (Name)"StressTensor", (ArithPointer) &particleExt->stress - (ArithPointer) &particle,
Variable_DataType_Double,
StGermain_nSymmetricTensorVectorComponents(dim),
variableName[0],variableName[1],variableName[2],
@@ -146,22 +143,9 @@ void _StoreStress_AssignFromXML( void* r
/* Construct Parent */
_Rheology_AssignFromXML( self, cf, data );
- materialPointsSwarm = Stg_ComponentFactory_ConstructByKey(
- cf,
- self->name,
- "MaterialPointsSwarm",
- MaterialPointsSwarm,
- True,
- data );
+ materialPointsSwarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"MaterialPointsSwarm", MaterialPointsSwarm, True, data );
/* TODO : 'KeyFallback' soon to be deprecated/updated */
- strainRateField = Stg_ComponentFactory_ConstructByNameWithKeyFallback(
- cf,
- self->name,
- "StrainRateField",
- "StrainRateField",
- FeVariable,
- True,
- data );
+ strainRateField = Stg_ComponentFactory_ConstructByNameWithKeyFallback( cf, self->name, (Name)"StrainRateField", (Dictionary_Entry_Key)"StrainRateField", FeVariable, True, data );
/*
strainRateField = Stg_ComponentFactory_ConstructByKey( cf, self->name,
"StrainRateField", FeVariable, True );
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/StoreViscosity.c
--- a/Rheology/src/StoreViscosity.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/StoreViscosity.c Thu Jan 14 17:41:33 2010 +1100
@@ -79,16 +79,12 @@ void _StoreVisc_Init(
/* Assign Pointers */
self->materialPointsSwarm = materialPointsSwarm;
- self->particleExtHandle = ExtensionManager_Add( materialPointsSwarm->particleExtensionMgr, self->type, sizeof( StoreVisc_ParticleExt ) );
+ self->particleExtHandle = ExtensionManager_Add( materialPointsSwarm->particleExtensionMgr, (Name)self->type, sizeof( StoreVisc_ParticleExt ) );
/* Add SwarmVariables for plotting */
particleExt = ExtensionManager_Get( materialPointsSwarm->particleExtensionMgr, &particle, self->particleExtHandle );
- self->swarmVariable = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "Viscosity",
- (ArithPointer) &particleExt->effVisc - (ArithPointer) &particle,
- Variable_DataType_Double );
+ self->swarmVariable = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"Viscosity", (ArithPointer) &particleExt->effVisc - (ArithPointer) &particle, Variable_DataType_Double );
}
void* _StoreVisc_DefaultNew( Name name ) {
@@ -109,7 +105,7 @@ void* _StoreVisc_DefaultNew( Name name )
/* Variables that are set to ZERO are variables that will be set either by the current _New function or another parent _New function further up the hierachy */
AllocationType nameAllocationType = NON_GLOBAL /* default value NON_GLOBAL */;
- return (void*) _StoreVisc_New( STOREVISC_PASSARGS );
+ return (void*) _StoreVisc_New( STOREVISC_PASSARGS );
}
void _StoreVisc_AssignFromXML( void* rheology, Stg_ComponentFactory* cf, void* data ){
@@ -119,13 +115,7 @@ void _StoreVisc_AssignFromXML( void* rhe
/* Construct Parent */
_Rheology_AssignFromXML( self, cf, data );
- materialPointsSwarm = Stg_ComponentFactory_ConstructByKey(
- cf,
- self->name,
- "MaterialPointsSwarm",
- MaterialPointsSwarm,
- True,
- data );
+ materialPointsSwarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"MaterialPointsSwarm", MaterialPointsSwarm, True, data );
_StoreVisc_Init( self, materialPointsSwarm );
}
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/StrainWeakening.c
--- a/Rheology/src/StrainWeakening.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/StrainWeakening.c Thu Jan 14 17:41:33 2010 +1100
@@ -145,16 +145,16 @@ void _StrainWeakening_Init(
/****** Setup Variables *****/
/* First check to see if a particle extension has already been created for this swarm */
- self->particleExtHandle = ExtensionManager_GetHandle( swarm->particleExtensionMgr, StrainWeakening_Type );
+ self->particleExtHandle = ExtensionManager_GetHandle( swarm->particleExtensionMgr, (Name)StrainWeakening_Type );
/* If there isn't one then create the particle extension - otherwise just use the one already there*/
- if ( self->particleExtHandle == (ExtensionInfo_Index) -1 ) {
+ if ( self->particleExtHandle == (ExtensionInfo_Index) -1 ) {
StandardParticle particle;
StrainWeakening_ParticleExt* particleExt;
/* Add particle extension */
self->particleExtHandle =
- ExtensionManager_Add( swarm->particleExtensionMgr, StrainWeakening_Type, sizeof(StrainWeakening_ParticleExt) );
+ ExtensionManager_Add( swarm->particleExtensionMgr, (Name)StrainWeakening_Type, sizeof(StrainWeakening_ParticleExt) );
particleExt = ExtensionManager_Get( swarm->particleExtensionMgr, &particle, self->particleExtHandle );
@@ -162,28 +162,20 @@ void _StrainWeakening_Init(
- self->postFailureWeakening = Swarm_NewScalarVariable(
- swarm,
- "PostFailureWeakening",
- (ArithPointer) &particleExt->postFailureWeakening - (ArithPointer) &particle,
- Variable_DataType_Double );
+ self->postFailureWeakening = Swarm_NewScalarVariable( swarm, (Name)"PostFailureWeakening", (ArithPointer) &particleExt->postFailureWeakening - (ArithPointer) &particle, Variable_DataType_Double );
- self->postFailureWeakeningIncrement = Swarm_NewScalarVariable(
- swarm,
- "PostFailureWeakeningIncrement",
- (ArithPointer) &particleExt->postFailureWeakeningIncrement - (ArithPointer) &particle,
- Variable_DataType_Double );
+ self->postFailureWeakeningIncrement = Swarm_NewScalarVariable( swarm, (Name)"PostFailureWeakeningIncrement", (ArithPointer) &particleExt->postFailureWeakeningIncrement - (ArithPointer) &particle, Variable_DataType_Double );
}
else {
Name variableName;
/* Get Variables already created */
- variableName = Stg_Object_AppendSuffix( swarm, "PostFailureWeakening" );
+ variableName = Stg_Object_AppendSuffix( swarm, (Name)"PostFailureWeakening" );
self->postFailureWeakening = SwarmVariable_Register_GetByName( swarm->swarmVariable_Register, variableName );
assert( self->postFailureWeakening );
Memory_Free( variableName );
- variableName = Stg_Object_AppendSuffix( swarm, "PostFailureWeakeningIncrement" );
+ variableName = Stg_Object_AppendSuffix( swarm, (Name)"PostFailureWeakeningIncrement" );
self->postFailureWeakeningIncrement = SwarmVariable_Register_GetByName( swarm->swarmVariable_Register, variableName );
assert( self->postFailureWeakeningIncrement );
Memory_Free( variableName );
@@ -242,25 +234,19 @@ void _StrainWeakening_AssignFromXML( voi
/* Construct Parent */
_TimeIntegrand_AssignFromXML( self, cf, data );
- materialPointsSwarm = Stg_ComponentFactory_ConstructByKey(
- cf,
- self->name,
- "MaterialPointsSwarm",
- MaterialPointsSwarm,
- True,
- data );
+ materialPointsSwarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"MaterialPointsSwarm", MaterialPointsSwarm, True, data );
- healingRate = Stg_ComponentFactory_GetDouble( cf, self->name, "healingRate", 0.0 );
- softeningStrain = Stg_ComponentFactory_GetDouble( cf, self->name, "softeningStrain", HUGE_VAL );
- initialDamageFraction = Stg_ComponentFactory_GetDouble( cf, self->name, "initialDamageFraction", 0.0 );
- initialDamageWavenumber = Stg_ComponentFactory_GetDouble( cf, self->name, "initialDamageWavenumber", -1.0 );
- initialDamageWavenumberSinI = Stg_ComponentFactory_GetDouble( cf, self->name, "initialDamageWavenumberSinI", -1.0 );
- initialDamageWavenumberCosI = Stg_ComponentFactory_GetDouble( cf, self->name, "initialDamageWavenumberCosI", -1.0 );
- initialDamageWavenumberSinK = Stg_ComponentFactory_GetDouble( cf, self->name, "initialDamageWavenumberSinK", -1.0 );
- initialDamageWavenumberCosK = Stg_ComponentFactory_GetDouble( cf, self->name, "initialDamageWavenumberCosK", -1.0 );
- initialDamageFactor = Stg_ComponentFactory_GetDouble( cf, self->name, "initialDamageFactor", 1.0 );
- randomSeed = (long int) Stg_ComponentFactory_GetInt( cf, self->name, "randomSeed", 0 );
- initialStrainShape = Stg_ComponentFactory_ConstructByKey( cf, self->name, "initialStrainShape", Stg_Shape, False, data );
+ healingRate = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"healingRate", 0.0 );
+ softeningStrain = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"softeningStrain", HUGE_VAL );
+ initialDamageFraction = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"initialDamageFraction", 0.0 );
+ initialDamageWavenumber = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"initialDamageWavenumber", -1.0 );
+ initialDamageWavenumberSinI = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"initialDamageWavenumberSinI", -1.0 );
+ initialDamageWavenumberCosI = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"initialDamageWavenumberCosI", -1.0 );
+ initialDamageWavenumberSinK = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"initialDamageWavenumberSinK", -1.0 );
+ initialDamageWavenumberCosK = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"initialDamageWavenumberCosK", -1.0 );
+ initialDamageFactor = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"initialDamageFactor", 1.0 );
+ randomSeed = (long int ) Stg_ComponentFactory_GetInt( cf, self->name, (Dictionary_Entry_Key)"randomSeed", 0 );
+ initialStrainShape = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"initialStrainShape", Stg_Shape, False, data );
_StrainWeakening_Init(
self,
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/ViscosityFieldRheology.c
--- a/Rheology/src/ViscosityFieldRheology.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/ViscosityFieldRheology.c Thu Jan 14 17:41:33 2010 +1100
@@ -100,7 +100,7 @@ void _ViscosityFieldRheology_AssignFromX
/* Construct Parent */
_Rheology_AssignFromXML( self, cf, data );
- viscosityField = Stg_ComponentFactory_ConstructByName( cf, Stg_ComponentFactory_GetString( cf, self->name, "ViscosityField", "ViscosityField" ), FeVariable, True, data );
+ viscosityField = Stg_ComponentFactory_ConstructByName( cf, (Name)Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"ViscosityField", "ViscosityField" ), FeVariable, True, data );
_ViscosityFieldRheology_Init( self, viscosityField );
}
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/VonMises.c
--- a/Rheology/src/VonMises.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/VonMises.c Thu Jan 14 17:41:33 2010 +1100
@@ -149,22 +149,20 @@ void _VonMises_AssignFromXML( void* rheo
/* Construct Parent */
_YieldRheology_AssignFromXML( self, cf, data );
- strainRateField = Stg_ComponentFactory_ConstructByKey(
- cf, self->name, "StrainRateField", FeVariable, False, data );
- swarmStrainRate = Stg_ComponentFactory_ConstructByKey(
- cf, self->name, "swarmStrainRate", SwarmVariable, False, data );
+ strainRateField = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"StrainRateField", FeVariable, False, data );
+ swarmStrainRate = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"swarmStrainRate", SwarmVariable, False, data );
Journal_Firewall(
- (strainRateField || self->swarmStrainRate),
- Journal_Register( Error_Type, self->type ),
+ (strainRateField || self->swarmStrainRate ),
+ Journal_Register( Error_Type, (Name)self->type ),
"\n Error in component type %s, name '%s'.\n Must specify a strainRateField OR a swarmStrainRate, but not both. \n", self->type, self->name );
_VonMises_Init(
self,
strainRateField,
swarmStrainRate,
- Stg_ComponentFactory_GetDouble( cf, self->name, "cohesion", 0.0 ),
- Stg_ComponentFactory_GetDouble( cf, self->name, "cohesionAfterSoftening", 0.0 ),
- Stg_ComponentFactory_GetBool( cf, self->name, "strainRateSoftening", False ) );
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"cohesion", 0.0 ),
+ Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"cohesionAfterSoftening", 0.0 ),
+ Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"strainRateSoftening", False ) );
}
void _VonMises_Destroy( void* rheology, void* data ){
diff -r 55c0e5081456 -r d7d947597d6d Rheology/src/YieldRheology.c
--- a/Rheology/src/YieldRheology.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/src/YieldRheology.c Thu Jan 14 17:41:33 2010 +1100
@@ -92,24 +92,20 @@ void _YieldRheology_Init( YieldRheology*
* with the YieldRheology_Type
* We should then add the extension */
- handle = ExtensionManager_GetHandle( materialPointsSwarm->particleExtensionMgr, YieldRheology_Type );
+ handle = ExtensionManager_GetHandle( materialPointsSwarm->particleExtensionMgr, (Name)YieldRheology_Type );
- if ( handle == (ExtensionInfo_Index) -1 ) {
- handle = ExtensionManager_Add(materialPointsSwarm->particleExtensionMgr, YieldRheology_Type, sizeof(Particle_Bool));
+ if ( handle == (ExtensionInfo_Index) -1 ) {
+ handle = ExtensionManager_Add( materialPointsSwarm->particleExtensionMgr, (Name)YieldRheology_Type, sizeof(Particle_Bool));
/* Adding variable for plotting purpose */
- offset = (ArithPointer)
+ offset = (ArithPointer )
ExtensionManager_Get( materialPointsSwarm->particleExtensionMgr, NULL, handle );
- self->hasYieldedVariable = Swarm_NewScalarVariable(
- materialPointsSwarm,
- "HasYielded",
- offset,
- Variable_DataType_Char );
+ self->hasYieldedVariable = Swarm_NewScalarVariable( materialPointsSwarm, (Name)"HasYielded", offset, Variable_DataType_Char );
}
else {
/* if the variable has already been created - then just store the pointer */
- Name hasYieldedVariableName = Stg_Object_AppendSuffix( materialPointsSwarm, "HasYielded" );
+ Name hasYieldedVariableName = Stg_Object_AppendSuffix( materialPointsSwarm, (Name)"HasYielded" );
self->hasYieldedVariable = SwarmVariable_Register_GetByName( materialPointsSwarm->swarmVariable_Register, hasYieldedVariableName );
Memory_Free( hasYieldedVariableName );
}
@@ -148,23 +144,11 @@ void _YieldRheology_AssignFromXML( void*
_Rheology_AssignFromXML( self, cf, data );
- strainWeakening = Stg_ComponentFactory_ConstructByKey(
- cf,
- self->name,
- "StrainWeakening",
- StrainWeakening,
- False,
- data ) ;
+ strainWeakening = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"StrainWeakening", StrainWeakening, False, data ) ;
- materialPoints = Stg_ComponentFactory_ConstructByKey(
- cf,
- self->name,
- "MaterialPointsSwarm",
- MaterialPointsSwarm,
- False,
- data ) ;
+ materialPoints = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"MaterialPointsSwarm", MaterialPointsSwarm, False, data ) ;
- minVisc = Stg_ComponentFactory_GetDouble( cf, self->name, "minimumViscosity", 0.0 );
+ minVisc = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"minimumViscosity", 0.0 );
_YieldRheology_Init( self, strainWeakening, materialPoints, minVisc );
}
diff -r 55c0e5081456 -r d7d947597d6d Rheology/tests/ByerleeYieldingSuite.c
--- a/Rheology/tests/ByerleeYieldingSuite.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/tests/ByerleeYieldingSuite.c Thu Jan 14 17:41:33 2010 +1100
@@ -80,7 +80,7 @@ void ByerleeYieldingSuite_Check( FiniteE
Journal_Enable_AllTypedStream( True );
- stream = Journal_Register( Dump_Type, ByerleeYieldingSuite_testByerlee2D_Type );
+ stream = Journal_Register( Dump_Type, (Name)ByerleeYieldingSuite_testByerlee2D_Type );
if(context->rank == 0){
/* Don't do anything if nothing has yielded yet */
@@ -88,7 +88,7 @@ void ByerleeYieldingSuite_Check( FiniteE
return;
}
- /* Set the stream to point to our output file (so we can do a diff on it later) */
+ /* Set the stream to point to our output file (so we can do a diff on it later ) */
Stream_Enable( stream, True );
Stream_RedirectFile_WithPrependedPath( stream, context->outputPath, "testByerlee2D.dat" );
@@ -143,7 +143,7 @@ void ByerleeYieldingSuite_TestByerlee2D(
/* read in the xml input file */
pcu_filename_input( "testByerleeYieldCriterion.xml", xml_input );
cf = stgMainInitFromXML( xml_input, MPI_COMM_WORLD, NULL );
- context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
Stream_Enable( context->info, False );
Stream_Enable( context->debug, False );
Stream_Enable( context->verbose, False );
@@ -152,10 +152,10 @@ void ByerleeYieldingSuite_TestByerlee2D(
stgMainBuildAndInitialise( cf );
/* get pointer to the mesh */
- globalSelf.mesh = Stg_ComponentFactory_ConstructByName( cf, "linearMesh", FeMesh, True, NULL );
+ globalSelf.mesh = Stg_ComponentFactory_ConstructByName( cf, (Name)"linearMesh", FeMesh, True, NULL );
/* Get a pointer the yield rheology that we are trying to test */
- yieldRheology = (YieldRheology*) LiveComponentRegister_Get( context->CF->LCRegister, "yieldRheology" );
+ yieldRheology = (YieldRheology* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"yieldRheology" );
/* Store the pointer to the original 'HasYielded' function */
globalSelf.realHasYieldedFunction = yieldRheology->_hasYielded;
diff -r 55c0e5081456 -r d7d947597d6d Rheology/tests/ConstitutiveMatrixSuite.c
--- a/Rheology/tests/ConstitutiveMatrixSuite.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/tests/ConstitutiveMatrixSuite.c Thu Jan 14 17:41:33 2010 +1100
@@ -39,9 +39,9 @@ void testConstitutiveMatrix( FiniteEleme
ConstitutiveMatrix* constitutiveMatrix;
Journal_Enable_AllTypedStream( True );
- stream = Journal_Register( Info_Type, "testConstitutiveMatrix" );
+ stream = Journal_Register( Info_Type, (Name)"testConstitutiveMatrix" );
- constitutiveMatrix = (ConstitutiveMatrix*) LiveComponentRegister_Get( context->CF->LCRegister, "constitutiveMatrix" );
+ constitutiveMatrix = (ConstitutiveMatrix* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"constitutiveMatrix" );
/* Create Constitutive Matrix */
Stream_RedirectFile_WithPrependedPath( stream, context->outputPath, "output.dat" );
@@ -97,7 +97,7 @@ void ConstitutiveMatrixSuite_CartesianMa
/* read in the xml input file */
pcu_filename_input( "testConstitutiveMatrix_Cartesian2D.xml", xml_input );
cf = stgMainInitFromXML( xml_input, MPI_COMM_WORLD, NULL );
- context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
data->context = context;
dictionary = context->dictionary;
diff -r 55c0e5081456 -r d7d947597d6d Rheology/tests/DirectorSuite.c
--- a/Rheology/tests/DirectorSuite.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/tests/DirectorSuite.c Thu Jan 14 17:41:33 2010 +1100
@@ -54,11 +54,11 @@ void _Director_Intermediate_Replace( voi
void _Director_Intermediate_Replace( void* director, Index lParticle_I ) {}
void test( UnderworldContext* context ) {
- Director* director = (Director*)LiveComponentRegister_Get( context->CF->LCRegister, "director" );
+ Director* director = (Director*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)"director" );
Particle_Index lParticle_I;
GlobalParticle* particle;
double time = context->currentTime + context->dt;
- Swarm* swarm = (Swarm*)LiveComponentRegister_Get( context->CF->LCRegister, "materialSwarm" );
+ Swarm* swarm = (Swarm* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)"materialSwarm" );
XYZ normal;
double error = 0.0;
double angle = 0.5 * M_PI - atan(1.0/(2.0*time) );
@@ -68,7 +68,7 @@ void test( UnderworldContext* context )
int ierr;
for ( lParticle_I = 0 ; lParticle_I < swarm->particleLocalCount ; lParticle_I++ ) {
- particle = (GlobalParticle*)Swarm_ParticleAt( swarm, lParticle_I );
+ particle = (GlobalParticle* )Swarm_ParticleAt( swarm, lParticle_I );
SwarmVariable_ValueAt( director->directorSwarmVariable, lParticle_I, normal );
angleDirector = atan(-normal[1]/normal[0]);
error += fabs( angleDirector - angle );
@@ -83,7 +83,7 @@ void test( UnderworldContext* context )
}
void testRandom( UnderworldContext* context ) {
- AlignmentSwarmVariable* alignment = (AlignmentSwarmVariable*) LiveComponentRegister_Get( context->CF->LCRegister, "alignment" );
+ AlignmentSwarmVariable* alignment = (AlignmentSwarmVariable*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"alignment" );
Director* director;
Particle_Index lParticle_I;
GlobalParticle* particle;
@@ -160,7 +160,7 @@ void testRandom( UnderworldContext* cont
#define ANGLE_ERROR 1e-7
void testPerMaterial( UnderworldContext* context ) {
- AlignmentSwarmVariable* alignment = (AlignmentSwarmVariable*) LiveComponentRegister_Get( context->CF->LCRegister, "alignment" );
+ AlignmentSwarmVariable* alignment = (AlignmentSwarmVariable*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"alignment" );
Materials_Register* materials_Register = context->materials_Register;
Director* director;
Particle_Index lParticle_I;
@@ -174,7 +174,7 @@ void testPerMaterial( UnderworldContext*
swarm = alignment->swarm;
director = alignment->director;
- materialsCount = Materials_Register_GetCount( materials_Register);
+ materialsCount = Materials_Register_GetCount( materials_Register );
/* construct test for testDirectorPerMaterial.xml */
/* assume a direction for each material and check that */
@@ -208,7 +208,7 @@ void testPerMaterial( UnderworldContext*
}
void testPerMaterial2( UnderworldContext* context ) {
- AlignmentSwarmVariable* alignment = (AlignmentSwarmVariable*) LiveComponentRegister_Get( context->CF->LCRegister, "alignment" );
+ AlignmentSwarmVariable* alignment = (AlignmentSwarmVariable*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"alignment" );
Materials_Register* materials_Register = context->materials_Register;
Director* director;
Particle_Index lParticle_I;
@@ -222,7 +222,7 @@ void testPerMaterial2( UnderworldContext
swarm = alignment->swarm;
director = alignment->director;
- materialsCount = Materials_Register_GetCount( materials_Register);
+ materialsCount = Materials_Register_GetCount( materials_Register );
matDirectionVectors = Memory_Alloc_Array(XYZ, DIR_TEST_NUM_MAT, "materialDirectionVectors");
@@ -273,7 +273,7 @@ void DirectorSuite_Test( DirectorSuiteDa
the intermediate re-normalisation of the director vectors */
pcu_filename_input( "testDirector.xml", xml_input );
cf = stgMainInitFromXML( xml_input, MPI_COMM_WORLD, NULL );
- context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
Stream_Enable( context->info, False );
Stream_Enable( context->verbose, False );
Stream_Enable( context->debug, False );
@@ -281,7 +281,7 @@ void DirectorSuite_Test( DirectorSuiteDa
ContextEP_Append( context, AbstractContext_EP_FrequentOutput, test );
EP_AppendClassHook( Context_GetEntryPoint( context, FiniteElementContext_EP_CalcDt ), dt, context );
stgMainBuildAndInitialise( cf );
- director = (Director*) LiveComponentRegister_Get( context->CF->LCRegister, "director" );
+ director = (Director*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"director" );
/* we disable the intermediate director step, which normalises the director. this is done so that we can have an analytic solution, but a more inclusive test
would be a good idea */
director->_intermediate = _Director_Intermediate_Replace;
@@ -296,7 +296,7 @@ void DirectorSuite_TestRandom( DirectorS
pcu_filename_input( "testDirectorRandom.xml", xml_input );
cf = stgMainInitFromXML( xml_input, MPI_COMM_WORLD, NULL );
- context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
Stream_Enable( context->info, False );
Stream_Enable( context->verbose, False );
Stream_Enable( context->debug, False );
@@ -314,7 +314,7 @@ void DirectorSuite_TestPerMaterial( Dire
pcu_filename_input( "testDirectorPerMaterial.xml", xml_input );
cf = stgMainInitFromXML( xml_input, MPI_COMM_WORLD, NULL );
- context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
Stream_Enable( context->info, False );
Stream_Enable( context->verbose, False );
Stream_Enable( context->debug, False );
@@ -332,7 +332,7 @@ void DirectorSuite_TestPerMaterial2( Dir
pcu_filename_input( "testDirectorPerMaterial2.xml", xml_input );
cf = stgMainInitFromXML( xml_input, MPI_COMM_WORLD, NULL );
- context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
Stream_Enable( context->info, False );
Stream_Enable( context->verbose, False );
Stream_Enable( context->debug, False );
diff -r 55c0e5081456 -r d7d947597d6d Rheology/tests/LateralViscosityAnalytic/LateralViscosityAnalytic.c
--- a/Rheology/tests/LateralViscosityAnalytic/LateralViscosityAnalytic.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/tests/LateralViscosityAnalytic/LateralViscosityAnalytic.c Thu Jan 14 17:41:33 2010 +1100
@@ -96,13 +96,13 @@ void LateralViscosityAnalytic_Temperatur
x = coord[ I_AXIS ] - min[ I_AXIS ];
y = coord[ J_AXIS ] - min[ J_AXIS ];
- wavenumberX = Dictionary_GetInt_WithDefault( dictionary, "wavenumberX", 1 );
- wavenumberY = Dictionary_GetInt_WithDefault( dictionary, "wavenumberY", 1 );
+ wavenumberX = Dictionary_GetInt_WithDefault( dictionary, (Dictionary_Entry_Key)"wavenumberX", 1 );
+ wavenumberY = Dictionary_GetInt_WithDefault( dictionary, (Dictionary_Entry_Key)"wavenumberY", 1 );
kx = wavenumberX * M_PI/ L;
ky = wavenumberY * M_PI;
- *result = sin( ky * y ) * cos( kx * x );
+ *result = sin( ky * y ) * cos( kx * x );
}
void _LateralViscosityAnalytic_VelocityFunction( void* analyticSolution, FeVariable* analyticFeVariable, double* coord, double* velocity ) {
@@ -411,17 +411,17 @@ void _LateralViscosityAnalytic_AssignFro
/* Construct Parent */
_AnalyticSolution_AssignFromXML( self, cf, data );
- context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
/* Add temperature initial condition */
- condFunc = ConditionFunction_New( LateralViscosityAnalytic_TemperatureIC, "LateralViscosityAnalytic_TemperatureIC" );
+ condFunc = ConditionFunction_New( LateralViscosityAnalytic_TemperatureIC, (Name)"LateralViscosityAnalytic_TemperatureIC" );
ConditionFunction_Register_Add( context->condFunc_Register, condFunc );
/* Create Analytic Fields */
- self->velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ self->velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, self->velocityField, _LateralViscosityAnalytic_VelocityFunction );
- self->beta = Stg_ComponentFactory_GetRootDictDouble( cf, "beta", 0.0 );
+ self->beta = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"beta", 0.0 );
self->wavenumberX = Stg_ComponentFactory_GetRootDictInt( cf, "wavenumberX", 1 );
self->wavenumberY = Stg_ComponentFactory_GetRootDictInt( cf, "wavenumberY", 1 );
}
@@ -454,7 +454,7 @@ void* _LateralViscosityAnalytic_DefaultN
}
Index Underworld_LateralViscosityAnalytic_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, LateralViscosityAnalytic_Type, "0", _LateralViscosityAnalytic_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, LateralViscosityAnalytic_Type, (Name)"0", _LateralViscosityAnalytic_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d Rheology/tests/NonNewtonianShearSolution/NonNewtonianShearSolution.c
--- a/Rheology/tests/NonNewtonianShearSolution/NonNewtonianShearSolution.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/tests/NonNewtonianShearSolution/NonNewtonianShearSolution.c Thu Jan 14 17:41:33 2010 +1100
@@ -96,8 +96,8 @@ void NonNewtonianShearSolution_UpdateVel
void NonNewtonianShearSolution_VelocityBC( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) {
FiniteElementContext * context = (FiniteElementContext*)_context;
- NonNewtonianShearSolution* self = (NonNewtonianShearSolution*) LiveComponentRegister_Get( context->CF->LCRegister, NonNewtonianShearSolution_Type );
- double* result = (double*) _result;
+ NonNewtonianShearSolution* self = (NonNewtonianShearSolution*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)NonNewtonianShearSolution_Type );
+ double* result = (double* ) _result;
*result = self->velocityTopOfBox;
}
@@ -111,33 +111,33 @@ void _NonNewtonianShearSolution_AssignFr
context = Stg_CheckType( self->context, FiniteElementContext );
ConditionFunction_Register_Add( context->condFunc_Register,
- ConditionFunction_New( NonNewtonianShearSolution_VelocityBC, "ShearTrigger") );
+ ConditionFunction_New( NonNewtonianShearSolution_VelocityBC, (Name)"ShearTrigger") );
/* Create Analytic Velocity Field */
- self->velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ self->velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, self->velocityField, NonNewtonianShearSolution_VelocityFunction );
/* Create Analytic Strain Rate Field */
- self->strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, True, data );
+ self->strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, self->strainRateField, NonNewtonianShearSolution_StrainRateFunction );
/* Create Analytic Stress Field */
- self->stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, True, data );
+ self->stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, self->stressField, NonNewtonianShearSolution_StressFunction );
/* Create Analytic Viscosity Field */
- self->viscosityField = Stg_ComponentFactory_ConstructByName( cf, "ViscosityField", FeVariable, True, data );
+ self->viscosityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"ViscosityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, self->viscosityField, NonNewtonianShearSolution_ViscosityFunction );
- self->materialViscosity = Stg_ComponentFactory_ConstructByName( cf, "layerViscosity", MaterialViscosity, True, data );
+ self->materialViscosity = Stg_ComponentFactory_ConstructByName( cf, (Name)"layerViscosity", MaterialViscosity, True, data );
self->nonNewtonianRheology =
- Stg_ComponentFactory_ConstructByName( cf, "nonNewtonianRheology", NonNewtonian, True, data );
- self->mesh = Stg_ComponentFactory_ConstructByName( cf, "linearMesh", Mesh, True, data );
+ Stg_ComponentFactory_ConstructByName( cf, (Name)"nonNewtonianRheology", NonNewtonian, True, data );
+ self->mesh = Stg_ComponentFactory_ConstructByName( cf, (Name)"linearMesh", Mesh, True, data );
/* Set Velocity Stuff */
EP_AppendClassHook( Context_GetEntryPoint( context, AbstractContext_EP_UpdateClass ),
NonNewtonianShearSolution_UpdateVelocityBC, self );
- self->velocityTopOfBox = Stg_ComponentFactory_GetRootDictDouble( cf, "velocityTopOfBox", 0.5 );
+ self->velocityTopOfBox = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"velocityTopOfBox", 0.5 );
}
void _NonNewtonianShearSolution_Build( void* analyticSolution, void* data ) {
@@ -171,8 +171,7 @@ void* _NonNewtonianShearSolution_Default
/* This function is automatically run by StGermain when this plugin is loaded. The name must be "<plugin-name>_Register". */
Index Underworld_NonNewtonianShearSolution_Register( PluginsManager* pluginsManager ) {
/* A plugin is only properly registered once it returns the handle provided when submitting a codelet to StGermain. */
- return PluginsManager_Submit( pluginsManager, NonNewtonianShearSolution_Type, "0",
- _NonNewtonianShearSolution_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, NonNewtonianShearSolution_Type, (Name)"0", _NonNewtonianShearSolution_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d Rheology/tests/ViscousSuite.c
--- a/Rheology/tests/ViscousSuite.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/tests/ViscousSuite.c Thu Jan 14 17:41:33 2010 +1100
@@ -47,16 +47,16 @@ void ViscousSuite_ArrheniusStiffnessMatr
/* read in the xml input file */
pcu_filename_input( "testArrhenius2D.xml", xml_input );
cf = stgMainInitFromXML( xml_input, MPI_COMM_WORLD, NULL );
- context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
data->context = context;
dictionary = context->dictionary;
stgMainBuildAndInitialise( cf );
/* Assemble */
- stiffnessMatrix = (StiffnessMatrix*) LiveComponentRegister_Get( context->CF->LCRegister, "k_matrix" );
- sle = (SystemLinearEquations*) LiveComponentRegister_Get( context->CF->LCRegister, "stokesEqn" );
- assert( stiffnessMatrix );
+ stiffnessMatrix = (StiffnessMatrix* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"k_matrix" );
+ sle = (SystemLinearEquations* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"stokesEqn" );
+ assert( stiffnessMatrix );
StiffnessMatrix_Assemble( stiffnessMatrix, False, sle, context );
stiffnessMatrix = stiffnessMatrix;
@@ -67,8 +67,8 @@ void ViscousSuite_ArrheniusStiffnessMatr
both matricies are built using only an Arrhenius rheology
*/
- filename = Dictionary_GetString( dictionary, "StiffnessMatrixCompareFilename" );
- tolerance = Dictionary_GetDouble_WithDefault( dictionary, "StiffnessMatrixCompareTolerance", 1e-4 );
+ filename = Dictionary_GetString( dictionary, (Dictionary_Entry_Key)"StiffnessMatrixCompareFilename" );
+ tolerance = Dictionary_GetDouble_WithDefault( dictionary, (Dictionary_Entry_Key)"StiffnessMatrixCompareTolerance", 1e-4 );
pcu_filename_expected( filename, expected_file );
PetscViewerBinaryOpen( context->communicator, expected_file, FILE_MODE_READ, &expViewer );
@@ -129,16 +129,16 @@ void ViscousSuite_FrankKamenetskiiStiffn
/* read in the xml input file */
pcu_filename_input( "testFrankKamenetskii2D.xml", xml_input );
cf = stgMainInitFromXML( xml_input, MPI_COMM_WORLD, NULL );
- context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
data->context = context;
dictionary = context->dictionary;
stgMainBuildAndInitialise( cf );
/* Assemble */
- stiffnessMatrix = (StiffnessMatrix*) LiveComponentRegister_Get( context->CF->LCRegister, "k_matrix" );
- sle = (SystemLinearEquations*) LiveComponentRegister_Get( context->CF->LCRegister, "stokesEqn" );
- assert( stiffnessMatrix );
+ stiffnessMatrix = (StiffnessMatrix* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"k_matrix" );
+ sle = (SystemLinearEquations* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"stokesEqn" );
+ assert( stiffnessMatrix );
StiffnessMatrix_Assemble( stiffnessMatrix, False, sle, context );
stiffnessMatrix = stiffnessMatrix;
@@ -149,8 +149,8 @@ void ViscousSuite_FrankKamenetskiiStiffn
both matricies are built using only an Arrhenius rheology
*/
- filename = Dictionary_GetString( dictionary, "StiffnessMatrixCompareFilename" );
- tolerance = Dictionary_GetDouble_WithDefault( dictionary, "StiffnessMatrixCompareTolerance", 1e-4 );
+ filename = Dictionary_GetString( dictionary, (Dictionary_Entry_Key)"StiffnessMatrixCompareFilename" );
+ tolerance = Dictionary_GetDouble_WithDefault( dictionary, (Dictionary_Entry_Key)"StiffnessMatrixCompareTolerance", 1e-4 );
pcu_filename_expected( filename, expected_file );
PetscViewerBinaryOpen( context->communicator, expected_file, FILE_MODE_READ, &expViewer );
@@ -211,16 +211,16 @@ void ViscousSuite_MaterialViscosityStiff
/* read in the xml input file */
pcu_filename_input( "testMaterialViscosity2D.xml", xml_input );
cf = stgMainInitFromXML( xml_input, MPI_COMM_WORLD, NULL );
- context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
data->context = context;
dictionary = context->dictionary;
stgMainBuildAndInitialise( cf );
/* Assemble */
- stiffnessMatrix = (StiffnessMatrix*) LiveComponentRegister_Get( context->CF->LCRegister, "k_matrix" );
- sle = (SystemLinearEquations*) LiveComponentRegister_Get( context->CF->LCRegister, "stokesEqn" );
- assert( stiffnessMatrix );
+ stiffnessMatrix = (StiffnessMatrix* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"k_matrix" );
+ sle = (SystemLinearEquations* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"stokesEqn" );
+ assert( stiffnessMatrix );
StiffnessMatrix_Assemble( stiffnessMatrix, False, sle, context );
stiffnessMatrix = stiffnessMatrix;
@@ -231,8 +231,8 @@ void ViscousSuite_MaterialViscosityStiff
both matricies are built using only an Arrhenius rheology
*/
- filename = Dictionary_GetString( dictionary, "StiffnessMatrixCompareFilename" );
- tolerance = Dictionary_GetDouble_WithDefault( dictionary, "StiffnessMatrixCompareTolerance", 1e-4 );
+ filename = Dictionary_GetString( dictionary, (Dictionary_Entry_Key)"StiffnessMatrixCompareFilename" );
+ tolerance = Dictionary_GetDouble_WithDefault( dictionary, (Dictionary_Entry_Key)"StiffnessMatrixCompareTolerance", 1e-4 );
pcu_filename_expected( filename, expected_file );
PetscViewerBinaryOpen( context->communicator, expected_file, FILE_MODE_READ, &expViewer );
@@ -292,16 +292,16 @@ void ViscousSuite_ArrheniusStiffnessMatr
/* read in the xml input file */
pcu_filename_input( "testArrhenius2D-DualMesh.xml", xml_input );
cf = stgMainInitFromXML( xml_input, MPI_COMM_WORLD, NULL );
- context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
data->context = context;
dictionary = context->dictionary;
stgMainBuildAndInitialise( cf );
/* Assemble */
- stiffnessMatrix = (StiffnessMatrix*) LiveComponentRegister_Get( context->CF->LCRegister, "k_matrix" );
- sle = (SystemLinearEquations*) LiveComponentRegister_Get( context->CF->LCRegister, "stokesEqn" );
- assert( stiffnessMatrix );
+ stiffnessMatrix = (StiffnessMatrix* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"k_matrix" );
+ sle = (SystemLinearEquations* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"stokesEqn" );
+ assert( stiffnessMatrix );
StiffnessMatrix_Assemble( stiffnessMatrix, False, sle, context );
stiffnessMatrix = stiffnessMatrix;
@@ -312,8 +312,8 @@ void ViscousSuite_ArrheniusStiffnessMatr
both matricies are built using only an Arrhenius rheology
*/
- filename = Dictionary_GetString( dictionary, "StiffnessMatrixCompareFilename" );
- tolerance = Dictionary_GetDouble_WithDefault( dictionary, "StiffnessMatrixCompareTolerance", 1e-4 );
+ filename = Dictionary_GetString( dictionary, (Dictionary_Entry_Key)"StiffnessMatrixCompareFilename" );
+ tolerance = Dictionary_GetDouble_WithDefault( dictionary, (Dictionary_Entry_Key)"StiffnessMatrixCompareTolerance", 1e-4 );
pcu_filename_expected( filename, expected_file );
PetscViewerBinaryOpen( context->communicator, expected_file, FILE_MODE_READ, &expViewer );
@@ -374,16 +374,16 @@ void ViscousSuite_FrankKamenetskiiStiffn
/* read in the xml input file */
pcu_filename_input( "testFrankKamenetskii2D-DualMesh.xml", xml_input );
cf = stgMainInitFromXML( xml_input, MPI_COMM_WORLD, NULL );
- context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
data->context = context;
dictionary = context->dictionary;
stgMainBuildAndInitialise( cf );
/* Assemble */
- stiffnessMatrix = (StiffnessMatrix*) LiveComponentRegister_Get( context->CF->LCRegister, "k_matrix" );
- sle = (SystemLinearEquations*) LiveComponentRegister_Get( context->CF->LCRegister, "stokesEqn" );
- assert( stiffnessMatrix );
+ stiffnessMatrix = (StiffnessMatrix* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"k_matrix" );
+ sle = (SystemLinearEquations* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"stokesEqn" );
+ assert( stiffnessMatrix );
StiffnessMatrix_Assemble( stiffnessMatrix, False, sle, context );
stiffnessMatrix = stiffnessMatrix;
@@ -394,8 +394,8 @@ void ViscousSuite_FrankKamenetskiiStiffn
both matricies are built using only an Arrhenius rheology
*/
- filename = Dictionary_GetString( dictionary, "StiffnessMatrixCompareFilename" );
- tolerance = Dictionary_GetDouble_WithDefault( dictionary, "StiffnessMatrixCompareTolerance", 1e-4 );
+ filename = Dictionary_GetString( dictionary, (Dictionary_Entry_Key)"StiffnessMatrixCompareFilename" );
+ tolerance = Dictionary_GetDouble_WithDefault( dictionary, (Dictionary_Entry_Key)"StiffnessMatrixCompareTolerance", 1e-4 );
pcu_filename_expected( filename, expected_file );
PetscViewerBinaryOpen( context->communicator, expected_file, FILE_MODE_READ, &expViewer );
diff -r 55c0e5081456 -r d7d947597d6d Rheology/tests/VonMisesYieldingSuite.c
--- a/Rheology/tests/VonMisesYieldingSuite.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/tests/VonMisesYieldingSuite.c Thu Jan 14 17:41:33 2010 +1100
@@ -75,7 +75,7 @@ void testVonMisesYielding_HasYielded(
void Underworld_testVonMisesYielding_Check( FiniteElementContext* context ) {
- Stream* stream = Journal_Register( Dump_Type, Underworld_testVonMisesYielding_Type );
+ Stream* stream = Journal_Register( Dump_Type, (Name)Underworld_testVonMisesYielding_Type );
if(context->rank == 0){
/* Don't do anything if nothing has yielded yet */
@@ -83,7 +83,7 @@ void Underworld_testVonMisesYielding_Che
return;
}
- /* Set the stream to point to our output file (so we can do a diff on it later) */
+ /* Set the stream to point to our output file (so we can do a diff on it later ) */
Stream_Enable( stream, True );
Stream_RedirectFile_WithPrependedPath( stream, context->outputPath, "testVonMisesYielding.dat" );
@@ -138,16 +138,16 @@ void VonMisesYieldingSuite_VonMises2D( V
/* read in the xml input file */
pcu_filename_input( "testVonMisesYieldCriterion.xml", xml_input );
cf = stgMainInitFromXML( xml_input, MPI_COMM_WORLD, NULL );
- context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, "context" );
+ context = (UnderworldContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
dictionary = context->dictionary;
- stgMainBuildAndInitialise( cf );
+ stgMainBuildAndInitialise( cf );
/* get pointer to the mesh */
- globalSelf.mesh = Stg_ComponentFactory_ConstructByName( cf, "linearMesh", FeMesh, True, NULL );
+ globalSelf.mesh = Stg_ComponentFactory_ConstructByName( cf, (Name)"linearMesh", FeMesh, True, NULL );
/* Get a pointer the yield rheology that we are trying to test */
- yieldRheology = (YieldRheology*) LiveComponentRegister_Get( context->CF->LCRegister, "yieldRheology" );
+ yieldRheology = (YieldRheology* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"yieldRheology" );
/* Store the pointer to the original 'HasYielded' function */
globalSelf.realHasYieldedFunction = yieldRheology->_hasYielded;
diff -r 55c0e5081456 -r d7d947597d6d Rheology/tests/testYieldCriterion/testYieldCriterion.c
--- a/Rheology/tests/testYieldCriterion/testYieldCriterion.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Rheology/tests/testYieldCriterion/testYieldCriterion.c Thu Jan 14 17:41:33 2010 +1100
@@ -35,9 +35,7 @@ void testYieldCriterion_HasYielded(
Dimension_Index dim_I;
/* Get pointer to plugin struct */
- self = (Underworld_testYieldCriterion*) LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_testYieldCriterion_Type );
+ self = (Underworld_testYieldCriterion*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_testYieldCriterion_Type );
/* Call real 'HasYielded' function */
self->realHasYieldedFunction(
@@ -66,13 +64,11 @@ double Underworld_testYieldCriterion_dt(
}
void Underworld_testYieldCriterion_Check( FiniteElementContext* context ) {
- Stream* stream = Journal_Register( Dump_Type, Underworld_testYieldCriterion_Type );
+ Stream* stream = Journal_Register( Dump_Type, (Name)Underworld_testYieldCriterion_Type );
Underworld_testYieldCriterion* self;
/* Get pointer to plugin struct */
- self = (Underworld_testYieldCriterion*) LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_testYieldCriterion_Type );
+ self = (Underworld_testYieldCriterion* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_testYieldCriterion_Type );
assert( self );
/* Don't do anything if nothing has yielded yet */
@@ -83,7 +79,7 @@ void Underworld_testYieldCriterion_Check
/* Get Calculation to stop */
context->maxTimeSteps = context->timeStep;
- /* Set the stream to point to our output file (so we can do a diff on it later) */
+ /* Set the stream to point to our output file (so we can do a diff on it later ) */
Stream_Enable( stream, True );
Stream_RedirectFile_WithPrependedPath( stream, context->outputPath, "testYieldCriterion.dat" );
@@ -101,18 +97,16 @@ void _Underworld_testYieldCriterion_Assi
YieldRheology* yieldRheology;
Underworld_testYieldCriterion* self;
- context = Stg_ComponentFactory_ConstructByName( cf, "context", FiniteElementContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", FiniteElementContext, True, data );
/* Get pointer to plugin struct */
- self = (Underworld_testYieldCriterion*) LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_testYieldCriterion_Type );
+ self = (Underworld_testYieldCriterion* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_testYieldCriterion_Type );
/* get pointer to the mesh */
- self->mesh = Stg_ComponentFactory_ConstructByName( cf, "linearMesh", FeMesh, True, data );
+ self->mesh = Stg_ComponentFactory_ConstructByName( cf, (Name)"linearMesh", FeMesh, True, data );
/* Get a pointer the yield rheology that we are trying to test */
- yieldRheology = (YieldRheology*) LiveComponentRegister_Get( context->CF->LCRegister, "yieldRheology" );
+ yieldRheology = (YieldRheology* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"yieldRheology" );
/* Store the pointer to the original 'HasYielded' function */
self->realHasYieldedFunction = yieldRheology->_hasYielded;
@@ -153,7 +147,7 @@ void* _Underworld_testYieldCriterion_Def
}
Index Underworld_testYieldCriterion_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_testYieldCriterion_Type, "0", _Underworld_testYieldCriterion_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_testYieldCriterion_Type, (Name)"0", _Underworld_testYieldCriterion_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/DepthDependentAnalytic3D/DepthDependentAnalytic3D.c
--- a/SysTest/AnalyticPlugins/DepthDependentAnalytic3D/DepthDependentAnalytic3D.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/DepthDependentAnalytic3D/DepthDependentAnalytic3D.c Thu Jan 14 17:41:33 2010 +1100
@@ -198,7 +198,7 @@ void DepthDependentAnalytic3D_Temperatur
FeMesh* mesh = temperatureField->feMesh;
double* temperature = (double*) _result;
double* coord;
- DepthDependentAnalytic3D* self = Stg_ComponentFactory_ConstructByName( context->CF, DepthDependentAnalytic3D_Type, DepthDependentAnalytic3D, True, context );
+ DepthDependentAnalytic3D* self = Stg_ComponentFactory_ConstructByName( context->CF, (Name)DepthDependentAnalytic3D_Type, DepthDependentAnalytic3D, True, context );
/* Find coordinate of node */
coord = Mesh_GetVertex( mesh, node_lI );
@@ -212,7 +212,7 @@ void DepthDependentAnalytic3D_PressureIC
FeMesh* mesh = PressureField->feMesh;
double* pressure = (double*) _result;
double* coord;
- DepthDependentAnalytic3D* self = Stg_ComponentFactory_ConstructByName( context->CF, DepthDependentAnalytic3D_Type, DepthDependentAnalytic3D, True, context );
+ DepthDependentAnalytic3D* self = Stg_ComponentFactory_ConstructByName( context->CF, (Name)DepthDependentAnalytic3D_Type, DepthDependentAnalytic3D, True, context );
/* Find coordinate of node */
coord = Mesh_GetVertex( mesh, node_lI );
@@ -229,11 +229,11 @@ void _DepthDependentAnalytic3D_AssignFro
_FieldTest_AssignFromXML( self, cf, data );
/* Add temperature initial condition */
- condFunc = ConditionFunction_New( DepthDependentAnalytic3D_TemperatureIC, "DepthDependentAnalytic3D_TemperatureIC" );
+ condFunc = ConditionFunction_New( DepthDependentAnalytic3D_TemperatureIC, (Name)"DepthDependentAnalytic3D_TemperatureIC" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
/* Add pressure initial condition */
- condFunc = ConditionFunction_New( DepthDependentAnalytic3D_PressureIC, "DepthDependentAnalytic3D_PressureIC" );
+ condFunc = ConditionFunction_New( DepthDependentAnalytic3D_PressureIC, (Name)"DepthDependentAnalytic3D_PressureIC" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
/* Create Analytic Fields */
@@ -244,7 +244,7 @@ void _DepthDependentAnalytic3D_AssignFro
self->_analyticSolutionList[3] = _DepthDependentAnalytic3D_ViscosityFunction;
/* Setup Viscosity Functions */
- viscosityType = Stg_ComponentFactory_GetRootDictString( cf, "ViscosityType", "Isoviscous" );
+ viscosityType = Stg_ComponentFactory_GetRootDictString( cf, (Dictionary_Entry_Key)"ViscosityType", "Isoviscous" );
if ( strcasecmp( viscosityType, "Isoviscous" ) == 0 ) {
self->viscosityFunc = DepthDependentAnalytic3D_ViscosityFunc_Isoviscous;
self->viscosityDerivativeFunc = DepthDependentAnalytic3D_ViscosityDerivativeFunc_Isoviscous;
@@ -266,8 +266,8 @@ void _DepthDependentAnalytic3D_AssignFro
self->viscosity2ndDerivativeFunc = DepthDependentAnalytic3D_Viscosity2ndDerivativeFunc_Exponential2;
}
- self->Ra = Stg_ComponentFactory_GetRootDictDouble( cf, "Ra", 0.0 );
- self->V0 = Stg_ComponentFactory_GetRootDictDouble( cf, "V0", 0.0 );
+ self->Ra = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"Ra", 0.0 );
+ self->V0 = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"V0", 0.0 );
}
void _DepthDependentAnalytic3D_Build( void* analyticSolution, void* data ) {
@@ -298,7 +298,7 @@ void* _DepthDependentAnalytic3D_DefaultN
}
Index Underworld_DepthDependentAnalytic3D_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, DepthDependentAnalytic3D_Type, "0", _DepthDependentAnalytic3D_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, DepthDependentAnalytic3D_Type, (Name)"0", _DepthDependentAnalytic3D_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/LateralViscosityAnalytic/LateralViscosityAnalytic.c
--- a/SysTest/AnalyticPlugins/LateralViscosityAnalytic/LateralViscosityAnalytic.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/LateralViscosityAnalytic/LateralViscosityAnalytic.c Thu Jan 14 17:41:33 2010 +1100
@@ -96,13 +96,13 @@ void LateralViscosityAnalytic_Temperatur
x = coord[ I_AXIS ] - min[ I_AXIS ];
y = coord[ J_AXIS ] - min[ J_AXIS ];
- wavenumberX = Dictionary_GetInt_WithDefault( dictionary, "wavenumberX", 1 );
- wavenumberY = Dictionary_GetInt_WithDefault( dictionary, "wavenumberY", 1 );
+ wavenumberX = Dictionary_GetInt_WithDefault( dictionary, (Dictionary_Entry_Key)"wavenumberX", 1 );
+ wavenumberY = Dictionary_GetInt_WithDefault( dictionary, (Dictionary_Entry_Key)"wavenumberY", 1 );
kx = wavenumberX * M_PI/ L;
ky = wavenumberY * M_PI;
- *result = sin( ky * y ) * cos( kx * x );
+ *result = sin( ky * y ) * cos( kx * x );
}
void _LateralViscosityAnalytic_VelocityFunction( void* analyticSolution, double* coord, double* velocity ) {
@@ -407,13 +407,13 @@ void _LateralViscosityAnalytic_AssignFro
_FieldTest_AssignFromXML( self, cf, data );
/* Add temperature initial condition */
- condFunc = ConditionFunction_New( LateralViscosityAnalytic_TemperatureIC, "LateralViscosityAnalytic_TemperatureIC" );
+ condFunc = ConditionFunction_New( LateralViscosityAnalytic_TemperatureIC, (Name)"LateralViscosityAnalytic_TemperatureIC" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
/* Create Analytic Fields */
- self->velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ self->velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
- self->beta = Stg_ComponentFactory_GetRootDictDouble( cf, "beta", 0.0 );
+ self->beta = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"beta", 0.0 );
self->wavenumberX = Stg_ComponentFactory_GetRootDictInt( cf, "wavenumberX", 1 );
self->wavenumberY = Stg_ComponentFactory_GetRootDictInt( cf, "wavenumberY", 1 );
}
@@ -464,7 +464,7 @@ void* _LateralViscosityAnalytic_DefaultN
}
Index Underworld_LateralViscosityAnalytic_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, LateralViscosityAnalytic_Type, "0", _LateralViscosityAnalytic_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, LateralViscosityAnalytic_Type, (Name)"0", _LateralViscosityAnalytic_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/NonNewtonianShearSolution/NonNewtonianShearSolution.c
--- a/SysTest/AnalyticPlugins/NonNewtonianShearSolution/NonNewtonianShearSolution.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/NonNewtonianShearSolution/NonNewtonianShearSolution.c Thu Jan 14 17:41:33 2010 +1100
@@ -98,8 +98,8 @@ void NonNewtonianShearSolution_UpdateVel
void NonNewtonianShearSolution_VelocityBC( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) {
FiniteElementContext* context = (FiniteElementContext*)_context;
- NonNewtonianShearSolution* self = (NonNewtonianShearSolution*) LiveComponentRegister_Get( context->CF->LCRegister, NonNewtonianShearSolution_Type );
- double* result = (double*) _result;
+ NonNewtonianShearSolution* self = (NonNewtonianShearSolution*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)NonNewtonianShearSolution_Type );
+ double* result = (double* ) _result;
*result = self->velocityTopOfBox;
}
@@ -112,25 +112,25 @@ void _NonNewtonianShearSolution_AssignFr
_FieldTest_AssignFromXML( self, cf, data );
context = Stg_CheckType( self->context, FiniteElementContext );
- ConditionFunction_Register_Add( condFunc_Register, ConditionFunction_New( NonNewtonianShearSolution_VelocityBC, "ShearTrigger") );
+ ConditionFunction_Register_Add( condFunc_Register, ConditionFunction_New( NonNewtonianShearSolution_VelocityBC, (Name)"ShearTrigger") );
/* Create Analytic Velocity Field */
- self->velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ self->velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
/* Create Analytic Strain Rate Field */
- self->strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, True, data );
+ self->strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, True, data );
/* Create Analytic Stress Field */
- self->stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, True, data );
+ self->stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, True, data );
/* Create Analytic Viscosity Field */
- self->viscosityField = Stg_ComponentFactory_ConstructByName( cf, "ViscosityField", FeVariable, True, data );
+ self->viscosityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"ViscosityField", FeVariable, True, data );
- self->materialViscosity = Stg_ComponentFactory_ConstructByName( cf, "layerViscosity", MaterialViscosity, True, data );
- self->nonNewtonianRheology = Stg_ComponentFactory_ConstructByName( cf, "nonNewtonianRheology", NonNewtonian, True, data );
- self->mesh = Stg_ComponentFactory_ConstructByName( cf, "linearMesh", Mesh, True, data );
+ self->materialViscosity = Stg_ComponentFactory_ConstructByName( cf, (Name)"layerViscosity", MaterialViscosity, True, data );
+ self->nonNewtonianRheology = Stg_ComponentFactory_ConstructByName( cf, (Name)"nonNewtonianRheology", NonNewtonian, True, data );
+ self->mesh = Stg_ComponentFactory_ConstructByName( cf, (Name)"linearMesh", Mesh, True, data );
/* Set Velocity Stuff */
EP_AppendClassHook( Context_GetEntryPoint( context, AbstractContext_EP_UpdateClass ), NonNewtonianShearSolution_UpdateVelocityBC, self );
EP_AppendClassHook( Context_GetEntryPoint( context, FiniteElementContext_EP_CalcDt ), NonNewtonianShearSolution_Dt, context );
- self->velocityTopOfBox = Stg_ComponentFactory_GetRootDictDouble( cf, "velocityTopOfBox", 0.5 );
+ self->velocityTopOfBox = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"velocityTopOfBox", 0.5 );
}
void _NonNewtonianShearSolution_Build( void* analyticSolution, void* data ) {
@@ -203,7 +203,7 @@ void* _NonNewtonianShearSolution_Default
/* This function is automatically run by StGermain when this plugin is loaded. The name must be "<plugin-name>_Register". */
Index Underworld_NonNewtonianShearSolution_Register( PluginsManager* pluginsManager ) {
/* A plugin is only properly registered once it returns the handle provided when submitting a codelet to StGermain. */
- return PluginsManager_Submit( pluginsManager, NonNewtonianShearSolution_Type, "0", _NonNewtonianShearSolution_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, NonNewtonianShearSolution_Type, (Name)"0", _NonNewtonianShearSolution_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Trubitsyn2006/Trubitsyn2006.c
--- a/SysTest/AnalyticPlugins/Trubitsyn2006/Trubitsyn2006.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Trubitsyn2006/Trubitsyn2006.c Thu Jan 14 17:41:33 2010 +1100
@@ -198,10 +198,10 @@ void Trubitsyn2006_TemperatureIC( Node_L
double* coord;
double x;
double y;
- Trubitsyn2006* self = Stg_ComponentFactory_ConstructByName( context->CF, Trubitsyn2006_Type, Trubitsyn2006, True, context );
+ Trubitsyn2006* self = Stg_ComponentFactory_ConstructByName( context->CF, (Name)Trubitsyn2006_Type, Trubitsyn2006, True, context );
double T0 = self->T0;
double Ra = self->Ra;
- double v0 = Trubitsyn2006_V0( self );
+ double v0 = Trubitsyn2006_V0( self );
XYZ min, max;
double eta;
double d_eta_dy;
@@ -230,7 +230,7 @@ void Trubitsyn2006_PressureIC( Node_Loca
FeMesh* mesh = PressureField->feMesh;
double* pressure = (double*) _result;
double* coord;
- Trubitsyn2006* self = Stg_ComponentFactory_ConstructByName( context->CF, Trubitsyn2006_Type, Trubitsyn2006, True, context );
+ Trubitsyn2006* self = Stg_ComponentFactory_ConstructByName( context->CF, (Name)Trubitsyn2006_Type, Trubitsyn2006, True, context );
/* Find coordinate of node */
coord = Mesh_GetVertex( mesh, node_lI );
@@ -247,15 +247,15 @@ void _Trubitsyn2006_AssignFromXML( void*
/* Construct Parent */
_FieldTest_AssignFromXML( self, cf, data );
- self->velocityField = Stg_ComponentFactory_ConstructByName( cf, Dictionary_GetString(pluginDict, "VelocityField"), FeVariable, True, data);
- self->pressureField = Stg_ComponentFactory_ConstructByName( cf, Dictionary_GetString(pluginDict, "PressureField"), FeVariable, True, data);
+ self->velocityField = Stg_ComponentFactory_ConstructByName( cf, Dictionary_GetString( pluginDict, (Dictionary_Entry_Key)"VelocityField" ), FeVariable, True, data);
+ self->pressureField = Stg_ComponentFactory_ConstructByName( cf, Dictionary_GetString( pluginDict, (Dictionary_Entry_Key)"PressureField" ), FeVariable, True, data);
/* Add temperature initial condition */
- condFunc = ConditionFunction_New( Trubitsyn2006_TemperatureIC, "Trubitsyn2006_TemperatureIC" );
+ condFunc = ConditionFunction_New( Trubitsyn2006_TemperatureIC, (Name)"Trubitsyn2006_TemperatureIC" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
/* Add pressure initial condition */
- condFunc = ConditionFunction_New( Trubitsyn2006_PressureIC, "Trubitsyn2006_PressureIC" );
+ condFunc = ConditionFunction_New( Trubitsyn2006_PressureIC, (Name)"Trubitsyn2006_PressureIC" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
/* Create Analytic Fields */
@@ -266,7 +266,7 @@ void _Trubitsyn2006_AssignFromXML( void*
*/
/* Setup Viscosity Functions */
- viscosityType = Stg_ComponentFactory_GetRootDictString( cf, "ViscosityType", "Isoviscous" );
+ viscosityType = Stg_ComponentFactory_GetRootDictString( cf, (Dictionary_Entry_Key)"ViscosityType", "Isoviscous" );
if ( strcasecmp( viscosityType, "Isoviscous" ) == 0 ) {
self->viscosityFunc = _Trubitsyn2006_ViscosityFunc_Isoviscous;
self->viscosityDerivativeFunc = _Trubitsyn2006_ViscosityDerivativeFunc_Isoviscous;
@@ -284,12 +284,12 @@ void _Trubitsyn2006_AssignFromXML( void*
self->viscosityDerivativeFunc = _Trubitsyn2006_ViscosityDerivativeFunc_Model3;
}
else {
- Journal_Printf( Journal_Register( Error_Type, self->type ), "Cannot understand viscosity type = '%s'\n", viscosityType );
+ Journal_Printf( Journal_Register( Error_Type, (Name)self->type ), "Cannot understand viscosity type = '%s'\n", viscosityType );
abort();
}
- self->Ra = Stg_ComponentFactory_GetRootDictDouble( cf, "Ra", 0.0 );
- self->T0 = Stg_ComponentFactory_GetRootDictDouble( cf, "T0", 0.0 );
+ self->Ra = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"Ra", 0.0 );
+ self->T0 = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"T0", 0.0 );
self->wavenumberX = Stg_ComponentFactory_GetRootDictInt( cf, "wavenumberX", 1 );
self->wavenumberY = Stg_ComponentFactory_GetRootDictInt( cf, "wavenumberY", 1 );
}
@@ -348,7 +348,7 @@ void* _Trubitsyn2006_DefaultNew( Name na
}
Index Underworld_Trubitsyn2006_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Trubitsyn2006_Type, "0", _Trubitsyn2006_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Trubitsyn2006_Type, (Name)"0", _Trubitsyn2006_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/VelicIC/VelicIC.c
--- a/SysTest/AnalyticPlugins/VelicIC/VelicIC.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/VelicIC/VelicIC.c Thu Jan 14 17:41:33 2010 +1100
@@ -79,9 +79,9 @@ void Underworld_VelicIC_Sinusoidal( Node
x = coord[ I_AXIS ] - min[ I_AXIS ];
y = coord[ J_AXIS ] - min[ J_AXIS ];
- wavenumberX = Dictionary_GetInt_WithDefault( dictionary, "wavenumberX", 1 );
- wavenumberY = Dictionary_GetDouble_WithDefault( dictionary, "wavenumberY", 1.0 );
- sigma = Dictionary_GetDouble_WithDefault( dictionary, "sigma", 1.0 );
+ wavenumberX = Dictionary_GetInt_WithDefault( dictionary, (Dictionary_Entry_Key)"wavenumberX", 1 );
+ wavenumberY = Dictionary_GetDouble_WithDefault( dictionary, (Dictionary_Entry_Key)"wavenumberY", 1.0 );
+ sigma = Dictionary_GetDouble_WithDefault( dictionary, (Dictionary_Entry_Key)"sigma", 1.0 );
assert( sigma > 0.0 );
assert( wavenumberY > 0.0 );
@@ -90,7 +90,7 @@ void Underworld_VelicIC_Sinusoidal( Node
kx = (double)wavenumberX * M_PI / Lx;
ky = (double)wavenumberY * M_PI;
- *result = sigma * sin( ky * y ) * cos( kx * x );
+ *result = sigma * sin( ky * y ) * cos( kx * x );
}
/* Works with SolB */
@@ -122,16 +122,16 @@ void Underworld_VelicIC_Hyperbolic( Node
x = coord[ I_AXIS ] - min[ I_AXIS ];
y = coord[ J_AXIS ] - min[ J_AXIS ];
- wavenumberX = Dictionary_GetInt_WithDefault( dictionary, "wavenumberX", 1 );
- wavenumberY = Dictionary_GetDouble_WithDefault( dictionary, "wavenumberY", 2.0 );
- assert( wavenumberX != wavenumberY );
- sigma = Dictionary_GetDouble_WithDefault( dictionary, "sigma", 1.0 );
+ wavenumberX = Dictionary_GetInt_WithDefault( dictionary, (Dictionary_Entry_Key)"wavenumberX", 1 );
+ wavenumberY = Dictionary_GetDouble_WithDefault( dictionary, (Dictionary_Entry_Key)"wavenumberY", 2.0 );
+ assert( wavenumberX != wavenumberY );
+ sigma = Dictionary_GetDouble_WithDefault( dictionary, (Dictionary_Entry_Key)"sigma", 1.0 );
kn = wavenumberX * M_PI / L;
/* TODO: Re-write Mirko's code and/or Documentation so the input parameters for these ICs are less confusing */
km = wavenumberY / L;
- *result = sigma * sinh( km * y ) * cos( kn * x );
+ *result = sigma * sinh( km * y ) * cos( kn * x );
}
@@ -140,11 +140,11 @@ void _Underworld_VelicIC_AssignFromXML(
AbstractContext* context;
ConditionFunction* condFunc;
- context = (AbstractContext*)Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ context = (AbstractContext*)Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
- condFunc = ConditionFunction_New( Underworld_VelicIC_Sinusoidal, "VelicIC_Sinusoidal");
+ condFunc = ConditionFunction_New( Underworld_VelicIC_Sinusoidal, (Name)"VelicIC_Sinusoidal" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
- condFunc = ConditionFunction_New( Underworld_VelicIC_Hyperbolic, "VelicIC_Hyperbolic");
+ condFunc = ConditionFunction_New( Underworld_VelicIC_Hyperbolic, (Name)"VelicIC_Hyperbolic" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
}
@@ -163,7 +163,7 @@ Index Underworld_VelicIC_Register( Plugi
Index Underworld_VelicIC_Register( PluginsManager* pluginsManager ) {
Journal_DPrintf( StgFEM_Debug, "In: %s( void* )\n", __func__ );
- return PluginsManager_Submit( pluginsManager, Underworld_VelicIC_Type, "0", _Underworld_VelicIC_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_VelicIC_Type, (Name)"0", _Underworld_VelicIC_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solA/Analytic_solA.c
--- a/SysTest/AnalyticPlugins/Velic_solA/Analytic_solA.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solA/Analytic_solA.c Thu Jan 14 17:41:33 2010 +1100
@@ -85,15 +85,15 @@ void _Underworld_solA_AssignFromXML( voi
/* Construct Parent */
_FieldTest_AssignFromXML( self, cf, data );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solA_sigma", 1.0 );
- Z = Stg_ComponentFactory_GetRootDictDouble( cf, "solA_Z", 1.0 );
- wavenumberY = Stg_ComponentFactory_GetRootDictDouble( cf, "wavenumberY", 1.5 );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solA_sigma", 1.0 );
+ Z = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solA_Z", 1.0 );
+ wavenumberY = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"wavenumberY", 1.5 );
n = Stg_ComponentFactory_GetRootDictInt( cf, "wavenumberX", 1 );
_Underworld_solA_Init( self, sigma, Z, wavenumberY, n );
isCorrectInput = solA_checkInputParams( self );
- Journal_Firewall( isCorrectInput , Journal_Register( Error_Type, "solA" ),
+ Journal_Firewall( isCorrectInput , Journal_Register( Error_Type, (Name)"solA" ),
"Error in function %s: Bad Input parameters, solution check valid values in .tex documentation\n",
__func__ );
}
@@ -141,7 +141,7 @@ void* _Underworld_solA_DefaultNew( Name
}
Index Underworld_Velic_solA_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_solA_Type, "0", _Underworld_solA_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_solA_Type, (Name)"0", _Underworld_solA_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solB/Analytic_solB.c
--- a/SysTest/AnalyticPlugins/Velic_solB/Analytic_solB.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solB/Analytic_solB.c Thu Jan 14 17:41:33 2010 +1100
@@ -85,15 +85,15 @@ void _Underworld_solB_AssignFromXML( voi
/* Construct Parent */
_FieldTest_AssignFromXML( self, cf, data );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solB_sigma", 1.0 );
- Z = Stg_ComponentFactory_GetRootDictDouble( cf, "solB_Z", 1.0 );
- wavenumberY = Stg_ComponentFactory_GetRootDictDouble( cf, "wavenumberY", 1.0 );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solB_sigma", 1.0 );
+ Z = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solB_Z", 1.0 );
+ wavenumberY = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"wavenumberY", 1.0 );
n = Stg_ComponentFactory_GetRootDictInt( cf, "wavenumberX", 1 );
_Underworld_solB_Init( self, sigma, Z, wavenumberY, n );
isCorrectInput = solB_checkInputParams( self );
- Journal_Firewall( isCorrectInput , Journal_Register( Error_Type, "Analytic_solB" ),
+ Journal_Firewall( isCorrectInput , Journal_Register( Error_Type, (Name)"Analytic_solB" ),
"Error in function %s: Bad Input parameters, solution check valid values in .tex documentation\n",
__func__ );
}
@@ -139,7 +139,7 @@ void* _Underworld_solB_DefaultNew( Name
}
Index Underworld_Velic_solB_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_solB_Type, "0", _Underworld_solB_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_solB_Type, (Name)"0", _Underworld_solB_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solC/Analytic_solC.c
--- a/SysTest/AnalyticPlugins/Velic_solC/Analytic_solC.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solC/Analytic_solC.c Thu Jan 14 17:41:33 2010 +1100
@@ -84,7 +84,7 @@ void _Velic_solC_Init( Velic_solC* self,
self->x_c = x_c;
isCorrectInput = _checkInputParams( self );
- Journal_Firewall( isCorrectInput , Journal_Register( Error_Type, "Velic_solB" ),
+ Journal_Firewall( isCorrectInput , Journal_Register( Error_Type, (Name)"Velic_solB" ),
"Error in function %s: Bad Input parameters, solution check valid values in .tex documentation\n",
__func__ );
}
@@ -103,32 +103,32 @@ void _Velic_solC_AssignFromXML( void* an
_AnalyticSolution_AssignFromXML( self, cf, data );
/* Create Analytic Fields */
- velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, velocityField, Velic_solC_VelocityFunction );
- pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"PressureField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, pressureField, Velic_solC_PressureFunction );
- stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, False, data );
- if ( stressField )
+ stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, False, data );
+ if ( stressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, stressField, Velic_solC_StressFunction );
- strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, False, data );
- if ( strainRateField ) {
+ strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, False, data );
+ if ( strainRateField ) {
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, strainRateField, Velic_solC_StrainRateFunction );
}
- recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStrainRateField", FeVariable, False, data );
- if ( recoveredStrainRateField )
+ recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStrainRateField", FeVariable, False, data );
+ if ( recoveredStrainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStrainRateField, Velic_solC_StrainRateFunction );
- recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStressField", FeVariable, False, data );
- if ( recoveredStressField )
+ recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStressField", FeVariable, False, data );
+ if ( recoveredStressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStressField, Velic_solC_StressFunction );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solC_sigma", 1.0 );
- eta = Stg_ComponentFactory_GetRootDictDouble( cf, "solC_eta", 1.0 );
- x_c = Stg_ComponentFactory_GetRootDictDouble( cf, "solC_xc", 0.4 );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solC_sigma", 1.0 );
+ eta = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solC_eta", 1.0 );
+ x_c = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solC_xc", 0.4 );
_Velic_solC_Init( self, sigma, eta, x_c );
}
@@ -161,7 +161,7 @@ void* _Velic_solC_DefaultNew( Name name
}
Index Underworld_Velic_solC_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solC_Type, "0", _Velic_solC_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solC_Type, (Name)"0", _Velic_solC_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solCA/Analytic_solCA.c
--- a/SysTest/AnalyticPlugins/Velic_solCA/Analytic_solCA.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solCA/Analytic_solCA.c Thu Jan 14 17:41:33 2010 +1100
@@ -84,7 +84,7 @@ void _Velic_solCA_Init( Velic_solCA* sel
self->x0 = x0;
isCorrectInput = _checkInputParams( self );
- Journal_Firewall( isCorrectInput , Journal_Register( Error_Type, "Velic_solCA" ),
+ Journal_Firewall( isCorrectInput , Journal_Register( Error_Type, (Name)"Velic_solCA" ),
"Error in function %s: Bad Input parameters, solution check valid values in .tex documentation\n",
__func__ );
}
@@ -103,36 +103,36 @@ void _Velic_solCA_AssignFromXML( void* a
_AnalyticSolution_AssignFromXML( self, cf, data );
/* Create Analytic Fields */
- velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, velocityField, Velic_solCA_VelocityFunction );
- pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"PressureField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, pressureField, Velic_solCA_PressureFunction );
- stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, False, data );
- if ( stressField )
+ stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, False, data );
+ if ( stressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, stressField, Velic_solCA_StressFunction );
- strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, False, data );
- if ( strainRateField ) {
+ strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, False, data );
+ if ( strainRateField ) {
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, strainRateField, Velic_solCA_StrainRateFunction );
}
- recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStrainRateField", FeVariable, False, data );
- if ( recoveredStrainRateField )
+ recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStrainRateField", FeVariable, False, data );
+ if ( recoveredStrainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStrainRateField, Velic_solCA_StrainRateFunction );
- recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStressField", FeVariable, False, data );
- if ( recoveredStressField )
+ recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStressField", FeVariable, False, data );
+ if ( recoveredStressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStressField, Velic_solCA_StressFunction );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solCA_sigma", 1.0 );
- eta = Stg_ComponentFactory_GetRootDictDouble( cf, "solCA_eta", 1.0 );
- startX = Stg_ComponentFactory_GetRootDictDouble( cf, "solCA_startX", 0.4 );
- endX = Stg_ComponentFactory_GetRootDictDouble( cf, "solCA_endX", 0.8 );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solCA_sigma", 1.0 );
+ eta = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solCA_eta", 1.0 );
+ startX = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solCA_startX", 0.4 );
+ endX = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solCA_endX", 0.8 );
dx = endX - startX;
- x0 = 0.5 * (endX + startX);
+ x0 = 0.5 * (endX + startX );
_Velic_solCA_Init( self, sigma, eta, dx, x0 );
@@ -167,7 +167,7 @@ void* _Velic_solCA_DefaultNew( Name name
}
Index Underworld_Velic_solCA_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solCA_Type, "0", _Velic_solCA_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solCA_Type, (Name)"0", _Velic_solCA_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solCx/Analytic_solCx.c
--- a/SysTest/AnalyticPlugins/Velic_solCx/Analytic_solCx.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solCx/Analytic_solCx.c Thu Jan 14 17:41:33 2010 +1100
@@ -93,7 +93,7 @@ void _Velic_solCx_Init( Velic_solCx* sel
if( (self->xc < 0.0) || self->xc > 1.0 )
correctInput = False;
- Journal_Firewall( correctInput, Journal_Register( Error_Type, "solCx_ErrorStream") ,
+ Journal_Firewall( correctInput, Journal_Register( Error_Type, (Name)"solCx_ErrorStream" ) ,
"Error: In func %s. The input parameters you supplied to the analytic Solution are incorrect.\nValid range of xc values is [0,1]. Currently it is %f\n", __func__, self->xc );
}
@@ -119,9 +119,9 @@ void _Underworld_solCx_AssignFromXML( vo
/* Construct Parent */
_FieldTest_AssignFromXML( self, cf, data );
- etaA = Stg_ComponentFactory_GetRootDictDouble( cf, "solCx_etaA", 1.0 );
- etaB = Stg_ComponentFactory_GetRootDictDouble( cf, "solCx_etaB", 2.0 );
- xc = Stg_ComponentFactory_GetRootDictDouble( cf, "solCx_xc", 0.25 );
+ etaA = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solCx_etaA", 1.0 );
+ etaB = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solCx_etaB", 2.0 );
+ xc = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solCx_xc", 0.25 );
n = Stg_ComponentFactory_GetRootDictInt( cf, "solCx_n", 1 );
_Velic_solCx_Init( self, etaA, etaB, xc, n);
@@ -148,7 +148,7 @@ void* _Underworld_solCx_DefaultNew( Name
}
Index Underworld_Velic_solCx_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_solCx_Type, "0", _Underworld_solCx_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_solCx_Type, (Name)"0", _Underworld_solCx_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solDA/Analytic_solDA.c
--- a/SysTest/AnalyticPlugins/Velic_solDA/Analytic_solDA.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solDA/Analytic_solDA.c Thu Jan 14 17:41:33 2010 +1100
@@ -104,38 +104,38 @@ void _Velic_solDA_AssignFromXML( void* a
_AnalyticSolution_AssignFromXML( self, cf, data );
/* Create Analytic Fields */
- velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, velocityField, Velic_solDA_VelocityFunction );
- pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"PressureField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, pressureField, Velic_solDA_PressureFunction );
- stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, False, data );
- if ( stressField )
+ stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, False, data );
+ if ( stressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, stressField, Velic_solDA_StressFunction );
- strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, False, data );
- if ( strainRateField ) {
+ strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, False, data );
+ if ( strainRateField ) {
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, strainRateField, Velic_solDA_StrainRateFunction );
}
- recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStrainRateField", FeVariable, False, data );
- if ( recoveredStrainRateField )
+ recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStrainRateField", FeVariable, False, data );
+ if ( recoveredStrainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStrainRateField, Velic_solDA_StrainRateFunction );
- recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStressField", FeVariable, False, data );
- if ( recoveredStressField )
+ recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStressField", FeVariable, False, data );
+ if ( recoveredStressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStressField, Velic_solDA_StressFunction );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solDA_sigma", 3.0 );
- etaA = Stg_ComponentFactory_GetRootDictDouble( cf, "solDA_etaA", 1.0 );
- etaB = Stg_ComponentFactory_GetRootDictDouble( cf, "solDA_etaB", 2.0 );
- zc = Stg_ComponentFactory_GetRootDictDouble( cf, "solDA_zc", 0.8 );
- startX = Stg_ComponentFactory_GetRootDictDouble( cf, "solCA_startX", 0.4 );
- endX = Stg_ComponentFactory_GetRootDictDouble( cf, "solCA_endX", 0.8 );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solDA_sigma", 3.0 );
+ etaA = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solDA_etaA", 1.0 );
+ etaB = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solDA_etaB", 2.0 );
+ zc = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solDA_zc", 0.8 );
+ startX = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solCA_startX", 0.4 );
+ endX = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solCA_endX", 0.8 );
dx = endX - startX;
- x0 = 0.5 * (endX + startX);
+ x0 = 0.5 * (endX + startX );
_Velic_solDA_Init( self, sigma, etaA, etaB, zc, dx, x0 );
@@ -163,7 +163,7 @@ void* _Velic_solDA_DefaultNew( Name name
}
Index Underworld_Velic_solDA_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solDA_Type, "0", _Velic_solDA_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solDA_Type, (Name)"0", _Velic_solDA_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solE/Analytic_solE.c
--- a/SysTest/AnalyticPlugins/Velic_solE/Analytic_solE.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solE/Analytic_solE.c Thu Jan 14 17:41:33 2010 +1100
@@ -105,35 +105,35 @@ void _Velic_solE_AssignFromXML( void* an
_AnalyticSolution_AssignFromXML( self, cf, data );
/* Create Analytic Fields */
- velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, velocityField, Velic_solE_VelocityFunction );
- pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"PressureField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, pressureField, Velic_solE_PressureFunction );
- stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, False , data);
- if ( stressField )
+ stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, False , data);
+ if ( stressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, stressField, Velic_solE_StressFunction );
- strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, False, data );
- if ( strainRateField ) {
+ strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, False, data );
+ if ( strainRateField ) {
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, strainRateField, Velic_solE_StrainRateFunction );
}
- recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStrainRateField", FeVariable, False, data );
- if ( recoveredStrainRateField )
+ recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStrainRateField", FeVariable, False, data );
+ if ( recoveredStrainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStrainRateField, Velic_solE_StrainRateFunction );
- recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStressField", FeVariable, False, data );
- if ( recoveredStressField )
+ recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStressField", FeVariable, False, data );
+ if ( recoveredStressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStressField, Velic_solE_StressFunction );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solE_sigma", 1.0 );
- etaA = Stg_ComponentFactory_GetRootDictDouble( cf, "solE_etaA", 100.0 );
- etaB = Stg_ComponentFactory_GetRootDictDouble( cf, "solE_etaB", 1.0 );
- zc = Stg_ComponentFactory_GetRootDictDouble( cf, "solE_zc", 0.8 );
- km = Stg_ComponentFactory_GetRootDictDouble( cf, "solE_km", M_PI );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solE_sigma", 1.0 );
+ etaA = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solE_etaA", 100.0 );
+ etaB = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solE_etaB", 1.0 );
+ zc = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solE_zc", 0.8 );
+ km = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solE_km", M_PI );
n = Stg_ComponentFactory_GetRootDictInt( cf, "solE_n", 1 );
_Velic_solE_Init( self, sigma, etaA, etaB, zc, km, n );
@@ -160,7 +160,7 @@ void* _Velic_solE_DefaultNew( Name name
}
Index Underworld_Velic_solE_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solE_Type, "0", _Velic_solE_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solE_Type, (Name)"0", _Velic_solE_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solF/Analytic_solF.c
--- a/SysTest/AnalyticPlugins/Velic_solF/Analytic_solF.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solF/Analytic_solF.c Thu Jan 14 17:41:33 2010 +1100
@@ -103,34 +103,34 @@ void _Velic_solF_AssignFromXML( void* an
_AnalyticSolution_AssignFromXML( self, cf, data );
/* Create Analytic Fields */
- velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, velocityField, Velic_solF_VelocityFunction );
- pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"PressureField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, pressureField, Velic_solF_PressureFunction );
- stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, False, data );
- if ( stressField )
+ stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, False, data );
+ if ( stressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, stressField, Velic_solF_StressFunction );
- strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, False, data );
- if ( strainRateField ) {
+ strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, False, data );
+ if ( strainRateField ) {
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, strainRateField, Velic_solF_StrainRateFunction );
}
- recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStrainRateField", FeVariable, False, data );
- if ( recoveredStrainRateField )
+ recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStrainRateField", FeVariable, False, data );
+ if ( recoveredStrainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStrainRateField, Velic_solF_StrainRateFunction );
- recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStressField", FeVariable, False, data );
- if ( recoveredStressField )
+ recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStressField", FeVariable, False, data );
+ if ( recoveredStressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStressField, Velic_solF_StressFunction );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solF_sigma", 1.0 );
- etaA = Stg_ComponentFactory_GetRootDictDouble( cf, "solF_etaA", 2.0 );
- etaB = Stg_ComponentFactory_GetRootDictDouble( cf, "solF_etaB", 1.0 );
- xc = Stg_ComponentFactory_GetRootDictDouble( cf, "solF_xc", 0.25 );
- zc = Stg_ComponentFactory_GetRootDictDouble( cf, "solF_zc", 0.7 );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solF_sigma", 1.0 );
+ etaA = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solF_etaA", 2.0 );
+ etaB = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solF_etaB", 1.0 );
+ xc = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solF_xc", 0.25 );
+ zc = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solF_zc", 0.7 );
_Velic_solF_Init( self, sigma, etaA, etaB, xc, zc );
@@ -158,7 +158,7 @@ void* _Velic_solF_DefaultNew( Name name
}
Index Underworld_Velic_solF_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solF_Type, "0", _Velic_solF_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solF_Type, (Name)"0", _Velic_solF_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solG/Analytic_solG.c
--- a/SysTest/AnalyticPlugins/Velic_solG/Analytic_solG.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solG/Analytic_solG.c Thu Jan 14 17:41:33 2010 +1100
@@ -104,38 +104,38 @@ void _Velic_solG_AssignFromXML( void* an
_AnalyticSolution_AssignFromXML( self, cf, data );
/* Create Analytic Fields */
- velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, velocityField, Velic_solG_VelocityFunction );
- pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"PressureField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, pressureField, Velic_solG_PressureFunction );
- stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, False, data );
- if ( stressField )
+ stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, False, data );
+ if ( stressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, stressField, Velic_solG_StressFunction );
- strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, False, data );
- if ( strainRateField ) {
+ strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, False, data );
+ if ( strainRateField ) {
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, strainRateField, Velic_solG_StrainRateFunction );
}
- recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStrainRateField", FeVariable, False, data );
- if ( recoveredStrainRateField )
+ recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStrainRateField", FeVariable, False, data );
+ if ( recoveredStrainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStrainRateField, Velic_solG_StrainRateFunction );
- recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStressField", FeVariable, False, data );
- if ( recoveredStressField )
+ recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStressField", FeVariable, False, data );
+ if ( recoveredStressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStressField, Velic_solG_StressFunction );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solG_sigma", 1.0 );
- etaA = Stg_ComponentFactory_GetRootDictDouble( cf, "solG_etaA", 10.0 );
- etaB = Stg_ComponentFactory_GetRootDictDouble( cf, "solG_etaB", 1.0 );
- zc = Stg_ComponentFactory_GetRootDictDouble( cf, "solG_zc", 0.7 );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solG_sigma", 1.0 );
+ etaA = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solG_etaA", 10.0 );
+ etaB = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solG_etaB", 1.0 );
+ zc = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solG_zc", 0.7 );
- startX = Stg_ComponentFactory_GetRootDictDouble( cf, "solG_startX", 0.4 );
- endX = Stg_ComponentFactory_GetRootDictDouble( cf, "solG_endX", 0.55 );
+ startX = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solG_startX", 0.4 );
+ endX = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solG_endX", 0.55 );
dx = endX - startX;
- x0 = 0.5 * (startX + endX);
+ x0 = 0.5 * (startX + endX );
_Velic_solG_Init( self, sigma, etaA, etaB, dx, x0, zc );
@@ -163,7 +163,7 @@ void* _Velic_solG_DefaultNew( Name name
}
Index Underworld_Velic_solG_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solG_Type, "0", _Velic_solG_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solG_Type, (Name)"0", _Velic_solG_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solH/Analytic_solH.c
--- a/SysTest/AnalyticPlugins/Velic_solH/Analytic_solH.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solH/Analytic_solH.c Thu Jan 14 17:41:33 2010 +1100
@@ -98,34 +98,34 @@ void _Velic_solH_AssignFromXML( void* an
_AnalyticSolution_AssignFromXML( self, cf, data );
/* Create Analytic Fields */
- velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, velocityField, Velic_solH_VelocityFunction );
- pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"PressureField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, pressureField, Velic_solH_PressureFunction );
- stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, False, data );
- if ( stressField )
+ stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, False, data );
+ if ( stressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, stressField, Velic_solH_StressFunction );
- strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, False, data );
- if ( strainRateField ) {
+ strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, False, data );
+ if ( strainRateField ) {
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, strainRateField, Velic_solH_StrainRateFunction );
}
- recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStrainRateField", FeVariable, False, data );
- if ( recoveredStrainRateField )
+ recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStrainRateField", FeVariable, False, data );
+ if ( recoveredStrainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStrainRateField, Velic_solH_StrainRateFunction );
- recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStressField", FeVariable, False, data );
- if ( recoveredStressField )
+ recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStressField", FeVariable, False, data );
+ if ( recoveredStressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStressField, Velic_solH_StressFunction );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solH_sigma", 1.0 );
- eta = Stg_ComponentFactory_GetRootDictDouble( cf, "solH_eta", 1.0 );
- dx = Stg_ComponentFactory_GetRootDictDouble( cf, "solH_dx", 0.4 );
- dy = Stg_ComponentFactory_GetRootDictDouble( cf, "solH_dy", 0.6 );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solH_sigma", 1.0 );
+ eta = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solH_eta", 1.0 );
+ dx = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solH_dx", 0.4 );
+ dy = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solH_dy", 0.6 );
_Velic_solH_Init( self, sigma, eta, dx, dy );
@@ -152,7 +152,7 @@ void* _Velic_solH_DefaultNew( Name name
}
Index Underworld_Velic_solH_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solH_Type, "0", _Velic_solH_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solH_Type, (Name)"0", _Velic_solH_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solHA/Analytic_solHA.c
--- a/SysTest/AnalyticPlugins/Velic_solHA/Analytic_solHA.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solHA/Analytic_solHA.c Thu Jan 14 17:41:33 2010 +1100
@@ -107,17 +107,17 @@ void _Velic_solHA_AssignFromXML( void* a
/* Construct Parent */
_FieldTest_AssignFromXML( self, cf, data );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solHA_sigma", 1.0 );
- eta = Stg_ComponentFactory_GetRootDictDouble( cf, "solHA_eta", 1.0 );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solHA_sigma", 1.0 );
+ eta = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solHA_eta", 1.0 );
- startX = Stg_ComponentFactory_GetRootDictDouble( cf, "solHA_startX", 0.1 );
- endX = Stg_ComponentFactory_GetRootDictDouble( cf, "solHA_endX", 0.7 );
+ startX = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solHA_startX", 0.1 );
+ endX = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solHA_endX", 0.7 );
- startY = Stg_ComponentFactory_GetRootDictDouble( cf, "solHA_startY", 0.2 );
- endY = Stg_ComponentFactory_GetRootDictDouble( cf, "solHA_endY", 0.6 );
+ startY = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solHA_startY", 0.2 );
+ endY = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solHA_endY", 0.6 );
dx = 0.5 * (startX + endX);
- dy = 0.5 * (startY + endY);
+ dy = 0.5 * (startY + endY );
x0 = endX - startX;
y0 = endY - startY;
@@ -146,7 +146,7 @@ void* _Velic_solHA_DefaultNew( Name name
}
Index Underworld_Velic_solHA_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solHA_Type, "0", _Velic_solHA_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solHA_Type, (Name)"0", _Velic_solHA_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solHAy/Analytic_solHAy.c
--- a/SysTest/AnalyticPlugins/Velic_solHAy/Analytic_solHAy.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solHAy/Analytic_solHAy.c Thu Jan 14 17:41:33 2010 +1100
@@ -100,35 +100,35 @@ void _Velic_solHAy_AssignFromXML( void*
_AnalyticSolution_AssignFromXML( self, cf, data );
/* Create Analytic Fields */
- velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, velocityField, Velic_solHAy_VelocityFunction );
- pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"PressureField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, pressureField, Velic_solHAy_PressureFunction );
- stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, False, data );
- if ( stressField )
+ stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, False, data );
+ if ( stressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, stressField, Velic_solHAy_StressFunction );
- strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, False, data );
- if ( strainRateField ) {
+ strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, False, data );
+ if ( strainRateField ) {
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, strainRateField, Velic_solHAy_StrainRateFunction );
}
- recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStrainRateField", FeVariable, False, data );
- if ( recoveredStrainRateField )
+ recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStrainRateField", FeVariable, False, data );
+ if ( recoveredStrainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStrainRateField, Velic_solHAy_StrainRateFunction );
- recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStressField", FeVariable, False, data );
- if ( recoveredStressField )
+ recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStressField", FeVariable, False, data );
+ if ( recoveredStressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStressField, Velic_solHAy_StressFunction );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solHA_sigma", 1.0 );
- eta = Stg_ComponentFactory_GetRootDictDouble( cf, "solHA_eta", 1.0 );
- dx = Stg_ComponentFactory_GetRootDictDouble( cf, "solHA_dx", 0.4 );
- dy = Stg_ComponentFactory_GetRootDictDouble( cf, "solHA_dy", 0.35 );
- x0 = Stg_ComponentFactory_GetRootDictDouble( cf, "solHA_x0", 0.3 );
- y0 = Stg_ComponentFactory_GetRootDictDouble( cf, "solHA_y0", 0.6 );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solHA_sigma", 1.0 );
+ eta = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solHA_eta", 1.0 );
+ dx = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solHA_dx", 0.4 );
+ dy = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solHA_dy", 0.35 );
+ x0 = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solHA_x0", 0.3 );
+ y0 = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solHA_y0", 0.6 );
_Velic_solHAy_Init( self, sigma, eta, dx, dy, x0, y0 );
}
@@ -154,7 +154,7 @@ void* _Velic_solHAy_DefaultNew( Name nam
}
Index Underworld_Velic_solHAy_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solHAy_Type, "0", _Velic_solHAy_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solHAy_Type, (Name)"0", _Velic_solHAy_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solHy/Analytic_solHy.c
--- a/SysTest/AnalyticPlugins/Velic_solHy/Analytic_solHy.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solHy/Analytic_solHy.c Thu Jan 14 17:41:33 2010 +1100
@@ -86,7 +86,7 @@ void _Velic_solHy_Init( Velic_solHy* sel
if( (self->xc < 0.0) || self->xc > 1.0 )
correctInput = False;
- Journal_Firewall( correctInput, Journal_Register( Error_Type, "solHy_ErrorStream") ,
+ Journal_Firewall( correctInput, Journal_Register( Error_Type, (Name)"solHy_ErrorStream" ) ,
"Error: In func %s. The input parameters you supplied to the analytic Solution are incorrect.\nValid range of xc values is [0,1]. Currently it is %f\n", __func__, self->xc );
}
@@ -105,32 +105,32 @@ void _Velic_solHy_AssignFromXML( void* a
_AnalyticSolution_AssignFromXML( self, cf, data );
/* Create Analytic Fields */
- velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, velocityField, Velic_solHy_VelocityFunction );
- pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"PressureField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, pressureField, Velic_solHy_PressureFunction );
- stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, False, data );
- if ( stressField )
+ stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, False, data );
+ if ( stressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, stressField, Velic_solHy_StressFunction );
- strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, False, data );
- if ( strainRateField ) {
+ strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, False, data );
+ if ( strainRateField ) {
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, strainRateField, Velic_solHy_StrainRateFunction );
}
- recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStrainRateField", FeVariable, False, data );
- if ( recoveredStrainRateField )
+ recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStrainRateField", FeVariable, False, data );
+ if ( recoveredStrainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStrainRateField, Velic_solHy_StrainRateFunction );
- recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStressField", FeVariable, False, data );
- if ( recoveredStressField )
+ recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStressField", FeVariable, False, data );
+ if ( recoveredStressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStressField, Velic_solHy_StressFunction );
- etaA = Stg_ComponentFactory_GetRootDictDouble( cf, "solHy_etaA", 1.0 );
- etaB = Stg_ComponentFactory_GetRootDictDouble( cf, "solHy_etaB", 2.0 );
- xc = Stg_ComponentFactory_GetRootDictDouble( cf, "solHy_xc", 0.25 );
+ etaA = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solHy_etaA", 1.0 );
+ etaB = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solHy_etaB", 2.0 );
+ xc = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solHy_xc", 0.25 );
n = Stg_ComponentFactory_GetRootDictInt( cf, "solHy_n", 1 );
_Velic_solHy_Init( self, etaA, etaB, xc, n );
@@ -158,7 +158,7 @@ void* _Velic_solHy_DefaultNew( Name name
}
Index Underworld_Velic_solHy_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solHy_Type, "0", _Velic_solHy_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solHy_Type, (Name)"0", _Velic_solHy_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solI/Analytic_solI.c
--- a/SysTest/AnalyticPlugins/Velic_solI/Analytic_solI.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solI/Analytic_solI.c Thu Jan 14 17:41:33 2010 +1100
@@ -97,33 +97,33 @@ void _Velic_solI_AssignFromXML( void* an
_AnalyticSolution_AssignFromXML( self, cf, data );
/* Create Analytic Fields */
- velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, velocityField, Velic_solI_VelocityFunction );
- pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"PressureField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, pressureField, Velic_solI_PressureFunction );
- stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, False, data );
- if ( stressField )
+ stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, False, data );
+ if ( stressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, stressField, Velic_solI_StressFunction );
- strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, False, data );
- if ( strainRateField ) {
+ strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, False, data );
+ if ( strainRateField ) {
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, strainRateField, Velic_solI_StrainRateFunction );
}
- recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStrainRateField", FeVariable, False, data );
- if ( recoveredStrainRateField )
+ recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStrainRateField", FeVariable, False, data );
+ if ( recoveredStrainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStrainRateField, Velic_solI_StrainRateFunction );
- recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStressField", FeVariable, False, data );
- if ( recoveredStressField )
+ recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStressField", FeVariable, False, data );
+ if ( recoveredStressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStressField, Velic_solI_StressFunction );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solI_sigma", 1.0 );
- twiceB = Stg_ComponentFactory_GetRootDictDouble( cf, "solI_twiceB", 2.0 );
- B = Stg_ComponentFactory_GetRootDictDouble( cf, "solI_B", 0.5 * twiceB );
- xc = Stg_ComponentFactory_GetRootDictDouble( cf, "solI_xc", 0.3 );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solI_sigma", 1.0 );
+ twiceB = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solI_twiceB", 2.0 );
+ B = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solI_B", 0.5 * twiceB );
+ xc = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solI_xc", 0.3 );
_Velic_solI_Init( self, sigma, B, xc );
@@ -150,7 +150,7 @@ void* _Velic_solI_DefaultNew( Name name
}
Index Underworld_Velic_solI_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solI_Type, "0", _Velic_solI_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solI_Type, (Name)"0", _Velic_solI_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solIA/Analytic_solIA.c
--- a/SysTest/AnalyticPlugins/Velic_solIA/Analytic_solIA.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solIA/Analytic_solIA.c Thu Jan 14 17:41:33 2010 +1100
@@ -98,37 +98,37 @@ void _Velic_solIA_AssignFromXML( void* a
_AnalyticSolution_AssignFromXML( self, cf, data );
/* Create Analytic Fields */
- velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, velocityField, Velic_solIA_VelocityFunction );
- pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"PressureField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, pressureField, Velic_solIA_PressureFunction );
- stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, False, data );
- if ( stressField )
+ stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, False, data );
+ if ( stressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, stressField, Velic_solIA_StressFunction );
- strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, False, data );
- if ( strainRateField ) {
+ strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, False, data );
+ if ( strainRateField ) {
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, strainRateField, Velic_solIA_StrainRateFunction );
}
- recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStrainRateField", FeVariable, False, data );
- if ( recoveredStrainRateField )
+ recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStrainRateField", FeVariable, False, data );
+ if ( recoveredStrainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStrainRateField, Velic_solIA_StrainRateFunction );
- recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStressField", FeVariable, False, data );
- if ( recoveredStressField )
+ recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStressField", FeVariable, False, data );
+ if ( recoveredStressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStressField, Velic_solIA_StressFunction );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solIA_sigma", 1.0 );
- twiceB = Stg_ComponentFactory_GetRootDictDouble( cf, "solIA_twiceB", 2.0 );
- B = Stg_ComponentFactory_GetRootDictDouble( cf, "solIA_B", 0.5 * twiceB );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solIA_sigma", 1.0 );
+ twiceB = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solIA_twiceB", 2.0 );
+ B = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solIA_B", 0.5 * twiceB );
- startX = Stg_ComponentFactory_GetRootDictDouble( cf, "solIA_startX", 0.4 );
- endX = Stg_ComponentFactory_GetRootDictDouble( cf, "solIA_endX", 0.3 );
+ startX = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solIA_startX", 0.4 );
+ endX = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solIA_endX", 0.3 );
dx = endX - startX;
- x0 = 0.5*(startX + endX);
+ x0 = 0.5*(startX + endX );
_Velic_solIA_Init( self, sigma, B, dx, x0 );
}
@@ -154,7 +154,7 @@ void* _Velic_solIA_DefaultNew( Name name
}
Index Underworld_Velic_solIA_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solIA_Type, "0", _Velic_solIA_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solIA_Type, (Name)"0", _Velic_solIA_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solJ/Analytic_solJ.c
--- a/SysTest/AnalyticPlugins/Velic_solJ/Analytic_solJ.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solJ/Analytic_solJ.c Thu Jan 14 17:41:33 2010 +1100
@@ -111,38 +111,38 @@ void _Velic_solJ_AssignFromXML( void* an
_AnalyticSolution_AssignFromXML( self, cf, data );
/* Create Analytic Fields */
- velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, velocityField, Velic_solJ_VelocityFunction );
- pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"PressureField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, pressureField, Velic_solJ_PressureFunction );
- stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, False, data );
- if ( stressField )
+ stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, False, data );
+ if ( stressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, stressField, Velic_solJ_StressFunction );
- strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, False, data );
- if ( strainRateField ) {
+ strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, False, data );
+ if ( strainRateField ) {
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, strainRateField, Velic_solJ_StrainRateFunction );
}
- recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStrainRateField", FeVariable, False, data );
- if ( recoveredStrainRateField )
+ recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStrainRateField", FeVariable, False, data );
+ if ( recoveredStrainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStrainRateField, Velic_solJ_StrainRateFunction );
- recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStressField", FeVariable, False, data );
- if ( recoveredStressField )
+ recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStressField", FeVariable, False, data );
+ if ( recoveredStressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStressField, Velic_solJ_StressFunction );
- sigmaA = Stg_ComponentFactory_GetRootDictDouble( cf, "solJ_sigmaA", 1.0 );
- sigmaB = Stg_ComponentFactory_GetRootDictDouble( cf, "solJ_sigmaB", 3.0 );
- etaB = Stg_ComponentFactory_GetRootDictDouble( cf, "solJ_etaB", 2.0 );
- etaA = Stg_ComponentFactory_GetRootDictDouble( cf, "solJ_etaA", 1.0 );
- dxB = Stg_ComponentFactory_GetRootDictDouble( cf, "solJ_dxB", 0.4 );
- dxA = Stg_ComponentFactory_GetRootDictDouble( cf, "solJ_dxA", 0.3 );
- x0B = Stg_ComponentFactory_GetRootDictDouble( cf, "solJ_x0B", 0.3 );
- x0A = Stg_ComponentFactory_GetRootDictDouble( cf, "solJ_x0A", 0.6 );
- zc = Stg_ComponentFactory_GetRootDictDouble( cf, "solJ_zc", 0.8 );
+ sigmaA = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solJ_sigmaA", 1.0 );
+ sigmaB = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solJ_sigmaB", 3.0 );
+ etaB = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solJ_etaB", 2.0 );
+ etaA = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solJ_etaA", 1.0 );
+ dxB = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solJ_dxB", 0.4 );
+ dxA = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solJ_dxA", 0.3 );
+ x0B = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solJ_x0B", 0.3 );
+ x0A = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solJ_x0A", 0.6 );
+ zc = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solJ_zc", 0.8 );
_Velic_solJ_Init( self, sigmaA, sigmaB, etaB, etaA, dxB, dxA, x0B, x0A, zc );
}
@@ -168,7 +168,7 @@ void* _Velic_solJ_DefaultNew( Name name
}
Index Underworld_Velic_solJ_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solJ_Type, "0", _Velic_solJ_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solJ_Type, (Name)"0", _Velic_solJ_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solJA/Analytic_solJA.c
--- a/SysTest/AnalyticPlugins/Velic_solJA/Analytic_solJA.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solJA/Analytic_solJA.c Thu Jan 14 17:41:33 2010 +1100
@@ -104,35 +104,35 @@ void _Velic_solJA_AssignFromXML( void* a
_AnalyticSolution_AssignFromXML( self, cf, data );
/* Create Analytic Fields */
- velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, velocityField, Velic_solJA_VelocityFunction );
- pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"PressureField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, pressureField, Velic_solJA_PressureFunction );
- stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, False, data );
- if ( stressField )
+ stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, False, data );
+ if ( stressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, stressField, Velic_solJA_StressFunction );
- strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, False, data );
- if ( strainRateField ) {
+ strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, False, data );
+ if ( strainRateField ) {
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, strainRateField, Velic_solJA_StrainRateFunction );
}
- recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStrainRateField", FeVariable, False, data );
- if ( recoveredStrainRateField )
+ recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStrainRateField", FeVariable, False, data );
+ if ( recoveredStrainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStrainRateField, Velic_solJA_StrainRateFunction );
- recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStressField", FeVariable, False, data );
- if ( recoveredStressField )
+ recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStressField", FeVariable, False, data );
+ if ( recoveredStressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStressField, Velic_solJA_StressFunction );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solJA_sigma", 1.0 );
- etaA = Stg_ComponentFactory_GetRootDictDouble( cf, "solJA_etaA", 100.0 );
- etaB = Stg_ComponentFactory_GetRootDictDouble( cf, "solJA_etaB", 1.0 );
- dx = Stg_ComponentFactory_GetRootDictDouble( cf, "solJA_dx", 0.4 );
- x0 = Stg_ComponentFactory_GetRootDictDouble( cf, "solJA_x0", 0.2 );
- zc = Stg_ComponentFactory_GetRootDictDouble( cf, "solJA_zc", 0.8 );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solJA_sigma", 1.0 );
+ etaA = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solJA_etaA", 100.0 );
+ etaB = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solJA_etaB", 1.0 );
+ dx = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solJA_dx", 0.4 );
+ x0 = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solJA_x0", 0.2 );
+ zc = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solJA_zc", 0.8 );
_Velic_solJA_Init( self, sigma, etaA, etaB, dx, x0, zc );
@@ -159,7 +159,7 @@ void* _Velic_solJA_DefaultNew( Name name
}
Index Underworld_Velic_solJA_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solJA_Type, "0", _Velic_solJA_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solJA_Type, (Name)"0", _Velic_solJA_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solKx/Analytic_solKx.c
--- a/SysTest/AnalyticPlugins/Velic_solKx/Analytic_solKx.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solKx/Analytic_solKx.c Thu Jan 14 17:41:33 2010 +1100
@@ -119,42 +119,42 @@ void _Velic_solKx_AssignFromXML( void* a
_AnalyticSolution_AssignFromXML( self, cf, data );
/* Create Analytic Fields */
- velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, velocityField, Velic_solKx_VelocityFunction );
- pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"PressureField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, pressureField, Velic_solKx_PressureFunction );
- viscosityField = Stg_ComponentFactory_ConstructByName( cf, "ViscosityField", FeVariable, False, data );
- if ( viscosityField )
+ viscosityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"ViscosityField", FeVariable, False, data );
+ if ( viscosityField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, viscosityField, Velic_solKx_ViscosityFunction );
- stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, False, data );
- if ( stressField )
+ stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, False, data );
+ if ( stressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, stressField, Velic_solKx_StressFunction );
- strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, False, data );
- if ( strainRateField )
+ strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, False, data );
+ if ( strainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, strainRateField, Velic_solKx_StrainRateFunction );
- recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStrainRateField", FeVariable, False, data );
- if ( recoveredStrainRateField )
+ recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStrainRateField", FeVariable, False, data );
+ if ( recoveredStrainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStrainRateField, Velic_solKx_StrainRateFunction );
- recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStressField", FeVariable, False, data );
- if ( recoveredStressField )
+ recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStressField", FeVariable, False, data );
+ if ( recoveredStressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStressField, Velic_solKx_StressFunction );
- recoveredPressureField = Stg_ComponentFactory_ConstructByName( cf, "recoveredPressureField", FeVariable, False, data );
- if ( recoveredPressureField )
+ recoveredPressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredPressureField", FeVariable, False, data );
+ if ( recoveredPressureField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredPressureField, Velic_solKx_PressureFunction );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solKx_sigma", 1.0 );
- _m = Stg_ComponentFactory_GetRootDictDouble( cf, "wavenumberY", 1 );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solKx_sigma", 1.0 );
+ _m = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"wavenumberY", 1 );
n = Stg_ComponentFactory_GetRootDictInt( cf, "wavenumberX", 1 );
- twiceB = Stg_ComponentFactory_GetRootDictDouble( cf, "solKx_twiceB", 2.0 );
- B = Stg_ComponentFactory_GetRootDictDouble( cf, "solKx_B", 0.5 * twiceB );
+ twiceB = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solKx_twiceB", 2.0 );
+ B = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solKx_B", 0.5 * twiceB );
_Velic_solKx_Init( self, sigma, _m, B, n );
@@ -181,7 +181,7 @@ void* _Velic_solKx_DefaultNew( Name name
}
Index Underworld_Velic_solKx_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solKx_Type, "0", _Velic_solKx_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solKx_Type, (Name)"0", _Velic_solKx_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solKz/Analytic_solKz.c
--- a/SysTest/AnalyticPlugins/Velic_solKz/Analytic_solKz.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solKz/Analytic_solKz.c Thu Jan 14 17:41:33 2010 +1100
@@ -110,10 +110,10 @@ void _Velic_solKz_AssignFromXML( void* a
/* Construct Parent */
_FieldTest_AssignFromXML( self, cf, data );
- sigma = Stg_ComponentFactory_GetRootDictDouble( cf, "solKz_sigma", 1.0 );
- twiceB = Stg_ComponentFactory_GetRootDictDouble( cf, "solKz_twiceB", 2.0 );
- B = Stg_ComponentFactory_GetRootDictDouble( cf, "solKz_B", 0.5 * twiceB );
- m = Stg_ComponentFactory_GetRootDictDouble( cf, "solKz_m", 1 );
+ sigma = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solKz_sigma", 1.0 );
+ twiceB = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solKz_twiceB", 2.0 );
+ B = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solKz_B", 0.5 * twiceB );
+ m = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solKz_m", 1 );
n = Stg_ComponentFactory_GetRootDictInt( cf, "solKz_n", 1 );
km = M_PI * m;
@@ -143,7 +143,7 @@ void* _Velic_solKz_DefaultNew( Name name
}
Index Underworld_Velic_solKz_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solKz_Type, "0", _Velic_solKz_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solKz_Type, (Name)"0", _Velic_solKz_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solL/Analytic_solL.c
--- a/SysTest/AnalyticPlugins/Velic_solL/Analytic_solL.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solL/Analytic_solL.c Thu Jan 14 17:41:33 2010 +1100
@@ -97,32 +97,32 @@ void _Velic_solL_AssignFromXML( void* an
_AnalyticSolution_AssignFromXML( self, cf, data );
/* Create Analytic Fields */
- velocityField = Stg_ComponentFactory_ConstructByName( cf, "VelocityField", FeVariable, True, data );
+ velocityField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, velocityField, Velic_solL_VelocityFunction );
- pressureField = Stg_ComponentFactory_ConstructByName( cf, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"PressureField", FeVariable, True, data );
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, pressureField, Velic_solL_PressureFunction );
- stressField = Stg_ComponentFactory_ConstructByName( cf, "StressField", FeVariable, False, data );
- if ( stressField )
+ stressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StressField", FeVariable, False, data );
+ if ( stressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, stressField, Velic_solL_StressFunction );
- strainRateField = Stg_ComponentFactory_ConstructByName( cf, "StrainRateField", FeVariable, False, data );
- if ( strainRateField ) {
+ strainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"StrainRateField", FeVariable, False, data );
+ if ( strainRateField ) {
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, strainRateField, Velic_solL_StrainRateFunction );
}
- recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStrainRateField", FeVariable, False, data );
- if ( recoveredStrainRateField )
+ recoveredStrainRateField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStrainRateField", FeVariable, False, data );
+ if ( recoveredStrainRateField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStrainRateField, Velic_solL_StrainRateFunction );
- recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, "recoveredStressField", FeVariable, False, data );
- if ( recoveredStressField )
+ recoveredStressField = Stg_ComponentFactory_ConstructByName( cf, (Name)"recoveredStressField", FeVariable, False, data );
+ if ( recoveredStressField )
AnalyticSolution_RegisterFeVariableWithAnalyticFunction( self, recoveredStressField, Velic_solL_StressFunction );
- sigmaB = Stg_ComponentFactory_GetRootDictDouble( cf, "solL_sigmaB", 2.0 );
- sigmaA = Stg_ComponentFactory_GetRootDictDouble( cf, "solL_sigmaA", 1.0 );
- eta = Stg_ComponentFactory_GetRootDictDouble( cf, "solL_eta", 1.0 );
+ sigmaB = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solL_sigmaB", 2.0 );
+ sigmaA = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solL_sigmaA", 1.0 );
+ eta = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solL_eta", 1.0 );
_Velic_solL_Init( self, sigmaB, sigmaA, eta );
}
@@ -148,7 +148,7 @@ void* _Velic_solL_DefaultNew( Name name
}
Index Underworld_Velic_solL_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Velic_solL_Type, "0", _Velic_solL_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Velic_solL_Type, (Name)"0", _Velic_solL_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d SysTest/AnalyticPlugins/Velic_solS/Analytic_solS.c
--- a/SysTest/AnalyticPlugins/Velic_solS/Analytic_solS.c Tue Jan 12 14:33:16 2010 +1100
+++ b/SysTest/AnalyticPlugins/Velic_solS/Analytic_solS.c Thu Jan 14 17:41:33 2010 +1100
@@ -76,7 +76,7 @@ void _Underworld_solS_Init( Underworld_s
self->_n = _n;
isCorrectInput = _checkInputParams( self );
- Journal_Firewall( isCorrectInput , Journal_Register( Error_Type, "Underworld_solS" ),
+ Journal_Firewall( isCorrectInput , Journal_Register( Error_Type, (Name)"Underworld_solS" ),
"Error in function %s: Bad Input parameters, solution check valid values in .tex documentation\n",
__func__ );
}
@@ -104,13 +104,13 @@ void _Underworld_solS_AssignFromXML( voi
/* Construct Parent */
_FieldTest_AssignFromXML( self, cf, data );
- _eta = Stg_ComponentFactory_GetRootDictDouble( cf, "solS_eta", 1.0 );
+ _eta = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"solS_eta", 1.0 );
_n = Stg_ComponentFactory_GetRootDictInt( cf, "sinusoidalLidWavenumber", 1 );
_Underworld_solS_Init( self, _eta, _n );
isCorrectInput = _checkInputParams( self );
- Journal_Firewall( isCorrectInput , Journal_Register( Error_Type, "solS" ),
+ Journal_Firewall( isCorrectInput , Journal_Register( Error_Type, (Name)"solS" ),
"Error in function %s: Bad Input parameters, solution check valid values in .tex documentation\n",
__func__ );
}
@@ -142,7 +142,7 @@ void* _Underworld_solS_DefaultNew( Name
}
Index Underworld_Velic_solS_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_solS_Type, "0", _Underworld_solS_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_solS_Type, (Name)"0", _Underworld_solS_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/BaseRecoveryFeVar.c
--- a/Utils/src/BaseRecoveryFeVar.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/BaseRecoveryFeVar.c Thu Jan 14 17:41:33 2010 +1100
@@ -122,15 +122,15 @@ void _BaseRecoveryFeVar_AssignFromXML( v
vr = self->context->variable_Register;
/* get the initial field */
- rawField = Stg_ComponentFactory_ConstructByKey( cf, self->name, "RawField", FeVariable, True, data );
+ rawField = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"RawField", FeVariable, True, data );
/* get the order of interpolation */
- rawOrderOfInterpolation = Stg_ComponentFactory_GetInt( cf, self->name , "orderOfInterpolation", 1 );
+ rawOrderOfInterpolation = Stg_ComponentFactory_GetInt( cf, self->name , (Dictionary_Entry_Key)"orderOfInterpolation", 1 );
- coeffInterpolation = Stg_ComponentFactory_GetBool( cf, self->name , "coeffInterpolation", True );
+ coeffInterpolation = Stg_ComponentFactory_GetBool( cf, self->name , (Dictionary_Entry_Key)"coeffInterpolation", True );
- Journal_Firewall( (rawOrderOfInterpolation < 2 ) ,
- Journal_Register( Error_Type, "BadNews" ),
+ Journal_Firewall( (rawOrderOfInterpolation < 2 ) ,
+ Journal_Register( Error_Type, (Name)"BadNews" ),
"Error in %s, the orderOfInterpolation must be: 1, higher order coefficients haven't been implemented. Currently it's %d\n"
"The larger the number the orderOfInterpolation:\n"
" * the more accurate the recoveredField\n"
@@ -158,7 +158,7 @@ void _BaseRecoveryFeVar_Build( void* _se
componentsCount = self->orderOfInterpolation * self->fieldComponentCount;
/* create an variable names - create an extra variableName for the dofLayout */
variableName = Memory_Alloc_Array( char*, componentsCount * sizeof(char*) + 1, "names");
- tmpName = Stg_Object_AppendSuffix( self, self->name );
+ tmpName = Stg_Object_AppendSuffix( self, (Name)self->name );
/* setup the sync and the nodeDomainCount */
sync = Mesh_GetSync( self->feMesh, MT_VERTEX );
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/DensityField.c
--- a/Utils/src/DensityField.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/DensityField.c Thu Jan 14 17:41:33 2010 +1100
@@ -111,9 +111,9 @@ void _DensityField_AssignFromXML( void*
_ParticleFeVariable_AssignFromXML( self, cf, data );
- buoyancyForceTerm = Stg_ComponentFactory_ConstructByKey( cf, self->name, "BuoyancyForceTerm", BuoyancyForceTerm, True, data );
+ buoyancyForceTerm = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"BuoyancyForceTerm", BuoyancyForceTerm, True, data );
variable_Register = self->context->variable_Register;
- assert( variable_Register );
+ assert( variable_Register );
_DensityField_Init( self, buoyancyForceTerm, variable_Register );
}
@@ -127,7 +127,7 @@ void _DensityField_Build( void* densityF
/* Create Dof Layout */
assert( Class_IsSuper( self->feMesh->topo, IGraph ) );
- tmpName = Stg_Object_AppendSuffix( self, "densityVariable" );
+ tmpName = Stg_Object_AppendSuffix( self, (Name)"densityVariable" );
self->dataVariable = Variable_NewScalar(
tmpName,
(AbstractContext*)self->context,
@@ -139,7 +139,7 @@ void _DensityField_Build( void* densityF
Memory_Free( tmpName );
self->fieldComponentCount = 1;
- tmpName = Stg_Object_AppendSuffix( self, "densityDOF" );
+ tmpName = Stg_Object_AppendSuffix( self, (Name)"densityDOF" );
self->dofLayout = DofLayout_New( tmpName, self->context, variable_Register, 0, self->feMesh );
self->dofLayout->_numItemsInLayout = FeMesh_GetNodeDomainSize( self->feMesh );
DofLayout_AddAllFromVariableArray( self->dofLayout, 1, &self->dataVariable );
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/Finalise.c
--- a/Utils/src/Finalise.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/Finalise.c Thu Jan 14 17:41:33 2010 +1100
@@ -51,7 +51,7 @@
#include <stdio.h>
Bool Underworld_Utils_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_ObjectList_Delete( repRequiredRawFields_Reg );
return True;
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/Init.c
--- a/Utils/src/Init.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/Init.c Thu Jan 14 17:41:33 2010 +1100
@@ -66,17 +66,17 @@ Bool Underworld_Utils_Init( int* argc, c
/* A register to keep track of fields needed to be initialise before the REP_Algorithm */
repRequiredRawFields_Reg = Stg_ObjectList_New();
- 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, UnderworldContext_Type, "0", _UnderworldContext_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, PressureTemperatureOutput_Type, "0", _PressureTemperatureOutput_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, Underworld_SwarmOutput_Type, "0", _Underworld_SwarmOutput_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, RadiogenicHeatingTerm_Type, "0", _RadiogenicHeatingTerm_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, StressField_Type , "0", _StressField_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, NodalPressureField_Type , "0", _NodalPressureField_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, SmoothVelGradField_Type , "0", _SmoothVelGradField_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, ViscosityField_Type , "0", _ViscosityField_DefaultNew );
- Stg_ComponentRegister_Add( componentRegister, DensityField_Type , "0", _DensityField_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, UnderworldContext_Type, (Name)"0", _UnderworldContext_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, PressureTemperatureOutput_Type, (Name)"0", _PressureTemperatureOutput_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, Underworld_SwarmOutput_Type, (Name)"0", _Underworld_SwarmOutput_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, RadiogenicHeatingTerm_Type, (Name)"0", _RadiogenicHeatingTerm_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, StressField_Type , (Name)"0", _StressField_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, NodalPressureField_Type , (Name)"0", _NodalPressureField_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, SmoothVelGradField_Type , (Name)"0", _SmoothVelGradField_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, ViscosityField_Type , (Name)"0", _ViscosityField_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, DensityField_Type , (Name)"0", _DensityField_DefaultNew );
RegisterParent( UnderworldContext_Type, PICelleratorContext_Type );
RegisterParent( PressureTemperatureOutput_Type, SwarmOutput_Type );
@@ -89,17 +89,17 @@ Bool Underworld_Utils_Init( int* argc, c
RegisterParent( DensityField_Type, ParticleFeVariable_Type );
/* Register the new BaseClass for recovery fields */
- Stg_ComponentRegister_Add( componentRegister, BaseRecoveryFeVar_Type, "0", _BaseRecoveryFeVar_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, BaseRecoveryFeVar_Type, (Name)"0", _BaseRecoveryFeVar_DefaultNew );
RegisterParent( BaseRecoveryFeVar_Type, FeVariable_Type );
/* Register the SPR component */
- Stg_ComponentRegister_Add( componentRegister, SPR_StrainRate_Type, "0", _SPR_StrainRate_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, SPR_StrainRate_Type, (Name)"0", _SPR_StrainRate_DefaultNew );
RegisterParent( SPR_StrainRate_Type, BaseRecoveryFeVar_Type );
- Stg_ComponentRegister_Add( componentRegister, REP_Algorithm_Type, "0", _REP_Algorithm_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, REP_Algorithm_Type, (Name)"0", _REP_Algorithm_DefaultNew );
RegisterParent( REP_Algorithm_Type, Stg_Component_Type );
- Stg_ComponentRegister_Add( componentRegister, RecoveredFeVariable_Type, "0", _RecoveredFeVariable_DefaultNew );
+ Stg_ComponentRegister_Add( componentRegister, RecoveredFeVariable_Type, (Name)"0", _RecoveredFeVariable_DefaultNew );
RegisterParent( RecoveredFeVariable_Type, FeVariable_Type );
return True;
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/NodalPressureField.c
--- a/Utils/src/NodalPressureField.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/NodalPressureField.c Thu Jan 14 17:41:33 2010 +1100
@@ -120,12 +120,12 @@ void _NodalPressureField_AssignFromXML(
variable_Register = self->variable_Register;
assert( variable_Register );
- pressureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, "PressureField", FeVariable, True, data );
+ pressureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"PressureField", FeVariable, True, data );
/*
** If we're using this field for non-linear feedback, we'll need to update it in between
** non-linear iterations. */
- sle = Stg_ComponentFactory_ConstructByKey( cf, self->name, "SLE", SystemLinearEquations, False, data );
+ sle = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"SLE", SystemLinearEquations, False, data );
_NodalPressureField_Init( self, variable_Register, pressureField, sle );
@@ -140,7 +140,7 @@ void _NodalPressureField_Build( void* _s
/* Create Variable to store data */
assert( Class_IsSuper( self->feMesh->topo, IGraph ) );
- tmpName = Stg_Object_AppendSuffix( self, "DataVariable" );
+ tmpName = Stg_Object_AppendSuffix( self, (Name)"DataVariable" );
self->dataVariable = Variable_NewScalar(
tmpName,
(AbstractContext*)self->context,
@@ -151,7 +151,7 @@ void _NodalPressureField_Build( void* _s
self->variable_Register );
/* Create Dof Layout */
- tmpName2 = Stg_Object_AppendSuffix( self, "DofLayout" );
+ tmpName2 = Stg_Object_AppendSuffix( self, (Name)"DofLayout" );
self->dofLayout = DofLayout_New( tmpName2, self->context, self->variable_Register, 0, self->feMesh );
self->dofLayout->_numItemsInLayout = FeMesh_GetNodeDomainSize( self->feMesh );
for( node_I = 0; node_I < FeMesh_GetNodeDomainSize( self->feMesh ); node_I++ ) {
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/PressureTemperatureOutput.c
--- a/Utils/src/PressureTemperatureOutput.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/PressureTemperatureOutput.c Thu Jan 14 17:41:33 2010 +1100
@@ -160,8 +160,8 @@ void _PressureTemperatureOutput_AssignFr
_SwarmOutput_AssignFromXML( self, cf, data );
- pressureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, "PressureField", FeVariable, True, data ) ;
- temperatureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, "TemperatureField", FeVariable, True, data ) ;
+ pressureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"PressureField", FeVariable, True, data ) ;
+ temperatureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"TemperatureField", FeVariable, True, data ) ;
_PressureTemperatureOutput_Init( self, pressureField, temperatureField );
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/REP_Algorithm.c
--- a/Utils/src/REP_Algorithm.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/REP_Algorithm.c Thu Jan 14 17:41:33 2010 +1100
@@ -130,7 +130,7 @@ void _REP_Algorithm_Init( void* rep,
#if PATCH_DEBUG
char* filename;
- self->myStream = Journal_Register( Info_Type, self->type );
+ self->myStream = Journal_Register( Info_Type, (Name)self->type );
Stg_asprintf( &filename, "FieldRecovery-Output.%dof%d.dat", context->rank, context->nproc );
Stream_RedirectFile_WithPrependedPath( self->myStream, context->outputPath, filename );
Memory_Free( filename );
@@ -150,16 +150,16 @@ void _REP_Algorithm_AssignFromXML( void*
Dictionary* dictionary = Dictionary_GetDictionary( cf->componentDict, self->name );
Dictionary_Entry_Value* list;
char* varName;
- Stream* errorStream = Journal_Register( Error_Type, "_REP_Algorithm_Construct" );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)"_REP_Algorithm_Construct" );
int field_I, listCount;
self->IPswarm = NULL;
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", UnderworldContext, False, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", UnderworldContext, False, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
- list = Dictionary_Get( dictionary, "RepFieldList" );
+ list = Dictionary_Get( dictionary, (Dictionary_Entry_Key)"RepFieldList" );
Journal_Firewall(
list != NULL,
errorStream,
@@ -185,14 +185,14 @@ void _REP_Algorithm_AssignFromXML( void*
/* get all the rep fields from the dictionary */
for( field_I = 0 ; field_I < listCount ; field_I++ ) {
varName = Dictionary_Entry_Value_AsString( Dictionary_Entry_Value_GetElement( list, field_I ) );
- self->repFieldList[ field_I ] = Stg_ComponentFactory_ConstructByName( cf, varName, RecoveredFeVariable, True, data );
+ self->repFieldList[ field_I ] = Stg_ComponentFactory_ConstructByName( cf, (Name)varName, RecoveredFeVariable, True, data );
}
- self->constitutiveMatrix = Stg_ComponentFactory_ConstructByKey( cf, self->name, "ConstitutiveMatrix", ConstitutiveMatrix, True, data );
+ self->constitutiveMatrix = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"ConstitutiveMatrix", ConstitutiveMatrix, True, data );
- if(self->constitutiveMatrix) {
+ if(self->constitutiveMatrix ) {
/* implicitly get from constitutiveMatrix dictionary */
- self->IPswarm = Stg_ComponentFactory_ConstructByKey( cf, self->constitutiveMatrix->name, "Swarm", IntegrationPointsSwarm, True, data );
+ self->IPswarm = Stg_ComponentFactory_ConstructByKey( cf, self->constitutiveMatrix->name, (Dictionary_Entry_Key)"Swarm", IntegrationPointsSwarm, True, data );
/* check if any of the repFields require the storeConstitutiveMatrix, if so turnOn */
for( field_I = 0 ; field_I < listCount ; field_I++ ) {
@@ -206,7 +206,7 @@ void _REP_Algorithm_AssignFromXML( void*
}
else {
/* explicitly get from component dictionary */
- self->IPswarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, "IntegrationPoints", IntegrationPointsSwarm, True, data );
+ self->IPswarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"IntegrationPoints", IntegrationPointsSwarm, True, data );
}
self->repFieldCount = listCount;
@@ -240,19 +240,19 @@ void _REP_Algorithm_Execute( void* patch
* are executed in the below functions
*/
UnderworldContext* context = (UnderworldContext*)data;
- REP_Algorithm* self = (REP_Algorithm*)LiveComponentRegister_Get( context->CF->LCRegister, NameOfPatch );
+ REP_Algorithm* self = (REP_Algorithm*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)NameOfPatch );
double startTime;
int field_I;
assert( self );
/* TODO: Optimisation question. Is this a test and do function or a straigh do function */
for( field_I = 0 ; field_I < Stg_ObjectList_Count( repRequiredRawFields_Reg ); field_I++ )
- FeVariable_SyncShadowValues( (FeVariable*)Stg_ObjectList_At( repRequiredRawFields_Reg, field_I ) );
+ FeVariable_SyncShadowValues( (FeVariable* )Stg_ObjectList_At( repRequiredRawFields_Reg, field_I ) );
MPI_Barrier(MPI_COMM_WORLD);
startTime = MPI_Wtime();
- Journal_RPrintf( Journal_Register( Info_Type, "REP"),
+ Journal_RPrintf( Journal_Register( Info_Type, (Name)"REP" ),
"Start Recovery Method\n" );
/* Phases of the REP_Algorithm in this code */
@@ -270,7 +270,7 @@ void _REP_Algorithm_Execute( void* patch
/* 6: Perform a final sync for new proc boundary domain edge nodes */
_REP_Algorithm_CommunicateBoundaries( self );
- Journal_RPrintf( Journal_Register( Info_Type, "REP"),
+ Journal_RPrintf( Journal_Register( Info_Type, (Name)"REP" ),
"Time Taken for Recovery Method %f\n", MPI_Wtime()-startTime);
}
@@ -419,20 +419,13 @@ void _REP_Algorithm_AssembleAllLocalElem
elFi_Mat = Memory_Alloc_Array( double**, repFieldCount, "localElement_FiPerField" );
p_pVec = Memory_Alloc_Array( double*, repFieldCount, "position polynomialPerField" );
/* Assume GNx this the same for all fields */
- GNx = Memory_Alloc_2DArray( double, self->repFieldList[0]->dim, REP_MAXNODESPERPATCH, "GNx" );
+ GNx = Memory_Alloc_2DArray( double, self->repFieldList[0]->dim, REP_MAXNODESPERPATCH, (Name)"GNx" );
numberLocalElements = FeMesh_GetElementLocalSize( self->repFieldList[0]->feMesh );
- for( field_I = 0 ; field_I < self->repFieldCount ; field_I++ ) {
+ for( field_I = 0 ; field_I < self->repFieldCount ; field_I++ ) {
/* TODO assumes constant nodesPerEl across domain */
- elHi_Mat[field_I] = Memory_Alloc_3DArray( double,
- self->repFieldList[field_I]->fieldComponentCount,
- self->repFieldList[field_I]->dim * self->repFieldList[field_I]->nodesPerEl,
- self->repFieldList[field_I]->orderOfInterpolation,
- "localElement_Hi" );
- elFi_Mat[field_I] = Memory_Alloc_2DArray( double,
- self->repFieldList[field_I]->fieldComponentCount,
- self->repFieldList[field_I]->dim * self->repFieldList[field_I]->nodesPerEl,
- "localElement_Fi");
+ elHi_Mat[field_I] = Memory_Alloc_3DArray( double, self->repFieldList[field_I]->fieldComponentCount, self->repFieldList[field_I]->dim * self->repFieldList[field_I]->nodesPerEl, self->repFieldList[field_I]->orderOfInterpolation, (Name)"localElement_Hi" );
+ elFi_Mat[field_I] = Memory_Alloc_2DArray( double, self->repFieldList[field_I]->fieldComponentCount, self->repFieldList[field_I]->dim * self->repFieldList[field_I]->nodesPerEl, (Name)"localElement_Fi" );
p_pVec[field_I] = Memory_Alloc_Array( double, self->repFieldList[field_I]->orderOfInterpolation, "position polynomial" );
}
@@ -530,7 +523,7 @@ void _REP_Algorithm_Solver(double **arra
N = LDA = LDB = n;
dgesv_( &N, &NRHS, AT, &LDA, IPIV, bVec, &LDB, &info);
- Journal_Firewall( info == 0, Journal_Register( Error_Type, "error_REP" ), "Error: In %s looks like the lapack solver (DGESV) died with the error code %d. Could be due to ill-conditioned matrix ... I advise that you manually print the results of the matrices that lapack uses or contact a developer.\n", __func__, info);
+ Journal_Firewall( info == 0, Journal_Register( Error_Type, (Name)"error_REP" ), "Error: In %s looks like the lapack solver (DGESV) died with the error code %d. Could be due to ill-conditioned matrix ... I advise that you manually print the results of the matrices that lapack uses or contact a developer.\n", __func__, info);
Memory_Free(IPIV);
Memory_Free(AT);
}
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/RadiogenicHeatingTerm.c
--- a/Utils/src/RadiogenicHeatingTerm.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/RadiogenicHeatingTerm.c Thu Jan 14 17:41:33 2010 +1100
@@ -130,8 +130,8 @@ void _RadiogenicHeatingTerm_Build( void*
materialExt = ExtensionManager_GetFunc( material->extensionMgr, material, self->materialExtHandle );
/* Get List of Heating Elements from material's dictionary */
- list = Dictionary_Get( material->dictionary, "heatingElements" );
- heatingElementCount = Dictionary_Entry_Value_GetCount( list );
+ list = Dictionary_Get( material->dictionary, (Dictionary_Entry_Key)"heatingElements" );
+ heatingElementCount = Dictionary_Entry_Value_GetCount( list );
materialExt->heatingElementList = Memory_Alloc_Array( HeatingElement, heatingElementCount, "Heating Element" );
memset( materialExt->heatingElementList, 0, heatingElementCount * sizeof(HeatingElement) );
materialExt->heatingElementCount = heatingElementCount;
@@ -140,8 +140,8 @@ void _RadiogenicHeatingTerm_Build( void*
heatingElement = &materialExt->heatingElementList[ heatingElement_I ];
entry = Dictionary_Entry_Value_GetElement( list, heatingElement_I );
- heatingElement->Q = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( entry, "Q"));
- heatingElement->lambda = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( entry, "lambda"));
+ heatingElement->Q = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( entry, (Dictionary_Entry_Key)"Q") );
+ heatingElement->lambda = Dictionary_Entry_Value_AsDouble( Dictionary_Entry_Value_GetMember( entry, (Dictionary_Entry_Key)"lambda") );
}
}
}
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/RecoveredFeVariable.c
--- a/Utils/src/RecoveredFeVariable.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/RecoveredFeVariable.c Thu Jan 14 17:41:33 2010 +1100
@@ -158,20 +158,20 @@ void _RecoveredFeVariable_AssignFromXML(
_BaseRecoveryFeVar_AssignFromXML( self, cf, data );
/* assume there this always a stiffness matrix called k_matrix */
- stiffnessMatrix = Stg_ComponentFactory_ConstructByName( cf, "k_matrix", StiffnessMatrix, True, data );
+ stiffnessMatrix = Stg_ComponentFactory_ConstructByName( cf, (Name)"k_matrix", StiffnessMatrix, True, data );
- recoverPressure = Stg_ComponentFactory_GetBool( cf, self->name, "recoverPressure", True );
- if( recoverPressure == True ) {
- rawPressureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, "RawPressureField", FeVariable, True, data );
+ recoverPressure = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"recoverPressure", True );
+ if( recoverPressure == True ) {
+ rawPressureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"RawPressureField", FeVariable, True, data );
/* record the rawField that is required on the repRequired_RawField register */
- if( (unsigned)-1 == Stg_ObjectList_GetIndex( repRequiredRawFields_Reg, rawPressureField->name ) )
+ if( (unsigned )-1 == Stg_ObjectList_GetIndex( repRequiredRawFields_Reg, rawPressureField->name ) )
Stg_ObjectList_Append( repRequiredRawFields_Reg, rawPressureField );
}
- velGradField = Stg_ComponentFactory_ConstructByName( cf, "VelocityGradientsField", FeVariable, False, data );
+ velGradField = Stg_ComponentFactory_ConstructByName( cf, (Name)"VelocityGradientsField", FeVariable, False, data );
- refreshMeshConnectivity = Stg_ComponentFactory_GetBool( cf, self->name , "refreshMeshConnectivity", False );
- recoverStrain = Stg_ComponentFactory_GetBool( cf, self->name , "recoverStrain", False );
+ refreshMeshConnectivity = Stg_ComponentFactory_GetBool( cf, self->name , (Dictionary_Entry_Key)"refreshMeshConnectivity", False );
+ recoverStrain = Stg_ComponentFactory_GetBool( cf, self->name , (Dictionary_Entry_Key)"recoverStrain", False );
_RecoveredFeVariable_Init( self, stiffnessMatrix, rawPressureField, velGradField, refreshMeshConnectivity, recoverStrain );
}
@@ -216,7 +216,7 @@ void _RecoveredFeVariable_Initialise( vo
Stg_Component_Initialise( self->dofLayout, data, False );
Stg_Component_Initialise( self->velGradField, data, False );
- self->pMatrix = Memory_Alloc_2DArray( double, self->fieldComponentCount, self->orderOfInterpolation , "P_Matrix");
+ self->pMatrix = Memory_Alloc_2DArray( double, self->fieldComponentCount, self->orderOfInterpolation , (Name)"P_Matrix" );
self->CPmat = Memory_Alloc_2DArray( double, self->fieldComponentCount, self->orderOfInterpolation, "CP matrix, for strainRate only");
self->tmpC = Memory_Alloc_2DArray( double, self->fieldComponentCount, self->fieldComponentCount, "tmp C matrix, for strainRate only");
@@ -585,12 +585,12 @@ void RecoveredFeVariable_SetupWorkSpace(
rowsInH = nodesInPatch * self->dim;
/* will be useful if AMR begins, currently assumes a static mesh */
- self->patch_H = Memory_Alloc_3DArray( double, dofThatExist, rowsInH, order , "H_Matrix");
- self->patch_F = Memory_Alloc_2DArray( double, dofThatExist, rowsInH, "F Vector");
+ self->patch_H = Memory_Alloc_3DArray( double, dofThatExist, rowsInH, order , (Name)"H_Matrix" );
+ self->patch_F = Memory_Alloc_2DArray( double, dofThatExist, rowsInH, (Name)"F Vector" );
self->H_t = Memory_Alloc_2DArray( double, order, rowsInH/*rowsInH, dofThatExist*/, " H transpose");
- self->AMat = Memory_Alloc_3DArray( double, dofThatExist, order, order , "AMatrix");
- self->bVec = Memory_Alloc_2DArray( double, dofThatExist, order , "BVector");
- self->tmpEl_H = Memory_Alloc_2DArray( double, rowsInH, order , "tmp Element H");
+ self->AMat = Memory_Alloc_3DArray( double, dofThatExist, order, order , (Name)"AMatrix" );
+ self->bVec = Memory_Alloc_2DArray( double, dofThatExist, order , (Name)"BVector" );
+ self->tmpEl_H = Memory_Alloc_2DArray( double, rowsInH, order , (Name)"tmp Element H" );
self->tmpEl_F = Memory_Alloc_Array( double, rowsInH, "tmp Element H");
}
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/SPR_StrainRate.c
--- a/Utils/src/SPR_StrainRate.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/SPR_StrainRate.c Thu Jan 14 17:41:33 2010 +1100
@@ -147,15 +147,15 @@ void _SPR_StrainRate_Execute( void* patc
* are executed in the below functions
*/
PICelleratorContext* context = (PICelleratorContext*)data;
- SPR_StrainRate* self = (SPR_StrainRate*) LiveComponentRegister_Get( context->CF->LCRegister, NameOfPatch );
+ SPR_StrainRate* self = (SPR_StrainRate*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)NameOfPatch );
double startTime;
assert( self );
FeVariable_SyncShadowValues( self->rawField );
MPI_Barrier(MPI_COMM_WORLD);
- startTime = MPI_Wtime();
- Journal_RPrintf( Journal_Register( Info_Type, "REP"), "Start Recovery Method\n" );
+ startTime = MPI_Wtime( );
+ Journal_RPrintf( Journal_Register( Info_Type, (Name)"REP" ), "Start Recovery Method\n" );
/* Phases of the SPR_StrainRate in this code */
@@ -168,7 +168,7 @@ void _SPR_StrainRate_Execute( void* patc
/* 4: Perform a final sync for new proc boundary domain edge nodes */
FeVariable_SyncShadowValues( self );
- Journal_RPrintf( Journal_Register( Info_Type, "REP"), "Time Taken for Recovery Method %f\n", MPI_Wtime()-startTime);
+ Journal_RPrintf( Journal_Register( Info_Type, (Name)"REP" ), "Time Taken for Recovery Method %f\n", MPI_Wtime()-startTime);
}
@@ -185,9 +185,9 @@ void _SPR_StrainRate_AssembleSolveLocalP
/* Allocate memory to AMatrix and bVectors */
- AMatrix = Memory_Alloc_2DArray( double, orderOfInterpolation, orderOfInterpolation, "A matrix" );
+ AMatrix = Memory_Alloc_2DArray( double, orderOfInterpolation, orderOfInterpolation, (Name)"A matrix" );
/* multiple bVectors are needed for each dof */
- bVector = Memory_Alloc_2DArray( double, dofThatExist, orderOfInterpolation, "b Vector * dof" );
+ bVector = Memory_Alloc_2DArray( double, dofThatExist, orderOfInterpolation, (Name)"b Vector * dof" );
patchCoeff = Memory_Alloc_Array( double, orderOfInterpolation * dofThatExist, "tmp coefficient array" );
nLocalNodes = FeMesh_GetNodeLocalSize( self->rawField->feMesh );
@@ -245,11 +245,11 @@ void _SPR_StrainRate_AssemblePatch( SPR_
/* 2) Memory Allocations + Initialisations */
scp_eps = Memory_Alloc_Array( SymmetricTensor, nbrElCount, "StrainRate at superconvergent points" );
- globalCoord = Memory_Alloc_2DArray( double, nbrElCount, self->dim, "Global Coords of superconvergent points" );
+ globalCoord = Memory_Alloc_2DArray( double, nbrElCount, self->dim, (Name)"Global Coords of superconvergent points" );
- pVec = Memory_Alloc_2DArray( double, nbrElCount, orderOfInterpolation, "Holds transformed global coord polynomials" );
+ pVec = Memory_Alloc_2DArray( double, nbrElCount, orderOfInterpolation, (Name)"Holds transformed global coord polynomials" );
- /* 3) Now collect information, to go find each elements contribution to the patch
+ /* 3 ) Now collect information, to go find each elements contribution to the patch
* So find the p vectors and strain-rate pseudo vectors for the Ax=b equation
* */
for( nbrEl_I = 0 ; nbrEl_I < nbrElCount ; nbrEl_I++ ) {
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/SmoothVelGradField.c
--- a/Utils/src/SmoothVelGradField.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/SmoothVelGradField.c Thu Jan 14 17:41:33 2010 +1100
@@ -130,12 +130,12 @@ void _SmoothVelGradField_AssignFromXML(
variable_Register = self->context->variable_Register;
assert( variable_Register );
- velField = Stg_ComponentFactory_ConstructByKey( cf, self->name, "VelocityField", FeVariable, True, data );
+ velField = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"VelocityField", FeVariable, True, data );
/*
** If we're using this field for non-linear feedback, we'll need to update it in between
** non-linear iterations. */
- sle = Stg_ComponentFactory_ConstructByKey( cf, self->name, "SLE", SystemLinearEquations, False, data );
+ sle = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"SLE", SystemLinearEquations, False, data );
_SmoothVelGradField_Init( self, variable_Register, velField, sle );
}
@@ -174,7 +174,7 @@ void _SmoothVelGradField_Build( void* _s
/* Create Variable to store data */
assert( Class_IsSuper( self->feMesh->topo, IGraph ) );
- tmpName = Stg_Object_AppendSuffix( self, "DataVariable" );
+ tmpName = Stg_Object_AppendSuffix( self, (Name)"DataVariable" );
self->dataVariable = Variable_NewVector(
tmpName,
(AbstractContext*)self->context,
@@ -196,7 +196,7 @@ void _SmoothVelGradField_Build( void* _s
Memory_Free( tmpName );
/* Create Dof Layout */
- tmpName = Stg_Object_AppendSuffix( self, "DofLayout" );
+ tmpName = Stg_Object_AppendSuffix( self, (Name)"DofLayout" );
self->dofLayout = DofLayout_New( tmpName, self->context, self->variable_Register, 0, self->feMesh );
self->dofLayout->_numItemsInLayout = FeMesh_GetNodeDomainSize( self->feMesh );
for( variable_I = 0; variable_I < self->fieldComponentCount ; variable_I++ ) {
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/StressField.c
--- a/Utils/src/StressField.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/StressField.c Thu Jan 14 17:41:33 2010 +1100
@@ -154,15 +154,15 @@ void _StressField_AssignFromXML( void* s
/* Construct Parent */
_ParticleFeVariable_AssignFromXML( self, cf, data );
- strainRateField = Stg_ComponentFactory_ConstructByKey( cf, self->name, "StrainRateField", FeVariable, True, data );
- constitutiveMatrix = Stg_ComponentFactory_ConstructByKey( cf, self->name, "ConstitutiveMatrix", ConstitutiveMatrix, True, data );
+ strainRateField = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"StrainRateField", FeVariable, True, data );
+ constitutiveMatrix = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"ConstitutiveMatrix", ConstitutiveMatrix, True, data );
variable_Register = self->context->variable_Register;
- assert( variable_Register );
+ assert( variable_Register );
- stressVariableName = Stg_ComponentFactory_GetString( cf, self->name, "StressVariable", "Stress" );
+ stressVariableName = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"StressVariable", "Stress" );
stressVariable = Variable_Register_GetByName( variable_Register, stressVariableName );
- sle = Stg_ComponentFactory_ConstructByKey( cf, self->name, "SLE", SystemLinearEquations, False, data );
+ sle = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"SLE", SystemLinearEquations, False, data );
_StressField_Init( self, strainRateField, constitutiveMatrix, stressVariable, variable_Register, sle );
}
@@ -196,7 +196,7 @@ void _StressField_Build( void* stressFie
/* Create Variable to store data */
assert( Class_IsSuper( self->feMesh->topo, IGraph ) );
- tmpName = Stg_Object_AppendSuffix( self, "DataVariable" );
+ tmpName = Stg_Object_AppendSuffix( self, (Name)"DataVariable" );
self->dataVariable = Variable_NewVector(
tmpName,
(AbstractContext*)self->context,
@@ -215,7 +215,7 @@ void _StressField_Build( void* stressFie
Memory_Free( tmpName );
/* Create Dof Layout */
- tmpName = Stg_Object_AppendSuffix( self, "DofLayout" );
+ tmpName = Stg_Object_AppendSuffix( self, (Name)"DofLayout" );
self->dofLayout = DofLayout_New( tmpName, self->context, self->variable_Register, 0, self->feMesh );
self->dofLayout->_numItemsInLayout = FeMesh_GetNodeDomainSize( self->feMesh );
for( variable_I = 0; variable_I < self->fieldComponentCount ; variable_I++ ) {
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/UnderworldContext.c
--- a/Utils/src/UnderworldContext.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/UnderworldContext.c Thu Jan 14 17:41:33 2010 +1100
@@ -207,16 +207,16 @@ void UnderworldContext_AssignPointers( v
return;
#if 0
- self->timeIntegrator = (TimeIntegrator*) LiveComponentRegister_Get( self->CF->LCRegister, "timeIntegrator" );
+ self->timeIntegrator = (TimeIntegrator*) LiveComponentRegister_Get( self->CF->LCRegister, (Name)"timeIntegrator" );
/* Get SLEs */
- self->stokesSLE = (Stokes_SLE*) LiveComponentRegister_Get( self->CF->LCRegister, "stokesEqn" );
- self->energySLE = (AdvectionDiffusionSLE*) LiveComponentRegister_Get( self->CF->LCRegister, "EnergyEqn" );
- self->compositionSLE = (AdvectionDiffusionSLE*) LiveComponentRegister_Get( self->CF->LCRegister, "CompositionEqn" );
- self->constitutiveMatrix = (ConstitutiveMatrix*) LiveComponentRegister_Get( self->CF->LCRegister, "constitutiveMatrix" );
+ self->stokesSLE = (Stokes_SLE* ) LiveComponentRegister_Get( self->CF->LCRegister, (Name)"stokesEqn" );
+ self->energySLE = (AdvectionDiffusionSLE* ) LiveComponentRegister_Get( self->CF->LCRegister, (Name)"EnergyEqn" );
+ self->compositionSLE = (AdvectionDiffusionSLE* ) LiveComponentRegister_Get( self->CF->LCRegister, (Name)"CompositionEqn" );
+ self->constitutiveMatrix = (ConstitutiveMatrix* ) LiveComponentRegister_Get( self->CF->LCRegister, (Name)"constitutiveMatrix" );
#endif
- Stream_UnIndentBranch( StgFEM_Debug );
+ Stream_UnIndentBranch( StgFEM_Debug );
}
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/Underworld_SwarmOutput.c
--- a/Utils/src/Underworld_SwarmOutput.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/Underworld_SwarmOutput.c Thu Jan 14 17:41:33 2010 +1100
@@ -169,14 +169,14 @@ void _Underworld_SwarmOutput_AssignFromX
Dictionary_Entry_Value* list;
unsigned int listCount, feVar_I;
char* varName;
- Stream *errorStream = Journal_Register( Error_Type, "_Underworld_SwarmOutput_Construct" );
+ Stream *errorStream = Journal_Register( Error_Type, (Name)"_Underworld_SwarmOutput_Construct" );
FeVariable** feVariableList;
- context = Stg_ComponentFactory_ConstructByName( cf, "context", PICelleratorContext, True, data ) ;
- materialSwarm = (MaterialPointsSwarm*)Stg_ComponentFactory_ConstructByKey( cf, self->name, "Swarm", MaterialPointsSwarm, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", PICelleratorContext, True, data ) ;
+ materialSwarm = (MaterialPointsSwarm* )Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Swarm", MaterialPointsSwarm, True, data );
/* Get all Swarms specified in input file, under swarms */
- list = Dictionary_Get( dictionary, "FeVariables" );
+ list = Dictionary_Get( dictionary, (Dictionary_Entry_Key)"FeVariables" );
Journal_Firewall(
list != NULL,
@@ -203,7 +203,7 @@ void _Underworld_SwarmOutput_AssignFromX
for( feVar_I = 0 ; feVar_I < listCount ; feVar_I++ ) {
varName = Dictionary_Entry_Value_AsString( Dictionary_Entry_Value_GetElement( list, feVar_I ) );
- feVariableList[ feVar_I ] = Stg_ComponentFactory_ConstructByName( cf, varName, FeVariable, True, data );
+ feVariableList[ feVar_I ] = Stg_ComponentFactory_ConstructByName( cf, (Name)varName, FeVariable, True, data );
}
_Underworld_SwarmOutput_Init( self,
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/ViscosityField.c
--- a/Utils/src/ViscosityField.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/ViscosityField.c Thu Jan 14 17:41:33 2010 +1100
@@ -117,9 +117,9 @@ void _ViscosityField_AssignFromXML( void
/* Construct Parent */
_ParticleFeVariable_AssignFromXML( self, cf, data );
- constitutiveMatrix = Stg_ComponentFactory_ConstructByKey( cf, self->name, "ConstitutiveMatrix", ConstitutiveMatrix, True, data );
+ constitutiveMatrix = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"ConstitutiveMatrix", ConstitutiveMatrix, True, data );
variable_Register = self->context->variable_Register;
- assert( variable_Register );
+ assert( variable_Register );
_ViscosityField_Init( self, constitutiveMatrix, variable_Register );
}
@@ -133,7 +133,7 @@ void _ViscosityField_Build( void* viscos
/* Create Dof Layout */
assert( Class_IsSuper( self->feMesh->topo, IGraph ) );
- tmpName = Stg_Object_AppendSuffix( self, "viscosityVariable" );
+ tmpName = Stg_Object_AppendSuffix( self, (Name)"viscosityVariable" );
self->dataVariable = Variable_NewScalar(
tmpName,
(AbstractContext*)self->context,
@@ -145,7 +145,7 @@ void _ViscosityField_Build( void* viscos
Memory_Free( tmpName );
self->fieldComponentCount = 1;
- tmpName = Stg_Object_AppendSuffix( self, "viscosityDOF" );
+ tmpName = Stg_Object_AppendSuffix( self, (Name)"viscosityDOF" );
self->dofLayout = DofLayout_New( tmpName, self->context, self->variable_Register, 0, self->feMesh );
self->dofLayout->_numItemsInLayout = FeMesh_GetNodeDomainSize( self->feMesh );
DofLayout_AddAllFromVariableArray( self->dofLayout, 1, &self->dataVariable );
diff -r 55c0e5081456 -r d7d947597d6d Utils/src/XDMFGenerator.c
--- a/Utils/src/XDMFGenerator.c Tue Jan 12 14:33:16 2010 +1100
+++ b/Utils/src/XDMFGenerator.c Thu Jan 14 17:41:33 2010 +1100
@@ -64,12 +64,12 @@ void XDMFGenerator_GenerateAll( void* _c
/** only the MASTER process writes to the file. other processes send information to the MASTER where required **/
if(context->rank == MASTER) {
Bool fileOpened;
- Stream* errorStream = Journal_Register( Error_Type, CURR_MODULE_NAME );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)CURR_MODULE_NAME );
char* filename;
char* outputPathString;
/** Create Stream **/
- stream = Journal_Register( InfoStream_Type, "XDMFOutputFile" );
+ stream = Journal_Register( InfoStream_Type, (Name)"XDMFOutputFile" );
/** Set auto flush on stream **/
Stream_SetAutoFlush( stream, True );
@@ -121,8 +121,8 @@ void _XDMFGenerator_WriteFieldSchema( Un
Index elementGlobalSize;
Element_GlobalIndex gElement_I;
Index var_I = 0;
- Bool saveCoords = Dictionary_GetBool_WithDefault( context->dictionary, "saveCoordsWithFields", False );
- Stream* errorStream = Journal_Register( Error_Type, CURR_MODULE_NAME );
+ Bool saveCoords = Dictionary_GetBool_WithDefault( context->dictionary, (Dictionary_Entry_Key)"saveCoordsWithFields", False );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)CURR_MODULE_NAME );
Name variableType = NULL;
Name topologyType = NULL;
unsigned componentCount = LiveComponentRegister_GetCount(stgLiveComponentRegister);
@@ -130,7 +130,7 @@ void _XDMFGenerator_WriteFieldSchema( Un
Stg_Component* stgComp;
/** search for entire live component register for feMesh types **/
- for( compI = 0 ; compI < componentCount ; compI++){
+ for( compI = 0 ; compI < componentCount ; compI++ ){
stgComp = LiveComponentRegister_At( stgLiveComponentRegister, compI );
/* check that component is of type FeMesh, and that its element family is linear */
if ( Stg_Class_IsInstance( stgComp, FeMesh_Type ) && !strcmp( ((FeMesh*)stgComp)->feElFamily, "linear" ) ) {
@@ -306,7 +306,7 @@ void _XDMFGenerator_WriteSwarmSchema( Un
Name swarmVarName;
Name variableType = NULL;
Name filename_part = NULL;
- Stream* errorStream = Journal_Register( Error_Type, CURR_MODULE_NAME );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)CURR_MODULE_NAME );
const int FINISHED_WRITING_TAG = 100;
MPI_Status status;
diff -r 55c0e5081456 -r d7d947597d6d libUnderworld/Toolbox/Toolbox.c
--- a/libUnderworld/Toolbox/Toolbox.c Tue Jan 12 14:33:16 2010 +1100
+++ b/libUnderworld/Toolbox/Toolbox.c Thu Jan 14 17:41:33 2010 +1100
@@ -72,11 +72,11 @@ void Underworld_Toolbox_Finalise( Plugin
void Underworld_Toolbox_Finalise( PluginsManager* pluginsManager ) {
Underworld_Finalise();
- Journal_RPrintf( Journal_Register( Info_Type, Underworld_Toolbox_Type ), "Finalised: Underworld Toolbox.\n" );
+ Journal_RPrintf( Journal_Register( Info_Type, (Name)Underworld_Toolbox_Type ), "Finalised: Underworld Toolbox.\n" );
}
Index Underworld_Toolbox_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_Toolbox_Type, "0", _Underworld_Toolbox_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_Toolbox_Type, (Name)"0", _Underworld_Toolbox_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d libUnderworld/src/Finalise.c
--- a/libUnderworld/src/Finalise.c Tue Jan 12 14:33:16 2010 +1100
+++ b/libUnderworld/src/Finalise.c Thu Jan 14 17:41:33 2010 +1100
@@ -61,7 +61,7 @@ Bool Underworld_Finalise( void ) {
Underworld_Utils_Finalise();
Underworld_Rheology_Finalise();
- 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;
} else {
diff -r 55c0e5081456 -r d7d947597d6d libUnderworld/src/Init.c
--- a/libUnderworld/src/Init.c Tue Jan 12 14:33:16 2010 +1100
+++ b/libUnderworld/src/Init.c Thu Jan 14 17:41:33 2010 +1100
@@ -91,19 +91,19 @@ Bool Underworld_Init( int* argc, char**
Underworld_Rheology_Init( argc, argv );
Underworld_Utils_Init( argc, argv );
- 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" ),
"Underworld (Geodynamics framework) revision %s. Copyright (C) 2005 Monash Cluster Computing.\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 );
/* Create Streams */
- Underworld_Debug = Journal_Register( Debug_Type, "Context" );
- Underworld_Info = Journal_Register( Info_Type, "Context" );
- Underworld_Error = Journal_Register( Error_Type, "Context" );
+ Underworld_Debug = Journal_Register( Debug_Type, (Name)"Context" );
+ Underworld_Info = Journal_Register( Info_Type, (Name)"Context" );
+ Underworld_Error = Journal_Register( Error_Type, (Name)"Context" );
/* Add the Underworld path to the global xml path dictionary */
directory = Memory_Alloc_Array( char, 400, "xmlDirectory" ) ;
diff -r 55c0e5081456 -r d7d947597d6d libUnderworld/tests/testLibUnderworld.c
--- a/libUnderworld/tests/testLibUnderworld.c Tue Jan 12 14:33:16 2010 +1100
+++ b/libUnderworld/tests/testLibUnderworld.c Thu Jan 14 17:41:33 2010 +1100
@@ -95,7 +95,7 @@ int main( int argc, char* argv[] ) {
printf( "Watching rank: %i\n", rank );
/* Testing entries in xmlSearchPaths */
- testDirectory = Stg_ObjectList_Get( xmlSearchPaths,"StGermain" );
+ testDirectory = Stg_ObjectList_Get( xmlSearchPaths, (Name)"StGermain" );
if (testDirectory != NULL) {
printf("StGermain XML library Path found.\n");
}
@@ -103,12 +103,12 @@ int main( int argc, char* argv[] ) {
printf("StGermain XML library Path not found.\n");
}
/* For build in the same build directory */
- if (strcmp((char*)LIB_DIR, (char*)testDirectory)) {
+ if (strcmp((char* )LIB_DIR, (char*)testDirectory)) {
printf("StgDomain XML library Path found.\n");
}
/* For build in separate directories */
else{
- testDirectory = Stg_ObjectList_Get( xmlSearchPaths,"StgDomain" );
+ testDirectory = Stg_ObjectList_Get( xmlSearchPaths, (Name)"StgDomain" );
if (testDirectory != NULL) {
printf("StgDomain XML library Path found.\n");
}
@@ -116,12 +116,12 @@ int main( int argc, char* argv[] ) {
printf("StgDomain XML library Path not found.\n");
}
}
- if (strcmp((char*)LIB_DIR, (char*)testDirectory)) {
+ if (strcmp((char* )LIB_DIR, (char*)testDirectory)) {
printf("StgFEM XML library Path found.\n");
}
/* For build in separate directories */
else{
- testDirectory = Stg_ObjectList_Get( xmlSearchPaths,"StgFEM" );
+ testDirectory = Stg_ObjectList_Get( xmlSearchPaths, (Name)"StgFEM" );
if (testDirectory != NULL) {
printf("StgFEM XML library Path found.\n");
}
@@ -130,12 +130,12 @@ int main( int argc, char* argv[] ) {
}
}
/* For build in the same build directory */
- if (strcmp((char*)LIB_DIR, (char*)testDirectory)) {
+ if (strcmp((char* )LIB_DIR, (char*)testDirectory)) {
printf("PICellerator XML library Path found.\n");
}
/* For build in separate directories */
else{
- testDirectory = Stg_ObjectList_Get( xmlSearchPaths,"PICellerator" );
+ testDirectory = Stg_ObjectList_Get( xmlSearchPaths, (Name)"PICellerator" );
if (testDirectory != NULL) {
printf("PICellerator XML library Path found.\n");
}
@@ -144,12 +144,12 @@ int main( int argc, char* argv[] ) {
}
}
/* For build in the same build directory */
- if (strcmp((char*)LIB_DIR, (char*)testDirectory)) {
+ if (strcmp((char* )LIB_DIR, (char*)testDirectory)) {
printf("Underworld XML library Path found.\n");
}
/* For build in separate directories */
else{
- testDirectory = Stg_ObjectList_Get( xmlSearchPaths,"Underworld" );
+ testDirectory = Stg_ObjectList_Get( xmlSearchPaths, (Name)"Underworld" );
if (testDirectory != NULL) {
printf("Underworld XML library Path found.\n");
}
@@ -165,7 +165,7 @@ int main( int argc, char* argv[] ) {
StGermain_Finalise();
/* Close off MPI */
- MPI_Finalize();
+ MPI_Finalize( );
return 0; /* success */
}
diff -r 55c0e5081456 -r d7d947597d6d plugins/DensityChangeAtDepth/DensityChangeAtDepth.c
--- a/plugins/DensityChangeAtDepth/DensityChangeAtDepth.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/DensityChangeAtDepth/DensityChangeAtDepth.c Thu Jan 14 17:41:33 2010 +1100
@@ -74,7 +74,7 @@ void Underworld_DensityChange_Check( Und
return;
/* Get self (the plugin) */
- Underworld_DensityChange* self = (Underworld_DensityChange*)LiveComponentRegister_Get( context->CF->LCRegister, Underworld_DensityChange_Type );
+ Underworld_DensityChange* self = (Underworld_DensityChange*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_DensityChange_Type );
/* get centroid coordinate */
volume = Material_Volume( self->material, (IntegrationPointsSwarm*)self->swarm, centroid );
@@ -84,7 +84,7 @@ void Underworld_DensityChange_Check( Und
if( centroid[1] >= self->height ) {
self->bftExt->density = self->newDensity;
densityChangeIsDone = 1;
- Journal_RPrintf( Journal_Register( Info_Type, "DensityChange" ),
+ Journal_RPrintf( Journal_Register( Info_Type, (Name)"DensityChange" ),
"************** Density Change for material %s, new density is %g**************\n",
self->material->name, self->bftExt->density );
}
@@ -94,12 +94,12 @@ void Underworld_DensityChange_Setup( Und
/* Function pulls and checks user input from the xml file */
BuoyancyForceTerm* bft = NULL;
BuoyancyForceTerm_MaterialExt* materialExt = NULL;;
- Stream* stream = Journal_Register( Info_Type, "cows" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"cows" );
Name materialName = NULL;
int materialIndex;
/* Get self (the plugin) */
- Underworld_DensityChange* self = (Underworld_DensityChange*)LiveComponentRegister_Get( context->CF->LCRegister, Underworld_DensityChange_Type );
+ Underworld_DensityChange* self = (Underworld_DensityChange* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_DensityChange_Type );
/* Initialise plugin data */
self->bftExt = NULL;
@@ -109,13 +109,13 @@ void Underworld_DensityChange_Setup( Und
self->newDensity = 0;
/* Need buoyancy force term, to get density infomation from bft extension + the integration swarm */
- bft = Stg_ComponentFactory_ConstructByName( context->CF, "buoyancyForceTerm", BuoyancyForceTerm, True, NULL );
+ bft = Stg_ComponentFactory_ConstructByName( context->CF, (Name)"buoyancyForceTerm", BuoyancyForceTerm, True, NULL );
/* Read in input from root xml dictionary */
- self->height = Dictionary_GetDouble_WithDefault( context->dictionary, "materialDensityChangeHeight", 0.5 );
- self->newDensity = Dictionary_GetDouble_WithDefault( context->dictionary, "materialDensityNewDensity", 0.3 );
- self->swarm = (IntegrationPointsSwarm*)bft->integrationSwarm;
- materialName = Dictionary_GetString( context->dictionary, "materialDensityToChange" );
+ self->height = Dictionary_GetDouble_WithDefault( context->dictionary, (Dictionary_Entry_Key)"materialDensityChangeHeight", 0.5 );
+ self->newDensity = Dictionary_GetDouble_WithDefault( context->dictionary, (Dictionary_Entry_Key)"materialDensityNewDensity", 0.3 );
+ self->swarm = (IntegrationPointsSwarm* )bft->integrationSwarm;
+ materialName = Dictionary_GetString( context->dictionary, (Dictionary_Entry_Key)"materialDensityToChange" );
self->material = Materials_Register_GetByName( self->swarm->materials_Register, materialName );
/* check if material index exists */
@@ -132,7 +132,7 @@ void _Underworld_DensityChange_AssignFro
void _Underworld_DensityChange_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
UnderworldContext* context;
- context = (UnderworldContext*)Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ context = (UnderworldContext*)Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
/* Add functions to entry points */
ContextEP_Append( context, AbstractContext_EP_Initialise, Underworld_DensityChange_Setup );
@@ -161,11 +161,7 @@ void* _Underworld_DensityChange_DefaultN
}
Index Underworld_DensityChangeAtDepth_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit(
- pluginsManager,
- Underworld_DensityChange_Type,
- "0",
- _Underworld_DensityChange_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_DensityChange_Type, (Name)"0", _Underworld_DensityChange_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d plugins/EulerDeform/EulerDeform.c
--- a/plugins/EulerDeform/EulerDeform.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/EulerDeform/EulerDeform.c Thu Jan 14 17:41:33 2010 +1100
@@ -51,7 +51,7 @@ ExtensionInfo_Index EulerDeform_ContextH
Index Underworld_EulerDeform_Register( PluginsManager* pluginsMgr ) {
- return PluginsManager_Submit( pluginsMgr, Underworld_EulerDeform_Type, "0", _Underworld_EulerDeform_DefaultNew );
+ return PluginsManager_Submit( pluginsMgr, Underworld_EulerDeform_Type, (Name)"0", _Underworld_EulerDeform_DefaultNew );
}
@@ -72,7 +72,7 @@ void* _Underworld_EulerDeform_DefaultNew
/* Variables that are set to ZERO are variables that will be set either by the current _New function or another parent _New function further up the hierachy */
AllocationType nameAllocationType = NON_GLOBAL /* default value NON_GLOBAL */;
- return _Codelet_New( CODELET_PASSARGS );
+ return _Codelet_New( CODELET_PASSARGS );
}
@@ -87,20 +87,20 @@ void _Underworld_EulerDeform_AssignFromX
Journal_DPrintf( Underworld_Debug, "In: %s( void* )\n", __func__ );
/* Retrieve context. */
- uwCtx = (UnderworldContext*)Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
- ed->context = (AbstractContext*)uwCtx;
+ uwCtx = (UnderworldContext*)Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
+ ed->context = (AbstractContext* )uwCtx;
/* Create new context. */
- EulerDeform_ContextHandle = ExtensionManager_Add( uwCtx->extensionMgr, Underworld_EulerDeform_Type, sizeof(EulerDeform_Context) );
+ EulerDeform_ContextHandle = ExtensionManager_Add( uwCtx->extensionMgr, (Name)Underworld_EulerDeform_Type, sizeof(EulerDeform_Context) );
edCtx = ExtensionManager_Get( uwCtx->extensionMgr, uwCtx, EulerDeform_ContextHandle );
memset( edCtx, 0, sizeof(EulerDeform_Context) );
edCtx->ctx = (AbstractContext*)uwCtx;
/* Get the time integrator. */
- edCtx->timeIntegrator = Stg_ComponentFactory_ConstructByName( cf, "timeIntegrator", TimeIntegrator, True, data );
+ edCtx->timeIntegrator = Stg_ComponentFactory_ConstructByName( cf, (Name)"timeIntegrator", TimeIntegrator, True, data );
/* Grab the ArtDisplacementField from the dictionary */
- edCtx->artDField = Stg_ComponentFactory_ConstructByName( cf, "ArtDisplacementField", FeVariable, False, data );
+ edCtx->artDField = Stg_ComponentFactory_ConstructByName( cf, (Name)"ArtDisplacementField", FeVariable, False, data );
}
@@ -121,18 +121,18 @@ void _Underworld_EulerDeform_Build( void
edCtx = ExtensionManager_Get( uwCtx->extensionMgr, uwCtx, EulerDeform_ContextHandle );
/* Get the dictionary. */
- edDict = Dictionary_Get( uwCtx->dictionary, "EulerDeform" );
- if( !edDict ) {
+ edDict = Dictionary_Get( uwCtx->dictionary, (Dictionary_Entry_Key)"EulerDeform" );
+ if( !edDict ) {
return;
}
/* Read system list. */
- sysLst = Dictionary_Entry_Value_GetMember( edDict, "systems" );
+ sysLst = Dictionary_Entry_Value_GetMember( edDict, (Dictionary_Entry_Key)"systems" );
if( sysLst ) {
unsigned sys_i;
/* Allocate for systems. */
- edCtx->nSystems = Dictionary_Entry_Value_GetCount( sysLst );
+ edCtx->nSystems = Dictionary_Entry_Value_GetCount( sysLst );
edCtx->systems = Memory_Alloc_Array( EulerDeform_System, edCtx->nSystems, "EulerDeform->systems" );
memset( edCtx->systems, 0, sizeof(EulerDeform_System) * edCtx->nSystems );
@@ -150,42 +150,42 @@ void _Underworld_EulerDeform_Build( void
assert( sysDict );
/* Read contents. */
- meshName = Dictionary_GetString( sysDict, "mesh" );
- remesherName = Dictionary_GetString( sysDict, "remesher" );
+ meshName = Dictionary_GetString( sysDict, (Dictionary_Entry_Key)"mesh" );
+ remesherName = Dictionary_GetString( sysDict, (Dictionary_Entry_Key)"remesher" );
if( strcmp( remesherName, "" ) )
- sys->remesher = Stg_ComponentFactory_ConstructByName( uwCtx->CF, remesherName, Remesher, True, data );
- name = Dictionary_GetString(sysDict, "displacementField");
+ sys->remesher = Stg_ComponentFactory_ConstructByName( uwCtx->CF, (Name)remesherName, Remesher, True, data );
+ name = Dictionary_GetString( sysDict, (Dictionary_Entry_Key)"displacementField" );
if(strcmp(name, ""))
- sys->dispField = Stg_ComponentFactory_ConstructByName( uwCtx->CF, name, FeVariable, True, data );
+ sys->dispField = Stg_ComponentFactory_ConstructByName( uwCtx->CF, (Name)name, FeVariable, True, data );
else
sys->dispField = NULL;
- velFieldName = Dictionary_GetString( sysDict, "VelocityField" );
- sys->interval = Dictionary_GetInt_WithDefault( sysDict, "interval", -1 );
- sys->wrapTop = Dictionary_GetBool_WithDefault( sysDict, "wrapTop", False );
- sys->wrapBottom = Dictionary_GetBool_WithDefault( sysDict, "wrapBottom", False );
- sys->wrapLeft = Dictionary_GetBool_WithDefault( sysDict, "wrapLeft", False );
- sys->mesh = Stg_ComponentFactory_ConstructByName( uwCtx->CF, meshName, Mesh, True, data );
+ velFieldName = Dictionary_GetString( sysDict, (Dictionary_Entry_Key)"VelocityField" );
+ sys->interval = Dictionary_GetInt_WithDefault( sysDict, (Dictionary_Entry_Key)"interval", -1 );
+ sys->wrapTop = Dictionary_GetBool_WithDefault( sysDict, (Dictionary_Entry_Key)"wrapTop", False );
+ sys->wrapBottom = Dictionary_GetBool_WithDefault( sysDict, (Dictionary_Entry_Key)"wrapBottom", False );
+ sys->wrapLeft = Dictionary_GetBool_WithDefault( sysDict, (Dictionary_Entry_Key)"wrapLeft", False );
+ sys->mesh = Stg_ComponentFactory_ConstructByName( uwCtx->CF, (Name)meshName, Mesh, True, data );
/* This line is currently not working, have to manually set the velocity field name.
This should be fixed once this plugin has been converted to a component. */
- /*sys->velField = Stg_ComponentFactory_ConstructByName( uwCtx->CF, velFieldName, FieldVariable, True, data );*/
- sys->velField = Stg_ComponentFactory_ConstructByName( uwCtx->CF, "VelocityField", FieldVariable, True, data );
+ /*sys->velField = Stg_ComponentFactory_ConstructByName( uwCtx->CF, (Name)velFieldName, FieldVariable, True, data );*/
+ sys->velField = Stg_ComponentFactory_ConstructByName( uwCtx->CF, (Name)"VelocityField", FieldVariable, True, data );
- sys->staticTop = Dictionary_GetBool_WithDefault( sysDict, "staticTop", False );
- sys->staticBottom = Dictionary_GetBool_WithDefault( sysDict, "staticBottom", False );
- sys->staticLeft = Dictionary_GetBool_WithDefault( sysDict, "staticLeft", False );
- sys->staticRight = Dictionary_GetBool_WithDefault( sysDict, "staticRight", False );
- sys->staticFront = Dictionary_GetBool_WithDefault( sysDict, "staticFront", False );
- sys->staticBack = Dictionary_GetBool_WithDefault( sysDict, "staticBack", False );
+ sys->staticTop = Dictionary_GetBool_WithDefault( sysDict, (Dictionary_Entry_Key)"staticTop", False );
+ sys->staticBottom = Dictionary_GetBool_WithDefault( sysDict, (Dictionary_Entry_Key)"staticBottom", False );
+ sys->staticLeft = Dictionary_GetBool_WithDefault( sysDict, (Dictionary_Entry_Key)"staticLeft", False );
+ sys->staticRight = Dictionary_GetBool_WithDefault( sysDict, (Dictionary_Entry_Key)"staticRight", False );
+ sys->staticFront = Dictionary_GetBool_WithDefault( sysDict, (Dictionary_Entry_Key)"staticFront", False );
+ sys->staticBack = Dictionary_GetBool_WithDefault( sysDict, (Dictionary_Entry_Key)"staticBack", False );
sys->staticSides = sys->staticTop || sys->staticBottom || sys->staticRight || sys->staticLeft || sys->staticFront || sys->staticBack;
- sys->contactRight = Dictionary_GetBool_WithDefault( sysDict, "contactRight", False );
- sys->contactLeft = Dictionary_GetBool_WithDefault( sysDict, "contactLeft", False );
+ sys->contactRight = Dictionary_GetBool_WithDefault( sysDict, (Dictionary_Entry_Key)"contactRight", False );
+ sys->contactLeft = Dictionary_GetBool_WithDefault( sysDict, (Dictionary_Entry_Key)"contactLeft", False );
/* Read the list of variables to interpolate. */
- varLst = Dictionary_Entry_Value_GetMember( Dictionary_Entry_Value_GetElement( sysLst, sys_i ), "fields" );
+ varLst = Dictionary_Entry_Value_GetMember( Dictionary_Entry_Value_GetElement( sysLst, (Dictionary_Entry_Key)sys_i ), "fields" );
if( varLst ) {
unsigned var_i;
@@ -203,18 +203,18 @@ void _Underworld_EulerDeform_Build( void
assert( varDict );
/* Get the field and its variable. */
- varName = Dictionary_GetString( varDict, "field" );
- sys->fields[var_i] = Stg_ComponentFactory_ConstructByName( uwCtx->CF, varName, FieldVariable, True, data );
+ varName = Dictionary_GetString( varDict, (Dictionary_Entry_Key)"field" );
+ sys->fields[var_i] = Stg_ComponentFactory_ConstructByName( uwCtx->CF, (Name)varName, FieldVariable, True, data );
#if 0
- varName = Dictionary_GetString( varDict, "variable" );
- sys->vars[var_i] = Stg_ComponentFactory_ConstructByName( uwCtx->CF, varName, Variable, True, data );
+ varName = Dictionary_GetString( varDict, (Dictionary_Entry_Key)"variable" );
+ sys->vars[var_i] = Stg_ComponentFactory_ConstructByName( uwCtx->CF, (Name)varName, Variable, True, data );
#endif
}
}
}
}
- for( sys_i = 0; sys_i < edCtx->nSystems; sys_i++ ) {
+ for( sys_i = 0; sys_i < edCtx->nSystems; sys_i++ ) {
EulerDeform_System* sys = edCtx->systems + sys_i;
/* Create a time integrand for the mesh's coordinates. */
@@ -265,7 +265,7 @@ IndexSet* EulerDeform_CreateStaticSet(Eu
IndexSet *set;
IJK ijk;
- grid = *(Grid**)ExtensionManager_Get ( sys->mesh->info, sys->mesh, ExtensionManager_GetHandle( sys->mesh->info, "vertexGrid" ) );
+ grid = *(Grid**)ExtensionManager_Get ( sys->mesh->info, sys->mesh, ExtensionManager_GetHandle( sys->mesh->info, (Name)"vertexGrid" ) );
nNodes = Mesh_GetDomainSize( sys->mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -452,7 +452,7 @@ Bool EulerDeform_TimeDeriv( void* crdAdv
( 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],
@@ -700,7 +700,7 @@ void EulerDeform_WrapTopSurface( EulerDe
/* Loop over top internal surface. */
mesh = sys->mesh;
grm = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
EulerDeform_TopInternalLoop( sys, grm, oldCrds, ijk, 0 );
}
diff -r 55c0e5081456 -r d7d947597d6d plugins/ExtractPetscObjects/ExtractPetscObjects.c
--- a/plugins/ExtractPetscObjects/ExtractPetscObjects.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/ExtractPetscObjects/ExtractPetscObjects.c Thu Jan 14 17:41:33 2010 +1100
@@ -64,9 +64,9 @@ void _Underworld_ExtractPetscObjects_Ass
{
UnderworldContext* context;
- context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
- Underworld_ExtractPetscObjects_PrintHeaderToFile( context );
+ Underworld_ExtractPetscObjects_PrintHeaderToFile( context );
ContextEP_Append( context, AbstractContext_EP_FrequentOutput , Underworld_ExtractPetscObjects_Dump );
}
@@ -85,7 +85,7 @@ void* _Underworld_ExtractPetscObjects_De
Index Underworld_ExtractPetscObjects_Register( PluginsManager* pluginsManager )
{
- return PluginsManager_Submit( pluginsManager, Underworld_ExtractPetscObjects_Type, "0", _Underworld_ExtractPetscObjects_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_ExtractPetscObjects_Type, (Name)"0", _Underworld_ExtractPetscObjects_DefaultNew );
}
@@ -158,11 +158,11 @@ void Underworld_ExtractPetscObjects_Dump
comm = context->communicator;
// get filename from problem description
- probName = strdup( Dictionary_Entry_Value_AsString( Dictionary_Get( context->dictionary, "ProbDescription" ) ));
+ probName = strdup( Dictionary_Entry_Value_AsString( Dictionary_Get( context->dictionary, (Dictionary_Entry_Key)"ProbDescription" ) ));
printf("\n\n");
printf("**********************************************\n" );
printf("****** Extracting PetscObjects ******\n" );
- printf("**********************************************\n");
+ printf("**********************************************\n" );
printf(" ProbDescription: %s \n", probName );
MPI_Get_processor_name( machine_name, &length);
diff -r 55c0e5081456 -r d7d947597d6d plugins/IncompressibleExtensionBC/IncompressibleExtensionBC.c
--- a/plugins/IncompressibleExtensionBC/IncompressibleExtensionBC.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/IncompressibleExtensionBC/IncompressibleExtensionBC.c Thu Jan 14 17:41:33 2010 +1100
@@ -86,44 +86,44 @@ const Type Underworld_IncompressibleExte
*/
double GetLeftWallVelocity( UnderworldContext* context ) {
- return Dictionary_GetDouble_WithDefault( context->dictionary, "leftWallVelocity", 0.0 );
+ return Dictionary_GetDouble_WithDefault( context->dictionary, (Dictionary_Entry_Key)"leftWallVelocity", 0.0 );
}
-double GetLeftWallShearVelocity( UnderworldContext* context ) {
- return Dictionary_GetDouble_WithDefault( context->dictionary, "leftWallShearVelocity", 0.0 );
+double GetLeftWallShearVelocity( UnderworldContext* context ) {
+ return Dictionary_GetDouble_WithDefault( context->dictionary, (Dictionary_Entry_Key)"leftWallShearVelocity", 0.0 );
}
-double GetRightWallVelocity( UnderworldContext* context ) {
- return Dictionary_GetDouble_WithDefault( context->dictionary, "rightWallVelocity", 0.0 );
+double GetRightWallVelocity( UnderworldContext* context ) {
+ return Dictionary_GetDouble_WithDefault( context->dictionary, (Dictionary_Entry_Key)"rightWallVelocity", 0.0 );
}
-double GetRightWallShearVelocity( UnderworldContext* context ) {
- return Dictionary_GetDouble_WithDefault( context->dictionary, "rightWallShearVelocity", 0.0 );
+double GetRightWallShearVelocity( UnderworldContext* context ) {
+ return Dictionary_GetDouble_WithDefault( context->dictionary, (Dictionary_Entry_Key)"rightWallShearVelocity", 0.0 );
}
double GetBackWallVelocity( UnderworldContext* context ) {
- if ( context->dim == 2 )
+ if ( context->dim == 2 )
return 0.0;
- return Dictionary_GetDouble_WithDefault( context->dictionary, "backWallVelocity", 0.0 );
+ return Dictionary_GetDouble_WithDefault( context->dictionary, (Dictionary_Entry_Key)"backWallVelocity", 0.0 );
}
double GetFrontWallVelocity( UnderworldContext* context ) {
- if ( context->dim == 2 )
+ if ( context->dim == 2 )
return 0.0;
- return Dictionary_GetDouble_WithDefault( context->dictionary, "frontWallVelocity", 0.0 );
+ return Dictionary_GetDouble_WithDefault( context->dictionary, (Dictionary_Entry_Key)"frontWallVelocity", 0.0 );
}
-double GetReferenceHeight( UnderworldContext* context ) {
- return Dictionary_GetDouble_WithDefault( context->dictionary, "constantHeight", 0.0 );
+double GetReferenceHeight( UnderworldContext* context ) {
+ return Dictionary_GetDouble_WithDefault( context->dictionary, (Dictionary_Entry_Key)"constantHeight", 0.0 );
}
double GetTopWallVelocity( UnderworldContext* context ) {
- FeVariable* velocityField = (FeVariable*) LiveComponentRegister_Get( context->CF->LCRegister, "VelocityField" );
+ FeVariable* velocityField = (FeVariable* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"VelocityField" );
double y = GetReferenceHeight( context );
double V_a = GetRightWallVelocity( context );
double V_b = GetLeftWallVelocity( context );
double V_e = GetBackWallVelocity( context );
- double V_f = GetFrontWallVelocity( context );
+ double V_f = GetFrontWallVelocity( context );
double V_c;
double h_1;
XYZ min, max;
@@ -144,12 +144,12 @@ double GetTopWallVelocity( UnderworldCon
}
double GetBottomWallVelocity( UnderworldContext* context ) {
- FeVariable* velocityField = (FeVariable*) LiveComponentRegister_Get( context->CF->LCRegister, "VelocityField" );
+ FeVariable* velocityField = (FeVariable*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"VelocityField" );
double y = GetReferenceHeight( context );
double V_a = GetRightWallVelocity( context );
double V_b = GetLeftWallVelocity( context );
double V_e = GetBackWallVelocity( context );
- double V_f = GetFrontWallVelocity( context );
+ double V_f = GetFrontWallVelocity( context );
double V_d;
double h_2;
XYZ min, max;
@@ -227,8 +227,8 @@ void IncompressibleExtensionBC_BottomCon
}
void Underworld_IncompressibleExtensionBC_Remesh( TimeIntegrator* timeIntegrator, IncExtBC* self ) {
- FeVariable* velocityField = (FeVariable*) LiveComponentRegister_Get( self->context->CF->LCRegister, "VelocityField" );
- FeVariable* pressureField = (FeVariable*) LiveComponentRegister_Get( self->context->CF->LCRegister, "PressureField" );
+ FeVariable* velocityField = (FeVariable*) LiveComponentRegister_Get( self->context->CF->LCRegister, (Name)"VelocityField" );
+ FeVariable* pressureField = (FeVariable* ) LiveComponentRegister_Get( self->context->CF->LCRegister, (Name)"PressureField" );
FeMesh *mesh;
Grid *nodeGrid;
double dt;
@@ -291,30 +291,30 @@ void Underworld_IncompressibleExtensionB
void _Underworld_IncompressibleExtensionBC_AssignFromXML( void* _self, Stg_ComponentFactory* cf, void* data ) {
IncExtBC* self = (IncExtBC*)_self;
- UnderworldContext* context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ UnderworldContext* context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
ConditionFunction* condFunc;
- TimeIntegrator* timeIntegrator = (TimeIntegrator*) LiveComponentRegister_Get( context->CF->LCRegister, "timeIntegrator" );
+ TimeIntegrator* timeIntegrator = (TimeIntegrator* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"timeIntegrator" );
self->context = context;
- condFunc = ConditionFunction_New( IncompressibleExtensionBC_TopCondition, "IncompressibleExtensionBC_TopCondition" );
+ condFunc = ConditionFunction_New( IncompressibleExtensionBC_TopCondition, (Name)"IncompressibleExtensionBC_TopCondition" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
- condFunc = ConditionFunction_New( IncompressibleExtensionBC_BottomCondition, "IncompressibleExtensionBC_BottomCondition" );
+ condFunc = ConditionFunction_New( IncompressibleExtensionBC_BottomCondition, (Name)"IncompressibleExtensionBC_BottomCondition" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
- condFunc = ConditionFunction_New( IncompressibleExtensionBC_LeftCondition, "IncompressibleExtensionBC_LeftCondition" );
+ condFunc = ConditionFunction_New( IncompressibleExtensionBC_LeftCondition, (Name)"IncompressibleExtensionBC_LeftCondition" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
- condFunc = ConditionFunction_New( IncompressibleExtensionBC_LeftShearCondition, "IncompressibleExtensionBC_LeftShearCondition" );
+ condFunc = ConditionFunction_New( IncompressibleExtensionBC_LeftShearCondition, (Name)"IncompressibleExtensionBC_LeftShearCondition" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
- condFunc = ConditionFunction_New( IncompressibleExtensionBC_RightCondition, "IncompressibleExtensionBC_RightCondition" );
+ condFunc = ConditionFunction_New( IncompressibleExtensionBC_RightCondition, (Name)"IncompressibleExtensionBC_RightCondition" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
- condFunc = ConditionFunction_New( IncompressibleExtensionBC_RightShearCondition, "IncompressibleExtensionBC_RightShearCondition" );
+ condFunc = ConditionFunction_New( IncompressibleExtensionBC_RightShearCondition, (Name)"IncompressibleExtensionBC_RightShearCondition" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
- condFunc = ConditionFunction_New( IncompressibleExtensionBC_FrontCondition, "IncompressibleExtensionBC_FrontCondition" );
+ condFunc = ConditionFunction_New( IncompressibleExtensionBC_FrontCondition, (Name)"IncompressibleExtensionBC_FrontCondition" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
- condFunc = ConditionFunction_New( IncompressibleExtensionBC_BackCondition, "IncompressibleExtensionBC_BackCondition" );
+ condFunc = ConditionFunction_New( IncompressibleExtensionBC_BackCondition, (Name)"IncompressibleExtensionBC_BackCondition" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
- if( Stg_ComponentFactory_PluginGetBool( cf, self, "Remesh", False ) ) {
+ if( Stg_ComponentFactory_PluginGetBool( cf, self, (Dictionary_Entry_Key)"Remesh", False ) ) {
TimeIntegrator_PrependFinishEP(
timeIntegrator, "Underworld_IncompressibleExtensionBC_Remesh", Underworld_IncompressibleExtensionBC_Remesh,
CURR_MODULE_NAME, self );
@@ -343,7 +343,7 @@ void* _Underworld_IncompressibleExtensio
/* This function is automatically run by StGermain when this plugin is loaded. The name must be "<plugin-name>_Register". */
Index Underworld_IncompressibleExtensionBC_Register( PluginsManager* pluginsManager ) {
/* A plugin is only properly registered once it returns the handle provided when submitting a codelet to StGermain. */
- return PluginsManager_Submit( pluginsManager, Underworld_IncompressibleExtensionBC_Type, "0", _Underworld_IncompressibleExtensionBC_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_IncompressibleExtensionBC_Type, (Name)"0", _Underworld_IncompressibleExtensionBC_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d plugins/MaterialThermalDiffusivity/MaterialThermalDiffusivity.c
--- a/plugins/MaterialThermalDiffusivity/MaterialThermalDiffusivity.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/MaterialThermalDiffusivity/MaterialThermalDiffusivity.c Thu Jan 14 17:41:33 2010 +1100
@@ -88,9 +88,9 @@ void Underworld_MaterialThermalDiffusivi
*/
Underworld_MaterialThermalDiffusivity* self = (Underworld_MaterialThermalDiffusivity*)_self;
UnderworldContext* context = (UnderworldContext*) self->context;
- AdvectionDiffusionSLE* energySLE = (AdvectionDiffusionSLE*) LiveComponentRegister_Get( context->CF->LCRegister, "EnergyEqn" );
+ AdvectionDiffusionSLE* energySLE = (AdvectionDiffusionSLE*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"EnergyEqn" );
/* TODO: This assumes OneToOne mapping of intPoints to matPoints, should be fixed in future */
- IntegrationPointsSwarm* picIntegrationPoints = (IntegrationPointsSwarm*)LiveComponentRegister_Get( context->CF->LCRegister, "picIntegrationPoints" );
+ IntegrationPointsSwarm* picIntegrationPoints = (IntegrationPointsSwarm*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)"picIntegrationPoints" );
OneToOneMapper* mapper = (OneToOneMapper*)picIntegrationPoints->mapper;
MaterialPointsSwarm* materialSwarm = mapper->materialSwarm;
@@ -100,15 +100,14 @@ void Underworld_MaterialThermalDiffusivi
AdvDiffResidualForceTerm* residualForceTerm;
assert( energySLE );
- assert( materialSwarm );
+ assert( materialSwarm );
Stg_Component_Build( picIntegrationPoints, data, False );
Stg_Component_Build( materialSwarm, data, False );
Stg_Component_Build( mapper, data, False );
/* Add Material Extension */
- particleExtHandle = ExtensionManager_Add( materialSwarm->particleExtensionMgr,
- CURR_MODULE_NAME, sizeof( double ) );
+ particleExtHandle = ExtensionManager_Add( materialSwarm->particleExtensionMgr, (Name)CURR_MODULE_NAME, sizeof( double ) );
swarmVariable = Swarm_NewScalarVariable(
materialSwarm,
@@ -145,13 +144,13 @@ void Underworld_MaterialThermalDiffusivi
double* materialThermalDiffusivity;
Particle_Index lParticle_I;
MaterialPointsSwarm* materialSwarm;
- AdvectionDiffusionSLE* energySLE = (AdvectionDiffusionSLE*) LiveComponentRegister_Get( context->CF->LCRegister, "EnergyEqn" );
+ AdvectionDiffusionSLE* energySLE = (AdvectionDiffusionSLE*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"EnergyEqn" );
ForceVector* residual;
AdvDiffResidualForceTerm* residualForceTerm;
Variable* variable;
- materialSwarm = (MaterialPointsSwarm*)Stg_ComponentFactory_ConstructByName( context->CF, "materialSwarm", MaterialPointsSwarm, True, 0 /* dummy */ );
- assert(materialSwarm);
+ materialSwarm = (MaterialPointsSwarm* )Stg_ComponentFactory_ConstructByName( context->CF, (Name)"materialSwarm", MaterialPointsSwarm, True, 0 /* dummy */ );
+ assert(materialSwarm );
residual = energySLE->residual;
residualForceTerm = Stg_CheckType( Stg_ObjectList_At( residual->forceTermList, 0 ), AdvDiffResidualForceTerm );
variable = residualForceTerm->diffusivityVariable;
@@ -165,11 +164,11 @@ void Underworld_MaterialThermalDiffusivi
dictionary = material->dictionary;
materialThermalDiffusivity[ material_I ] =
- Dictionary_GetDouble_WithDefault( dictionary, "thermalDiffusivity", 1.0 );
+ Dictionary_GetDouble_WithDefault( dictionary, (Dictionary_Entry_Key)"thermalDiffusivity", 1.0 );
}
/* Assign value to particle */
- for ( lParticle_I = 0 ; lParticle_I < materialSwarm->particleLocalCount ; lParticle_I++ ) {
+ for ( lParticle_I = 0 ; lParticle_I < materialSwarm->particleLocalCount ; lParticle_I++ ) {
Variable_SetValueDouble(
variable,
lParticle_I,
@@ -182,10 +181,10 @@ void _Underworld_MaterialThermalDiffusiv
void _Underworld_MaterialThermalDiffusivity_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
Underworld_MaterialThermalDiffusivity* self = (Underworld_MaterialThermalDiffusivity*)component;
- self->context = (AbstractContext*)Stg_ComponentFactory_PluginConstructByKey( cf, self, "Context", UnderworldContext, True, data );
+ self->context = (AbstractContext*)Stg_ComponentFactory_PluginConstructByKey( cf, self, (Dictionary_Entry_Key)"Context", UnderworldContext, True, data );
}
-void* _Underworld_MaterialThermalDiffusivity_DefaultNew( Name name ) {
+void* _Underworld_MaterialThermalDiffusivity_DefaultNew( Name name ) {
return Codelet_New(
Underworld_MaterialThermalDiffusivity_Type,
_Underworld_MaterialThermalDiffusivity_DefaultNew,
@@ -198,7 +197,7 @@ void* _Underworld_MaterialThermalDiffusi
}
Index Underworld_MaterialThermalDiffusivity_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_MaterialThermalDiffusivity_Type, "0", _Underworld_MaterialThermalDiffusivity_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_MaterialThermalDiffusivity_Type, (Name)"0", _Underworld_MaterialThermalDiffusivity_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d plugins/MeshAdvectionCorrection/MeshAdvectionCorrection.c
--- a/plugins/MeshAdvectionCorrection/MeshAdvectionCorrection.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/MeshAdvectionCorrection/MeshAdvectionCorrection.c Thu Jan 14 17:41:33 2010 +1100
@@ -154,7 +154,7 @@ void MeshAdvectionCorrection( void* sle,
void MeshAdvectionCorrection( void* sle, void* data ) {
UnderworldContext* context = (UnderworldContext*) data;
Underworld_MeshAdvectionCorrection_ContextExt* plugin;
- FeVariable* velocityField = (FeVariable*) LiveComponentRegister_Get( context->CF->LCRegister, "VelocityField" );
+ FeVariable* velocityField = (FeVariable*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"VelocityField" );
double dt = context->dt;
double *artVelocity, *oldVelocity;
int lNodeCount;
@@ -198,32 +198,29 @@ void MeshAdvectionCorrection( void* sle,
void _Underworld_MeshAdvectionCorrection_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
UnderworldContext* context =
- Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
Underworld_MeshAdvectionCorrection_ContextExt* plugin;
- AdvectionDiffusionSLE* energySLE = (AdvectionDiffusionSLE*) Stg_ComponentFactory_ConstructByName( cf, "EnergyEqn", UnderworldContext, True, data );
+ AdvectionDiffusionSLE* energySLE = (AdvectionDiffusionSLE* ) Stg_ComponentFactory_ConstructByName( cf, (Name)"EnergyEqn", UnderworldContext, True, data );
Journal_DFirewall(
- (Bool)context,
- Journal_Register( Error_Type, Underworld_MeshAdvectionCorrection_Type ),
+ (Bool )context,
+ Journal_Register( Error_Type, (Name)Underworld_MeshAdvectionCorrection_Type ),
"No context found\n" );
Journal_DFirewall(
(Bool)energySLE,
- Journal_Register( Error_Type, Underworld_MeshAdvectionCorrection_Type ),
+ Journal_Register( Error_Type, (Name)Underworld_MeshAdvectionCorrection_Type ),
"The required energy SLE component has not been created or placed on the context.\n");
/* Add the extension to the context */
- Underworld_MeshAdvectionCorrection_ContextExtHandle = ExtensionManager_Add(
- context->extensionMgr,
- Underworld_MeshAdvectionCorrection_Type,
- sizeof( Underworld_MeshAdvectionCorrection_ContextExt ) );
+ Underworld_MeshAdvectionCorrection_ContextExtHandle = ExtensionManager_Add( context->extensionMgr, (Name)Underworld_MeshAdvectionCorrection_Type, sizeof( Underworld_MeshAdvectionCorrection_ContextExt ) );
plugin = ExtensionManager_Get(
context->extensionMgr,
context,
Underworld_MeshAdvectionCorrection_ContextExtHandle );
- if( Stg_ComponentFactory_GetRootDictBool( cf, "MeshAdvectionCorrection_UseArtDisplacementField", False) ) {
+ if( Stg_ComponentFactory_GetRootDictBool( cf, (Dictionary_Entry_Key)"MeshAdvectionCorrection_UseArtDisplacementField", False) ) {
/* get the artificial displacement field */
- plugin->artDisplacement = Stg_ComponentFactory_ConstructByName( cf, "ArtDisplacementField", FeVariable, True, data );
+ plugin->artDisplacement = Stg_ComponentFactory_ConstructByName( cf, (Name)"ArtDisplacementField", FeVariable, True, data );
}
/* Replace the energy SLE's execute with this one. Save the old value for use later. */
@@ -232,7 +229,7 @@ void _Underworld_MeshAdvectionCorrection
}
/* This function will provide StGermain the abilty to instantiate (create) this codelet on demand. */
-void* _Underworld_MeshAdvectionCorrection_DefaultNew( Name name ) {
+void* _Underworld_MeshAdvectionCorrection_DefaultNew( Name name ) {
return Codelet_New(
Underworld_MeshAdvectionCorrection_Type,
_Underworld_MeshAdvectionCorrection_DefaultNew,
@@ -247,11 +244,7 @@ void* _Underworld_MeshAdvectionCorrectio
/* This function is automatically run by StGermain when this plugin is loaded. The name must be "<plugin-name>_Register". */
Index Underworld_MeshAdvectionCorrection_Register( PluginsManager* pluginsManager ) {
/* A plugin is only properly registered once it returns the handle provided when submitting a codelet to StGermain. */
- return PluginsManager_Submit(
- pluginsManager,
- Underworld_MeshAdvectionCorrection_Type,
- "0",
- _Underworld_MeshAdvectionCorrection_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_MeshAdvectionCorrection_Type, (Name)"0", _Underworld_MeshAdvectionCorrection_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d plugins/MovingMesh/MovingMesh.c
--- a/plugins/MovingMesh/MovingMesh.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/MovingMesh/MovingMesh.c Thu Jan 14 17:41:33 2010 +1100
@@ -57,45 +57,45 @@ const Type Underworld_MovingMesh_Type =
const Type Underworld_MovingMesh_Type = "Underworld_MovingMesh";
void _Underworld_MovingMesh_AssignFromXML( void* meshExtender, Stg_ComponentFactory* cf, void* data ) {
- UnderworldContext* context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ UnderworldContext* context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
MeshExtender* self = (MeshExtender*) meshExtender;
Dimension_Index dim_I = 0;
Dimension_Index axisToRemeshOnTotal = 0;
Journal_Firewall(
- (Bool)context,
- Journal_Register( Error_Type, Underworld_MovingMesh_Type ),
+ (Bool )context,
+ Journal_Register( Error_Type, (Name)Underworld_MovingMesh_Type ),
"No context found\n" );
self->context = (AbstractContext*)context;
self->velocityField = context->velocityField;
Journal_Firewall( (Bool)self->velocityField,
- Journal_Register( Error_Type, Underworld_MovingMesh_Type ),
+ Journal_Register( Error_Type, (Name)Underworld_MovingMesh_Type ),
"The required velocity field component has not been created or placed on the context.\n");
self->remeshAccordingToAxis[I_AXIS] =
- Dictionary_GetBool_WithDefault( context->dictionary, "remeshAccordingToIAxis", True );
+ Dictionary_GetBool_WithDefault( context->dictionary, (Dictionary_Entry_Key)"remeshAccordingToIAxis", True );
self->remeshAccordingToAxis[J_AXIS] =
- Dictionary_GetBool_WithDefault( context->dictionary, "remeshAccordingToJAxis", True );
- if ( self->velocityField->dim == 2 ) {
+ Dictionary_GetBool_WithDefault( context->dictionary, (Dictionary_Entry_Key)"remeshAccordingToJAxis", True );
+ if ( self->velocityField->dim == 2 ) {
self->remeshAccordingToAxis[K_AXIS] = False;
}
else {
self->remeshAccordingToAxis[K_AXIS] =
- Dictionary_GetBool_WithDefault( context->dictionary, "remeshAccordingToKAxis", True );
+ Dictionary_GetBool_WithDefault( context->dictionary, (Dictionary_Entry_Key)"remeshAccordingToKAxis", True );
}
axisToRemeshOnTotal = 0;
for ( dim_I = 0; dim_I < self->velocityField->dim; dim_I++ ) {
- if ( self->remeshAccordingToAxis[dim_I] == True ) {
+ if ( self->remeshAccordingToAxis[dim_I] == True ) {
axisToRemeshOnTotal++;
}
}
Journal_Firewall(
axisToRemeshOnTotal > 0,
- Journal_Register( Error_Type, Underworld_MovingMesh_Type ),
+ Journal_Register( Error_Type, (Name)Underworld_MovingMesh_Type ),
"Error: in %s: you have disabled remeshing on all axis. Please set at least one axis to remesh on "
"using the remeshAccordingToIAxis, remeshAccordingToJAxis, remeshAccordingToKAxis dictionary "
"parameters, if you wish to use the remesher.\n",
@@ -117,8 +117,8 @@ void Underworld_MovingMesh_Build( void*
mesh = (Mesh*)self->velocityField->feMesh;
- Journal_Firewall( ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) != (unsigned)-1,
- Journal_Register( Error_Type, Underworld_MovingMesh_Type ),
+ Journal_Firewall( ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) != (unsigned )-1,
+ Journal_Register( Error_Type, (Name)Underworld_MovingMesh_Type ),
"Error: in %s: provided Velocity field's mesh doesn't have a regular decomposition.\n",
__func__ );
}
@@ -128,8 +128,8 @@ void Underworld_MovingMesh_Remesh( TimeI
FeVariable* velocityField = self->velocityField;
Mesh* mesh = (Mesh*) velocityField->feMesh;
unsigned rank;
- Stream* debug = Journal_Register( Debug_Type, Underworld_MovingMesh_Type );
- Stream* info = Journal_Register( Info_Type, self->type );
+ Stream* debug = Journal_Register( Debug_Type, (Name)Underworld_MovingMesh_Type );
+ Stream* info = Journal_Register( Info_Type, (Name)self->type );
double remeshTime, remeshTimeStart, remeshTimeEnd;
Dimension_Index dim_I = 0;
Dimension_Index axisToRemeshOnTotal = 0;
@@ -158,7 +158,7 @@ void Underworld_MovingMesh_Remesh( TimeI
Journal_Firewall(
axisToRemeshOnTotal > 0,
- Journal_Register( Error_Type, Underworld_MovingMesh_Type ),
+ Journal_Register( Error_Type, (Name)Underworld_MovingMesh_Type ),
"Error: in %s: you have disabled remeshing on all axis. Please set at least one axis to remesh on "
"using the remeshAccordingToIAxis, remeshAccordingToJAxis, remeshAccordingToKAxis dictionary "
"parameters, if you wish to use the remesher.\n",
@@ -170,22 +170,22 @@ void Underworld_MovingMesh_Remesh( TimeI
if ( self->context->timeStep > 1 ) {
Journal_Firewall(
dt > 0.0,
- Journal_Register( Error_Type, Underworld_MovingMesh_Type ),
+ Journal_Register( Error_Type, (Name)Underworld_MovingMesh_Type ),
"Error- in %s: in timeStep %u, provided Context \"%s\"'s dt <= 0.\n",
__func__, self->context->timeStep, self->context->name );
}
remeshTimeStart = MPI_Wtime();
- Journal_Firewall( ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) != (unsigned)-1,
- Journal_Register( Error_Type, Underworld_MovingMesh_Type ),
+ Journal_Firewall( ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) != (unsigned )-1,
+ Journal_Register( Error_Type, (Name)Underworld_MovingMesh_Type ),
"Error: in %s: provided Velocity field's mesh doesn't have a regular decomposition.\n",
__func__ );
/*
Journal_Firewall(
True == Stg_Class_IsInstance( velocityField->feMesh->layout->elementLayout, ParallelPipedHexaEL_Type ),
- Journal_Register( Error_Type, Underworld_MovingMesh_Type ),
+ Journal_Register( Error_Type, (Name)Underworld_MovingMesh_Type ),
"Error: in %s: provided Velocity field's mesh doesn't have a %s elementLayout.\n",
__func__, ParallelPipedHexaEL_Type );
*/
@@ -261,7 +261,7 @@ void Underworld_MovingMesh_RemeshAccordi
double newCoordInRemeshAxis = 0;
double tolerance;
- Stream* debug = Journal_Register( Debug_Type, Underworld_MovingMesh_Type );
+ Stream* debug = Journal_Register( Debug_Type, (Name)Underworld_MovingMesh_Type );
/*Journal_DPrintf( debug, "In %s(): for remeshAxis %c\n", __func__, IJKTopology_DimNumToDimLetter[remeshAxis] );*/
Stream_Indent( debug );
@@ -270,7 +270,7 @@ void Underworld_MovingMesh_RemeshAccordi
tolerance = (maxCrd[remeshAxis] - minCrd[remeshAxis]) * 1e-9;
vertGrid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
sideWallNodeCount = vertGrid->sizes[ otherAxisA ] * vertGrid->sizes[ otherAxisB ];
minGlobal = Memory_Alloc_Array( double, sideWallNodeCount, "min node coords" );
@@ -429,7 +429,7 @@ void Underworld_MovingMesh_CalculateMinO
tolerance = (maxCrd[remeshAxis] - minCrd[remeshAxis]) * 1e-9;
vertGrid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
sideWallNodeCount = vertGrid->sizes[ otherAxisA ] * vertGrid->sizes[ otherAxisB ];
newWallCoordsInRemeshAxis = Memory_Alloc_Array( double, sideWallNodeCount, "newWallCoordsInRemeshAxis" );
@@ -469,9 +469,9 @@ void Underworld_MovingMesh_CalculateMinO
Stg_Class_IsInstance( mesh->layout->elementLayout, ParallelPipedHexaEL_Type ) )
{
double differenceBetweenCurrAndPrev = 0;
- Stream* errorStream = Journal_Register( Error_Type, self->type );
+ Stream* errorStream = Journal_Register( Error_Type, (Name)self->type );
differenceBetweenCurrAndPrev = fabs( newWallCoordsInRemeshAxis[ sideWallNode_I ]
- - lastCalculatedNewWallCoordInRemeshAxis );
+ - lastCalculatedNewWallCoordInRemeshAxis );
Journal_Firewall( differenceBetweenCurrAndPrev < tolerance,
errorStream,
@@ -557,7 +557,7 @@ void* _Underworld_MovingMesh_DefaultNew(
/* This function is automatically run by StGermain when this plugin is loaded. The name must be "<plugin-name>_Register". */
Index Underworld_MovingMesh_Register( PluginsManager* pluginsManager ) {
/* A plugin is only properly registered once it returns the handle provided when submitting a codelet to StGermain. */
- return PluginsManager_Submit( pluginsManager, Underworld_MovingMesh_Type, "0", _Underworld_MovingMesh_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_MovingMesh_Type, (Name)"0", _Underworld_MovingMesh_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d plugins/MovingMesh/tests/plugins/testMovingMesh.c
--- a/plugins/MovingMesh/tests/plugins/testMovingMesh.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/MovingMesh/tests/plugins/testMovingMesh.c Thu Jan 14 17:41:33 2010 +1100
@@ -13,7 +13,7 @@ ExtensionInfo_Index handle;
ExtensionInfo_Index handle;
double dt( void* class, PICelleratorContext* context ) {
- return Dictionary_GetDouble_WithDefault( context->dictionary, "dt", 0.01 );
+ return Dictionary_GetDouble_WithDefault( context->dictionary, (Dictionary_Entry_Key)"dt", 0.01 );
}
void MovingMeshTestVelBCs_IncreasingWithY( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) {
@@ -58,7 +58,7 @@ void MovingMeshTestVelBCs_ToCentreY( Nod
centreInJ = ( max[J_AXIS] + min[J_AXIS] ) / 2;
coordJ_RelativeToCentreJ = coord[J_AXIS] - centreInJ;
- toCentreJ_Max = Dictionary_GetDouble_WithDefault( context->dictionary, "toCentreJ_Max", 1.0 );
+ toCentreJ_Max = Dictionary_GetDouble_WithDefault( context->dictionary, (Dictionary_Entry_Key)"toCentreJ_Max", 1.0 );
/* Need the -1 factor to "flip" so both above and below coords go towards the centre */
*result = (-1) * coordJ_RelativeToCentreJ / (boxHeight / 2) * toCentreJ_Max;
}
@@ -68,13 +68,13 @@ void construct( PICelleratorContext* con
MaterialPointsSwarm* materialSwarm;
/* Add original pos to particle */
- materialSwarm = (MaterialPointsSwarm*) LiveComponentRegister_Get( context->CF->LCRegister, "materialSwarm" );
- handle = ExtensionManager_Add( materialSwarm->particleExtensionMgr, CURR_MODULE_NAME, sizeof( Coord ) );
+ materialSwarm = (MaterialPointsSwarm* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"materialSwarm" );
+ handle = ExtensionManager_Add( materialSwarm->particleExtensionMgr, (Name)CURR_MODULE_NAME, sizeof( Coord ) );
ConditionFunction_Register_Add( context->condFunc_Register,
- ConditionFunction_New( MovingMeshTestVelBCs_IncreasingWithY, "MovingMeshTestVelBCs_IncreasingWithY" ) );
+ ConditionFunction_New( MovingMeshTestVelBCs_IncreasingWithY, (Name)"MovingMeshTestVelBCs_IncreasingWithY" ) );
ConditionFunction_Register_Add( context->condFunc_Register,
- ConditionFunction_New( MovingMeshTestVelBCs_ToCentreY, "MovingMeshTestVelBCs_ToCentreY" ) );
+ ConditionFunction_New( MovingMeshTestVelBCs_ToCentreY, (Name)"MovingMeshTestVelBCs_ToCentreY" ) );
/* Need to do this so we can test the remesher handles incorrect BCs properly */
stJournal->firewallProducesAssert = False;
@@ -86,10 +86,10 @@ void storeOriginalPos( PICelleratorConte
double* originalCoord;
Particle_Index lParticle_I;
- materialSwarm = (MaterialPointsSwarm*) LiveComponentRegister_Get( context->CF->LCRegister, "materialSwarm" );
+ materialSwarm = (MaterialPointsSwarm* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"materialSwarm" );
for ( lParticle_I = 0 ; lParticle_I < materialSwarm->particleLocalCount ; lParticle_I++ ) {
- particle = (GlobalParticle*) Swarm_ParticleAt( materialSwarm, lParticle_I );
+ particle = (GlobalParticle* ) Swarm_ParticleAt( materialSwarm, lParticle_I );
originalCoord = ExtensionManager_Get( materialSwarm->particleExtensionMgr, particle, handle );
memcpy( originalCoord, particle->coord, sizeof(Coord) );
@@ -115,7 +115,7 @@ void check( PICelleratorContext* context
total time up to the start of this timestep */
double time = context->currentTime + context->dt;
Dictionary* dictionary = context->dictionary;
- Stream* stream = Journal_Register( Info_Type, CURR_MODULE_NAME );
+ Stream* stream = Journal_Register( Info_Type, (Name)CURR_MODULE_NAME );
double tolerance;
Dimension_Index dim;
@@ -127,9 +127,9 @@ void check( PICelleratorContext* context
dim = 2;
/* Add original pos to particle */
- materialSwarm = (MaterialPointsSwarm*) LiveComponentRegister_Get( context->CF->LCRegister, "materialSwarm" );
+ materialSwarm = (MaterialPointsSwarm*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"materialSwarm" );
- tolerance = Dictionary_GetDouble_WithDefault( dictionary, "tolerance", 1.0e-6 );
+ tolerance = Dictionary_GetDouble_WithDefault( dictionary, (Dictionary_Entry_Key)"tolerance", 1.0e-6 );
Journal_Printf( stream, "Timestep = %u: ", context->timeStep );
@@ -175,9 +175,9 @@ typedef struct {
void _testMovingMesh_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
DomainContext* context;
- Stream* stream = Journal_Register( Info_Type, CURR_MODULE_NAME );
+ Stream* stream = Journal_Register( Info_Type, (Name)CURR_MODULE_NAME );
- context = Stg_ComponentFactory_ConstructByName( cf, "context", DomainContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", DomainContext, True, data );
ContextEP_Append( context, AbstractContext_EP_AssignFromXMLExtensions, construct );
ContextEP_Append( context, AbstractContext_EP_Initialise, storeOriginalPos );
@@ -202,7 +202,7 @@ void* _testMovingMesh_DefaultNew( Name n
}
Index testMovingMesh_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, testMovingMesh_Type, "0", _testMovingMesh_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, testMovingMesh_Type, (Name)"0", _testMovingMesh_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d plugins/Multigrid/Multigrid.c
--- a/plugins/Multigrid/Multigrid.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Multigrid/Multigrid.c Thu Jan 14 17:41:33 2010 +1100
@@ -94,9 +94,9 @@ void Underworld_Multigrid_AssignFromXML(
Underworld_Multigrid_selfPointer = self;
- self->ctx = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
- self->sle = Stg_ComponentFactory_ConstructByName( cf, "stokesEqn", Stokes_SLE, True, data );
- self->mgSolver = Stg_ComponentFactory_ConstructByName( cf, "mgSolver", PETScMGSolver, True, data );
+ self->ctx = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
+ self->sle = Stg_ComponentFactory_ConstructByName( cf, (Name)"stokesEqn", Stokes_SLE, True, data );
+ self->mgSolver = Stg_ComponentFactory_ConstructByName( cf, (Name)"mgSolver", PETScMGSolver, True, data );
/* Replace the setup routine... hacky. */
self->sle->solver->_solverSetup = Underworld_Multigrid_SolverSetup;
@@ -141,10 +141,7 @@ void* Underworld_Multigrid_New( Name nam
}
Index Underworld_Multigrid_Register( PluginsManager* mgr ) {
- return PluginsManager_Submit( mgr,
- Underworld_Multigrid_Type,
- "0",
- Underworld_Multigrid_New );
+ return PluginsManager_Submit( mgr, Underworld_Multigrid_Type, (Name)"0", Underworld_Multigrid_New );
}
diff -r 55c0e5081456 -r d7d947597d6d plugins/Output/AverageTemperature/AverageTemperature.c
--- a/plugins/Output/AverageTemperature/AverageTemperature.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Output/AverageTemperature/AverageTemperature.c Thu Jan 14 17:41:33 2010 +1100
@@ -56,9 +56,9 @@ void _Underworld_AverageTemperature_Assi
void _Underworld_AverageTemperature_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
UnderworldContext* context;
- context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
- Underworld_AverageTemperature_PrintHeaderToFile( context );
+ Underworld_AverageTemperature_PrintHeaderToFile( context );
ContextEP_Append( context, AbstractContext_EP_FrequentOutput, Underworld_AverageTemperature_Output );
}
@@ -75,14 +75,14 @@ void* _Underworld_AverageTemperature_Def
}
Index Underworld_AverageTemperature_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_AverageTemperature_Type, "0", _Underworld_AverageTemperature_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_AverageTemperature_Type, (Name)"0", _Underworld_AverageTemperature_DefaultNew );
}
void Underworld_AverageTemperature_Output( void* _context ) {
UnderworldContext* context = (UnderworldContext*) _context;
- FeVariable* temperatureFe = (FeVariable*) LiveComponentRegister_Get( context->CF->LCRegister, "temperatureField" );
+ FeVariable* temperatureFe = (FeVariable* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"temperatureField" );
FeMesh* mesh = temperatureFe->feMesh;
- IntegrationPointsSwarm* swarm = (IntegrationPointsSwarm*)LiveComponentRegister_Get( context->CF->LCRegister, "gaussSwarm" );
+ IntegrationPointsSwarm* swarm = (IntegrationPointsSwarm* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)"gaussSwarm" );
IntegrationPoint* particle;
ElementType* elementType;
Element_LocalIndex lElement_I, lCell_I;
diff -r 55c0e5081456 -r d7d947597d6d plugins/Output/BoundaryLayers/BoundaryLayers.c
--- a/plugins/Output/BoundaryLayers/BoundaryLayers.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Output/BoundaryLayers/BoundaryLayers.c Thu Jan 14 17:41:33 2010 +1100
@@ -64,7 +64,7 @@ void _Underworld_BoundaryLayers_AssignFr
/*printf("AKJFHQEIUH)@$UFKAJSDHRF\nKJASHRFOPUEH\nsaljkdh9\n9)#@$\n213\n\n"); The coordinates of the California Moon ?? */
- context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
/* Add functions to entry points */
ContextEP_Append( context, AbstractContext_EP_FrequentOutput, Underworld_BoundaryLayers_Output );
@@ -94,19 +94,17 @@ void* _Underworld_BoundaryLayers_Default
}
Index Underworld_BoundaryLayers_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_BoundaryLayers_Type, "0", _Underworld_BoundaryLayers_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_BoundaryLayers_Type, (Name)"0", _Underworld_BoundaryLayers_DefaultNew );
}
void Underworld_BoundaryLayers_Setup( UnderworldContext* context ) {
Underworld_BoundaryLayers* self;
Dictionary* dictionary = context->dictionary;
- self = (Underworld_BoundaryLayers*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_BoundaryLayers_Type );
+ self = (Underworld_BoundaryLayers* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_BoundaryLayers_Type );
self->internalTemperature = 0.5;
- self->tolerance = Dictionary_GetDouble_WithDefault( dictionary, "BoundaryLayersTolerance", 0.0001 );
+ self->tolerance = Dictionary_GetDouble_WithDefault( dictionary, (Dictionary_Entry_Key)"BoundaryLayersTolerance", 0.0001 );
self->maxIterations = Dictionary_GetUnsignedInt_WithDefault( dictionary, "BoundaryLayersMaxIterations", 100 );
self->minIterations = Dictionary_GetUnsignedInt_WithDefault( dictionary, "BoundaryLayersMinIterations", 2 );
@@ -129,12 +127,8 @@ void Underworld_BoundaryLayers_Output( U
double hotLayerThickness;
double coldLayerThickness;
- self = (Underworld_BoundaryLayers*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_BoundaryLayers_Type );
- nusseltPlugin = (Underworld_Nusselt*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_Nusselt_Type );
+ self = (Underworld_BoundaryLayers*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_BoundaryLayers_Type );
+ nusseltPlugin = (Underworld_Nusselt* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_Nusselt_Type );
iteration_I = 0;
maxIterations = self->maxIterations;
@@ -180,11 +174,11 @@ double Underworld_BoundaryLayers_Interna
double internalTemperature;
double integral = 0.0;
double integralGlobal = 0.0;
- Swarm* gaussSwarm = (Swarm*)LiveComponentRegister_Get( context->CF->LCRegister, "gaussSwarm" );
+ Swarm* gaussSwarm = (Swarm*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)"gaussSwarm" );
IntegrationPoint* particle;
double bottomLayerHeight;
double topLayerHeight;
- FeVariable* temperatureField = (FeVariable*) LiveComponentRegister_Get( context->CF->LCRegister, "temperatureField" );
+ FeVariable* temperatureField = (FeVariable* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"temperatureField" );
FeMesh* mesh = temperatureField->feMesh;
Element_LocalIndex lElement_I;
Node_LocalIndex nodeAtElementBottom;
diff -r 55c0e5081456 -r d7d947597d6d plugins/Output/BuoyancyIntegrals/BuoyancyIntegrals.c
--- a/plugins/Output/BuoyancyIntegrals/BuoyancyIntegrals.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Output/BuoyancyIntegrals/BuoyancyIntegrals.c Thu Jan 14 17:41:33 2010 +1100
@@ -79,7 +79,7 @@ const Type Underworld_BuoyancyIntegrals_
Index Underworld_BuoyancyIntegrals_Register( PluginsManager *pluginsManager )
{
- return PluginsManager_Submit( pluginsManager, Underworld_BuoyancyIntegrals_Type, "0", _Underworld_BuoyancyIntegrals_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_BuoyancyIntegrals_Type, (Name)"0", _Underworld_BuoyancyIntegrals_DefaultNew );
}
void* _Underworld_BuoyancyIntegrals_DefaultNew( Name name )
@@ -108,7 +108,7 @@ void _Underworld_BuoyancyIntegrals_CTX_D
{
Underworld_BuoyancyIntegrals_CTX *ctx = (Underworld_BuoyancyIntegrals_CTX*)component;
- _Codelet_Delete( ctx );
+ _Codelet_Delete( ctx );
}
void _Underworld_BuoyancyIntegrals_CTX_Destroy( void* component, void* data ) {
@@ -126,20 +126,18 @@ void _Underworld_BuoyancyIntegrals_Assig
Underworld_BuoyancyIntegrals_CTX *ctx;
MaterialPointsSwarm *cob_swarm; /* center of buouyancy swarm */
- context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
/* Add functions to entry points */
ContextEP_Append( context, AbstractContext_EP_AssignFromXMLExtensions, Underworld_BuoyancyIntegrals_Setup );
ContextEP_Append( context, AbstractContext_EP_FrequentOutput, Underworld_BuoyancyIntegrals_Output );
- ctx = (Underworld_BuoyancyIntegrals_CTX*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_BuoyancyIntegrals_Type );
+ ctx = (Underworld_BuoyancyIntegrals_CTX*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_BuoyancyIntegrals_Type );
/* Look for a swarm to which we will assign the calculated center of buoyancy to */
ctx->cob_swarm = NULL;
- cob_swarm = Stg_ComponentFactory_ConstructByName( cf, "center_buoyancy_swarm", MaterialPointsSwarm, False, data );
+ cob_swarm = Stg_ComponentFactory_ConstructByName( cf, (Name)"center_buoyancy_swarm", MaterialPointsSwarm, False, data );
if( cob_swarm != NULL ) {
ctx->cob_swarm = cob_swarm;
}
@@ -155,9 +153,7 @@ void Underworld_BuoyancyIntegrals_Setup(
/* allocate memory */
- ctx = (Underworld_BuoyancyIntegrals_CTX*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_BuoyancyIntegrals_Type );
+ ctx = (Underworld_BuoyancyIntegrals_CTX* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_BuoyancyIntegrals_Type );
/* init values */
ctx->dim = Stg_ComponentFactory_GetRootDictInt( context->CF, "dim", -1 );
@@ -166,17 +162,17 @@ void Underworld_BuoyancyIntegrals_Setup(
}
- ctx->beta = Stg_ComponentFactory_GetRootDictDouble( context->CF, "alpha", -1 );
+ ctx->beta = Stg_ComponentFactory_GetRootDictDouble( context->CF, (Dictionary_Entry_Key)"alpha", -1 );
if( (int)ctx->beta == -1 ) {
- printf("******************** ERROR ALPHA IS UNINITIALISED ******************************** \n");
+ printf("******************** ERROR ALPHA IS UNINITIALISED ******************************** \n" );
}
- ctx->gravity = Stg_ComponentFactory_GetRootDictDouble( context->CF, "gravity", -1 );
+ ctx->gravity = Stg_ComponentFactory_GetRootDictDouble( context->CF, (Dictionary_Entry_Key)"gravity", -1 );
if( (int)ctx->gravity == -1 ) {
- printf("******************** ERROR GRAVITY IS UNINITIALISED ******************************** \n");
+ printf("******************** ERROR GRAVITY IS UNINITIALISED ******************************** \n" );
}
- ctx->y_b_initial = Stg_ComponentFactory_GetRootDictDouble( context->CF, "y_b_initial", -1 );
+ ctx->y_b_initial = Stg_ComponentFactory_GetRootDictDouble( context->CF, (Dictionary_Entry_Key)"y_b_initial", -1 );
if( (int)ctx->y_b_initial == -1 ) {
printf("********************* ERROR Y_B_INITIAL IS NOT SET *********************** \n");
}
@@ -184,11 +180,11 @@ void Underworld_BuoyancyIntegrals_Setup(
ctx->int_w_bar_dt = ctx->y_b_initial;
if (ctx->dim ==3){
- shape = (Stg_Shape*)Stg_ComponentFactory_ConstructByName( context->CF, "cylinder", Stg_Shape, True, 0 /* dummy */ );
+ shape = (Stg_Shape* )Stg_ComponentFactory_ConstructByName( context->CF, (Name)"cylinder", Stg_Shape, True, 0 /* dummy */ );
ctx->x_b = shape->centre[0];
ctx->z_b = shape->centre[2];
} else if (ctx->dim==2){
- shape = (Stg_Shape*)Stg_ComponentFactory_ConstructByName( context->CF, "disk", Stg_Shape, True, 0 /* dummy */ );
+ shape = (Stg_Shape* )Stg_ComponentFactory_ConstructByName( context->CF, (Name)"disk", Stg_Shape, True, 0 /* dummy */ );
ctx->x_b = shape->centre[0];
}
@@ -294,13 +290,11 @@ void perform_integrals( UnderworldContex
FeVariable *velocityField, *temperatureField;
Swarm* gaussSwarm;
- ctx = (Underworld_BuoyancyIntegrals_CTX*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_BuoyancyIntegrals_Type );
+ ctx = (Underworld_BuoyancyIntegrals_CTX*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_BuoyancyIntegrals_Type );
- velocityField = (FeVariable*)LiveComponentRegister_Get( context->CF->LCRegister, "VelocityField" );
- temperatureField = (FeVariable*)LiveComponentRegister_Get( context->CF->LCRegister, "temperatureField" );
- gaussSwarm = (Swarm*)LiveComponentRegister_Get( context->CF->LCRegister, "gaussSwarm" );
+ velocityField = (FeVariable* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)"VelocityField" );
+ temperatureField = (FeVariable* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)"temperatureField" );
+ gaussSwarm = (Swarm* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)"gaussSwarm" );
/* initialise values to compute */
*B = *w_bar = *y_b = -1.0;
@@ -323,7 +317,7 @@ void perform_integrals( UnderworldContex
ngp = context->gaussSwarm->particleLocalCount;
cell_I = 0;
for( p = 0; p<ngp; p++ ) {
- ip = (IntegrationPoint*)Swarm_ParticleInCellAt( context->gaussSwarm, cell_I, p );
+ ip = (IntegrationPoint* )Swarm_ParticleInCellAt( context->gaussSwarm, cell_I, p );
xi = ip->xi;
weight = ip->weight;
///*
@@ -336,7 +330,7 @@ void perform_integrals( UnderworldContex
dim = ctx->dim;
elementType = FeMesh_GetElementType( velocityField->feMesh, 0 );
elementNodeCount = elementType->nodeCount;
- GNx = Memory_Alloc_2DArray( double, dim, elementNodeCount, "Global Shape Function Derivatives for mayhem" );
+ GNx = Memory_Alloc_2DArray( double, dim, elementNodeCount, (Name)"Global Shape Function Derivatives for mayhem" );
mesh = temperatureField->feMesh;
@@ -345,7 +339,7 @@ void perform_integrals( UnderworldContex
_sum_vol = 0.0;
ngp = gaussSwarm->particleLocalCount;
- n_elements = FeMesh_GetElementLocalSize( mesh );
+ n_elements = FeMesh_GetElementLocalSize( mesh );
// printf("n_elements = %d \n", n_elements );
for( e=0; e<n_elements; e++ ) {
@@ -430,11 +424,9 @@ void eval_temperature( UnderworldContext
T = -66.99;
- ctx = (Underworld_BuoyancyIntegrals_CTX*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_BuoyancyIntegrals_Type );
+ ctx = (Underworld_BuoyancyIntegrals_CTX*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_BuoyancyIntegrals_Type );
- temperatureField = (FeVariable*)LiveComponentRegister_Get( context->CF->LCRegister, "temperatureField" );
+ temperatureField = (FeVariable* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)"temperatureField" );
/* Get x_b, and z_b from xml */
/* "cylinder" z_b = CentreZ (0.5), x_b = CentreX (1.0) */
if (ctx->dim==3){
@@ -459,11 +451,11 @@ void assign_coords_to_swarm( double x_b,
int point_count;
GlobalParticle *particle;
Particle_Index lParticle_I;
- Stream *errorStream = Journal_Register( Error_Type, "Underworld_BuoyancyIntegrals: assign_coords_to_swarm" );
+ Stream *errorStream = Journal_Register( Error_Type, (Name)"Underworld_BuoyancyIntegrals: assign_coords_to_swarm" );
/* int rank; */
/* Cast to get parent */
- swarm = (Swarm*)cob_swarm;
+ swarm = (Swarm* )cob_swarm;
/* check cob swarm only has one point */
@@ -503,11 +495,9 @@ void Underworld_BuoyancyIntegrals_Output
perform_integrals( context, &B, &w_bar, &y_b, &int_w_bar_dt );
eval_temperature( context, y_b, &temp_b );
- ctx = (Underworld_BuoyancyIntegrals_CTX*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_BuoyancyIntegrals_Type );
+ ctx = (Underworld_BuoyancyIntegrals_CTX*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_BuoyancyIntegrals_Type );
- temperatureField = (FeVariable*)LiveComponentRegister_Get( context->CF->LCRegister, "temperatureField" );
+ temperatureField = (FeVariable* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)"temperatureField" );
StgFEM_FrequentOutput_PrintValue( context, B );
StgFEM_FrequentOutput_PrintValue( context, w_bar );
diff -r 55c0e5081456 -r d7d947597d6d plugins/Output/ConvectionData/ConvectionData.c
--- a/plugins/Output/ConvectionData/ConvectionData.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Output/ConvectionData/ConvectionData.c Thu Jan 14 17:41:33 2010 +1100
@@ -105,22 +105,20 @@ void Underworld_ConvectionData_Setup( vo
FrankKamenetskii* frankKamenetskii;
Rheology* rheology;
NonNewtonian* nonNewtonian;
- Swarm* gaussSwarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, "gaussSwarm" );
- FeVariable* velocityField = (FeVariable*)LiveComponentRegister_Get( context->CF->LCRegister, "VelocityField" );
+ Swarm* gaussSwarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"gaussSwarm" );
+ FeVariable* velocityField = (FeVariable* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)"VelocityField" );
char* filename;
- dataStream = Journal_Register( Info_Type, "ConvectionData Info Stream" );
+ dataStream = Journal_Register( Info_Type, (Name)"ConvectionData Info Stream" );
Stream_SetPrintingRank( dataStream, 0 ); /** Only prints to main proccessor */
- self = (Underworld_ConvectionData*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_ConvectionData_Type );
+ self = (Underworld_ConvectionData*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_ConvectionData_Type );
- rheology = (Rheology*)Stg_ComponentFactory_ConstructByName( context->CF, "temperatureDependence", Rheology, False, 0 /* dummy */ );
- nonNewtonian = (NonNewtonian*)LiveComponentRegister_Get( context->CF->LCRegister, NonNewtonian_Type );
- /* (NonNewtonian*)Stg_ComponentFactory_ConstructByName( context->CF, "nonNewtonian", NonNewtonian, True, 0 */ /* dummy */ /* ); */
+ rheology = (Rheology* )Stg_ComponentFactory_ConstructByName( context->CF, (Name)"temperatureDependence", Rheology, False, 0 /* dummy */ );
+ nonNewtonian = (NonNewtonian* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)NonNewtonian_Type );
+ /* (NonNewtonian* )Stg_ComponentFactory_ConstructByName( context->CF, (Name)"nonNewtonian", NonNewtonian, True, 0 */ /* dummy */ /* ); */
(nonNewtonian == NULL) ? (self->stressExponent = 1) :
- (self->stressExponent = nonNewtonian->stressExponent) ;
+ (self->stressExponent = nonNewtonian->stressExponent ) ;
if( !strcmp( rheology->type, "FrankKamenetskii" ) ) {
frankKamenetskii = (FrankKamenetskii*)rheology;
@@ -130,16 +128,14 @@ void Underworld_ConvectionData_Setup( vo
frankKamenetskii=NULL;
}
- self->diffusivity = Stg_ComponentFactory_GetRootDictDouble( context->CF, "diffusivity", 1.0 );
- self->horizontalDimOfConvecCell = Stg_ComponentFactory_GetRootDictDouble( context->CF, "horizontalDimOfConvecCell", 1.0 );
- self->Ra = Stg_ComponentFactory_GetRootDictDouble( context->CF, "Ra", 1.0 );
+ self->diffusivity = Stg_ComponentFactory_GetRootDictDouble( context->CF, (Dictionary_Entry_Key)"diffusivity", 1.0 );
+ self->horizontalDimOfConvecCell = Stg_ComponentFactory_GetRootDictDouble( context->CF, (Dictionary_Entry_Key)"horizontalDimOfConvecCell", 1.0 );
+ self->Ra = Stg_ComponentFactory_GetRootDictDouble( context->CF, (Dictionary_Entry_Key)"Ra", 1.0 );
self->eta0 = ( arrhenius != NULL ? arrhenius->eta0 : frankKamenetskii->eta0 );
/* self->stressExponent = nonNewtonian->stressExponent; */
self->rheologyName = rheology->type;/*( arrhenius != NULL ? StG_Strdup(arrhenius->type) : StG_Strdup(frankKamenetskii->type) ); */
- self->boundaryLayersPlugin = (Underworld_BoundaryLayers*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_BoundaryLayers_Type );
+ self->boundaryLayersPlugin = (Underworld_BoundaryLayers* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_BoundaryLayers_Type );
Journal_Firewall( self->boundaryLayersPlugin != NULL, Underworld_Error, "Error in %s. Cannot find the BoundaryLayers Plugin. Make sure <param>Underworld_BoundaryLayers</param> is in your plugins list\n");
Journal_Firewall(
@@ -179,9 +175,7 @@ void Underworld_ConvectionData_Dump( voi
double surfaceMobility;
double deltaViscosity;
- self = (Underworld_ConvectionData*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_ConvectionData_Type );
+ self = (Underworld_ConvectionData*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_ConvectionData_Type );
Journal_Printf( dataStream, "ID = %s_%.3g_%.3g_%.3g\n", self->rheologyName, self->stressExponent, self->eta0, self->Ra );
@@ -229,9 +223,7 @@ double Underworld_ConvectionData_XZPlane
TODO:PAT help:
Here I would like to get the VelocitySquareField instead of getting the whole plugin
*/
- self = (Underworld_ConvectionData*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_ConvectionData_Type );
+ self = (Underworld_ConvectionData*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_ConvectionData_Type );
/* Sum integral */
integral = FeVariable_IntegratePlane( self->velocitySquaredField, J_AXIS, yCoord_Of_XZPlane );
@@ -252,7 +244,7 @@ void _Underworld_ConvectionData_AssignFr
void _Underworld_ConvectionData_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
UnderworldContext* context;
- context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
ContextEP_Append( context, AbstractContext_EP_AssignFromXMLExtensions, Underworld_ConvectionData_Setup );
ContextEP_Append( context, AbstractContext_EP_FrequentOutput, Underworld_ConvectionData_Dump );
@@ -286,7 +278,7 @@ void* _Underworld_ConvectionData_Default
}
Index Underworld_ConvectionData_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_ConvectionData_Type, "0", _Underworld_ConvectionData_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_ConvectionData_Type, (Name)"0", _Underworld_ConvectionData_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d plugins/Output/CylinderNodeProfiling/CylinderNodeProfiling.c
--- a/plugins/Output/CylinderNodeProfiling/CylinderNodeProfiling.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Output/CylinderNodeProfiling/CylinderNodeProfiling.c Thu Jan 14 17:41:33 2010 +1100
@@ -60,7 +60,7 @@ void Experimental_NodeTempProfile( PICel
Index lNode_I, newNodeID;
int startProfileNodeID;
static Bool beenHere = False;
- Stream* stream = Journal_Register( Info_Type, "TempNodeHeight" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"TempNodeHeight" );
char* filename;
double* maxTempList = Memory_Alloc_Array( double, context->nproc, "Hold the max temperature of each array");
unsigned rootProc;
@@ -71,8 +71,8 @@ void Experimental_NodeTempProfile( PICel
tempFeName = Dictionary_GetString_WithDefault( context->dictionary, "TemperatureField", "TemperatureField" );
/* Get TemperatureField FeVariable */
- temperatureFe = (FeVariable*) LiveComponentRegister_Get( context->CF->LCRegister, tempFeName );
- assert( temperatureFe );
+ temperatureFe = (FeVariable*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)tempFeName );
+ assert( temperatureFe );
/* Set up stream */
Stg_asprintf( &filename, "CylinderNodeProfiling.%dof%d.dat", context->rank, context->nproc );
@@ -130,10 +130,10 @@ void _Experimental_CylinderNodeProfiling
void _Experimental_CylinderNodeProfiling_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
AbstractContext* context;
- FeVariable* temperatureField = Stg_ComponentFactory_ConstructByName( cf, "TemperatureField", FeVariable, True, data );
+ FeVariable* temperatureField = Stg_ComponentFactory_ConstructByName( cf, (Name)"TemperatureField", FeVariable, True, data );
FeMesh* mesh = temperatureField->feMesh;
- context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
ContextEP_Append( context, AbstractContext_EP_FrequentOutput, Experimental_NodeTempProfile );
}
@@ -162,8 +162,7 @@ Index Experimental_CylinderNodeProfiling
Index Experimental_CylinderNodeProfiling_Register( PluginsManager* pluginsManager ) {
Index result;
- result = PluginsManager_Submit( pluginsManager, Experimental_CylinderNodeProfiling, "0",
- _Experimental_CylinderNodeProfiling_DefaultNew );
+ result = PluginsManager_Submit( pluginsManager, Experimental_CylinderNodeProfiling, (Name)"0", _Experimental_CylinderNodeProfiling_DefaultNew );
return result;
}
diff -r 55c0e5081456 -r d7d947597d6d plugins/Output/Localisation/Localisation.c
--- a/plugins/Output/Localisation/Localisation.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Output/Localisation/Localisation.c Thu Jan 14 17:41:33 2010 +1100
@@ -60,10 +60,10 @@ void _Underworld_Localisation_AssignFrom
void _Underworld_Localisation_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
UnderworldContext* context;
- context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
/* Add functions to entry points */
- Underworld_Localisation_Setup( context );
+ Underworld_Localisation_Setup( context );
ContextEP_Append( context, AbstractContext_EP_FrequentOutput, Underworld_Localisation_Output );
}
@@ -95,7 +95,7 @@ void* _Underworld_Localisation_DefaultNe
}
Index Underworld_Localisation_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_Localisation_Type, "0", _Underworld_Localisation_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_Localisation_Type, (Name)"0", _Underworld_Localisation_DefaultNew );
}
void Underworld_Localisation_Setup( UnderworldContext* context ) {
@@ -107,21 +107,19 @@ void Underworld_Localisation_Setup( Unde
Index numberOfOperands;
Operator* ownOperator;
Dimension_Index dim;
- Swarm* gaussSwarm = (Swarm*)LiveComponentRegister_Get( context->CF->LCRegister, "gaussSwarm" );
+ Swarm* gaussSwarm = (Swarm* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)"gaussSwarm" );
Underworld_Localisation* self;
/* create datatype for MPI communications */
Localisation_Create_MPI_Datatype();
- self = (Underworld_Localisation*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_Localisation_Type );
+ self = (Underworld_Localisation* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_Localisation_Type );
StgFEM_FrequentOutput_PrintString( context, "Localisation" );
/* get localisation parameter */
- self->deformationFactor = Dictionary_GetDouble_WithDefault( context->dictionary, "localisationDeformationFactor", 0.8 );
+ self->deformationFactor = Dictionary_GetDouble_WithDefault( context->dictionary, (Dictionary_Entry_Key)"localisationDeformationFactor", 0.8 );
Journal_Firewall(
gaussSwarm != NULL,
@@ -159,7 +157,7 @@ void Underworld_Localisation_Output( Und
double weightSoFar2;
double *min, *max;
double translate;
- int meshSizeJ = Dictionary_GetInt_WithDefault( context->dictionary, "elementResJ", 1 );
+ int meshSizeJ = Dictionary_GetInt_WithDefault( context->dictionary, (Dictionary_Entry_Key)"elementResJ", 1 );
int ii;
int aa;
int numPoints;
@@ -176,9 +174,7 @@ void Underworld_Localisation_Output( Und
globPartInc = 0;
- self = (Underworld_Localisation*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_Localisation_Type );
+ self = (Underworld_Localisation*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_Localisation_Type );
/* find the size of the domain */
min = Memory_Alloc_Array_Unnamed( double, Mesh_GetDimSize( self->reducedStrainRateFieldInvariantRoot->feMesh ) );
diff -r 55c0e5081456 -r d7d947597d6d plugins/Output/MaxTemperature/MaxTemperature.c
--- a/plugins/Output/MaxTemperature/MaxTemperature.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Output/MaxTemperature/MaxTemperature.c Thu Jan 14 17:41:33 2010 +1100
@@ -56,9 +56,9 @@ void _Underworld_MaxTemperature_AssignFr
void _Underworld_MaxTemperature_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
UnderworldContext* context;
- context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
- Underworld_MaxTemperature_PrintHeaderToFile( context );
+ Underworld_MaxTemperature_PrintHeaderToFile( context );
ContextEP_Append( context, AbstractContext_EP_FrequentOutput, Underworld_MaxTemperature_Output );
}
@@ -75,15 +75,15 @@ void* _Underworld_MaxTemperature_Default
}
Index Underworld_MaxTemperature_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_MaxTemperature_Type, "0", _Underworld_MaxTemperature_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_MaxTemperature_Type, (Name)"0", _Underworld_MaxTemperature_DefaultNew );
}
void Underworld_MaxTemperature_Output( void* _context ) {
UnderworldContext* context = (UnderworldContext*) _context;
- FeVariable* temperatureFe = (FeVariable*)LiveComponentRegister_Get( context->CF->LCRegister, "TemperatureField" );
+ FeVariable* temperatureFe = (FeVariable* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)"TemperatureField" );
double maxTemp;
- maxTemp = _FeVariable_GetMaxGlobalFieldMagnitude( temperatureFe );
+ maxTemp = _FeVariable_GetMaxGlobalFieldMagnitude( temperatureFe );
StgFEM_FrequentOutput_PrintValue( context, maxTemp );
}
diff -r 55c0e5081456 -r d7d947597d6d plugins/Output/MaxVelocity/MaxVelocity.c
--- a/plugins/Output/MaxVelocity/MaxVelocity.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Output/MaxVelocity/MaxVelocity.c Thu Jan 14 17:41:33 2010 +1100
@@ -80,10 +80,10 @@ Index Underworld_MaxVelocity_Register( P
* as it's final argument. This argument should define the functionality of the plugin
*/
- return PluginsManager_Submit( pluginsManager, Underworld_MaxVelocity_Type, "0", _Underworld_MaxVelocity_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_MaxVelocity_Type, (Name)"0", _Underworld_MaxVelocity_DefaultNew );
}
-void* _Underworld_MaxVelocity_DefaultNew( Name name ) {
+void* _Underworld_MaxVelocity_DefaultNew( Name name ) {
/*
* Purpose:
* Registers the 'key' StGermain functions that will be used by this plugin.
@@ -148,10 +148,10 @@ void _Underworld_MaxVelocity_AssignFromX
UnderworldContext* context;
/* Gather context from the ComponentFactory here */
- context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
/* Simple user defined function which belong to no EntryPoint */
- Underworld_MaxVelocity_PrintHeaderToFile( context );
+ Underworld_MaxVelocity_PrintHeaderToFile( context );
/* Append user defined function, Underworld_MaxVelocity_Output, onto the EntryPoint
* AbstractContext_EP_FrequentOutput */
@@ -180,11 +180,11 @@ void Underworld_MaxVelocity_Output( void
*/
UnderworldContext* context = (UnderworldContext*) _context;
- FeVariable* velocityFe = (FeVariable*) LiveComponentRegister_Get( context->CF->LCRegister, "VelocityField" );
+ FeVariable* velocityFe = (FeVariable*) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"VelocityField" );
double maxVel;
/* Find the max field component */
- maxVel = _FeVariable_GetMaxGlobalFieldMagnitude( velocityFe );
+ maxVel = _FeVariable_GetMaxGlobalFieldMagnitude( velocityFe );
/* Print to the FrequentOutput stream */
StgFEM_FrequentOutput_PrintValue( context, maxVel );
}
diff -r 55c0e5081456 -r d7d947597d6d plugins/Output/Mobility/Mobility.c
--- a/plugins/Output/Mobility/Mobility.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Output/Mobility/Mobility.c Thu Jan 14 17:41:33 2010 +1100
@@ -57,9 +57,9 @@ void _Underworld_Mobility_AssignFromXML(
void _Underworld_Mobility_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
UnderworldContext* context;
- context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
- Underworld_Mobility_PrintHeaderToFile( context );
+ Underworld_Mobility_PrintHeaderToFile( context );
ContextEP_Append( context, AbstractContext_EP_AssignFromXMLExtensions, Underworld_Mobility_Setup );
ContextEP_Append( context, AbstractContext_EP_FrequentOutput , Underworld_Mobility_Dump );
}
@@ -113,17 +113,17 @@ void* _Underworld_Mobility_DefaultNew( N
}
Index Underworld_Mobility_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_Mobility_Type, "0", _Underworld_Mobility_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_Mobility_Type, (Name)"0", _Underworld_Mobility_DefaultNew );
}
void Underworld_Mobility_Setup( void* _context ) {
UnderworldContext* context = (UnderworldContext*) _context;
- Swarm* gaussSwarm = (Swarm*)LiveComponentRegister_Get( context->CF->LCRegister, "gaussSwarm" );
- FeVariable* velocityField = (FeVariable*)LiveComponentRegister_Get( context->CF->LCRegister, "VelocityField" );
+ Swarm* gaussSwarm = (Swarm* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)"gaussSwarm" );
+ FeVariable* velocityField = (FeVariable* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)"VelocityField" );
Underworld_Mobility* self;
- self = (Underworld_Mobility*)LiveComponentRegister_Get( context->CF->LCRegister, Underworld_Mobility_Type );
+ self = (Underworld_Mobility* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_Mobility_Type );
Journal_Firewall( gaussSwarm != NULL, Underworld_Error, "Cannot find gauss swarm. Cannot use %s.\n", CURR_MODULE_NAME );
Journal_Firewall( velocityField != NULL, Underworld_Error, "Cannot find velocityField. Cannot use %s.\n", CURR_MODULE_NAME );
@@ -135,7 +135,7 @@ void Underworld_Mobility_Setup( void* _c
/* Integrate Every Step and dump to file */
void Underworld_Mobility_Dump( void* _context ) {
UnderworldContext* context = (UnderworldContext*) _context;
- Swarm* gaussSwarm = (Swarm*)LiveComponentRegister_Get( context->CF->LCRegister, "gaussSwarm" );
+ Swarm* gaussSwarm = (Swarm*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)"gaussSwarm" );
Mesh* mesh;
double maxCrd[3], minCrd[3];
double integral;
@@ -147,11 +147,9 @@ void Underworld_Mobility_Dump( void* _co
Underworld_Mobility* self;
- self = (Underworld_Mobility*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_Mobility_Type );
+ self = (Underworld_Mobility*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_Mobility_Type );
- mesh = (Mesh*)self->velocitySquaredField->feMesh;
+ mesh = (Mesh* )self->velocitySquaredField->feMesh;
Mesh_GetGlobalCoordRange( mesh, minCrd, maxCrd );
/* Sum integral */
diff -r 55c0e5081456 -r d7d947597d6d plugins/Output/Nusselt/Nusselt.c
--- a/plugins/Output/Nusselt/Nusselt.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Output/Nusselt/Nusselt.c Thu Jan 14 17:41:33 2010 +1100
@@ -62,8 +62,8 @@ void _Underworld_Nusselt_AssignFromXML(
FieldVariable* velocityField;
FieldVariable* temperatureField;
- self->context = (AbstractContext*)Stg_ComponentFactory_PluginConstructByKey( cf, self, "Context", UnderworldContext, True, data );
- self->gaussSwarm = Stg_ComponentFactory_PluginConstructByKey( cf, self, "GaussSwarm", Swarm, True, data );
+ self->context = (AbstractContext*)Stg_ComponentFactory_PluginConstructByKey( cf, self, (Dictionary_Entry_Key)"Context", UnderworldContext, True, data );
+ self->gaussSwarm = Stg_ComponentFactory_PluginConstructByKey( cf, self, (Dictionary_Entry_Key)"GaussSwarm", Swarm, True, data );
StgFEM_FrequentOutput_PrintString( self->context, "Nusselt" );
@@ -157,13 +157,13 @@ void* _Underworld_Nusselt_DefaultNew( Na
}
Index Underworld_Nusselt_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_Nusselt_Type, "0", _Underworld_Nusselt_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_Nusselt_Type, (Name)"0", _Underworld_Nusselt_DefaultNew );
}
void Underworld_Nusselt_Output( UnderworldContext* context ) {
Underworld_Nusselt* self;
- self = (Underworld_Nusselt*)LiveComponentRegister_Get( context->CF->LCRegister, Underworld_Nusselt_Type );
+ self = (Underworld_Nusselt* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_Nusselt_Type );
/* This performs in integral given in the first half of equation 23 in
* Moresi, L. N. and Solomatov, V. S.,
diff -r 55c0e5081456 -r d7d947597d6d plugins/Output/Nusselt_deltaT/Nusselt_deltaT.c
--- a/plugins/Output/Nusselt_deltaT/Nusselt_deltaT.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Output/Nusselt_deltaT/Nusselt_deltaT.c Thu Jan 14 17:41:33 2010 +1100
@@ -42,10 +42,10 @@ void _Underworld_Nusselt_deltaT_AssignFr
void _Underworld_Nusselt_deltaT_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
UnderworldContext* context;
- context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
/* Add functions to entry points */
- Underworld_Nusselt_deltaT_Setup( context );
+ Underworld_Nusselt_deltaT_Setup( context );
ContextEP_Append( context, AbstractContext_EP_FrequentOutput, Underworld_Nusselt_deltaT_Output );
}
@@ -77,7 +77,7 @@ void* _Underworld_Nusselt_deltaT_Default
}
Index Underworld_Nusselt_deltaT_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_Nusselt_deltaT_Type, "0", _Underworld_Nusselt_deltaT_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_Nusselt_deltaT_Type, (Name)"0", _Underworld_Nusselt_deltaT_DefaultNew );
}
@@ -92,9 +92,7 @@ void Underworld_Nusselt_deltaT_Setup( Un
Underworld_Nusselt_deltaT* self;
- self = (Underworld_Nusselt_deltaT*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_Nusselt_deltaT_Type );
+ self = (Underworld_Nusselt_deltaT* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_Nusselt_deltaT_Type );
StgFEM_FrequentOutput_PrintString( context, "Nu/DeltaT" );
@@ -137,9 +135,7 @@ void Underworld_Nusselt_deltaT_Output( U
temperatureField = FieldVariable_Register_GetByName( fV_Register, "TemperatureField" );
- self = (Underworld_Nusselt_deltaT*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_Nusselt_deltaT_Type );
+ self = (Underworld_Nusselt_deltaT*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_Nusselt_deltaT_Type );
/* get_layer value */
/*self->shfl = FeVariable_AverageTopLayer( self->dTField, context->gaussSwarm, NULL, J_AXIS ); */
diff -r 55c0e5081456 -r d7d947597d6d plugins/Output/OutputForSPModel/OutputForSPModel.c
--- a/plugins/Output/OutputForSPModel/OutputForSPModel.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Output/OutputForSPModel/OutputForSPModel.c Thu Jan 14 17:41:33 2010 +1100
@@ -91,7 +91,7 @@ int Underworld_OutputForSPModel_Interpol
}
vertGrid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, "vertexGrid" ) );
+ ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
nodesPerFace = 4;
/* set up IJK parametrisation of nodes */
@@ -293,13 +293,10 @@ void Underworld_OutputForSPModelDo( Unde
}
Index Underworld_OutputForSPModel_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager,
- Underworld_OutputForSPModel_Type,
- "0",
- _Underworld_OutputForSPModel_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_OutputForSPModel_Type, (Name)"0", _Underworld_OutputForSPModel_DefaultNew );
}
-void* _Underworld_OutputForSPModel_DefaultNew( Name name ) {
+void* _Underworld_OutputForSPModel_DefaultNew( Name name ) {
return Codelet_New(
Underworld_OutputForSPModel_Type,
_Underworld_OutputForSPModel_DefaultNew,
@@ -312,7 +309,7 @@ void* _Underworld_OutputForSPModel_Defau
}
void _Underworld_OutputForSPModel_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
- UnderworldContext* context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ UnderworldContext* context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
outputTimestep = Dictionary_GetUnsignedInt_WithDefault( context->dictionary, "OutputForSPModel_OutputTimestep", 10 );
diff -r 55c0e5081456 -r d7d947597d6d plugins/Output/Shfl/Shfl.c
--- a/plugins/Output/Shfl/Shfl.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Output/Shfl/Shfl.c Thu Jan 14 17:41:33 2010 +1100
@@ -42,10 +42,10 @@ void _Underworld_Shfl_AssignFromXML( voi
void _Underworld_Shfl_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
UnderworldContext* context;
- context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
/* Add functions to entry points */
- Underworld_Shfl_Setup( context );
+ Underworld_Shfl_Setup( context );
ContextEP_Append( context, AbstractContext_EP_FrequentOutput, Underworld_Shfl_Output );
}
@@ -98,7 +98,7 @@ void* _Underworld_Shfl_DefaultNew( Name
}
Index Underworld_Shfl_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_Shfl_Type, "0", _Underworld_Shfl_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_Shfl_Type, (Name)"0", _Underworld_Shfl_DefaultNew );
}
@@ -109,13 +109,11 @@ void Underworld_Shfl_Setup( UnderworldCo
FieldVariable* temperatureField;
OperatorFeVariable* advectiveHeatFluxField;
OperatorFeVariable* temperatureTotalDerivField;
- Swarm* gaussSwarm = (Swarm*)LiveComponentRegister_Get( context->CF->LCRegister, "gaussSwarm" );
+ Swarm* gaussSwarm = (Swarm* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)"gaussSwarm" );
Underworld_Shfl* self;
- self = (Underworld_Shfl*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_Shfl_Type );
+ self = (Underworld_Shfl* )LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_Shfl_Type );
StgFEM_FrequentOutput_PrintString( context, "Shfl" );
@@ -162,9 +160,7 @@ void Underworld_Shfl_Output( UnderworldC
temperatureField = FieldVariable_Register_GetByName( fV_Register, "TemperatureField" );
- self = (Underworld_Shfl*)LiveComponentRegister_Get(
- context->CF->LCRegister,
- Underworld_Shfl_Type );
+ self = (Underworld_Shfl*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_Shfl_Type );
/* get_layer value */
self->shfl = FeVariable_AveragePlane( self->dTField, J_AXIS, 1.0 );
diff -r 55c0e5081456 -r d7d947597d6d plugins/Output/VTKOutput/VTKOutput.c
--- a/plugins/Output/VTKOutput/VTKOutput.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Output/VTKOutput/VTKOutput.c Thu Jan 14 17:41:33 2010 +1100
@@ -55,7 +55,7 @@ void _Underworld_VTKOutput_AssignFromXML
void _Underworld_VTKOutput_AssignFromXML( void* component, Stg_ComponentFactory* cf, void *data ) {
UnderworldContext* context;
- context = (UnderworldContext*)Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ context = (UnderworldContext*)Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
ContextEP_Append( context, AbstractContext_EP_Dump,
VTKOutput );
@@ -76,7 +76,7 @@ Index Underworld_VTKOutput_Register( Plu
Index Underworld_VTKOutput_Register( PluginsManager* pluginsManager ) {
Journal_DPrintf( StgFEM_Debug, "In: %s( void* )\n", __func__ );
- return PluginsManager_Submit( pluginsManager, Underworld_VTKOutput_Type, "0", _Underworld_VTKOutput_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_VTKOutput_Type, (Name)"0", _Underworld_VTKOutput_DefaultNew );
}
void VTKOutput_particles(IntegrationPointsSwarm* picswarm,
@@ -89,7 +89,7 @@ void VTKOutput( void* _context ) {
void VTKOutput( void* _context ) {
UnderworldContext* context = (UnderworldContext*)_context;
Dictionary* dictionary = context->dictionary;
- IntegrationPointsSwarm* picIntegrationPoints = (IntegrationPointsSwarm*)LiveComponentRegister_Get( context->CF->LCRegister, "picIntegrationPoints" );
+ IntegrationPointsSwarm* picIntegrationPoints = (IntegrationPointsSwarm*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)"picIntegrationPoints" );
int myRank, nprocs;
MPI_Comm comm;
@@ -110,10 +110,8 @@ void VTKOutput( void* _context ) {
if(picIntegrationPoints) {
VTKOutput_particles(picIntegrationPoints,
- Dictionary_GetDouble_WithDefault
- (dictionary,"defaultDiffusivity",1.0),
- Dictionary_GetInt_WithDefault
- (dictionary,"particleStepping",1),
+ Dictionary_GetDouble_WithDefault( dictionary, (Dictionary_Entry_Key)"defaultDiffusivity", 1.0 ),
+ Dictionary_GetInt_WithDefault( dictionary, (Dictionary_Entry_Key)"particleStepping", 1 ),
context->outputPath, context->timeStep,
context->dim,myRank,nprocs);
}
@@ -191,14 +189,11 @@ void VTKOutput_particles(IntegrationPoin
material = (RheologyMaterial*) IntegrationPointsSwarm_GetMaterialOn( picswarm, integrationparticle );
materialparticle = OneToOneMapper_GetMaterialPoint( picswarm->mapper, integrationparticle, &materialSwarm );
- density=Dictionary_GetDouble_WithDefault( material->dictionary,
- "density", 0.0 );
- alpha=Dictionary_GetDouble_WithDefault( material->dictionary,
- "alpha", 0.0 );
+ density=Dictionary_GetDouble_WithDefault( material->dictionary, (Dictionary_Entry_Key)"density", 0.0 );
+ alpha=Dictionary_GetDouble_WithDefault( material->dictionary, (Dictionary_Entry_Key)"alpha", 0.0 );
material_index=material->index;
- diffusivity=Dictionary_GetDouble_WithDefault
- ( material->dictionary, "diffusivity", defaultDiffusivity );
- rheology_register=(Rheology_Register*)material->rheology_Register;
+ diffusivity=Dictionary_GetDouble_WithDefault( material->dictionary, (Dictionary_Entry_Key)"diffusivity", defaultDiffusivity );
+ rheology_register=(Rheology_Register* )material->rheology_Register;
if( rheology_register && strcmp( material->name, Material_Type ) )
rheologyCount = Rheology_Register_GetCount( rheology_register );
diff -r 55c0e5081456 -r d7d947597d6d plugins/Output/Vrms/Vrms.c
--- a/plugins/Output/Vrms/Vrms.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/Output/Vrms/Vrms.c Thu Jan 14 17:41:33 2010 +1100
@@ -57,9 +57,9 @@ void _Underworld_Vrms_AssignFromXML( voi
void _Underworld_Vrms_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
Underworld_Vrms* self = (Underworld_Vrms*)component;
- self->context = (AbstractContext*)Stg_ComponentFactory_PluginConstructByKey( cf, self, "Context", UnderworldContext, True, data );
- self->gaussSwarm = Stg_ComponentFactory_PluginConstructByKey( cf, self, "GaussSwarm", Swarm, True, data );
- self->velocityField = Stg_ComponentFactory_PluginConstructByKey( cf, self, "VelocityField", FeVariable, True, data );
+ self->context = (AbstractContext*)Stg_ComponentFactory_PluginConstructByKey( cf, self, (Dictionary_Entry_Key)"Context", UnderworldContext, True, data );
+ self->gaussSwarm = Stg_ComponentFactory_PluginConstructByKey( cf, self, (Dictionary_Entry_Key)"GaussSwarm", Swarm, True, data );
+ self->velocityField = Stg_ComponentFactory_PluginConstructByKey( cf, self, (Dictionary_Entry_Key)"VelocityField", FeVariable, True, data );
/* Create new Field Variable */
self->velocitySquaredField = OperatorFeVariable_NewUnary( "VelocitySquaredField", (DomainContext*)self->context, self->velocityField, "VectorSquare" );
@@ -128,12 +128,12 @@ void* _Underworld_Vrms_DefaultNew( Name
}
Index Underworld_Vrms_Register( PluginsManager* pluginsManager ) {
- return PluginsManager_Submit( pluginsManager, Underworld_Vrms_Type, "0", _Underworld_Vrms_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_Vrms_Type, (Name)"0", _Underworld_Vrms_DefaultNew );
}
/* Integrate Every Step and dump to file */
void Underworld_Vrms_Dump( void* _context ) {
- UnderworldContext* context = (UnderworldContext*) _context;
+ UnderworldContext* context = (UnderworldContext* ) _context;
Mesh* mesh;
double maxCrd[3], minCrd[3];
double integral;
@@ -143,9 +143,9 @@ void Underworld_Vrms_Dump( void* _contex
Underworld_Vrms* self;
- self = (Underworld_Vrms*)LiveComponentRegister_Get( context->CF->LCRegister, Underworld_Vrms_Type );
+ self = (Underworld_Vrms*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)Underworld_Vrms_Type );
- mesh = (Mesh*)self->velocitySquaredField->feMesh;
+ mesh = (Mesh* )self->velocitySquaredField->feMesh;
Mesh_GetGlobalCoordRange( mesh, minCrd, maxCrd );
/* Sum integral */
diff -r 55c0e5081456 -r d7d947597d6d plugins/ScalingChecks/Ra_Scaling/Ra_Scaling.c
--- a/plugins/ScalingChecks/Ra_Scaling/Ra_Scaling.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/ScalingChecks/Ra_Scaling/Ra_Scaling.c Thu Jan 14 17:41:33 2010 +1100
@@ -56,11 +56,11 @@ const Type Underworld_Ra_Scaling_Type =
void _Ra_CheckScalings_Func( void* context, void* ptrToContext ) {
UnderworldContext* self = (UnderworldContext*) context;
- ForceTerm* bfTerm = (ForceTerm*)LiveComponentRegister_Get( self->CF->LCRegister, "buoyancyForceTerm" );
+ ForceTerm* bfTerm = (ForceTerm*)LiveComponentRegister_Get( self->CF->LCRegister, (Name)"buoyancyForceTerm" );
/* check the Rayleigh Number Scaling:
* first check the RHS for the stokes SLE has a force term which uses Ra*/
- if( bfTerm != NULL && (bfTerm->type == ThermalBuoyancyForceTerm_Type ) ) {
+ if( bfTerm != NULL && (bfTerm->type == ThermalBuoyancyForceTerm_Type ) ) {
RheologyMaterial* material;
Rheology* rheology;
Materials_Register* materials_Register = self->materials_Register;
@@ -87,10 +87,10 @@ void _Ra_CheckScalings_Func( void* conte
if( rheology->type == MaterialViscosity_Type && isValid ) {
eta0 = ((MaterialViscosity*)rheology)->eta0;
- diffusivity = Stg_ComponentFactory_GetDouble( self->CF, "defaultResidualForceTerm", "defaultDiffusivity", 1.0 );
- gravity = Stg_ComponentFactory_GetRootDictDouble( self->CF, "gravity", 1.0 );
+ diffusivity = Stg_ComponentFactory_GetDouble( self->CF, "defaultResidualForceTerm", (Dictionary_Entry_Key)"defaultDiffusivity", 1.0 );
+ gravity = Stg_ComponentFactory_GetRootDictDouble( self->CF, (Dictionary_Entry_Key)"gravity", 1.0 );
- Ra_0 = (gravity * thermalExp)/(diffusivity * eta0 );
+ Ra_0 = (gravity * thermalExp)/(diffusivity * eta0 );
/* check if the Ra matches the viscosity, gravity, thermal expansivity and diffusivity of the problem */
if( abs(Ra - Ra_0) > 1e-3 ) {
Stg_asprintf( &errorMesg, "* Error - Your combination of diffusivity, gravity and eta0 (rheology) don't agree with your Ra:"
@@ -103,11 +103,11 @@ void _Ra_CheckScalings_Func( void* conte
}
void _Underworld_Ra_Scaling_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
- UnderworldContext* context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ UnderworldContext* context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
- Bool checkScaling = Stg_ComponentFactory_GetRootDictBool( cf, "Ra_ScalingCheck", True );
+ Bool checkScaling = Stg_ComponentFactory_GetRootDictBool( cf, (Dictionary_Entry_Key)"Ra_ScalingCheck", True );
- if ( checkScaling ) {
+ if ( checkScaling ) {
EntryPoint_Append( Context_GetEntryPoint( context, AbstractContext_EP_Build ),
"Underworld CheckScalings",
_Ra_CheckScalings_Func,
@@ -131,7 +131,7 @@ void* _Underworld_Ra_Scaling_DefaultNew(
/* This function is automatically run by StGermain when this plugin is loaded. The name must be "<plugin-name>_Register". */
Index Underworld_Ra_Scaling_Register( PluginsManager* pluginsManager ) {
/* A plugin is only properly registered once it returns the handle provided when submitting a codelet to StGermain. */
- return PluginsManager_Submit( pluginsManager, Underworld_Ra_Scaling_Type, "0", _Underworld_Ra_Scaling_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_Ra_Scaling_Type, (Name)"0", _Underworld_Ra_Scaling_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d plugins/VariableConditions/ShapeFemIC/ShapeFemIC.c
--- a/plugins/VariableConditions/ShapeFemIC/ShapeFemIC.c Tue Jan 12 14:33:16 2010 +1100
+++ b/plugins/VariableConditions/ShapeFemIC/ShapeFemIC.c Thu Jan 14 17:41:33 2010 +1100
@@ -70,9 +70,9 @@ void Underworld_LinearShapeIC( Node_Loca
UnderworldContext* context = (UnderworldContext*)_context;
Dictionary* theDictionary = context->dictionary;
- FeVariable* tempField = (FeVariable*)LiveComponentRegister_Get( context->CF->LCRegister, "TemperatureField" );
+ FeVariable* tempField = (FeVariable*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)"TemperatureField" );
FeMesh* theMesh = NULL;
- double* result = (double*) _result;
+ double* result = (double* ) _result;
Stg_Shape* shape;
Name shapeName;
double* coord;
@@ -102,19 +102,19 @@ void Underworld_LinearShapeIC( Node_Loca
theMesh = tempField->feMesh;
- shapeSpecs = Dictionary_Get( theDictionary, "linearShapeIC" );
+ shapeSpecs = Dictionary_Get( theDictionary, (Dictionary_Entry_Key)"linearShapeIC" );
numSpecs = Dictionary_Entry_Value_GetCount( shapeSpecs );
- for( shapeSpec_I = 0; shapeSpec_I < numSpecs; shapeSpec_I++ ) {
+ for( shapeSpec_I = 0; shapeSpec_I < numSpecs; shapeSpec_I++ ) {
shapeSpec = Dictionary_Entry_Value_GetElement( shapeSpecs, shapeSpec_I );
shapeSpecDict = Dictionary_Entry_Value_AsDictionary( shapeSpec );
- shapeName = Dictionary_Entry_Value_AsString( Dictionary_Get( shapeSpecDict, "Shape" ) );
+ shapeName = Dictionary_Entry_Value_AsString( Dictionary_Get( shapeSpecDict, (Dictionary_Entry_Key)"Shape" ) );
/* Get the shape */
- shape = (Stg_Shape*) LiveComponentRegister_Get( context->CF->LCRegister, shapeName );
+ shape = (Stg_Shape* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)shapeName );
- Journal_Firewall( (Bool) shape,
- Journal_Register( Error_Type, Underworld_ShapeFemIC_Type ),
+ Journal_Firewall( (Bool ) shape,
+ Journal_Register( Error_Type, (Name)Underworld_ShapeFemIC_Type ),
"Shape %s not found.\n", shapeName );
/* Find coordinate of node */
@@ -122,43 +122,43 @@ void Underworld_LinearShapeIC( Node_Loca
if( Stg_Shape_IsCoordInside( shape, coord ) ) {
- setup = Dictionary_GetInt_WithDefault( shapeSpecDict, "setup", STD );
+ setup = Dictionary_GetInt_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"setup", STD );
- switch( setup ) {
+ switch( setup ) {
case STD:
/* rotation angle */
- az = Dictionary_GetDouble_WithDefault( shapeSpecDict, "rotation", 0.0 );
+ az = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"rotation", 0.0 );
/* gradient in each direction */
- gx = Dictionary_GetDouble_WithDefault( shapeSpecDict, "gradientx", 0.0 );
- gy = Dictionary_GetDouble_WithDefault( shapeSpecDict, "gradienty", 0.0 );
+ gx = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"gradientx", 0.0 );
+ gy = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"gradienty", 0.0 );
/* value of the field at origin */
- T0 = Dictionary_GetDouble_WithDefault( shapeSpecDict, "valueAtOrigin", 0.0 );
+ T0 = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"valueAtOrigin", 0.0 );
x = coord[I_AXIS];
y = coord[J_AXIS];
az = az/180.0*M_PI;
- switch( theMesh->topo->nDims ) {
+ switch( theMesh->topo->nDims ) {
case 2:
/* origin */
- ox = Dictionary_GetDouble_WithDefault( shapeSpecDict, "originx", 0.0 );
- oy = Dictionary_GetDouble_WithDefault( shapeSpecDict, "originy", 0.0 );
+ ox = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"originx", 0.0 );
+ oy = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"originy", 0.0 );
/* rotations and translations */
xp = (x-ox)*cos(az) - (y-oy)*sin(az);
- yp = (x-ox)*sin(az) + (y-oy)*cos(az);
+ yp = (x-ox)*sin(az) + (y-oy)*cos(az );
/* compute value at the point */
*result = T0 + xp*gx + yp*gy;
break;
case 3:
- gz = Dictionary_GetDouble_WithDefault( shapeSpecDict, "gradientz", 0.0 );
- /* two points defining the rotational axis (3D case) First point is the origin */
- p1x = Dictionary_GetDouble_WithDefault( shapeSpecDict, "p1x", 0.0 );
- p1y = Dictionary_GetDouble_WithDefault( shapeSpecDict, "p1y", 0.0 );
- p1z = Dictionary_GetDouble_WithDefault( shapeSpecDict, "p1z", 0.0 );
- p2x = Dictionary_GetDouble_WithDefault( shapeSpecDict, "p2x", 0.0 );
- p2y = Dictionary_GetDouble_WithDefault( shapeSpecDict, "p2y", 0.0 );
- p2z = Dictionary_GetDouble_WithDefault( shapeSpecDict, "p2z", 1.0 );
+ gz = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"gradientz", 0.0 );
+ /* two points defining the rotational axis (3D case ) First point is the origin */
+ p1x = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"p1x", 0.0 );
+ p1y = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"p1y", 0.0 );
+ p1z = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"p1z", 0.0 );
+ p2x = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"p2x", 0.0 );
+ p2y = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"p2y", 0.0 );
+ p2z = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"p2z", 1.0 );
z = coord[K_AXIS];
@@ -176,7 +176,7 @@ void Underworld_LinearShapeIC( Node_Loca
d = sqrt( uy*uy + uz*uz );
xp = cos(az)*( -uy*(y-p1y) - uz*(z-p1z) ) - sin(az)*( uz/d*(y-p1y) - uy/ux*(z-p1z) );
yp = sin(az)*( -uy*(y-p1y) - uz*(z-p1z) ) + cos(az)*( uz/d*(y-p1y) - uy/ux*(z-p1z) );
- zp = d*uy/ux*(y-p1y) + d*uz/ux*(z-p1z);
+ zp = d*uy/ux*(y-p1y) + d*uz/ux*(z-p1z );
/* compute value at the point */
*result = T0 + xp*gx + yp*gy + zp*gz;
@@ -186,17 +186,17 @@ void Underworld_LinearShapeIC( Node_Loca
case PM:
/* Advanced config */
- ox1 = Dictionary_GetDouble_WithDefault( shapeSpecDict, "originx1", 0.0 );
- oy1 = Dictionary_GetDouble_WithDefault( shapeSpecDict, "originy1", 0.0 );
- gy1 = Dictionary_GetDouble_WithDefault( shapeSpecDict, "gradienty1", 0.0 );
- T1 = Dictionary_GetDouble_WithDefault( shapeSpecDict, "valueAtOrigin1", 0.0 );
- H1 = Dictionary_GetDouble_WithDefault( shapeSpecDict, "height1", 0.0 );
+ ox1 = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"originx1", 0.0 );
+ oy1 = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"originy1", 0.0 );
+ gy1 = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"gradienty1", 0.0 );
+ T1 = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"valueAtOrigin1", 0.0 );
+ H1 = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"height1", 0.0 );
- ox2 = Dictionary_GetDouble_WithDefault( shapeSpecDict, "originx2", 0.0 );
- oy2 = Dictionary_GetDouble_WithDefault( shapeSpecDict, "originy2", 0.0 );
- gy2 = Dictionary_GetDouble_WithDefault( shapeSpecDict, "gradienty2", 0.0 );
- T2 = Dictionary_GetDouble_WithDefault( shapeSpecDict, "valueAtOrigin2", 0.0 );
- H2 = Dictionary_GetDouble_WithDefault( shapeSpecDict, "height2", 0.0 );
+ ox2 = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"originx2", 0.0 );
+ oy2 = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"originy2", 0.0 );
+ gy2 = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"gradienty2", 0.0 );
+ T2 = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"valueAtOrigin2", 0.0 );
+ H2 = Dictionary_GetDouble_WithDefault( shapeSpecDict, (Dictionary_Entry_Key)"height2", 0.0 );
x = coord[I_AXIS];
y = coord[J_AXIS];
@@ -224,7 +224,7 @@ void Underworld_LinearShapeIC( Node_Loca
beta = (y - omuy) / (omly - omuy);
- *result = (1-beta)*Tmu + beta*Tml;
+ *result = (1-beta )*Tmu + beta*Tml;
break;
}
}
@@ -245,9 +245,9 @@ void Underworld_SimpleShapeIC( Node_Loca
meshVar = (MeshVariable*)Variable_Register_GetByIndex( context->variable_Register, var_I );
mesh = (FeMesh*)meshVar->mesh; assert( mesh != NULL );
- shapeName = Dictionary_GetString( dictionary, "ShapeFemIC" );
- shape = (Stg_Shape*) LiveComponentRegister_Get( context->CF->LCRegister, shapeName );
- assert( shape );
+ shapeName = Dictionary_GetString( dictionary, (Dictionary_Entry_Key)"ShapeFemIC" );
+ shape = (Stg_Shape* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)shapeName );
+ assert( shape );
/* Find coordinate of node */
coord = Mesh_GetVertex( mesh, node_lI );
@@ -261,9 +261,9 @@ void Underworld_GaussianIC( Node_LocalIn
void Underworld_GaussianIC( Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result ) {
UnderworldContext* context = (UnderworldContext*)_context;
Dictionary* dictionary = context->dictionary;
- FeVariable* tempField = (FeVariable*)LiveComponentRegister_Get( context->CF->LCRegister, "TemperatureField" );
+ FeVariable* tempField = (FeVariable*)LiveComponentRegister_Get( context->CF->LCRegister, (Name)"TemperatureField" );
FeMesh* mesh = NULL;
- double* result = (double*) _result;
+ double* result = (double* ) _result;
Stg_Shape* shape;
Name shapeName;
double* coord;
@@ -273,14 +273,14 @@ void Underworld_GaussianIC( Node_LocalIn
mesh = tempField->feMesh;
- amplitude = Dictionary_GetDouble_WithDefault( dictionary, "GaussianIC-Amplitude", 1.0 );
- width = Dictionary_GetDouble_WithDefault( dictionary, "GaussianIC-Width", 1e-2 );
+ amplitude = Dictionary_GetDouble_WithDefault( dictionary, (Dictionary_Entry_Key)"GaussianIC-Amplitude", 1.0 );
+ width = Dictionary_GetDouble_WithDefault( dictionary, (Dictionary_Entry_Key)"GaussianIC-Width", 1e-2 );
- shapeName = Dictionary_GetString( dictionary, "ShapeFemIC" );
- shape = (Stg_Shape*) LiveComponentRegister_Get( context->CF->LCRegister, shapeName );
- assert( shape );
+ shapeName = Dictionary_GetString( dictionary, (Dictionary_Entry_Key)"ShapeFemIC" );
+ shape = (Stg_Shape* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)shapeName );
+ assert( shape );
Journal_Firewall( !strcmp(shape->type, "Sphere") || !strcmp(shape->type, "Cylinder"),
- Journal_Register( Error_Type, Underworld_ShapeFemIC_Type ),
+ Journal_Register( Error_Type, (Name)Underworld_ShapeFemIC_Type ),
"Error in %s: You're applying the GaussianIC to a shape of type %s, which can't be done."
" It can only work on Sphere\' or \'Cylinder\' shapes\n", __func__, shape->type );
/* Find coordinate of node */
@@ -307,13 +307,13 @@ void _Underworld_ShapeFemIC_AssignFromXM
ConditionFunction* condFunc;
UnderworldContext* context;
- context = (UnderworldContext*)Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+ context = (UnderworldContext*)Stg_ComponentFactory_ConstructByName( cf, (Name)"context", UnderworldContext, True, data );
- condFunc = ConditionFunction_New( Underworld_SimpleShapeIC, "Inside1_Outside0_ShapeIC" );
+ condFunc = ConditionFunction_New( Underworld_SimpleShapeIC, (Name)"Inside1_Outside0_ShapeIC" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
- condFunc = ConditionFunction_New( Underworld_GaussianIC, "GaussianIC" );
+ condFunc = ConditionFunction_New( Underworld_GaussianIC, (Name)"GaussianIC" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
- condFunc = ConditionFunction_New( Underworld_LinearShapeIC, "linearShapeIC" );
+ condFunc = ConditionFunction_New( Underworld_LinearShapeIC, (Name)"linearShapeIC" );
ConditionFunction_Register_Add( condFunc_Register, condFunc );
}
@@ -332,7 +332,7 @@ Index Underworld_ShapeFemIC_Register( Pl
Index Underworld_ShapeFemIC_Register( PluginsManager* pluginsManager ) {
Journal_DPrintf( Underworld_Debug, "In: %s( void* )\n", __func__ );
- return PluginsManager_Submit( pluginsManager, Underworld_ShapeFemIC_Type, "0", _Underworld_ShapeFemIC_DefaultNew );
+ return PluginsManager_Submit( pluginsManager, Underworld_ShapeFemIC_Type, (Name)"0", _Underworld_ShapeFemIC_DefaultNew );
}
diff -r 55c0e5081456 -r d7d947597d6d src/main.c
--- a/src/main.c Tue Jan 12 14:33:16 2010 +1100
+++ b/src/main.c Thu Jan 14 17:41:33 2010 +1100
@@ -71,7 +71,7 @@ int main( int argc, char* argv[] ) {
MPI_Comm_size( CommWorld, &numProcessors );
MPI_Comm_rank( CommWorld, &rank );
StGermain_Init( &argc, &argv );
- stream = Journal_Register( Info_Type, Underworld_Type );
+ stream = Journal_Register( Info_Type, (Name)Underworld_Type );
#ifdef HAVE_PYTHON
Py_Initialize();
#endif
@@ -79,7 +79,7 @@ int main( int argc, char* argv[] ) {
/* Create the application's dictionary & read input */
dictionary = Dictionary_New();
- ioHandler = XML_IO_Handler_New();
+ ioHandler = XML_IO_Handler_New( );
IO_Handler_ReadAllFromCommandLine( ioHandler, argc, argv, dictionary );
Journal_ReadFromDictionary( dictionary );
More information about the CIG-COMMITS
mailing list