[cig-commits] commit: Results of the Script O' Doom!!
Mercurial
hg at geodynamics.org
Mon Feb 1 15:31:01 PST 2010
changeset: 336:d71e205639b6
branch: pcu_rejig
user: MirkoVelic <------>
date: Mon Nov 30 02:03:06 2009 +1100
files: Apps/RayleighTaylor/tests/AnalyticBlock/AnalyticBlock.c Apps/RayleighTaylor/tests/AnalyticColumn/AnalyticColumn.c MaterialPoints/src/BackgroundParticleLayout.c MaterialPoints/src/BackgroundParticleLayout.h MaterialPoints/src/CoincidentMapper.c MaterialPoints/src/CoincidentMapper.h MaterialPoints/src/Finalise.c MaterialPoints/src/GaussCoincidentMapper.c MaterialPoints/src/GaussCoincidentMapper.h MaterialPoints/src/GaussMapper.c MaterialPoints/src/GaussMapper.h MaterialPoints/src/Init.c MaterialPoints/src/IntegrationPointMapper.c MaterialPoints/src/IntegrationPointMapper.h MaterialPoints/src/IntegrationPointsSwarm.c MaterialPoints/src/IntegrationPointsSwarm.h MaterialPoints/src/ManyToOneMapper.c MaterialPoints/src/ManyToOneMapper.h MaterialPoints/src/MappedParticleLayout.c MaterialPoints/src/MappedParticleLayout.h MaterialPoints/src/Material.c MaterialPoints/src/Material.h MaterialPoints/src/MaterialFeVariable.c MaterialPoints/src/MaterialFeVariable.h MaterialPoints/src/MaterialPoint.c MaterialPoints/src/MaterialPointsSwarm.c MaterialPoints/src/MaterialPointsSwarm.h MaterialPoints/src/Materials_Register.c MaterialPoints/src/OneToOneMapper.c MaterialPoints/src/OneToOneMapper.h MaterialPoints/src/PICelleratorContext.c MaterialPoints/src/PICelleratorContext.h MaterialPoints/src/ParticleFeVariable.c MaterialPoints/src/ParticleFeVariable.h MaterialPoints/src/PeriodicBoundariesManager.c MaterialPoints/src/PeriodicBoundariesManager.h MaterialPoints/src/SwarmAdvectionInAPlane.c MaterialPoints/src/SwarmAdvectionInAPlane.h MaterialPoints/src/SwarmAdvector.c MaterialPoints/src/SwarmAdvector.h MaterialPoints/src/SwarmVariableField.c MaterialPoints/src/SwarmVariableField.h MaterialPoints/tests/AdvectionSuite.c MaterialPoints/tests/MaterialComponentsSuite.c MaterialPoints/tests/MaterialFeVariableSuite.c MaterialPoints/tests/PeriodicBoundariesManagerSuite.c PopulationControl/src/EscapedRoutine.c PopulationControl/src/EscapedRoutine.h PopulationControl/src/Finalise.c PopulationControl/src/Init.c PopulationControl/tests/EscapedRoutineSuite.c SysTest/AnalyticPlugins/AnalyticPressure/AnalyticPressure.c Utils/src/BuoyancyForceTerm.c Utils/src/BuoyancyForceTerm.h Utils/src/BuoyancyForceTermThermoChem.c Utils/src/BuoyancyForceTermThermoChem.h Utils/src/DiffusionSMT.c Utils/src/DiffusionSMT.h Utils/src/Finalise.c Utils/src/Init.c Utils/src/MaterialSwarmVariable.c Utils/src/MaterialSwarmVariable.h Utils/src/PCDVC.c Utils/src/PCDVC.h Utils/tests/PCDVCSuite.c Weights/src/ConstantWeights.c Weights/src/ConstantWeights.h Weights/src/DVCWeights.c Weights/src/DVCWeights.h Weights/src/Finalise.c Weights/src/Init.c Weights/src/IterativeWeights.c Weights/src/IterativeWeights.h Weights/src/MomentBalanceWeights.c Weights/src/MomentBalanceWeights.h Weights/src/VolumeWeights.c Weights/src/VolumeWeights.h Weights/src/WeightsCalculator.c Weights/src/WeightsCalculator.h Weights/tests/ConstantWeightsSuite.c Weights/tests/DVCWeightsSuite.c Weights/tests/IterativeWeightsSuite.c Weights/tests/MomentBalanceWeightsSuite.c libPICellerator/Toolbox/Toolbox.c libPICellerator/src/Finalise.c libPICellerator/src/Init.c libPICellerator/tests/LibPICelleratorSuite.c plugins/CalculateParticleDisplacement/CalculateParticleDisplacement.c plugins/Output/MaterialCentroid/MaterialCentroid.c
description:
Results of the Script O' Doom!!
The entire Private _New functions inheritance system has been reworked to use macros so
that all arguments to these functions are now consistent and clear.
All private _New functions that have a parent now use consistent macro-defined arguments.
All existing macros have been re-written to be consistent with new macros.
All Public _New functions have had their arguments to private _New functions brought out of
the private functions and into the body of the Public functions so that the types
and variables that the private functions use is obvious; The private functions inside the public
functions now also have a macro-defined argument.
All the PCU tests passed.
StgFEM Regression Tests:
Before: 2 failed
After : 1 failed (same 1 of 2)
PICellerator Regression Tests:
Before: 0 failed
After : 0 failed
Underworld Regression Tests:
Before: 0 failed ( 1 command failed to execute )
After : 0 failed ( 1 command failed to execute; same command)
Experimental Regression Tests:
Before: 1 failed
After : 1 failed (same test)
Mirko
diff -r fed10f57c2d4 -r d71e205639b6 Apps/RayleighTaylor/tests/AnalyticBlock/AnalyticBlock.c
--- a/Apps/RayleighTaylor/tests/AnalyticBlock/AnalyticBlock.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Apps/RayleighTaylor/tests/AnalyticBlock/AnalyticBlock.c Mon Nov 30 02:03:06 2009 +1100
@@ -1749,21 +1749,27 @@ void _AnalyticBlock_Build( void* analyti
}
void* _AnalyticBlock_DefaultNew( Name name ) {
- return _AnalyticSolution_New(
- sizeof(AnalyticBlock),
- AnalyticBlock_Type,
- _AnalyticSolution_Delete,
- _AnalyticSolution_Print,
- _AnalyticSolution_Copy,
- _AnalyticBlock_DefaultNew,
- _AnalyticBlock_AssignFromXML,
- _AnalyticBlock_Build,
- _AnalyticSolution_Initialise,
- _AnalyticSolution_Execute,
- _AnalyticSolution_Destroy,
- name );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(AnalyticBlock);
+ Type type = AnalyticBlock_Type;
+ Stg_Class_DeleteFunction* _delete = _AnalyticSolution_Delete;
+ Stg_Class_PrintFunction* _print = _AnalyticSolution_Print;
+ Stg_Class_CopyFunction* _copy = _AnalyticSolution_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _AnalyticBlock_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _AnalyticBlock_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _AnalyticBlock_Build;
+ Stg_Component_InitialiseFunction* _initialise = _AnalyticSolution_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _AnalyticSolution_Execute;
+ Stg_Component_DestroyFunction* _destroy = _AnalyticSolution_Destroy;
+
+ /* 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 = ZERO;
+
+ return _AnalyticSolution_New( ANALYTICSOLUTION_PASSARGS );
}
Index _PICellerator_AnalyticBlock_Register( PluginsManager* pluginsManager ) {
return PluginsManager_Submit( pluginsManager, AnalyticBlock_Type, "0", _AnalyticBlock_DefaultNew );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Apps/RayleighTaylor/tests/AnalyticColumn/AnalyticColumn.c
--- a/Apps/RayleighTaylor/tests/AnalyticColumn/AnalyticColumn.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Apps/RayleighTaylor/tests/AnalyticColumn/AnalyticColumn.c Mon Nov 30 02:03:06 2009 +1100
@@ -327,21 +327,27 @@ void _AnalyticColumn_Build( void* analyt
}
void* _AnalyticColumn_DefaultNew( Name name ) {
- return _AnalyticSolution_New(
- sizeof(AnalyticColumn),
- AnalyticColumn_Type,
- _AnalyticSolution_Delete,
- _AnalyticSolution_Print,
- _AnalyticSolution_Copy,
- _AnalyticColumn_DefaultNew,
- _AnalyticColumn_AssignFromXML,
- _AnalyticColumn_Build,
- _AnalyticSolution_Initialise,
- _AnalyticSolution_Execute,
- _AnalyticSolution_Destroy,
- name );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(AnalyticColumn);
+ Type type = AnalyticColumn_Type;
+ Stg_Class_DeleteFunction* _delete = _AnalyticSolution_Delete;
+ Stg_Class_PrintFunction* _print = _AnalyticSolution_Print;
+ Stg_Class_CopyFunction* _copy = _AnalyticSolution_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _AnalyticColumn_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _AnalyticColumn_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _AnalyticColumn_Build;
+ Stg_Component_InitialiseFunction* _initialise = _AnalyticSolution_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _AnalyticSolution_Execute;
+ Stg_Component_DestroyFunction* _destroy = _AnalyticSolution_Destroy;
+
+ /* 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 = ZERO;
+
+ return _AnalyticSolution_New( ANALYTICSOLUTION_PASSARGS );
}
Index _PICellerator_AnalyticColumn_Register( PluginsManager* pluginsManager ) {
return PluginsManager_Submit( pluginsManager, AnalyticColumn_Type, "0", _AnalyticColumn_DefaultNew );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/BackgroundParticleLayout.c
--- a/MaterialPoints/src/BackgroundParticleLayout.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/BackgroundParticleLayout.c Mon Nov 30 02:03:06 2009 +1100
@@ -58,47 +58,13 @@ BackgroundParticleLayout* BackgroundPart
_BackgroundParticleLayout_Init( self );
self->isConstructed = True;
}
-BackgroundParticleLayout* _BackgroundParticleLayout_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- Name name,
- AllocationType nameAllocationType,
- ParticleLayout_SetInitialCountsFunction* _setInitialCounts,
- ParticleLayout_InitialiseParticlesFunction* _initialiseParticles,
- CoordSystem coordSystem,
- Bool weightsInitialisedAtStartup )
+BackgroundParticleLayout* _BackgroundParticleLayout_New( BACKGROUNDPARTICLELAYOUT_DEFARGS )
{
BackgroundParticleLayout* self;
/* Allocate memory */
assert( _sizeOfSelf >= sizeof(BackgroundParticleLayout) );
- self = (BackgroundParticleLayout*)_ParticleLayout_New(
- _sizeOfSelf,
- type,
- _delete,
- _print,
- _copy,
- _defaultConstructor,
- _construct,
- _build,
- _initialise,
- _execute,
- _destroy,
- name,
- nameAllocationType,
- _setInitialCounts,
- _initialiseParticles,
- coordSystem,
- weightsInitialisedAtStartup );
+ self = (BackgroundParticleLayout*)_ParticleLayout_New( PARTICLELAYOUT_PASSARGS );
return self;
}
@@ -137,22 +103,25 @@ void* _BackgroundParticleLayout_Copy( vo
}
void* _BackgroundParticleLayout_DefaultNew( Name name ) {
- return _BackgroundParticleLayout_New(
- sizeof(BackgroundParticleLayout),
- BackgroundParticleLayout_Type,
- _BackgroundParticleLayout_Delete,
- _BackgroundParticleLayout_Print,
- _BackgroundParticleLayout_Copy,
- _BackgroundParticleLayout_DefaultNew,
- _BackgroundParticleLayout_AssignFromXML,
- _BackgroundParticleLayout_Build,
- _BackgroundParticleLayout_Initialise,
- _BackgroundParticleLayout_Execute,
- _BackgroundParticleLayout_Destroy,
- name, NON_GLOBAL,
- _BackgroundParticleLayout_SetInitialCounts,
- _BackgroundParticleLayout_InitialiseParticles,
- GlobalCoordSystem, False );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(BackgroundParticleLayout);
+ Type type = BackgroundParticleLayout_Type;
+ Stg_Class_DeleteFunction* _delete = _BackgroundParticleLayout_Delete;
+ Stg_Class_PrintFunction* _print = _BackgroundParticleLayout_Print;
+ Stg_Class_CopyFunction* _copy = _BackgroundParticleLayout_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _BackgroundParticleLayout_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _BackgroundParticleLayout_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _BackgroundParticleLayout_Build;
+ Stg_Component_InitialiseFunction* _initialise = _BackgroundParticleLayout_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _BackgroundParticleLayout_Execute;
+ Stg_Component_DestroyFunction* _destroy = _BackgroundParticleLayout_Destroy;
+ AllocationType nameAllocationType = NON_GLOBAL;
+ ParticleLayout_SetInitialCountsFunction* _setInitialCounts = _BackgroundParticleLayout_SetInitialCounts;
+ ParticleLayout_InitialiseParticlesFunction* _initialiseParticles = _BackgroundParticleLayout_InitialiseParticles;
+ CoordSystem coordSystem = GlobalCoordSystem;
+ Bool weightsInitialisedAtStartup = False;
+
+ return _BackgroundParticleLayout_New( BACKGROUNDPARTICLELAYOUT_PASSARGS );
}
void _BackgroundParticleLayout_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
BackgroundParticleLayout* self = (BackgroundParticleLayout*)component;
@@ -212,3 +181,5 @@ void _BackgroundParticleLayout_Initialis
Swarm_AddParticleToCell( swarm, 0, 0 );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/BackgroundParticleLayout.h
--- a/MaterialPoints/src/BackgroundParticleLayout.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/BackgroundParticleLayout.h Mon Nov 30 02:03:06 2009 +1100
@@ -17,24 +17,18 @@ BackgroundParticleLayout* BackgroundPart
CoordSystem coordSystem,
Bool weightsInitialisedAtStartup );
-BackgroundParticleLayout* _BackgroundParticleLayout_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- Name name,
- AllocationType nameAllocationType,
- ParticleLayout_SetInitialCountsFunction* _setInitialCounts,
- ParticleLayout_InitialiseParticlesFunction* _initialiseParticles,
- CoordSystem coordSystem,
- Bool weightsInitialisedAtStartup );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define BACKGROUNDPARTICLELAYOUT_DEFARGS \
+ PARTICLELAYOUT_DEFARGS
+
+ #define BACKGROUNDPARTICLELAYOUT_PASSARGS \
+ PARTICLELAYOUT_PASSARGS
+
+BackgroundParticleLayout* _BackgroundParticleLayout_New( BACKGROUNDPARTICLELAYOUT_DEFARGS );
/* Initialise implementation */
void _BackgroundParticleLayout_Init(
@@ -60,3 +54,4 @@ void _BackgroundParticleLayout_Initialis
#endif /* __PICellerator_MaterialPoints_BackgroundParticleLayout_h__ */
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/CoincidentMapper.c
--- a/MaterialPoints/src/CoincidentMapper.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/CoincidentMapper.c Mon Nov 30 02:03:06 2009 +1100
@@ -82,32 +82,31 @@ CoincidentMapper* CoincidentMapper_New(
}
void* _CoincidentMapper_DefaultNew( Name name ) {
- return _CoincidentMapper_New(
- sizeof(CoincidentMapper),
- CoincidentMapper_Type,
- _CoincidentMapper_Delete,
- _CoincidentMapper_Print,
- _CoincidentMapper_Copy,
- _CoincidentMapper_DefaultNew,
- _CoincidentMapper_AssignFromXML,
- _CoincidentMapper_Build,
- _CoincidentMapper_Initialise,
- _CoincidentMapper_Execute,
- _CoincidentMapper_Destroy,
- name,
- NON_GLOBAL,
- _CoincidentMapper_Map,
- _OneToOneMapper_GetMaterialPointsSwarms,
- _OneToOneMapper_GetMaterialIndexOn,
- _OneToOneMapper_GetExtensionOn,
- NULL,
- NULL );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(CoincidentMapper);
+ Type type = CoincidentMapper_Type;
+ Stg_Class_DeleteFunction* _delete = _CoincidentMapper_Delete;
+ Stg_Class_PrintFunction* _print = _CoincidentMapper_Print;
+ Stg_Class_CopyFunction* _copy = _CoincidentMapper_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _CoincidentMapper_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _CoincidentMapper_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _CoincidentMapper_Build;
+ Stg_Component_InitialiseFunction* _initialise = _CoincidentMapper_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _CoincidentMapper_Execute;
+ Stg_Component_DestroyFunction* _destroy = _CoincidentMapper_Destroy;
+ AllocationType nameAllocationType = NON_GLOBAL;
+ IntegrationPointMapper_MapFunction* _map = _CoincidentMapper_Map;
+ IntegrationPointMapper_GetMaterialPointsSwarmsFunction* _getMaterialPointsSwarms = _OneToOneMapper_GetMaterialPointsSwarms;
+ IntegrationPointMapper_GetMaterialIndexOnFunction* _getMaterialIndexOn = _OneToOneMapper_GetMaterialIndexOn;
+ IntegrationPointMapper_GetExtensionOnFunction* _getExtensionOn = _OneToOneMapper_GetExtensionOn;
+
+ return _CoincidentMapper_New( COINCIDENTMAPPER_PASSARGS );
}
-CoincidentMapper* _CoincidentMapper_New( COINCIDENTMAPPER_DEFARGS ) {
+CoincidentMapper* _CoincidentMapper_New( COINCIDENTMAPPER_DEFARGS ) {
CoincidentMapper* result;
- result = (CoincidentMapper*)_OneToOneMapper_New( ONETOONEMAPPER_PASSARGS );
+ result = (CoincidentMapper*)_OneToOneMapper_New( ONETOONEMAPPER_PASSARGS );
return result;
}
@@ -257,3 +256,5 @@ void _CoincidentMapper_Map( void* mapper
Stream_UnIndentBranch( debugStream );
Journal_DPrintfL( debugStream, 1, "...%s(): Done.\n", __func__ );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/CoincidentMapper.h
--- a/MaterialPoints/src/CoincidentMapper.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/CoincidentMapper.h Mon Nov 30 02:03:06 2009 +1100
@@ -63,11 +63,7 @@
struct CoincidentMapper { __CoincidentMapper };
- #define COINCIDENTMAPPER_DEFARGS \
- ONETOONEMAPPER_DEFARGS
- #define COINCIDENTMAPPER_PASSARGS \
- ONETOONEMAPPER_PASSARGS
CoincidentMapper* CoincidentMapper_New(
Name name,
@@ -75,7 +71,18 @@
IntegrationPointsSwarm* integrationSwarm,
MaterialPointsSwarm* materialSwarm);
- CoincidentMapper* _CoincidentMapper_New( COINCIDENTMAPPER_DEFARGS );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define COINCIDENTMAPPER_DEFARGS \
+ ONETOONEMAPPER_DEFARGS
+
+ #define COINCIDENTMAPPER_PASSARGS \
+ ONETOONEMAPPER_PASSARGS
+
+ CoincidentMapper* _CoincidentMapper_New( COINCIDENTMAPPER_DEFARGS );
void _CoincidentMapper_Init( void* mapper );
@@ -105,3 +112,4 @@
void _CoincidentMapper_Map( void* mapper );
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/Finalise.c
--- a/MaterialPoints/src/Finalise.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/Finalise.c Mon Nov 30 02:03:06 2009 +1100
@@ -57,3 +57,5 @@ Bool PICellerator_MaterialPoints_Finalis
return True;
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/GaussCoincidentMapper.c
--- a/MaterialPoints/src/GaussCoincidentMapper.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/GaussCoincidentMapper.c Mon Nov 30 02:03:06 2009 +1100
@@ -82,32 +82,31 @@ GaussCoincidentMapper* GaussCoincidentMa
}
void* _GaussCoincidentMapper_DefaultNew( Name name ) {
- return _GaussCoincidentMapper_New(
- sizeof(GaussCoincidentMapper),
- GaussCoincidentMapper_Type,
- _GaussCoincidentMapper_Delete,
- _GaussCoincidentMapper_Print,
- _GaussCoincidentMapper_Copy,
- _GaussCoincidentMapper_DefaultNew,
- _GaussCoincidentMapper_AssignFromXML,
- _GaussCoincidentMapper_Build,
- _GaussCoincidentMapper_Initialise,
- _GaussCoincidentMapper_Execute,
- _GaussCoincidentMapper_Destroy,
- name,
- NON_GLOBAL,
- _GaussCoincidentMapper_Map,
- _OneToOneMapper_GetMaterialPointsSwarms,
- _OneToOneMapper_GetMaterialIndexOn,
- _OneToOneMapper_GetExtensionOn,
- NULL,
- NULL );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(GaussCoincidentMapper);
+ Type type = GaussCoincidentMapper_Type;
+ Stg_Class_DeleteFunction* _delete = _GaussCoincidentMapper_Delete;
+ Stg_Class_PrintFunction* _print = _GaussCoincidentMapper_Print;
+ Stg_Class_CopyFunction* _copy = _GaussCoincidentMapper_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _GaussCoincidentMapper_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _GaussCoincidentMapper_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _GaussCoincidentMapper_Build;
+ Stg_Component_InitialiseFunction* _initialise = _GaussCoincidentMapper_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _GaussCoincidentMapper_Execute;
+ Stg_Component_DestroyFunction* _destroy = _GaussCoincidentMapper_Destroy;
+ AllocationType nameAllocationType = NON_GLOBAL;
+ IntegrationPointMapper_MapFunction* _map = _GaussCoincidentMapper_Map;
+ IntegrationPointMapper_GetMaterialPointsSwarmsFunction* _getMaterialPointsSwarms = _OneToOneMapper_GetMaterialPointsSwarms;
+ IntegrationPointMapper_GetMaterialIndexOnFunction* _getMaterialIndexOn = _OneToOneMapper_GetMaterialIndexOn;
+ IntegrationPointMapper_GetExtensionOnFunction* _getExtensionOn = _OneToOneMapper_GetExtensionOn;
+
+ return _GaussCoincidentMapper_New( GAUSSCOINCIDENTMAPPER_PASSARGS );
}
-GaussCoincidentMapper* _GaussCoincidentMapper_New( GAUSSCOINCIDENTMAPPER_DEFARGS ) {
+GaussCoincidentMapper* _GaussCoincidentMapper_New( GAUSSCOINCIDENTMAPPER_DEFARGS ) {
GaussCoincidentMapper* result;
- result = (GaussCoincidentMapper*)_OneToOneMapper_New( ONETOONEMAPPER_PASSARGS );
+ result = (GaussCoincidentMapper*)_OneToOneMapper_New( ONETOONEMAPPER_PASSARGS );
return result;
}
@@ -245,3 +244,5 @@ void _GaussCoincidentMapper_Map( void* m
#endif
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/GaussCoincidentMapper.h
--- a/MaterialPoints/src/GaussCoincidentMapper.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/GaussCoincidentMapper.h Mon Nov 30 02:03:06 2009 +1100
@@ -63,11 +63,7 @@
struct GaussCoincidentMapper { __GaussCoincidentMapper };
- #define GAUSSCOINCIDENTMAPPER_DEFARGS \
- ONETOONEMAPPER_DEFARGS
- #define GAUSSCOINCIDENTMAPPER_PASSARGS \
- ONETOONEMAPPER_PASSARGS
GaussCoincidentMapper* GaussCoincidentMapper_New(
Name name,
@@ -75,7 +71,18 @@
IntegrationPointsSwarm* integrationSwarm,
MaterialPointsSwarm* materialSwarm);
- GaussCoincidentMapper* _GaussCoincidentMapper_New( GAUSSCOINCIDENTMAPPER_DEFARGS );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define GAUSSCOINCIDENTMAPPER_DEFARGS \
+ ONETOONEMAPPER_DEFARGS
+
+ #define GAUSSCOINCIDENTMAPPER_PASSARGS \
+ ONETOONEMAPPER_PASSARGS
+
+ GaussCoincidentMapper* _GaussCoincidentMapper_New( GAUSSCOINCIDENTMAPPER_DEFARGS );
void _GaussCoincidentMapper_Init( void* mapper );
@@ -105,3 +112,4 @@
void _GaussCoincidentMapper_Map( void* mapper );
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/GaussMapper.c
--- a/MaterialPoints/src/GaussMapper.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/GaussMapper.c Mon Nov 30 02:03:06 2009 +1100
@@ -44,35 +44,34 @@
const Type GaussMapper_Type = "GaussMapper";
-GaussMapper* _GaussMapper_New( GAUSSMAPPER_DEFARGS ) {
+GaussMapper* _GaussMapper_New( GAUSSMAPPER_DEFARGS ) {
GaussMapper* result;
- result = (GaussMapper*)_OneToOneMapper_New( ONETOONEMAPPER_PASSARGS );
+ result = (GaussMapper*)_OneToOneMapper_New( ONETOONEMAPPER_PASSARGS );
return result;
}
void* _GaussMapper_DefaultNew( Name name ) {
- return _GaussMapper_New(
- sizeof(GaussMapper),
- GaussMapper_Type,
- _GaussMapper_Delete,
- _GaussMapper_Print,
- _GaussMapper_Copy,
- _GaussMapper_DefaultNew,
- _GaussMapper_AssignFromXML,
- _GaussMapper_Build,
- _GaussMapper_Initialise,
- _GaussMapper_Execute,
- _GaussMapper_Destroy,
- name,
- NON_GLOBAL,
- _GaussMapper_Map,
- _OneToOneMapper_GetMaterialPointsSwarms,
- _OneToOneMapper_GetMaterialIndexOn,
- _OneToOneMapper_GetExtensionOn,
- NULL,
- NULL );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(GaussMapper);
+ Type type = GaussMapper_Type;
+ Stg_Class_DeleteFunction* _delete = _GaussMapper_Delete;
+ Stg_Class_PrintFunction* _print = _GaussMapper_Print;
+ Stg_Class_CopyFunction* _copy = _GaussMapper_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _GaussMapper_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _GaussMapper_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _GaussMapper_Build;
+ Stg_Component_InitialiseFunction* _initialise = _GaussMapper_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _GaussMapper_Execute;
+ Stg_Component_DestroyFunction* _destroy = _GaussMapper_Destroy;
+ AllocationType nameAllocationType = NON_GLOBAL;
+ IntegrationPointMapper_MapFunction* _map = _GaussMapper_Map;
+ IntegrationPointMapper_GetMaterialPointsSwarmsFunction* _getMaterialPointsSwarms = _OneToOneMapper_GetMaterialPointsSwarms;
+ IntegrationPointMapper_GetMaterialIndexOnFunction* _getMaterialIndexOn = _OneToOneMapper_GetMaterialIndexOn;
+ IntegrationPointMapper_GetExtensionOnFunction* _getExtensionOn = _OneToOneMapper_GetExtensionOn;
+
+ return _GaussMapper_New( GAUSSMAPPER_PASSARGS );
}
void _GaussMapper_Init( void* mapper ) {
@@ -162,3 +161,5 @@ void _GaussMapper_Map( void* mapper ) {
ref->particle_I = 0;
}
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/GaussMapper.h
--- a/MaterialPoints/src/GaussMapper.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/GaussMapper.h Mon Nov 30 02:03:06 2009 +1100
@@ -42,13 +42,20 @@
struct GaussMapper { __GaussMapper };
+
+
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
#define GAUSSMAPPER_DEFARGS \
- ONETOONEMAPPER_DEFARGS
-
+ ONETOONEMAPPER_DEFARGS
+
#define GAUSSMAPPER_PASSARGS \
- ONETOONEMAPPER_PASSARGS
+ ONETOONEMAPPER_PASSARGS
- GaussMapper* _GaussMapper_New( GAUSSMAPPER_DEFARGS );
+ GaussMapper* _GaussMapper_New( GAUSSMAPPER_DEFARGS );
void _GaussMapper_Init( void* mapper );
@@ -78,3 +85,4 @@
void _GaussMapper_Map( void* mapper );
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/Init.c
--- a/MaterialPoints/src/Init.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/Init.c Mon Nov 30 02:03:06 2009 +1100
@@ -106,3 +106,5 @@ Bool PICellerator_MaterialPoints_Init( i
return True;
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/IntegrationPointMapper.c
--- a/MaterialPoints/src/IntegrationPointMapper.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/IntegrationPointMapper.c Mon Nov 30 02:03:06 2009 +1100
@@ -58,10 +58,10 @@
const Type IntegrationPointMapper_Type = "IntegrationPointMapper";
-IntegrationPointMapper* _IntegrationPointMapper_New( INTEGRATIONPOINTMAPPER_DEFARGS ) {
+IntegrationPointMapper* _IntegrationPointMapper_New( INTEGRATIONPOINTMAPPER_DEFARGS ) {
IntegrationPointMapper* self;
- self = (IntegrationPointMapper*)_Stg_Component_New( STG_COMPONENT_PASSARGS );
+ self = (IntegrationPointMapper*)_Stg_Component_New( STG_COMPONENT_PASSARGS );
self->_map = _map;
self->_getMaterialPointsSwarms = _getMaterialPointsSwarms;
@@ -184,3 +184,5 @@ void* IntegrationPointMapper_GetExtensio
return IntegrationPointMapper_GetExtensionOn( mapper, point, extHandle );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/IntegrationPointMapper.h
--- a/MaterialPoints/src/IntegrationPointMapper.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/IntegrationPointMapper.h Mon Nov 30 02:03:06 2009 +1100
@@ -90,27 +90,32 @@
struct IntegrationPointMapper { __IntegrationPointMapper };
- #define INTEGRATIONPOINTMAPPER_DEFARGS \
- STG_COMPONENT_DEFARGS, \
- IntegrationPointMapper_MapFunction* _map, \
- IntegrationPointMapper_GetMaterialPointsSwarmsFunction* _getMaterialPointsSwarms, \
- IntegrationPointMapper_GetMaterialIndexOnFunction* _getMaterialIndexOn, \
- IntegrationPointMapper_GetExtensionOnFunction* _getExtensionOn, \
- IntegrationPointsSwarm* integrationSwarm
- #define INTEGRATIONPOINTMAPPER_PASSARGS \
- STG_COMPONENT_PASSARGS, \
- _map, \
- _getMaterialPointsSwarms, \
- _getMaterialIndexOn, \
- _getExtensionOn, \
- integrationSwarm
/*---------------------------------------------------------------------------------------------------------------------
** Constructors
*/
- IntegrationPointMapper* _IntegrationPointMapper_New( INTEGRATIONPOINTMAPPER_DEFARGS );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define INTEGRATIONPOINTMAPPER_DEFARGS \
+ STG_COMPONENT_DEFARGS, \
+ IntegrationPointMapper_MapFunction* _map, \
+ IntegrationPointMapper_GetMaterialPointsSwarmsFunction* _getMaterialPointsSwarms, \
+ IntegrationPointMapper_GetMaterialIndexOnFunction* _getMaterialIndexOn, \
+ IntegrationPointMapper_GetExtensionOnFunction* _getExtensionOn
+
+ #define INTEGRATIONPOINTMAPPER_PASSARGS \
+ STG_COMPONENT_PASSARGS, \
+ _map, \
+ _getMaterialPointsSwarms, \
+ _getMaterialIndexOn, \
+ _getExtensionOn
+
+ IntegrationPointMapper* _IntegrationPointMapper_New( INTEGRATIONPOINTMAPPER_DEFARGS );
void _IntegrationPointMapper_Init( void* mapper, PICelleratorContext* context, IntegrationPointsSwarm* integrationSwarm );
@@ -190,3 +195,4 @@
void* IntegrationPointMapper_GetExtensionAtFunc( void* mapper, Index point_I, ExtensionInfo_Index extHandle );
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/IntegrationPointsSwarm.c
--- a/MaterialPoints/src/IntegrationPointsSwarm.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/IntegrationPointsSwarm.c Mon Nov 30 02:03:06 2009 +1100
@@ -80,37 +80,26 @@ IntegrationPointsSwarm* IntegrationPoint
Variable_Register* swarmVariable_Register,
Materials_Register* materials_Register,
MPI_Comm comm,
- void* ics)
+ void* ics_dummy)
{
- IntegrationPointsSwarm* self = _IntegrationPointsSwarm_New(
- sizeof(IntegrationPointsSwarm),
- IntegrationPointsSwarm_Type,
- _IntegrationPointsSwarm_Delete,
- _IntegrationPointsSwarm_Print,
- _IntegrationPointsSwarm_Copy,
- _IntegrationPointsSwarm_DefaultNew,
- _IntegrationPointsSwarm_AssignFromXML,
- _IntegrationPointsSwarm_Build,
- _IntegrationPointsSwarm_Initialise,
- _IntegrationPointsSwarm_Execute,
- _IntegrationPointsSwarm_Destroy,
- name,
- cellLayout,
- particleLayout,
- dim,
- particleSize,
- cellParticleTblDelta,
- extraParticlesFactor,
- mesh,
- timeIntegrator,
- weights,
- mapper,
- recalculateWeights,
- extensionMgr_Register,
- swarmVariable_Register,
- materials_Register,
- comm
- );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(IntegrationPointsSwarm);
+ Type type = IntegrationPointsSwarm_Type;
+ Stg_Class_DeleteFunction* _delete = _IntegrationPointsSwarm_Delete;
+ Stg_Class_PrintFunction* _print = _IntegrationPointsSwarm_Print;
+ Stg_Class_CopyFunction* _copy = _IntegrationPointsSwarm_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _IntegrationPointsSwarm_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _IntegrationPointsSwarm_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _IntegrationPointsSwarm_Build;
+ Stg_Component_InitialiseFunction* _initialise = _IntegrationPointsSwarm_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _IntegrationPointsSwarm_Execute;
+ Stg_Component_DestroyFunction* _destroy = _IntegrationPointsSwarm_Destroy;
+
+ /* 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 = ZERO;
+ void* ics = ZERO;
+
+ IntegrationPointsSwarm* self = _IntegrationPointsSwarm_New( INTEGRATIONPOINTSSWARM_PASSARGS );
_Swarm_Init(
(Swarm*)self, context,
@@ -123,7 +112,7 @@ IntegrationPointsSwarm* IntegrationPoint
extensionMgr_Register,
swarmVariable_Register,
comm,
- ics );
+ ics_dummy );
_IntegrationPointsSwarm_Init(
self,
mesh,
@@ -136,94 +125,40 @@ IntegrationPointsSwarm* IntegrationPoint
void* _IntegrationPointsSwarm_DefaultNew( Name name ) {
- return (void*) _IntegrationPointsSwarm_New(
- sizeof(IntegrationPointsSwarm),
- IntegrationPointsSwarm_Type,
- _IntegrationPointsSwarm_Delete,
- _IntegrationPointsSwarm_Print,
- _IntegrationPointsSwarm_Copy,
- _IntegrationPointsSwarm_DefaultNew,
- _IntegrationPointsSwarm_AssignFromXML,
- _IntegrationPointsSwarm_Build,
- _IntegrationPointsSwarm_Initialise,
- _IntegrationPointsSwarm_Execute,
- _IntegrationPointsSwarm_Destroy,
- name,
- NULL, /* cellLayout */
- NULL, /* particleLayout */
- 0, /* dim */
- sizeof(IntegrationPoint), /* particleSize */
- 0, /* cellParticleTblDelta */
- 0.0, /* extraParticlesFactor */
- NULL, /* mesh */
- NULL, /* timeIntegrator */
- NULL, /* weights */
- NULL, /* mapper */
- False, /* recalculateWeights */
- NULL, /* extensionMgr_Register */
- NULL, /* swarmVariable_Register */
- NULL, /* materials_Register */
- MPI_COMM_WORLD /* MPI_Comm */
- );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(IntegrationPointsSwarm);
+ Type type = IntegrationPointsSwarm_Type;
+ Stg_Class_DeleteFunction* _delete = _IntegrationPointsSwarm_Delete;
+ Stg_Class_PrintFunction* _print = _IntegrationPointsSwarm_Print;
+ Stg_Class_CopyFunction* _copy = _IntegrationPointsSwarm_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _IntegrationPointsSwarm_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _IntegrationPointsSwarm_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _IntegrationPointsSwarm_Build;
+ Stg_Component_InitialiseFunction* _initialise = _IntegrationPointsSwarm_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _IntegrationPointsSwarm_Execute;
+ Stg_Component_DestroyFunction* _destroy = _IntegrationPointsSwarm_Destroy;
+ SizeT particleSize = sizeof(IntegrationPoint);
+
+ /* 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 = ZERO;
+ void* ics = ZERO;
+
+ return (void*) _IntegrationPointsSwarm_New( INTEGRATIONPOINTSSWARM_PASSARGS );
}
-IntegrationPointsSwarm* _IntegrationPointsSwarm_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- Name name,
- CellLayout* cellLayout,
- ParticleLayout* particleLayout,
- Dimension_Index dim,
- SizeT particleSize,
- Particle_InCellIndex cellParticleTblDelta,
- double extraParticlesFactor,
- FeMesh* mesh,
- TimeIntegrator* timeIntegrator,
- WeightsCalculator* weights,
- IntegrationPointMapper* mapper,
- Bool recalculateWeights,
- ExtensionManager_Register* extensionMgr_Register,
- Variable_Register* swarmVariable_Register,
- Materials_Register* materials_Register,
- MPI_Comm comm)
+IntegrationPointsSwarm* _IntegrationPointsSwarm_New( INTEGRATIONPOINTSSWARM_DEFARGS )
{
IntegrationPointsSwarm* self;
/* Allocate memory */
assert( _sizeOfSelf >= sizeof(IntegrationPointsSwarm) );
- self = (IntegrationPointsSwarm*)_Swarm_New(
- _sizeOfSelf,
- type,
- _delete,
- _print,
- _copy,
- _defaultConstructor,
- _construct,
- _build,
- _initialise,
- _execute,
- _destroy,
- name,
- cellLayout,
- particleLayout,
- dim,
- particleSize,
- cellParticleTblDelta,
- extraParticlesFactor,
- extensionMgr_Register,
- swarmVariable_Register,
- comm,
- NULL );
+ /* The following terms are parameters that have been passed into this function but are being set before being passed onto the parent */
+ /* This means that any values of these parameters that are passed into this function are not passed onto the parent function
+ and so should be set to ZERO in any children of this class. */
+ ics = NULL;
+
+ self = (IntegrationPointsSwarm*)_Swarm_New( SWARM_PASSARGS );
return self;
}
@@ -518,3 +453,5 @@ Material* IntegrationPointsSwarm_GetMate
swarm->materials_Register,
IntegrationPointsSwarm_GetMaterialIndexOn( swarm, point ) );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/IntegrationPointsSwarm.h
--- a/MaterialPoints/src/IntegrationPointsSwarm.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/IntegrationPointsSwarm.h Mon Nov 30 02:03:06 2009 +1100
@@ -103,35 +103,18 @@
void* _IntegrationPointsSwarm_DefaultNew( Name name ) ;
/** Private New */
- IntegrationPointsSwarm* _IntegrationPointsSwarm_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- Name name,
- CellLayout* cellLayout,
- ParticleLayout* particleLayout,
- Dimension_Index dim,
- SizeT particleSize,
- Particle_InCellIndex cellParticleTblDelta,
- double extraParticlesFactor,
- FeMesh* mesh,
- TimeIntegrator* timeIntegrator,
- WeightsCalculator* weights,
- IntegrationPointMapper* mapper,
- Bool recalculateWeights,
- ExtensionManager_Register* extensionMgr_Register,
- Variable_Register* swarmVariable_Register,
- Materials_Register* materials_Register,
- MPI_Comm comm
- );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define INTEGRATIONPOINTSSWARM_DEFARGS \
+ SWARM_DEFARGS
+
+ #define INTEGRATIONPOINTSSWARM_PASSARGS \
+ SWARM_PASSARGS
+
+ IntegrationPointsSwarm* _IntegrationPointsSwarm_New( INTEGRATIONPOINTSSWARM_DEFARGS );
void _IntegrationPointsSwarm_AssignFromXML( void* shape, Stg_ComponentFactory* cf, void* data ) ;
@@ -194,3 +177,4 @@
IntegrationPointMapper_GetExtensionAt( ((IntegrationPointsSwarm*)(swarm))->mapper, (point_I), (extHandle) )
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/ManyToOneMapper.c
--- a/MaterialPoints/src/ManyToOneMapper.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/ManyToOneMapper.c Mon Nov 30 02:03:06 2009 +1100
@@ -58,10 +58,10 @@
const Type ManyToOneMapper_Type = "ManyToOneMapper";
-ManyToOneMapper* _ManyToOneMapper_New( MANYTOONEMAPPER_DEFARGS ) {
+ManyToOneMapper* _ManyToOneMapper_New( MANYTOONEMAPPER_DEFARGS ) {
ManyToOneMapper* result;
- result = (ManyToOneMapper*)_IntegrationPointMapper_New( INTEGRATIONPOINTMAPPER_PASSARGS );
+ result = (ManyToOneMapper*)_IntegrationPointMapper_New( INTEGRATIONPOINTMAPPER_PASSARGS );
return result;
}
@@ -196,3 +196,5 @@ MaterialPointsSwarm** ManyToOneMapper_Ge
return result;
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/ManyToOneMapper.h
--- a/MaterialPoints/src/ManyToOneMapper.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/ManyToOneMapper.h Mon Nov 30 02:03:06 2009 +1100
@@ -66,20 +66,23 @@
struct ManyToOneMapper { __ManyToOneMapper };
- #define MANYTOONEMAPPER_DEFARGS \
- INTEGRATIONPOINTMAPPER_DEFARGS, \
- MaterialPointsSwarm** materialSwarms, \
- Index materialSwarmCount
- #define MANYTOONEMAPPER_PASSARGS \
- INTEGRATIONPOINTMAPPER_PASSARGS, \
- materialSwarms, \
- materialSwarmCount
/*---------------------------------------------------------------------------------------------------------------------
** Constructors
*/
- ManyToOneMapper* _ManyToOneMapper_New( MANYTOONEMAPPER_DEFARGS );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define MANYTOONEMAPPER_DEFARGS \
+ INTEGRATIONPOINTMAPPER_DEFARGS
+
+ #define MANYTOONEMAPPER_PASSARGS \
+ INTEGRATIONPOINTMAPPER_PASSARGS
+
+ ManyToOneMapper* _ManyToOneMapper_New( MANYTOONEMAPPER_DEFARGS );
void _ManyToOneMapper_Init( void* mapper, MaterialPointsSwarm** materialSwarms, Index materialSwarmCount );
@@ -109,3 +112,4 @@
MaterialPointsSwarm** ManyToOneMapper_GetMaterialPointsSwarms( void* mapper, Index* count );
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/MappedParticleLayout.c
--- a/MaterialPoints/src/MappedParticleLayout.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/MappedParticleLayout.c Mon Nov 30 02:03:06 2009 +1100
@@ -59,47 +59,13 @@ MappedParticleLayout* MappedParticleLayo
_ParticleLayout_Init( self, context, coordSystem, weightsInitialisedAtStartup );
_MappedParticleLayout_Init( self );
}
-MappedParticleLayout* _MappedParticleLayout_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- Name name,
- AllocationType nameAllocationType,
- ParticleLayout_SetInitialCountsFunction* _setInitialCounts,
- ParticleLayout_InitialiseParticlesFunction* _initialiseParticles,
- CoordSystem coordSystem,
- Bool weightsInitialisedAtStartup )
+MappedParticleLayout* _MappedParticleLayout_New( MAPPEDPARTICLELAYOUT_DEFARGS )
{
MappedParticleLayout* self;
/* Allocate memory */
assert( _sizeOfSelf >= sizeof(MappedParticleLayout) );
- self = (MappedParticleLayout*)_ParticleLayout_New(
- _sizeOfSelf,
- type,
- _delete,
- _print,
- _copy,
- _defaultConstructor,
- _construct,
- _build,
- _initialise,
- _execute,
- _destroy,
- name,
- nameAllocationType,
- _setInitialCounts,
- _initialiseParticles,
- coordSystem,
- weightsInitialisedAtStartup );
+ self = (MappedParticleLayout*)_ParticleLayout_New( PARTICLELAYOUT_PASSARGS );
return self;
}
@@ -137,22 +103,25 @@ void* _MappedParticleLayout_Copy( void*
}
void* _MappedParticleLayout_DefaultNew( Name name ) {
- return _MappedParticleLayout_New(
- sizeof(MappedParticleLayout),
- MappedParticleLayout_Type,
- _MappedParticleLayout_Delete,
- _MappedParticleLayout_Print,
- _MappedParticleLayout_Copy,
- _MappedParticleLayout_DefaultNew,
- _MappedParticleLayout_AssignFromXML,
- _MappedParticleLayout_Build,
- _MappedParticleLayout_Initialise,
- _MappedParticleLayout_Execute,
- _MappedParticleLayout_Destroy,
- name, NON_GLOBAL,
- _MappedParticleLayout_SetInitialCounts,
- _MappedParticleLayout_InitialiseParticles,
- LocalCoordSystem, False );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(MappedParticleLayout);
+ Type type = MappedParticleLayout_Type;
+ Stg_Class_DeleteFunction* _delete = _MappedParticleLayout_Delete;
+ Stg_Class_PrintFunction* _print = _MappedParticleLayout_Print;
+ Stg_Class_CopyFunction* _copy = _MappedParticleLayout_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _MappedParticleLayout_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _MappedParticleLayout_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _MappedParticleLayout_Build;
+ Stg_Component_InitialiseFunction* _initialise = _MappedParticleLayout_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _MappedParticleLayout_Execute;
+ Stg_Component_DestroyFunction* _destroy = _MappedParticleLayout_Destroy;
+ AllocationType nameAllocationType = NON_GLOBAL;
+ ParticleLayout_SetInitialCountsFunction* _setInitialCounts = _MappedParticleLayout_SetInitialCounts;
+ ParticleLayout_InitialiseParticlesFunction* _initialiseParticles = _MappedParticleLayout_InitialiseParticles;
+ CoordSystem coordSystem = LocalCoordSystem;
+ Bool weightsInitialisedAtStartup = False;
+
+ return _MappedParticleLayout_New( MAPPEDPARTICLELAYOUT_PASSARGS );
}
void _MappedParticleLayout_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
MappedParticleLayout* self = (MappedParticleLayout*)component;
@@ -198,3 +167,5 @@ void _MappedParticleLayout_InitialisePar
/* Don't need to do anything */
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/MappedParticleLayout.h
--- a/MaterialPoints/src/MappedParticleLayout.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/MappedParticleLayout.h Mon Nov 30 02:03:06 2009 +1100
@@ -17,24 +17,18 @@ MappedParticleLayout* MappedParticleLayo
CoordSystem coordSystem,
Bool weightsInitialisedAtStartup);
-MappedParticleLayout* _MappedParticleLayout_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- Name name,
- AllocationType nameAllocationType,
- ParticleLayout_SetInitialCountsFunction* _setInitialCounts,
- ParticleLayout_InitialiseParticlesFunction* _initialiseParticles,
- CoordSystem coordSystem,
- Bool weightsInitialisedAtStartup );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define MAPPEDPARTICLELAYOUT_DEFARGS \
+ PARTICLELAYOUT_DEFARGS
+
+ #define MAPPEDPARTICLELAYOUT_PASSARGS \
+ PARTICLELAYOUT_PASSARGS
+
+MappedParticleLayout* _MappedParticleLayout_New( MAPPEDPARTICLELAYOUT_DEFARGS );
/* Initialise implementation */
void _MappedParticleLayout_Init(
@@ -60,3 +54,4 @@ void _MappedParticleLayout_InitialisePar
#endif /* __PICellerator_MaterialPoints_MappedParticleLayout_h__ */
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/Material.c
--- a/MaterialPoints/src/Material.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/Material.c Mon Nov 30 02:03:06 2009 +1100
@@ -77,60 +77,38 @@ Material* Material_New(
void* _Material_DefaultNew( Name name ) {
- return (void*) _Material_New(
- sizeof(Material),
- Material_Type,
- _Material_Delete,
- _Material_Print,
- _Material_Copy,
- _Material_DefaultNew,
- _Material_AssignFromXML,
- _Material_Build,
- _Material_Initialise,
- _Material_Execute,
- _Material_Destroy,
- name,
- NULL,
- NULL,
- NULL );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(Material);
+ Type type = Material_Type;
+ Stg_Class_DeleteFunction* _delete = _Material_Delete;
+ Stg_Class_PrintFunction* _print = _Material_Print;
+ Stg_Class_CopyFunction* _copy = _Material_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _Material_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _Material_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _Material_Build;
+ Stg_Component_InitialiseFunction* _initialise = _Material_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _Material_Execute;
+ Stg_Component_DestroyFunction* _destroy = _Material_Destroy;
+
+ /* 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 = ZERO;
+
+ return (void*) _Material_New( MATERIAL_PASSARGS );
}
/* Private Constructor */
-Material* _Material_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- Name name,
- Stg_Shape* shape,
- Dictionary* materialDictionary,
- Materials_Register* materialRegister )
+Material* _Material_New( MATERIAL_DEFARGS )
{
Material* self;
assert( _sizeOfSelf >= sizeof(Material) );
- self = (Material*) _Stg_Component_New(
- _sizeOfSelf,
- type,
- _delete,
- _print,
- _copy,
- _defaultConstructor,
- _construct,
- _build,
- _initialise,
- _execute,
- _destroy,
- name,
- NON_GLOBAL );
+ /* The following terms are parameters that have been passed into this function but are being set before being passed onto the parent */
+ /* This means that any values of these parameters that are passed into this function are not passed onto the parent function
+ and so should be set to ZERO in any children of this class. */
+ nameAllocationType = NON_GLOBAL;
+
+ self = (Material*) _Stg_Component_New( STG_COMPONENT_PASSARGS );
return self;
}
@@ -368,3 +346,5 @@ void Material_IntegrateField(
Memory_Free( fieldValue );
Memory_Free( localResult );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/Material.h
--- a/MaterialPoints/src/Material.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/Material.h Mon Nov 30 02:03:06 2009 +1100
@@ -71,22 +71,18 @@
void* _Material_DefaultNew( Name name );
/* Private Constructor */
- Material* _Material_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- Name name,
- Stg_Shape* shape,
- Dictionary* materialDictionary,
- Materials_Register* materialRegister );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define MATERIAL_DEFARGS \
+ STG_COMPONENT_DEFARGS
+
+ #define MATERIAL_PASSARGS \
+ STG_COMPONENT_PASSARGS
+
+ Material* _Material_New( MATERIAL_DEFARGS );
void _Material_AssignFromXML( void* material, Stg_ComponentFactory* cf, void* data );
@@ -135,3 +131,4 @@
double* result );
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/MaterialFeVariable.c
--- a/MaterialPoints/src/MaterialFeVariable.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/MaterialFeVariable.c Mon Nov 30 02:03:06 2009 +1100
@@ -56,54 +56,14 @@
const Type MaterialFeVariable_Type = "MaterialFeVariable";
-MaterialFeVariable* _MaterialFeVariable_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- FieldVariable_InterpolateValueAtFunction* _interpolateValueAt,
- FieldVariable_GetValueFunction* _getMinGlobalFeMagnitude,
- FieldVariable_GetValueFunction* _getMaxGlobalFeMagnitude,
- FieldVariable_GetCoordFunction* _getMinAndMaxLocalCoords,
- FieldVariable_GetCoordFunction* _getMinAndMaxGlobalCoords,
- FeVariable_InterpolateWithinElementFunction* _interpolateWithinElement,
- FeVariable_GetValueAtNodeFunction* _getValueAtNode,
- ParticleFeVariable_ValueAtParticleFunction* _valueAtParticle,
- Name name )
+MaterialFeVariable* _MaterialFeVariable_New( MATERIALFEVARIABLE_DEFARGS )
{
MaterialFeVariable* self;
/* Allocate memory */
assert( _sizeOfSelf >= sizeof(MaterialFeVariable) );
self = (MaterialFeVariable*)
- _ParticleFeVariable_New(
- _sizeOfSelf,
- type,
- _delete,
- _print,
- _copy,
- _defaultConstructor,
- _construct,
- _build,
- _initialise,
- _execute,
- _destroy,
- _interpolateValueAt,
- _getMinGlobalFeMagnitude,
- _getMaxGlobalFeMagnitude,
- _getMinAndMaxLocalCoords,
- _getMinAndMaxGlobalCoords,
- _interpolateWithinElement,
- _getValueAtNode,
- _valueAtParticle,
- name );
+ _ParticleFeVariable_New( PARTICLEFEVARIABLE_PASSARGS );
return self;
}
@@ -151,27 +111,32 @@ void* _MaterialFeVariable_Copy( void* fe
}
void* _MaterialFeVariable_DefaultNew( Name name ) {
- return (void*) _MaterialFeVariable_New(
- sizeof(MaterialFeVariable),
- MaterialFeVariable_Type,
- _MaterialFeVariable_Delete,
- _MaterialFeVariable_Print,
- _MaterialFeVariable_Copy,
- _MaterialFeVariable_DefaultNew,
- _MaterialFeVariable_AssignFromXML,
- _MaterialFeVariable_Build,
- _MaterialFeVariable_Initialise,
- _MaterialFeVariable_Execute,
- _MaterialFeVariable_Destroy,
- _FeVariable_InterpolateValueAt,
- _FeVariable_GetMinGlobalFieldMagnitude,
- _FeVariable_GetMaxGlobalFieldMagnitude,
- _FeVariable_GetMinAndMaxLocalCoords,
- _FeVariable_GetMinAndMaxGlobalCoords,
- _FeVariable_InterpolateNodeValuesToElLocalCoord,
- _FeVariable_GetValueAtNode,
- _MaterialFeVariable_ValueAtParticle,
- name );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(MaterialFeVariable);
+ Type type = MaterialFeVariable_Type;
+ Stg_Class_DeleteFunction* _delete = _MaterialFeVariable_Delete;
+ Stg_Class_PrintFunction* _print = _MaterialFeVariable_Print;
+ Stg_Class_CopyFunction* _copy = _MaterialFeVariable_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _MaterialFeVariable_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _MaterialFeVariable_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _MaterialFeVariable_Build;
+ Stg_Component_InitialiseFunction* _initialise = _MaterialFeVariable_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _MaterialFeVariable_Execute;
+ Stg_Component_DestroyFunction* _destroy = _MaterialFeVariable_Destroy;
+ FieldVariable_InterpolateValueAtFunction* _interpolateValueAt = _FeVariable_InterpolateValueAt;
+ FieldVariable_GetCoordFunction* _getMinAndMaxLocalCoords = _FeVariable_GetMinAndMaxLocalCoords;
+ FieldVariable_GetCoordFunction* _getMinAndMaxGlobalCoords = _FeVariable_GetMinAndMaxGlobalCoords;
+ FeVariable_InterpolateWithinElementFunction* _interpolateWithinElement = _FeVariable_InterpolateNodeValuesToElLocalCoord;
+ FeVariable_GetValueAtNodeFunction* _getValueAtNode = _FeVariable_GetValueAtNode;
+ ParticleFeVariable_ValueAtParticleFunction* _valueAtParticle = _MaterialFeVariable_ValueAtParticle;
+
+ /* 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 = ZERO;
+ FieldVariable_GetValueFunction* _getMinGlobalFieldMagnitude = ZERO;
+ FieldVariable_GetValueFunction* _getMaxGlobalFieldMagnitude = ZERO;
+ FeVariable_SyncShadowValuesFunc* _syncShadowValues = ZERO;
+
+ return (void*) _MaterialFeVariable_New( MATERIALFEVARIABLE_PASSARGS );
}
void _MaterialFeVariable_AssignFromXML( void* materialFeVariable, Stg_ComponentFactory* cf, void* data ){
@@ -245,3 +210,5 @@ void _MaterialFeVariable_ValueAtParticle
*particleValue = (double) ( self->material->index == IntegrationPointsSwarm_GetMaterialIndexOn( swarm, particle ) );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/MaterialFeVariable.h
--- a/MaterialPoints/src/MaterialFeVariable.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/MaterialFeVariable.h Mon Nov 30 02:03:06 2009 +1100
@@ -57,27 +57,18 @@
struct MaterialFeVariable { __MaterialFeVariable };
/* --- Contstructors / Destructors --- */
- MaterialFeVariable* _MaterialFeVariable_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- FieldVariable_InterpolateValueAtFunction* _interpolateValueAt,
- FieldVariable_GetValueFunction* _getMinGlobalFeMagnitude,
- FieldVariable_GetValueFunction* _getMaxGlobalFeMagnitude,
- FieldVariable_GetCoordFunction* _getMinAndMaxLocalCoords,
- FieldVariable_GetCoordFunction* _getMinAndMaxGlobalCoords,
- FeVariable_InterpolateWithinElementFunction* _interpolateWithinElement,
- FeVariable_GetValueAtNodeFunction* _getValueAtNode,
- ParticleFeVariable_ValueAtParticleFunction* _valueAtParticle,
- Name name );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define MATERIALFEVARIABLE_DEFARGS \
+ PARTICLEFEVARIABLE_DEFARGS
+
+ #define MATERIALFEVARIABLE_PASSARGS \
+ PARTICLEFEVARIABLE_PASSARGS
+
+ MaterialFeVariable* _MaterialFeVariable_New( MATERIALFEVARIABLE_DEFARGS );
void _MaterialFeVariable_Init( MaterialFeVariable* self, Material* material ) ;
@@ -100,3 +91,4 @@
double* particleValue );
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/MaterialPoint.c
--- a/MaterialPoints/src/MaterialPoint.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/MaterialPoint.c Mon Nov 30 02:03:06 2009 +1100
@@ -54,3 +54,5 @@
#include "MaterialPoint.h"
const Type MaterialPoint_Type = "MaterialPoint";
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/MaterialPointsSwarm.c
--- a/MaterialPoints/src/MaterialPointsSwarm.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/MaterialPointsSwarm.c Mon Nov 30 02:03:06 2009 +1100
@@ -74,35 +74,30 @@ MaterialPointsSwarm* MaterialPointsSwarm
ExtensionManager_Register* extensionMgr_Register,
Materials_Register* materials_Register,
MPI_Comm comm,
- void* ics )
+ void* ics_dummy )
{
- MaterialPointsSwarm* self = _MaterialPointsSwarm_New(
- sizeof(MaterialPointsSwarm),
- MaterialPointsSwarm_Type,
- _MaterialPointsSwarm_Delete,
- _MaterialPointsSwarm_Print,
- _MaterialPointsSwarm_Copy,
- _MaterialPointsSwarm_DefaultNew,
- _MaterialPointsSwarm_AssignFromXML,
- _MaterialPointsSwarm_Build,
- _MaterialPointsSwarm_Initialise,
- _MaterialPointsSwarm_Execute,
- _MaterialPointsSwarm_Destroy,
- name,
- cellLayout, /* cellLayout */
- particleLayout, /* particleLayout */
- dim, /* dim */
- particleSize, /* particleSize */
- DEFAULT_CELL_PARTICLE_TBL_DELTA, /* cellParticleTblDelta */
- DEFAULT_EXTRA_PARTICLES_FACTOR, /* extraParticlesFactor */
- mesh, /* mesh */
- escapedRoutine, /* escapedRoutine */
- material, /* material */
- swarmVariable_Register, /* swarmVariable_Register */
- extensionMgr_Register, /* extensionMgr_Register */
- materials_Register, /* materials_Register */
- comm /* comm */
- );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(MaterialPointsSwarm);
+ Type type = MaterialPointsSwarm_Type;
+ Stg_Class_DeleteFunction* _delete = _MaterialPointsSwarm_Delete;
+ Stg_Class_PrintFunction* _print = _MaterialPointsSwarm_Print;
+ Stg_Class_CopyFunction* _copy = _MaterialPointsSwarm_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _MaterialPointsSwarm_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _MaterialPointsSwarm_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _MaterialPointsSwarm_Build;
+ Stg_Component_InitialiseFunction* _initialise = _MaterialPointsSwarm_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _MaterialPointsSwarm_Execute;
+ Stg_Component_DestroyFunction* _destroy = _MaterialPointsSwarm_Destroy;
+
+ /* 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 = ZERO;
+ void* ics = ZERO;
+
+ /* The following terms are parameters that have been passed into or defined in this function but are being set before being passed onto the parent */
+ Particle_InCellIndex cellParticleTblDelta = DEFAULT_CELL_PARTICLE_TBL_DELTA;
+ double extraParticlesFactor = DEFAULT_EXTRA_PARTICLES_FACTOR;
+
+ MaterialPointsSwarm* self = _MaterialPointsSwarm_New( MATERIALPOINTSSWARM_PASSARGS );
_Swarm_Init(
(Swarm*)self, context,
@@ -115,7 +110,7 @@ MaterialPointsSwarm* MaterialPointsSwarm
extensionMgr_Register,
swarmVariable_Register,
comm,
- ics );
+ ics_dummy );
_MaterialPointsSwarm_Init(
self,
@@ -128,60 +123,18 @@ MaterialPointsSwarm* MaterialPointsSwarm
}
-MaterialPointsSwarm* _MaterialPointsSwarm_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- Name name,
- CellLayout* cellLayout,
- ParticleLayout* particleLayout,
- Dimension_Index dim,
- SizeT particleSize,
- Particle_InCellIndex cellParticleTblDelta,
- double extraParticlesFactor,
- FeMesh* mesh,
- EscapedRoutine* escapedRoutine,
- Material* material,
- Variable_Register* swarmVariable_Register,
- ExtensionManager_Register* extensionMgr_Register,
- Materials_Register* materials_Register,
- MPI_Comm comm )
+MaterialPointsSwarm* _MaterialPointsSwarm_New( MATERIALPOINTSSWARM_DEFARGS )
{
MaterialPointsSwarm* self;
/* Allocate memory */
assert( _sizeOfSelf >= sizeof(MaterialPointsSwarm) );
- self = (MaterialPointsSwarm*)_Swarm_New(
- _sizeOfSelf,
- type,
- _delete,
- _print,
- _copy,
- _defaultConstructor,
- _construct,
- _build,
- _initialise,
- _execute,
- _destroy,
- name,
- cellLayout,
- particleLayout,
- dim,
- particleSize,
- cellParticleTblDelta,
- extraParticlesFactor,
- extensionMgr_Register,
- swarmVariable_Register,
- comm,
- NULL );
+ /* The following terms are parameters that have been passed into this function but are being set before being passed onto the parent */
+ /* This means that any values of these parameters that are passed into this function are not passed onto the parent function
+ and so should be set to ZERO in any children of this class. */
+ ics = NULL;
+
+ self = (MaterialPointsSwarm*)_Swarm_New( SWARM_PASSARGS );
return self;
}
@@ -261,33 +214,25 @@ void* _MaterialPointsSwarm_Copy( void* s
}
void* _MaterialPointsSwarm_DefaultNew( Name name ) {
- return _MaterialPointsSwarm_New(
- sizeof(MaterialPointsSwarm),
- MaterialPointsSwarm_Type,
- _MaterialPointsSwarm_Delete,
- _MaterialPointsSwarm_Print,
- _MaterialPointsSwarm_Copy,
- _MaterialPointsSwarm_DefaultNew,
- _MaterialPointsSwarm_AssignFromXML,
- _MaterialPointsSwarm_Build,
- _MaterialPointsSwarm_Initialise,
- _MaterialPointsSwarm_Execute,
- _MaterialPointsSwarm_Destroy,
- name,
- NULL, /* cellLayout */
- NULL, /* particleLayout */
- 0, /* dim */
- sizeof(MaterialPoint), /* particleSize */
- 0, /* cellParticleTblDelta */
- 0.0, /* extraParticlesFactor */
- NULL, /* mesh */
- NULL, /* escapedRoutine */
- NULL, /* material */
- NULL, /* swarmVariable_Register */
- NULL, /* extensionMgr_Register */
- NULL, /* materials_Register */
- 0 /* comm */
- );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(MaterialPointsSwarm);
+ Type type = MaterialPointsSwarm_Type;
+ Stg_Class_DeleteFunction* _delete = _MaterialPointsSwarm_Delete;
+ Stg_Class_PrintFunction* _print = _MaterialPointsSwarm_Print;
+ Stg_Class_CopyFunction* _copy = _MaterialPointsSwarm_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _MaterialPointsSwarm_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _MaterialPointsSwarm_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _MaterialPointsSwarm_Build;
+ Stg_Component_InitialiseFunction* _initialise = _MaterialPointsSwarm_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _MaterialPointsSwarm_Execute;
+ Stg_Component_DestroyFunction* _destroy = _MaterialPointsSwarm_Destroy;
+ SizeT particleSize = sizeof(MaterialPoint);
+
+ /* 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 = ZERO;
+ void* ics = ZERO;
+
+ return _MaterialPointsSwarm_New( MATERIALPOINTSSWARM_PASSARGS );
}
@@ -589,3 +534,5 @@ void* MaterialPointsSwarm_GetExtensionAt
return ExtensionManager_Get( self->particleExtensionMgr, point, extHandle );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/MaterialPointsSwarm.h
--- a/MaterialPoints/src/MaterialPointsSwarm.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/MaterialPointsSwarm.h Mon Nov 30 02:03:06 2009 +1100
@@ -94,32 +94,18 @@
MPI_Comm comm,
void* ics );
- MaterialPointsSwarm* _MaterialPointsSwarm_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- Name name,
- CellLayout* cellLayout,
- ParticleLayout* particleLayout,
- Dimension_Index dim,
- SizeT particleSize,
- Particle_InCellIndex cellParticleTblDelta,
- double extraParticlesFactor,
- FeMesh* mesh,
- EscapedRoutine* escapedRoutine,
- Material* material,
- Variable_Register* swarmVariable_Register,
- ExtensionManager_Register* extensionMgr_Register,
- Materials_Register* materials_Register,
- MPI_Comm comm);
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define MATERIALPOINTSSWARM_DEFARGS \
+ SWARM_DEFARGS
+
+ #define MATERIALPOINTSSWARM_PASSARGS \
+ SWARM_PASSARGS
+
+ MaterialPointsSwarm* _MaterialPointsSwarm_New( MATERIALPOINTSSWARM_DEFARGS );
void _MaterialPointsSwarm_Delete( void* swarm );
void _MaterialPointsSwarm_Print( void* swarm, Stream* stream );
@@ -166,3 +152,4 @@
void* MaterialPointsSwarm_GetExtensionAt( void* swarm, Index point_I, Index extHandle );
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/Materials_Register.c
--- a/MaterialPoints/src/Materials_Register.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/Materials_Register.c Mon Nov 30 02:03:06 2009 +1100
@@ -59,14 +59,16 @@ const Type Materials_Register_Type = "Ma
const Type Materials_Register_Type = "Materials_Register";
Materials_Register* Materials_Register_New( void ) {
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(Materials_Register);
+ Type type = Materials_Register_Type;
+ Stg_Class_DeleteFunction* _delete = _Materials_Register_Delete;
+ Stg_Class_PrintFunction* _print = _Materials_Register_Print;
+ Stg_Class_CopyFunction* _copy = _Materials_Register_Copy;
+
Materials_Register* self;
- self = (Materials_Register*) _NamedObject_Register_New(
- sizeof(Materials_Register),
- Materials_Register_Type,
- _Materials_Register_Delete,
- _Materials_Register_Print,
- _Materials_Register_Copy );
+ self = (Materials_Register*) _NamedObject_Register_New( NAMEDOBJECT_REGISTER_PASSARGS );
return self;
}
@@ -305,3 +307,5 @@ void Variable_Register_SetAllVariablesFr
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/OneToOneMapper.c
--- a/MaterialPoints/src/OneToOneMapper.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/OneToOneMapper.c Mon Nov 30 02:03:06 2009 +1100
@@ -58,10 +58,10 @@
const Type OneToOneMapper_Type = "OneToOneMapper";
-OneToOneMapper* _OneToOneMapper_New( ONETOONEMAPPER_DEFARGS ) {
+OneToOneMapper* _OneToOneMapper_New( ONETOONEMAPPER_DEFARGS ) {
OneToOneMapper* result;
- result = (OneToOneMapper*)_IntegrationPointMapper_New( INTEGRATIONPOINTMAPPER_PASSARGS );
+ result = (OneToOneMapper*)_IntegrationPointMapper_New( INTEGRATIONPOINTMAPPER_PASSARGS );
return result;
}
@@ -197,3 +197,5 @@ void* _OneToOneMapper_GetExtensionOn( vo
return ExtensionManager_Get( swarm->particleExtensionMgr, materialPoint, extHandle );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/OneToOneMapper.h
--- a/MaterialPoints/src/OneToOneMapper.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/OneToOneMapper.h Mon Nov 30 02:03:06 2009 +1100
@@ -71,15 +71,20 @@
struct OneToOneMapper { __OneToOneMapper };
+
+
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
#define ONETOONEMAPPER_DEFARGS \
- INTEGRATIONPOINTMAPPER_DEFARGS, \
- MaterialPointsSwarm* materialSwarm
+ INTEGRATIONPOINTMAPPER_DEFARGS
#define ONETOONEMAPPER_PASSARGS \
- INTEGRATIONPOINTMAPPER_PASSARGS, \
- materialSwarm
-
- OneToOneMapper* _OneToOneMapper_New( ONETOONEMAPPER_DEFARGS );
+ INTEGRATIONPOINTMAPPER_PASSARGS
+
+ OneToOneMapper* _OneToOneMapper_New( ONETOONEMAPPER_DEFARGS );
void _OneToOneMapper_Init( void* mapper, MaterialPointsSwarm* materialSwarm );
@@ -115,3 +120,4 @@
MaterialPoint* OneToOneMapper_GetMaterialPoint( void* mapper, void* integrationPoint, MaterialPointsSwarm** materialSwarm );
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/PICelleratorContext.c
--- a/MaterialPoints/src/PICelleratorContext.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/PICelleratorContext.c Mon Nov 30 02:03:06 2009 +1100
@@ -75,11 +75,11 @@ PICelleratorContext* PICelleratorContext
return self;
}
-PICelleratorContext* _PICelleratorContext_New( PICELLERATORCONTEXT_DEFARGS ) {
+PICelleratorContext* _PICelleratorContext_New( PICELLERATORCONTEXT_DEFARGS ) {
PICelleratorContext* self;
/* Allocate memory */
- self = (PICelleratorContext*)_FiniteElementContext_New( FINITEELEMENTCONTEXT_PASSARGS );
+ self = (PICelleratorContext*)_FiniteElementContext_New( FINITEELEMENTCONTEXT_PASSARGS );
/* General info */
@@ -89,25 +89,26 @@ PICelleratorContext* _PICelleratorContex
}
void* _PICelleratorContext_DefaultNew( Name name ) {
- return (void*) _PICelleratorContext_New(
- sizeof(PICelleratorContext),
- PICelleratorContext_Type,
- _PICelleratorContext_Delete,
- _PICelleratorContext_Print,
- NULL,
- _PICelleratorContext_DefaultNew,
- _PICelleratorContext_AssignFromXML,
- (Stg_Component_BuildFunction*)_FiniteElementContext_Build,
- (Stg_Component_InitialiseFunction*)_FiniteElementContext_Initialise,
- (Stg_Component_ExecuteFunction*)_AbstractContext_Execute,
- _PICelleratorContext_Destroy,
- name,
- NON_GLOBAL,
- _PICelleratorContext_SetDt,
- 0,
- 0,
- MPI_COMM_WORLD,
- NULL );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(PICelleratorContext);
+ Type type = PICelleratorContext_Type;
+ Stg_Class_DeleteFunction* _delete = _PICelleratorContext_Delete;
+ Stg_Class_PrintFunction* _print = _PICelleratorContext_Print;
+ Stg_Class_CopyFunction* _copy = NULL;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _PICelleratorContext_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _PICelleratorContext_AssignFromXML;
+ Stg_Component_BuildFunction* _build = (Stg_Component_BuildFunction*)_FiniteElementContext_Build;
+ Stg_Component_InitialiseFunction* _initialise = (Stg_Component_InitialiseFunction*)_FiniteElementContext_Initialise;
+ Stg_Component_ExecuteFunction* _execute = (Stg_Component_ExecuteFunction*)_AbstractContext_Execute;
+ Stg_Component_DestroyFunction* _destroy = _PICelleratorContext_Destroy;
+ AllocationType nameAllocationType = NON_GLOBAL;
+ AbstractContext_SetDt* _setDt = _PICelleratorContext_SetDt;
+ double startTime = 0;
+ double stopTime = 0;
+ MPI_Comm communicator = MPI_COMM_WORLD;
+ Dictionary* dictionary = NULL;
+
+ return (void*) _PICelleratorContext_New( PICELLERATORCONTEXT_PASSARGS );
}
void _PICelleratorContext_Init( void* context ) {
@@ -185,3 +186,5 @@ void _PICelleratorContext_AssignFromXML(
_PICelleratorContext_Init( self );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/PICelleratorContext.h
--- a/MaterialPoints/src/PICelleratorContext.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/PICelleratorContext.h Mon Nov 30 02:03:06 2009 +1100
@@ -68,11 +68,7 @@
struct PICelleratorContext { __PICelleratorContext };
- #define PICELLERATORCONTEXT_DEFARGS \
- FINITEELEMENTCONTEXT_DEFARGS
- #define PICELLERATORCONTEXT_PASSARGS \
- FINITEELEMENTCONTEXT_PASSARGS
/* Constructors ----------------------------------------------------------------------------------------------------*/
@@ -87,7 +83,18 @@
Dictionary* dictionary );
/** Creation implementation / Virtual constructor */
- PICelleratorContext* _PICelleratorContext_New( PICELLERATORCONTEXT_DEFARGS );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define PICELLERATORCONTEXT_DEFARGS \
+ FINITEELEMENTCONTEXT_DEFARGS
+
+ #define PICELLERATORCONTEXT_PASSARGS \
+ FINITEELEMENTCONTEXT_PASSARGS
+
+ PICelleratorContext* _PICelleratorContext_New( PICELLERATORCONTEXT_DEFARGS );
/** Initialisation implementation */
void _PICelleratorContext_Init( void* context );
@@ -115,3 +122,4 @@
/* Private functions -----------------------------------------------------------------------------------------------*/
#endif /* __PICelleratorContext_h__ */
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/ParticleFeVariable.c
--- a/MaterialPoints/src/ParticleFeVariable.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/ParticleFeVariable.c Mon Nov 30 02:03:06 2009 +1100
@@ -60,69 +60,19 @@ int ParticleFeVariable_nNames = 0;
int ParticleFeVariable_nNames = 0;
int ParticleFeVariable_curName = 0;
-ParticleFeVariable* _ParticleFeVariable_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- FieldVariable_InterpolateValueAtFunction* _interpolateValueAt,
- FieldVariable_GetValueFunction* _getMinGlobalFeMagnitude,
- FieldVariable_GetValueFunction* _getMaxGlobalFeMagnitude,
- FieldVariable_GetCoordFunction* _getMinAndMaxLocalCoords,
- FieldVariable_GetCoordFunction* _getMinAndMaxGlobalCoords,
- FeVariable_InterpolateWithinElementFunction* _interpolateWithinElement,
- FeVariable_GetValueAtNodeFunction* _getValueAtNode,
- ParticleFeVariable_ValueAtParticleFunction* _valueAtParticle,
- Name name )
+ParticleFeVariable* _ParticleFeVariable_New( PARTICLEFEVARIABLE_DEFARGS )
{
ParticleFeVariable* self;
/* Allocate memory */
assert( _sizeOfSelf >= sizeof(ParticleFeVariable) );
- self = (ParticleFeVariable*) _FeVariable_New(
- _sizeOfSelf,
- type,
- _delete,
- _print,
- _copy,
- _defaultConstructor,
- _construct,
- _build,
- _initialise,
- _execute,
- _destroy,
- name,
- NON_GLOBAL,
- _interpolateValueAt,
- _getMinGlobalFeMagnitude,
- _getMaxGlobalFeMagnitude,
- _getMinAndMaxLocalCoords,
- _getMinAndMaxGlobalCoords,
- 0, /* fieldComponentCount */
- 0, /* dim */
- True, /* isCheckpointedAndReloaded */
- 0, /* communicator */
- NULL, /* fv_Register */
- _interpolateWithinElement,
- _getValueAtNode,
- _FeVariable_SyncShadowValues,
- NULL,
- NULL,
- NULL, /* bcs */
- NULL, /* ics */
- NULL, /* linkedDofInfo */
- NULL, /* templateFeVariable */
- NULL,
- False, /* use a reference solution from file */
- False /* load the reference solution at each time step */
- );
+ /* The following terms are parameters that have been passed into this function but are being set before being passed onto the parent */
+ /* This means that any values of these parameters that are passed into this function are not passed onto the parent function
+ and so should be set to ZERO in any children of this class. */
+ nameAllocationType = NON_GLOBAL;
+ _syncShadowValues = _FeVariable_SyncShadowValues;
+
+ self = (ParticleFeVariable*) _FeVariable_New( FEVARIABLE_PASSARGS );
self->_valueAtParticle = _valueAtParticle;
@@ -369,3 +319,5 @@ void ParticleFeVariable_AssembleElementS
}
}
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/ParticleFeVariable.h
--- a/MaterialPoints/src/ParticleFeVariable.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/ParticleFeVariable.h Mon Nov 30 02:03:06 2009 +1100
@@ -77,27 +77,20 @@
struct ParticleFeVariable { __ParticleFeVariable };
/* --- Contstructors / Destructors --- */
- ParticleFeVariable* _ParticleFeVariable_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- FieldVariable_InterpolateValueAtFunction* _interpolateValueAt,
- FieldVariable_GetValueFunction* _getMinGlobalFeMagnitude,
- FieldVariable_GetValueFunction* _getMaxGlobalFeMagnitude,
- FieldVariable_GetCoordFunction* _getMinAndMaxLocalCoords,
- FieldVariable_GetCoordFunction* _getMinAndMaxGlobalCoords,
- FeVariable_InterpolateWithinElementFunction* _interpolateWithinElement,
- FeVariable_GetValueAtNodeFunction* _getValueAtNode,
- ParticleFeVariable_ValueAtParticleFunction* _valueAtParticle,
- Name name );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define PARTICLEFEVARIABLE_DEFARGS \
+ FEVARIABLE_DEFARGS, \
+ ParticleFeVariable_ValueAtParticleFunction* _valueAtParticle
+
+ #define PARTICLEFEVARIABLE_PASSARGS \
+ FEVARIABLE_PASSARGS, \
+ _valueAtParticle
+
+ ParticleFeVariable* _ParticleFeVariable_New( PARTICLEFEVARIABLE_DEFARGS );
void _ParticleFeVariable_Init( ParticleFeVariable* self, IntegrationPointsSwarm* swarm );
@@ -147,3 +140,4 @@
double* elForceVector );
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/PeriodicBoundariesManager.c
--- a/MaterialPoints/src/PeriodicBoundariesManager.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/PeriodicBoundariesManager.c Mon Nov 30 02:03:06 2009 +1100
@@ -79,30 +79,28 @@ PeriodicBoundariesManager* PeriodicBound
}
void* _PeriodicBoundariesManager_DefaultNew( Name name ) {
- return (void*) _PeriodicBoundariesManager_New(
- sizeof(PeriodicBoundariesManager),
- PeriodicBoundariesManager_Type,
- _PeriodicBoundariesManager_Delete,
- _PeriodicBoundariesManager_Print,
- NULL,
- _PeriodicBoundariesManager_DefaultNew,
- _PeriodicBoundariesManager_AssignFromXML,
- _PeriodicBoundariesManager_Build,
- _PeriodicBoundariesManager_Initialise,
- _PeriodicBoundariesManager_Execute,
- _PeriodicBoundariesManager_Destroy,
- name,
- NON_GLOBAL,
- NULL,
- NULL,
- NULL);
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(PeriodicBoundariesManager);
+ Type type = PeriodicBoundariesManager_Type;
+ Stg_Class_DeleteFunction* _delete = _PeriodicBoundariesManager_Delete;
+ Stg_Class_PrintFunction* _print = _PeriodicBoundariesManager_Print;
+ Stg_Class_CopyFunction* _copy = NULL;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _PeriodicBoundariesManager_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _PeriodicBoundariesManager_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _PeriodicBoundariesManager_Build;
+ Stg_Component_InitialiseFunction* _initialise = _PeriodicBoundariesManager_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _PeriodicBoundariesManager_Execute;
+ Stg_Component_DestroyFunction* _destroy = _PeriodicBoundariesManager_Destroy;
+ AllocationType nameAllocationType = NON_GLOBAL;
+
+ return (void*) _PeriodicBoundariesManager_New( PERIODICBOUNDARIESMANAGER_PASSARGS );
}
-PeriodicBoundariesManager* _PeriodicBoundariesManager_New( PERIODICBOUNDARIESMANAGER_DEFARGS ) {
+PeriodicBoundariesManager* _PeriodicBoundariesManager_New( PERIODICBOUNDARIESMANAGER_DEFARGS ) {
PeriodicBoundariesManager* self;
/* Allocate memory */
- self = (PeriodicBoundariesManager*)_Stg_Component_New( STG_COMPONENT_PASSARGS );
+ self = (PeriodicBoundariesManager*)_Stg_Component_New( STG_COMPONENT_PASSARGS );
/* General info */
@@ -368,3 +366,5 @@ void PeriodicBoundariesManager_UpdatePar
}
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/PeriodicBoundariesManager.h
--- a/MaterialPoints/src/PeriodicBoundariesManager.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/PeriodicBoundariesManager.h Mon Nov 30 02:03:06 2009 +1100
@@ -80,17 +80,7 @@
struct PeriodicBoundariesManager { __PeriodicBoundariesManager };
- #define PERIODICBOUNDARIESMANAGER_DEFARGS \
- STG_COMPONENT_DEFARGS, \
- Mesh* mesh, \
- Swarm* swarm, \
- Dictionary* dictionary
- #define PERIODICBOUNDARIESMANAGER_PASSARGS \
- STG_COMPONENT_PASSARGS, \
- mesh, \
- swarm, \
- dictionary
void* _PeriodicBoundariesManager_DefaultNew( Name name );
@@ -101,7 +91,18 @@
Swarm* swarm,
Dictionary* dictionary );
- PeriodicBoundariesManager* _PeriodicBoundariesManager_New( PERIODICBOUNDARIESMANAGER_DEFARGS );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define PERIODICBOUNDARIESMANAGER_DEFARGS \
+ STG_COMPONENT_DEFARGS
+
+ #define PERIODICBOUNDARIESMANAGER_PASSARGS \
+ STG_COMPONENT_PASSARGS
+
+ PeriodicBoundariesManager* _PeriodicBoundariesManager_New( PERIODICBOUNDARIESMANAGER_DEFARGS );
void _PeriodicBoundariesManager_Init(
void* periodicBCsManager,
@@ -131,3 +132,4 @@
void PeriodicBoundariesManager_UpdateParticle( void* periodicBCsManager, Particle_Index lParticle_I );
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/SwarmAdvectionInAPlane.c
--- a/MaterialPoints/src/SwarmAdvectionInAPlane.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/SwarmAdvectionInAPlane.c Mon Nov 30 02:03:06 2009 +1100
@@ -90,41 +90,13 @@ SwarmAdvectionInAPlane* SwarmAdvectionIn
return self;
}
-SwarmAdvectionInAPlane* _SwarmAdvectionInAPlane_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- TimeIntegratee_CalculateTimeDerivFunction* _calculateTimeDeriv,
- TimeIntegratee_IntermediateFunction* _intermediate,
- Name name )
+SwarmAdvectionInAPlane* _SwarmAdvectionInAPlane_New( SWARMADVECTIONINAPLANE_DEFARGS )
{
SwarmAdvectionInAPlane* self;
/* Allocate memory */
assert( _sizeOfSelf >= sizeof(SwarmAdvectionInAPlane) );
- self = (SwarmAdvectionInAPlane*)_SwarmAdvector_New(
- _sizeOfSelf,
- type,
- _delete,
- _print,
- _copy,
- _defaultConstructor,
- _construct,
- _build,
- _initialise,
- _execute,
- _destroy,
- _calculateTimeDeriv,
- _intermediate,
- name );
+ self = (SwarmAdvectionInAPlane*)_SwarmAdvector_New( SWARMADVECTOR_PASSARGS );
/* General info */
@@ -173,22 +145,25 @@ void* _SwarmAdvectionInAPlane_Copy( void
}
void* _SwarmAdvectionInAPlane_DefaultNew( Name name ) {
- return (void*) _SwarmAdvectionInAPlane_New(
- sizeof(SwarmAdvectionInAPlane),
- SwarmAdvectionInAPlane_Type,
- _SwarmAdvectionInAPlane_Delete,
- _SwarmAdvectionInAPlane_Print,
- _SwarmAdvectionInAPlane_Copy,
- _SwarmAdvectionInAPlane_DefaultNew,
- _SwarmAdvectionInAPlane_AssignFromXML,
- /* Just use the normal parent's implementation for next few, apart from new TimeDeriv function */
- _SwarmAdvector_Build,
- _SwarmAdvector_Initialise,
- _SwarmAdvector_Execute,
- _SwarmAdvector_Destroy,
- _SwarmAdvectionInAPlane_TimeDeriv,
- _SwarmAdvector_Intermediate,
- name );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(SwarmAdvectionInAPlane);
+ Type type = SwarmAdvectionInAPlane_Type;
+ Stg_Class_DeleteFunction* _delete = _SwarmAdvectionInAPlane_Delete;
+ Stg_Class_PrintFunction* _print = _SwarmAdvectionInAPlane_Print;
+ Stg_Class_CopyFunction* _copy = _SwarmAdvectionInAPlane_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _SwarmAdvectionInAPlane_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _SwarmAdvectionInAPlane_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _SwarmAdvector_Build;
+ Stg_Component_InitialiseFunction* _initialise = _SwarmAdvector_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _SwarmAdvector_Execute;
+ Stg_Component_DestroyFunction* _destroy = _SwarmAdvector_Destroy;
+ TimeIntegratee_CalculateTimeDerivFunction* _calculateTimeDeriv = _SwarmAdvectionInAPlane_TimeDeriv;
+ TimeIntegratee_IntermediateFunction* _intermediate = _SwarmAdvector_Intermediate;
+
+ /* 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 = ZERO;
+
+ return (void*) _SwarmAdvectionInAPlane_New( SWARMADVECTIONINAPLANE_PASSARGS );
}
@@ -248,3 +223,5 @@ Bool _SwarmAdvectionInAPlane_TimeDeriv(
*/
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/SwarmAdvectionInAPlane.h
--- a/MaterialPoints/src/SwarmAdvectionInAPlane.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/SwarmAdvectionInAPlane.h Mon Nov 30 02:03:06 2009 +1100
@@ -78,21 +78,18 @@
MaterialPointsSwarm* swarm,
PeriodicBoundariesManager* periodicBCsManager );
- SwarmAdvectionInAPlane* _SwarmAdvectionInAPlane_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- TimeIntegratee_CalculateTimeDerivFunction* _calculateTimeDeriv,
- TimeIntegratee_IntermediateFunction* _intermediate,
- Name name );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define SWARMADVECTIONINAPLANE_DEFARGS \
+ SWARMADVECTOR_DEFARGS
+
+ #define SWARMADVECTIONINAPLANE_PASSARGS \
+ SWARMADVECTOR_PASSARGS
+
+ SwarmAdvectionInAPlane* _SwarmAdvectionInAPlane_New( SWARMADVECTIONINAPLANE_DEFARGS );
void _SwarmAdvectionInAPlane_Init(
SwarmAdvectionInAPlane* self,
@@ -131,3 +128,4 @@ void _SwarmAdvectionInAPlane_AssignFromX
*/
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/SwarmAdvector.c
--- a/MaterialPoints/src/SwarmAdvector.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/SwarmAdvector.c Mon Nov 30 02:03:06 2009 +1100
@@ -85,41 +85,13 @@ SwarmAdvector* SwarmAdvector_New(
return self;
}
-SwarmAdvector* _SwarmAdvector_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- TimeIntegratee_CalculateTimeDerivFunction* _calculateTimeDeriv,
- TimeIntegratee_IntermediateFunction* _intermediate,
- Name name )
+SwarmAdvector* _SwarmAdvector_New( SWARMADVECTOR_DEFARGS )
{
SwarmAdvector* self;
/* Allocate memory */
assert( _sizeOfSelf >= sizeof(SwarmAdvector) );
- self = (SwarmAdvector*)_TimeIntegratee_New(
- _sizeOfSelf,
- type,
- _delete,
- _print,
- _copy,
- _defaultConstructor,
- _construct,
- _build,
- _initialise,
- _execute,
- _destroy,
- _calculateTimeDeriv,
- _intermediate,
- name );
+ self = (SwarmAdvector*)_TimeIntegratee_New( TIMEINTEGRATEE_PASSARGS );
/* General info */
@@ -212,21 +184,25 @@ void* _SwarmAdvector_Copy( void* swarmAd
}
void* _SwarmAdvector_DefaultNew( Name name ) {
- return (void*) _SwarmAdvector_New(
- sizeof(SwarmAdvector),
- SwarmAdvector_Type,
- _SwarmAdvector_Delete,
- _SwarmAdvector_Print,
- _SwarmAdvector_Copy,
- _SwarmAdvector_DefaultNew,
- _SwarmAdvector_AssignFromXML,
- _SwarmAdvector_Build,
- _SwarmAdvector_Initialise,
- _SwarmAdvector_Execute,
- _SwarmAdvector_Destroy,
- _SwarmAdvector_TimeDeriv,
- _SwarmAdvector_Intermediate,
- name );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(SwarmAdvector);
+ Type type = SwarmAdvector_Type;
+ Stg_Class_DeleteFunction* _delete = _SwarmAdvector_Delete;
+ Stg_Class_PrintFunction* _print = _SwarmAdvector_Print;
+ Stg_Class_CopyFunction* _copy = _SwarmAdvector_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _SwarmAdvector_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _SwarmAdvector_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _SwarmAdvector_Build;
+ Stg_Component_InitialiseFunction* _initialise = _SwarmAdvector_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _SwarmAdvector_Execute;
+ Stg_Component_DestroyFunction* _destroy = _SwarmAdvector_Destroy;
+ TimeIntegratee_CalculateTimeDerivFunction* _calculateTimeDeriv = _SwarmAdvector_TimeDeriv;
+ TimeIntegratee_IntermediateFunction* _intermediate = _SwarmAdvector_Intermediate;
+
+ /* 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 = ZERO;
+
+ return (void*) _SwarmAdvector_New( SWARMADVECTOR_PASSARGS );
}
@@ -333,3 +309,5 @@ void SwarmAdvector_AdvectionFinish( Time
*/
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/SwarmAdvector.h
--- a/MaterialPoints/src/SwarmAdvector.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/SwarmAdvector.h Mon Nov 30 02:03:06 2009 +1100
@@ -80,21 +80,18 @@
MaterialPointsSwarm* swarm,
PeriodicBoundariesManager* periodicBCsManager );
- SwarmAdvector* _SwarmAdvector_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- TimeIntegratee_CalculateTimeDerivFunction* _calculateTimeDeriv,
- TimeIntegratee_IntermediateFunction* _intermediate,
- Name name );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define SWARMADVECTOR_DEFARGS \
+ TIMEINTEGRATEE_DEFARGS
+
+ #define SWARMADVECTOR_PASSARGS \
+ TIMEINTEGRATEE_PASSARGS
+
+ SwarmAdvector* _SwarmAdvector_New( SWARMADVECTOR_DEFARGS );
void _SwarmAdvector_Init(
SwarmAdvector* self,
@@ -135,3 +132,4 @@ void _SwarmAdvector_AssignFromXML( void*
*/
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/SwarmVariableField.c
--- a/MaterialPoints/src/SwarmVariableField.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/SwarmVariableField.c Mon Nov 30 02:03:06 2009 +1100
@@ -63,56 +63,14 @@ const Type SwarmVariableField_Type = "Sw
const Type SwarmVariableField_Type = "SwarmVariableField";
/* Creation implementation / Virtual constructor */
-SwarmVariableField* _SwarmVariableField_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- FieldVariable_InterpolateValueAtFunction* _interpolateValueAt,
- FieldVariable_GetValueFunction* _getMinGlobalFeMagnitude,
- FieldVariable_GetValueFunction* _getMaxGlobalFeMagnitude,
- FieldVariable_GetCoordFunction* _getMinAndMaxLocalCoords,
- FieldVariable_GetCoordFunction* _getMinAndMaxGlobalCoords,
- FeVariable_InterpolateWithinElementFunction* _interpolateWithinElement,
- FeVariable_GetValueAtNodeFunction* _getValueAtNode,
- /*SwarmVariableField_GetValueAtNodeFunction* _getValueAtNode,*/
- /*SwarmVariableField_ValueAtParticleFunction* _valueAtParticle,*/
- ParticleFeVariable_ValueAtParticleFunction* _valueAtParticle,
- Name name )
+SwarmVariableField* _SwarmVariableField_New( SWARMVARIABLEFIELD_DEFARGS )
{
SwarmVariableField* self;
/* Allocate memory */
assert( _sizeOfSelf >= sizeof(SwarmVariableField) );
- self = (SwarmVariableField*) _ParticleFeVariable_New(
- _sizeOfSelf,
- type,
- _delete,
- _print,
- _copy,
- _defaultConstructor,
- _construct,
- _build,
- _initialise,
- _execute,
- _destroy,
- _interpolateValueAt,
- _getMinGlobalFeMagnitude,
- _getMaxGlobalFeMagnitude,
- _getMinAndMaxLocalCoords,
- _getMinAndMaxGlobalCoords,
- _interpolateWithinElement,
- _getValueAtNode,
- _valueAtParticle,
- name );
+ self = (SwarmVariableField*) _ParticleFeVariable_New( PARTICLEFEVARIABLE_PASSARGS );
/* Virtual info */
return self;
@@ -137,28 +95,32 @@ void _SwarmVariableField_Print( void* sw
}
void* _SwarmVariableField_DefaultNew( Name name ) {
- return (void*)_SwarmVariableField_New(
- sizeof(SwarmVariableField),
- SwarmVariableField_Type,
- _SwarmVariableField_Delete,
- _SwarmVariableField_Print,
- NULL,
- _SwarmVariableField_DefaultNew,
- _SwarmVariableField_AssignFromXML,
- _SwarmVariableField_Build,
- _SwarmVariableField_Initialise,
- _SwarmVariableField_Execute,
- _SwarmVariableField_Destroy,
- _FeVariable_InterpolateValueAt,
- _FeVariable_GetMinGlobalFieldMagnitude,
- _FeVariable_GetMaxGlobalFieldMagnitude,
- _FeVariable_GetMinAndMaxLocalCoords,
- _FeVariable_GetMinAndMaxGlobalCoords,
- _FeVariable_InterpolateNodeValuesToElLocalCoord,
- _FeVariable_GetValueAtNode,
- /*_SwarmVariableField_GetValueAtNode,*/
- (ParticleFeVariable_ValueAtParticleFunction*)_SwarmVariableField_ValueAtParticle,
- name );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(SwarmVariableField);
+ Type type = SwarmVariableField_Type;
+ Stg_Class_DeleteFunction* _delete = _SwarmVariableField_Delete;
+ Stg_Class_PrintFunction* _print = _SwarmVariableField_Print;
+ Stg_Class_CopyFunction* _copy = NULL;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _SwarmVariableField_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _SwarmVariableField_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _SwarmVariableField_Build;
+ Stg_Component_InitialiseFunction* _initialise = _SwarmVariableField_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _SwarmVariableField_Execute;
+ Stg_Component_DestroyFunction* _destroy = _SwarmVariableField_Destroy;
+ FieldVariable_InterpolateValueAtFunction* _interpolateValueAt = _FeVariable_InterpolateValueAt;
+ FieldVariable_GetCoordFunction* _getMinAndMaxLocalCoords = _FeVariable_GetMinAndMaxLocalCoords;
+ FieldVariable_GetCoordFunction* _getMinAndMaxGlobalCoords = _FeVariable_GetMinAndMaxGlobalCoords;
+ FeVariable_InterpolateWithinElementFunction* _interpolateWithinElement = _FeVariable_InterpolateNodeValuesToElLocalCoord;
+ FeVariable_GetValueAtNodeFunction* _getValueAtNode = _FeVariable_GetValueAtNode;
+ ParticleFeVariable_ValueAtParticleFunction* _valueAtParticle = (ParticleFeVariable_ValueAtParticleFunction*)_SwarmVariableField_ValueAtParticle;
+
+ /* 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 = ZERO;
+ FieldVariable_GetValueFunction* _getMinGlobalFieldMagnitude = ZERO;
+ FieldVariable_GetValueFunction* _getMaxGlobalFieldMagnitude = ZERO;
+ FeVariable_SyncShadowValuesFunc* _syncShadowValues = ZERO;
+
+ return (void*)_SwarmVariableField_New( SWARMVARIABLEFIELD_PASSARGS );
}
void _SwarmVariableField_AssignFromXML( void* swarmVariableField, Stg_ComponentFactory* cf, void* data ) {
@@ -291,3 +253,5 @@ double _SwarmVariableField_GetMaxGlobalM
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/src/SwarmVariableField.h
--- a/MaterialPoints/src/SwarmVariableField.h Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/src/SwarmVariableField.h Mon Nov 30 02:03:06 2009 +1100
@@ -69,29 +69,18 @@
MaterialPointsSwarm* swarm,
Index dofCount );
*/
- SwarmVariableField* _SwarmVariableField_New(
- SizeT sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- FieldVariable_InterpolateValueAtFunction* _interpolateValueAt,
- FieldVariable_GetValueFunction* _getMinGlobalFeMagnitude,
- FieldVariable_GetValueFunction* _getMaxGlobalFeMagnitude,
- FieldVariable_GetCoordFunction* _getMinAndMaxLocalCoords,
- FieldVariable_GetCoordFunction* _getMinAndMaxGlobalCoords,
- FeVariable_InterpolateWithinElementFunction* _interpolateWithinElement,
- FeVariable_GetValueAtNodeFunction* _getValueAtNode,
- /*SwarmVariableField_GetValueAtNodeFunction* _getValueAtNode,*/
- /*SwarmVariableField_ValueAtParticleFunction* _valueAtParticle,*/
- ParticleFeVariable_ValueAtParticleFunction* _valueAtParticle,
- Name name );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define SWARMVARIABLEFIELD_DEFARGS \
+ PARTICLEFEVARIABLE_DEFARGS
+
+ #define SWARMVARIABLEFIELD_PASSARGS \
+ PARTICLEFEVARIABLE_PASSARGS
+
+ SwarmVariableField* _SwarmVariableField_New( SWARMVARIABLEFIELD_DEFARGS );
void _SwarmVariableField_Delete( void* swarmVariable );
void _SwarmVariableField_Print( void* swarmVariable, Stream* stream );
@@ -113,3 +102,4 @@
void _SwarmVariableField_ValueAtParticle( void* swarmVariableField, IntegrationPointsSwarm* swarm, Element_LocalIndex lElement_I, /*Particle_Index lParticle_I*/ IntegrationPoint* particle, double* value );
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/tests/AdvectionSuite.c
--- a/MaterialPoints/tests/AdvectionSuite.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/tests/AdvectionSuite.c Mon Nov 30 02:03:06 2009 +1100
@@ -226,3 +226,5 @@ void AdvectionSuite( pcu_suite_t* suite
pcu_suite_addTest( suite, AdvectionSuite_TestRK2 );
pcu_suite_addTest( suite, AdvectionSuite_TestRK4 );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/tests/MaterialComponentsSuite.c
--- a/MaterialPoints/tests/MaterialComponentsSuite.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/tests/MaterialComponentsSuite.c Mon Nov 30 02:03:06 2009 +1100
@@ -397,3 +397,5 @@ void MaterialComponentsSuite( pcu_suite_
pcu_suite_addTest( suite, MaterialComponentsSuite_TestGetMaterial );
pcu_suite_addTest( suite, MaterialComponentsSuite_TestAssignParticleProperties );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/tests/MaterialFeVariableSuite.c
--- a/MaterialPoints/tests/MaterialFeVariableSuite.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/tests/MaterialFeVariableSuite.c Mon Nov 30 02:03:06 2009 +1100
@@ -95,3 +95,5 @@ void MaterialFeVariableSuite( pcu_suite_
pcu_suite_setFixtures( suite, MaterialFeVariableSuite_Setup, MaterialFeVariableSuite_Teardown );
pcu_suite_addTest( suite, MaterialFeVariableSuite_TestVolume );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 MaterialPoints/tests/PeriodicBoundariesManagerSuite.c
--- a/MaterialPoints/tests/PeriodicBoundariesManagerSuite.c Fri Nov 27 16:20:09 2009 +1100
+++ b/MaterialPoints/tests/PeriodicBoundariesManagerSuite.c Mon Nov 30 02:03:06 2009 +1100
@@ -150,3 +150,5 @@ void UpdateParticlePositionsToLeft( Swar
}
Stream_UnIndent( debugStream );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 PopulationControl/src/EscapedRoutine.c
--- a/PopulationControl/src/EscapedRoutine.c Fri Nov 27 16:20:09 2009 +1100
+++ b/PopulationControl/src/EscapedRoutine.c Mon Nov 30 02:03:06 2009 +1100
@@ -60,39 +60,18 @@ const Type EscapedRoutine_Type = "Escape
** Constructors
*/
-EscapedRoutine* _EscapedRoutine_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- EscapedRoutine_SelectFunction* _select,
- Name name )
+EscapedRoutine* _EscapedRoutine_New( ESCAPEDROUTINE_DEFARGS )
{
EscapedRoutine* self;
/* Allocate memory */
assert( _sizeOfSelf >= sizeof(EscapedRoutine) );
- self = (EscapedRoutine*)_Stg_Component_New(
- _sizeOfSelf,
- type,
- _delete,
- _print,
- _copy,
- _defaultConstructor,
- _construct,
- _build,
- _initialise,
- _execute,
- _destroy,
- name ,
- NON_GLOBAL );
+ /* The following terms are parameters that have been passed into this function but are being set before being passed onto the parent */
+ /* This means that any values of these parameters that are passed into this function are not passed onto the parent function
+ and so should be set to ZERO in any children of this class. */
+ nameAllocationType = NON_GLOBAL;
+
+ self = (EscapedRoutine*)_Stg_Component_New( STG_COMPONENT_PASSARGS );
/* General info */
@@ -103,20 +82,24 @@ EscapedRoutine* _EscapedRoutine_New(
}
void* _EscapedRoutine_DefaultNew( Name name ) {
- return (void*) _EscapedRoutine_New(
- sizeof(EscapedRoutine),
- EscapedRoutine_Type,
- _EscapedRoutine_Delete,
- _EscapedRoutine_Print,
- _EscapedRoutine_Copy,
- _EscapedRoutine_DefaultNew,
- _EscapedRoutine_AssignFromXML,
- _EscapedRoutine_Build,
- _EscapedRoutine_Initialise,
- _EscapedRoutine_Execute,
- _EscapedRoutine_Destroy,
- _EscapedRoutine_Select,
- name );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(EscapedRoutine);
+ Type type = EscapedRoutine_Type;
+ Stg_Class_DeleteFunction* _delete = _EscapedRoutine_Delete;
+ Stg_Class_PrintFunction* _print = _EscapedRoutine_Print;
+ Stg_Class_CopyFunction* _copy = _EscapedRoutine_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _EscapedRoutine_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _EscapedRoutine_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _EscapedRoutine_Build;
+ Stg_Component_InitialiseFunction* _initialise = _EscapedRoutine_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _EscapedRoutine_Execute;
+ Stg_Component_DestroyFunction* _destroy = _EscapedRoutine_Destroy;
+ EscapedRoutine_SelectFunction* _select = _EscapedRoutine_Select;
+
+ /* 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 = ZERO;
+
+ return (void*) _EscapedRoutine_New( ESCAPEDROUTINE_PASSARGS );
}
void _EscapedRoutine_Init(
@@ -342,3 +325,5 @@ void EscapedRoutine_RemoveParticles( voi
Swarm_Realloc( swarm );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 PopulationControl/src/EscapedRoutine.h
--- a/PopulationControl/src/EscapedRoutine.h Fri Nov 27 16:20:09 2009 +1100
+++ b/PopulationControl/src/EscapedRoutine.h Mon Nov 30 02:03:06 2009 +1100
@@ -79,20 +79,20 @@
/*---------------------------------------------------------------------------------------------------------------------
** Constructors
*/
- EscapedRoutine* _EscapedRoutine_New(
- SizeT _sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- EscapedRoutine_SelectFunction* _select,
- Name name );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define ESCAPEDROUTINE_DEFARGS \
+ STG_COMPONENT_DEFARGS, \
+ EscapedRoutine_SelectFunction* _select
+
+ #define ESCAPEDROUTINE_PASSARGS \
+ STG_COMPONENT_PASSARGS, \
+ _select
+
+ EscapedRoutine* _EscapedRoutine_New( ESCAPEDROUTINE_DEFARGS );
void* _EscapedRoutine_DefaultNew( Name name );
@@ -126,3 +126,4 @@
void EscapedRoutine_RemoveParticles( void* escapedRoutine, Swarm* swarm ) ;
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 PopulationControl/src/Finalise.c
--- a/PopulationControl/src/Finalise.c Fri Nov 27 16:20:09 2009 +1100
+++ b/PopulationControl/src/Finalise.c Mon Nov 30 02:03:06 2009 +1100
@@ -57,3 +57,5 @@ Bool PICellerator_PopulationControl_Fina
return True;
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 PopulationControl/src/Init.c
--- a/PopulationControl/src/Init.c Fri Nov 27 16:20:09 2009 +1100
+++ b/PopulationControl/src/Init.c Mon Nov 30 02:03:06 2009 +1100
@@ -61,3 +61,5 @@ Bool PICellerator_PopulationControl_Init
return True;
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 PopulationControl/tests/EscapedRoutineSuite.c
--- a/PopulationControl/tests/EscapedRoutineSuite.c Fri Nov 27 16:20:09 2009 +1100
+++ b/PopulationControl/tests/EscapedRoutineSuite.c Mon Nov 30 02:03:06 2009 +1100
@@ -201,3 +201,5 @@ void EscapedRoutineSuite( pcu_suite_t* s
pcu_suite_addTest( suite, EscapedRoutineSuite_TestRemoveParticles );
pcu_suite_addTest( suite, EscapedRoutineSuite_TestExecuteBadInput );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 SysTest/AnalyticPlugins/AnalyticPressure/AnalyticPressure.c
--- a/SysTest/AnalyticPlugins/AnalyticPressure/AnalyticPressure.c Fri Nov 27 16:20:09 2009 +1100
+++ b/SysTest/AnalyticPlugins/AnalyticPressure/AnalyticPressure.c Mon Nov 30 02:03:06 2009 +1100
@@ -82,21 +82,27 @@ void _AnalyticPressure_Build( void* _sel
}
void* _AnalyticPressure_DefaultNew( Name name ) {
- return _FieldTest_New(
- sizeof(AnalyticPressure),
- AnalyticPressure_Type,
- _FieldTest_Delete,
- _FieldTest_Print,
- _FieldTest_Copy,
- _AnalyticPressure_DefaultNew,
- _AnalyticPressure_AssignFromXML,
- _AnalyticPressure_Build,
- _FieldTest_Initialise,
- _FieldTest_Execute,
- _FieldTest_Destroy,
- name );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(AnalyticPressure);
+ Type type = AnalyticPressure_Type;
+ Stg_Class_DeleteFunction* _delete = _FieldTest_Delete;
+ Stg_Class_PrintFunction* _print = _FieldTest_Print;
+ Stg_Class_CopyFunction* _copy = _FieldTest_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _AnalyticPressure_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _AnalyticPressure_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _AnalyticPressure_Build;
+ Stg_Component_InitialiseFunction* _initialise = _FieldTest_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _FieldTest_Execute;
+ Stg_Component_DestroyFunction* _destroy = _FieldTest_Destroy;
+
+ /* 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 = ZERO;
+
+ return _FieldTest_New( FIELDTEST_PASSARGS );
}
Index PICellerator_AnalyticPressure_Register( PluginsManager* pluginsManager ) {
return PluginsManager_Submit( pluginsManager, AnalyticPressure_Type, "0", _AnalyticPressure_DefaultNew );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Utils/src/BuoyancyForceTerm.c
--- a/Utils/src/BuoyancyForceTerm.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Utils/src/BuoyancyForceTerm.c Mon Nov 30 02:03:06 2009 +1100
@@ -81,41 +81,18 @@ BuoyancyForceTerm* BuoyancyForceTerm_New
}
/* Creation implementation / Virtual constructor */
-BuoyancyForceTerm* _BuoyancyForceTerm_New(
- SizeT sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- ForceTerm_AssembleElementFunction* _assembleElement,
- BuoyancyForceTerm_CalcGravityFunction* _calcGravity,
- Name name )
+BuoyancyForceTerm* _BuoyancyForceTerm_New( BUOYANCYFORCETERM_DEFARGS )
{
BuoyancyForceTerm* self;
/* Allocate memory */
- assert( sizeOfSelf >= sizeof(BuoyancyForceTerm) );
- self = (BuoyancyForceTerm*) _ForceTerm_New(
- sizeOfSelf,
- type,
- _delete,
- _print,
- _copy,
- _defaultConstructor,
- _construct,
- _build,
- _initialise,
- _execute,
- _destroy,
- name,
- NON_GLOBAL,
- _assembleElement );
+ assert( _sizeOfSelf >= sizeof(BuoyancyForceTerm) );
+ /* The following terms are parameters that have been passed into this function but are being set before being passed onto the parent */
+ /* This means that any values of these parameters that are passed into this function are not passed onto the parent function
+ and so should be set to ZERO in any children of this class. */
+ nameAllocationType = NON_GLOBAL;
+
+ self = (BuoyancyForceTerm*) _ForceTerm_New( FORCETERM_PASSARGS );
/* Virtual info */
self->_calcGravity = _calcGravity;
@@ -156,21 +133,25 @@ void _BuoyancyForceTerm_Print( void* for
}
void* _BuoyancyForceTerm_DefaultNew( Name name ) {
- return (void*)_BuoyancyForceTerm_New(
- sizeof(BuoyancyForceTerm),
- BuoyancyForceTerm_Type,
- _BuoyancyForceTerm_Delete,
- _BuoyancyForceTerm_Print,
- NULL,
- _BuoyancyForceTerm_DefaultNew,
- _BuoyancyForceTerm_AssignFromXML,
- _BuoyancyForceTerm_Build,
- _BuoyancyForceTerm_Initialise,
- _BuoyancyForceTerm_Execute,
- _BuoyancyForceTerm_Destroy,
- _BuoyancyForceTerm_AssembleElement,
- _BuoyancyForceTerm_CalcGravity,
- name );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(BuoyancyForceTerm);
+ Type type = BuoyancyForceTerm_Type;
+ Stg_Class_DeleteFunction* _delete = _BuoyancyForceTerm_Delete;
+ Stg_Class_PrintFunction* _print = _BuoyancyForceTerm_Print;
+ Stg_Class_CopyFunction* _copy = NULL;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _BuoyancyForceTerm_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _BuoyancyForceTerm_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _BuoyancyForceTerm_Build;
+ Stg_Component_InitialiseFunction* _initialise = _BuoyancyForceTerm_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _BuoyancyForceTerm_Execute;
+ Stg_Component_DestroyFunction* _destroy = _BuoyancyForceTerm_Destroy;
+ ForceTerm_AssembleElementFunction* _assembleElement = _BuoyancyForceTerm_AssembleElement;
+ BuoyancyForceTerm_CalcGravityFunction* _calcGravity = _BuoyancyForceTerm_CalcGravity;
+
+ /* 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 = ZERO;
+
+ return (void*)_BuoyancyForceTerm_New( BUOYANCYFORCETERM_PASSARGS );
}
void _BuoyancyForceTerm_AssignFromXML( void* forceTerm, Stg_ComponentFactory* cf, void* data ) {
@@ -422,3 +403,5 @@ double _BuoyancyForceTerm_CalcGravity( v
return self->gravity;
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Utils/src/BuoyancyForceTerm.h
--- a/Utils/src/BuoyancyForceTerm.h Fri Nov 27 16:20:09 2009 +1100
+++ b/Utils/src/BuoyancyForceTerm.h Mon Nov 30 02:03:06 2009 +1100
@@ -85,21 +85,20 @@
Bool adjust,
Materials_Register* materials_Register );
- BuoyancyForceTerm* _BuoyancyForceTerm_New(
- SizeT sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- ForceTerm_AssembleElementFunction* _assembleElement,
- BuoyancyForceTerm_CalcGravityFunction* _calcGravity,
- Name name );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define BUOYANCYFORCETERM_DEFARGS \
+ FORCETERM_DEFARGS, \
+ BuoyancyForceTerm_CalcGravityFunction* _calcGravity
+
+ #define BUOYANCYFORCETERM_PASSARGS \
+ FORCETERM_PASSARGS, \
+ _calcGravity
+
+ BuoyancyForceTerm* _BuoyancyForceTerm_New( BUOYANCYFORCETERM_DEFARGS );
void _BuoyancyForceTerm_Init(
void* forceTerm,
@@ -132,3 +131,4 @@
(( (BuoyancyForceTerm*) forceTerm )->_calcGravity( forceTerm, swarm, lElement_I, particle ) )
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 Utils/src/BuoyancyForceTermThermoChem.c
--- a/Utils/src/BuoyancyForceTermThermoChem.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Utils/src/BuoyancyForceTermThermoChem.c Mon Nov 30 02:03:06 2009 +1100
@@ -82,61 +82,41 @@ BuoyancyForceTermThermoChem* BuoyancyFor
}
void* _BuoyancyForceTermThermoChem_DefaultNew( Name name ) {
- return (void*)_BuoyancyForceTermThermoChem_New(
- sizeof(BuoyancyForceTermThermoChem),
- BuoyancyForceTermThermoChem_Type,
- _BuoyancyForceTermThermoChem_Delete,
- _BuoyancyForceTermThermoChem_Print,
- NULL,
- _BuoyancyForceTermThermoChem_DefaultNew,
- _BuoyancyForceTermThermoChem_AssignFromXML,
- _BuoyancyForceTermThermoChem_Build,
- _BuoyancyForceTermThermoChem_Initialise,
- _BuoyancyForceTermThermoChem_Execute,
- _BuoyancyForceTermThermoChem_Destroy,
- _BuoyancyForceTermThermoChem_AssembleElement,
- _BuoyancyForceTermThermoChem_CalcRaT,
- _BuoyancyForceTermThermoChem_CalcRaC,
- name );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(BuoyancyForceTermThermoChem);
+ Type type = BuoyancyForceTermThermoChem_Type;
+ Stg_Class_DeleteFunction* _delete = _BuoyancyForceTermThermoChem_Delete;
+ Stg_Class_PrintFunction* _print = _BuoyancyForceTermThermoChem_Print;
+ Stg_Class_CopyFunction* _copy = NULL;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _BuoyancyForceTermThermoChem_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _BuoyancyForceTermThermoChem_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _BuoyancyForceTermThermoChem_Build;
+ Stg_Component_InitialiseFunction* _initialise = _BuoyancyForceTermThermoChem_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _BuoyancyForceTermThermoChem_Execute;
+ Stg_Component_DestroyFunction* _destroy = _BuoyancyForceTermThermoChem_Destroy;
+ ForceTerm_AssembleElementFunction* _assembleElement = _BuoyancyForceTermThermoChem_AssembleElement;
+ BuoyancyForceTermThermoChem_CalcRaTFunction* _calcRaT = _BuoyancyForceTermThermoChem_CalcRaT;
+ BuoyancyForceTermThermoChem_CalcRaCFunction* _calcRaC = _BuoyancyForceTermThermoChem_CalcRaC;
+
+ /* 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 = ZERO;
+
+ return (void*)_BuoyancyForceTermThermoChem_New( BUOYANCYFORCETERMTHERMOCHEM_PASSARGS );
}
/* Creation implementation / Virtual constructor */
-BuoyancyForceTermThermoChem* _BuoyancyForceTermThermoChem_New(
- SizeT sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- ForceTerm_AssembleElementFunction* _assembleElement,
- BuoyancyForceTermThermoChem_CalcRaTFunction* _calcRaT,
- BuoyancyForceTermThermoChem_CalcRaCFunction* _calcRaC,
- Name name )
+BuoyancyForceTermThermoChem* _BuoyancyForceTermThermoChem_New( BUOYANCYFORCETERMTHERMOCHEM_DEFARGS )
{
BuoyancyForceTermThermoChem* self;
/* Allocate memory */
- assert( sizeOfSelf >= sizeof(BuoyancyForceTermThermoChem) );
- self = (BuoyancyForceTermThermoChem*) _ForceTerm_New(
- sizeOfSelf,
- type,
- _delete,
- _print,
- _copy,
- _defaultConstructor,
- _construct,
- _build,
- _initialise,
- _execute,
- _destroy,
- name,
- NON_GLOBAL,
- _assembleElement );
+ assert( _sizeOfSelf >= sizeof(BuoyancyForceTermThermoChem) );
+ /* The following terms are parameters that have been passed into this function but are being set before being passed onto the parent */
+ /* This means that any values of these parameters that are passed into this function are not passed onto the parent function
+ and so should be set to ZERO in any children of this class. */
+ nameAllocationType = NON_GLOBAL;
+
+ self = (BuoyancyForceTermThermoChem*) _ForceTerm_New( FORCETERM_PASSARGS );
/* Virtual info */
self->_calcRaT = _calcRaT;
@@ -377,3 +357,5 @@ double _BuoyancyForceTermThermoChem_Calc
return self->RaC;
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Utils/src/BuoyancyForceTermThermoChem.h
--- a/Utils/src/BuoyancyForceTermThermoChem.h Fri Nov 27 16:20:09 2009 +1100
+++ b/Utils/src/BuoyancyForceTermThermoChem.h Mon Nov 30 02:03:06 2009 +1100
@@ -96,22 +96,22 @@
Bool adjust,
Materials_Register* materials_Register );
- BuoyancyForceTermThermoChem* _BuoyancyForceTermThermoChem_New(
- SizeT sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- ForceTerm_AssembleElementFunction* _assembleElement,
- BuoyancyForceTermThermoChem_CalcRaTFunction* _calcRaT,
- BuoyancyForceTermThermoChem_CalcRaCFunction* _calcRaC,
- Name name );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define BUOYANCYFORCETERMTHERMOCHEM_DEFARGS \
+ FORCETERM_DEFARGS, \
+ BuoyancyForceTermThermoChem_CalcRaTFunction* _calcRaT, \
+ BuoyancyForceTermThermoChem_CalcRaCFunction* _calcRaC
+
+ #define BUOYANCYFORCETERMTHERMOCHEM_PASSARGS \
+ FORCETERM_PASSARGS, \
+ _calcRaT, \
+ _calcRaC
+
+ BuoyancyForceTermThermoChem* _BuoyancyForceTermThermoChem_New( BUOYANCYFORCETERMTHERMOCHEM_DEFARGS );
void _BuoyancyForceTermThermoChem_Init(
BuoyancyForceTermThermoChem* self,
@@ -150,3 +150,4 @@
(( (BuoyancyForceTermThermoChem*) forceTerm )->_calcRaC( forceTerm, swarm, lElement_I, particle ) )
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 Utils/src/DiffusionSMT.c
--- a/Utils/src/DiffusionSMT.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Utils/src/DiffusionSMT.c Mon Nov 30 02:03:06 2009 +1100
@@ -73,39 +73,13 @@ DiffusionSMT* DiffusionSMT_New(
}
/* Creation implementation / Virtual constructor */
-DiffusionSMT* _DiffusionSMT_New(
- SizeT sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- StiffnessMatrixTerm_AssembleElementFunction* _assembleElement,
- Name name )
+DiffusionSMT* _DiffusionSMT_New( DIFFUSIONSMT_DEFARGS )
{
DiffusionSMT* self;
/* Allocate memory */
- assert( sizeOfSelf >= sizeof(DiffusionSMT) );
- self = (DiffusionSMT*) _StiffnessMatrixTerm_New(
- sizeOfSelf,
- type,
- _delete,
- _print,
- _copy,
- _defaultConstructor,
- _construct,
- _build,
- _initialise,
- _execute,
- _destroy,
- _assembleElement,
- name );
+ assert( _sizeOfSelf >= sizeof(DiffusionSMT) );
+ self = (DiffusionSMT*) _StiffnessMatrixTerm_New( STIFFNESSMATRIXTERM_PASSARGS );
/* Virtual info */
@@ -135,20 +109,24 @@ void _DiffusionSMT_Print( void* matrixTe
}
void* _DiffusionSMT_DefaultNew( Name name ) {
- return (void*)_DiffusionSMT_New(
- sizeof(DiffusionSMT),
- DiffusionSMT_Type,
- _DiffusionSMT_Delete,
- _DiffusionSMT_Print,
- NULL,
- _DiffusionSMT_DefaultNew,
- _DiffusionSMT_AssignFromXML,
- _DiffusionSMT_Build,
- _DiffusionSMT_Initialise,
- _DiffusionSMT_Execute,
- _DiffusionSMT_Destroy,
- _DiffusionSMT_AssembleElement,
- name );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(DiffusionSMT);
+ Type type = DiffusionSMT_Type;
+ Stg_Class_DeleteFunction* _delete = _DiffusionSMT_Delete;
+ Stg_Class_PrintFunction* _print = _DiffusionSMT_Print;
+ Stg_Class_CopyFunction* _copy = NULL;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _DiffusionSMT_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _DiffusionSMT_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _DiffusionSMT_Build;
+ Stg_Component_InitialiseFunction* _initialise = _DiffusionSMT_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _DiffusionSMT_Execute;
+ Stg_Component_DestroyFunction* _destroy = _DiffusionSMT_Destroy;
+ StiffnessMatrixTerm_AssembleElementFunction* _assembleElement = _DiffusionSMT_AssembleElement;
+
+ /* 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 = ZERO;
+
+ return (void*)_DiffusionSMT_New( DIFFUSIONSMT_PASSARGS );
}
void _DiffusionSMT_AssignFromXML( void* matrixTerm, Stg_ComponentFactory* cf, void* data ) {
@@ -316,3 +294,5 @@ void _DiffusionSMT_AssembleElement(
Memory_Free(GNx);
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Utils/src/DiffusionSMT.h
--- a/Utils/src/DiffusionSMT.h Fri Nov 27 16:20:09 2009 +1100
+++ b/Utils/src/DiffusionSMT.h Mon Nov 30 02:03:06 2009 +1100
@@ -70,20 +70,18 @@ extern const Type DiffusionSMT_Type;
StiffnessMatrix* stiffnessMatrix,
Swarm* integrationSwarm );
- DiffusionSMT* _DiffusionSMT_New(
- SizeT sizeOfSelf,
- Type type,
- Stg_Class_DeleteFunction* _delete,
- Stg_Class_PrintFunction* _print,
- Stg_Class_CopyFunction* _copy,
- Stg_Component_DefaultConstructorFunction* _defaultConstructor,
- Stg_Component_ConstructFunction* _construct,
- Stg_Component_BuildFunction* _build,
- Stg_Component_InitialiseFunction* _initialise,
- Stg_Component_ExecuteFunction* _execute,
- Stg_Component_DestroyFunction* _destroy,
- StiffnessMatrixTerm_AssembleElementFunction* _assembleElement,
- Name name );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define DIFFUSIONSMT_DEFARGS \
+ STIFFNESSMATRIXTERM_DEFARGS
+
+ #define DIFFUSIONSMT_PASSARGS \
+ STIFFNESSMATRIXTERM_PASSARGS
+
+ DiffusionSMT* _DiffusionSMT_New( DIFFUSIONSMT_DEFARGS );
void _DiffusionSMT_Init( void* matrixTerm );
@@ -112,3 +110,4 @@ extern const Type DiffusionSMT_Type;
double** elStiffMat ) ;
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 Utils/src/Finalise.c
--- a/Utils/src/Finalise.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Utils/src/Finalise.c Mon Nov 30 02:03:06 2009 +1100
@@ -57,3 +57,5 @@ Bool PICellerator_Utils_Finalise( void )
return True;
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Utils/src/Init.c
--- a/Utils/src/Init.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Utils/src/Init.c Mon Nov 30 02:03:06 2009 +1100
@@ -70,3 +70,5 @@ Bool PICellerator_Utils_Init( int* argc,
RegisterParent( PCDVC_Type, DVCWeights_Type );
return True;
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Utils/src/MaterialSwarmVariable.c
--- a/Utils/src/MaterialSwarmVariable.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Utils/src/MaterialSwarmVariable.c Mon Nov 30 02:03:06 2009 +1100
@@ -79,32 +79,33 @@ MaterialSwarmVariable* MaterialSwarmVari
}
void* _MaterialSwarmVariable_DefaultNew( Name name ) {
- return (void*)_MaterialSwarmVariable_New(
- sizeof(MaterialSwarmVariable),
- MaterialSwarmVariable_Type,
- _MaterialSwarmVariable_Delete,
- _MaterialSwarmVariable_Print,
- NULL,
- _MaterialSwarmVariable_DefaultNew,
- _MaterialSwarmVariable_AssignFromXML,
- _MaterialSwarmVariable_Build,
- _MaterialSwarmVariable_Initialise,
- _MaterialSwarmVariable_Execute,
- _MaterialSwarmVariable_Destroy,
- name,
- NON_GLOBAL,
- _MaterialSwarmVariable_ValueAt,
- _MaterialSwarmVariable_GetMinGlobalMagnitude,
- _MaterialSwarmVariable_GetMaxGlobalMagnitude );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(MaterialSwarmVariable);
+ Type type = MaterialSwarmVariable_Type;
+ Stg_Class_DeleteFunction* _delete = _MaterialSwarmVariable_Delete;
+ Stg_Class_PrintFunction* _print = _MaterialSwarmVariable_Print;
+ Stg_Class_CopyFunction* _copy = NULL;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _MaterialSwarmVariable_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _MaterialSwarmVariable_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _MaterialSwarmVariable_Build;
+ Stg_Component_InitialiseFunction* _initialise = _MaterialSwarmVariable_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _MaterialSwarmVariable_Execute;
+ Stg_Component_DestroyFunction* _destroy = _MaterialSwarmVariable_Destroy;
+ AllocationType nameAllocationType = NON_GLOBAL;
+ SwarmVariable_ValueAtFunction* _valueAt = _MaterialSwarmVariable_ValueAt;
+ SwarmVariable_GetGlobalValueFunction* _getMinGlobalMagnitude = _MaterialSwarmVariable_GetMinGlobalMagnitude;
+ SwarmVariable_GetGlobalValueFunction* _getMaxGlobalMagnitude = _MaterialSwarmVariable_GetMaxGlobalMagnitude;
+
+ return (void*)_MaterialSwarmVariable_New( MATERIALSWARMVARIABLE_PASSARGS );
}
/* Creation implementation / Virtual constructor */
-MaterialSwarmVariable* _MaterialSwarmVariable_New( MATERIALSWARMVARIABLE_DEFARGS ) {
+MaterialSwarmVariable* _MaterialSwarmVariable_New( MATERIALSWARMVARIABLE_DEFARGS ) {
MaterialSwarmVariable* self;
/* Allocate memory */
- assert( sizeOfSelf >= sizeof(MaterialSwarmVariable) );
- self = (MaterialSwarmVariable*) _SwarmVariable_New( SWARMVARIABLE_PASSARGS );
+ assert( _sizeOfSelf >= sizeof(MaterialSwarmVariable) );
+ self = (MaterialSwarmVariable*) _SwarmVariable_New( SWARMVARIABLE_PASSARGS );
/* Virtual info */
@@ -203,3 +204,5 @@ double _MaterialSwarmVariable_GetMaxGlob
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Utils/src/MaterialSwarmVariable.h
--- a/Utils/src/MaterialSwarmVariable.h Fri Nov 27 16:20:09 2009 +1100
+++ b/Utils/src/MaterialSwarmVariable.h Mon Nov 30 02:03:06 2009 +1100
@@ -59,11 +59,7 @@
struct MaterialSwarmVariable { __MaterialSwarmVariable };
- #define MATERIALSWARMVARIABLE_DEFARGS \
- SWARMVARIABLE_DEFARGS
- #define MATERIALSWARMVARIABLE_PASSARGS \
- SWARMVARIABLE_PASSARGS
MaterialSwarmVariable* MaterialSwarmVariable_New(
Name name,
@@ -74,7 +70,18 @@
ExtensionInfo_Index materialExtensionHandle,
SizeT offset );
- MaterialSwarmVariable* _MaterialSwarmVariable_New( MATERIALSWARMVARIABLE_DEFARGS );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define MATERIALSWARMVARIABLE_DEFARGS \
+ SWARMVARIABLE_DEFARGS
+
+ #define MATERIALSWARMVARIABLE_PASSARGS \
+ SWARMVARIABLE_PASSARGS
+
+ MaterialSwarmVariable* _MaterialSwarmVariable_New( MATERIALSWARMVARIABLE_DEFARGS );
void _MaterialSwarmVariable_Init(
void* swarmVariable,
@@ -105,3 +112,4 @@
double _MaterialSwarmVariable_GetMaxGlobalMagnitude( void* swarmVariable );
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 Utils/src/PCDVC.c
--- a/Utils/src/PCDVC.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Utils/src/PCDVC.c Mon Nov 30 02:03:06 2009 +1100
@@ -137,14 +137,14 @@ PCDVC* PCDVC_New( Name name, Dimension_I
Inflow, CentPosRatio, ParticlesPerCell, Threshold );
}
-PCDVC* _PCDVC_New( PCDVC_DEFARGS ) {
+PCDVC* _PCDVC_New( PCDVC_DEFARGS ) {
PCDVC* self;
/* Allocate memory */
- assert( sizeOfSelf >= sizeof(PCDVC) );
+ assert( _sizeOfSelf >= sizeof(PCDVC) );
/* Initialise the parent class. Every class has a parent, bar Stg_Component, which needs to be called */
- self = (PCDVC*)_DVCWeights_New( DVCWEIGHTS_PASSARGS );
+ self = (PCDVC*)_DVCWeights_New( DVCWEIGHTS_PASSARGS );
/* General info */
@@ -201,23 +201,22 @@ void* _PCDVC_Copy( void* pcdvc, void* de
}
void* _PCDVC_DefaultNew( Name name ) {
- return (void*) _PCDVC_New(
- sizeof(PCDVC),
- PCDVC_Type,
- _PCDVC_Delete,
- _PCDVC_Print,
- _PCDVC_Copy,
- _PCDVC_DefaultNew,
- _PCDVC_AssignFromXML,
- _PCDVC_Build,
- _PCDVC_Initialise,
- _PCDVC_Execute,
- NULL,
- name,
- NON_GLOBAL,
- _PCDVC_Calculate,
- 0, NULL, NULL, 0.0, 0.0, 0, 0, False, False, False,
- 0.0, 0, 0.0 );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(PCDVC);
+ Type type = PCDVC_Type;
+ Stg_Class_DeleteFunction* _delete = _PCDVC_Delete;
+ Stg_Class_PrintFunction* _print = _PCDVC_Print;
+ Stg_Class_CopyFunction* _copy = _PCDVC_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _PCDVC_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _PCDVC_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _PCDVC_Build;
+ Stg_Component_InitialiseFunction* _initialise = _PCDVC_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _PCDVC_Execute;
+ Stg_Component_DestroyFunction* _destroy = NULL;
+ AllocationType nameAllocationType = NON_GLOBAL;
+ WeightsCalculator_CalculateFunction* _calculate = _PCDVC_Calculate;
+
+ return (void*) _PCDVC_New( PCDVC_PASSARGS );
}
@@ -1598,3 +1597,5 @@ void _PCDVC_Calculate( void* pcdvc, void
** Public Functions
*/
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Utils/src/PCDVC.h
--- a/Utils/src/PCDVC.h Fri Nov 27 16:20:09 2009 +1100
+++ b/Utils/src/PCDVC.h Mon Nov 30 02:03:06 2009 +1100
@@ -114,25 +114,7 @@ struct deleteParticle{
** Constructors
*/
-#define PCDVC_DEFARGS \
- DVCWEIGHTS_DEFARGS, \
- MaterialPointsSwarm* mps, \
- double upT, \
- double lowT, \
- int maxDeletions, \
- int maxSplits, \
- Bool splitInInterfaceCells, \
- Bool deleteInInterfaceCells, \
- Bool Inflow, \
- double CentPosRatio, \
- int ParticlesPerCell, \
- double Threshold
-#define PCDVC_PASSARGS \
- DVCWEIGHTS_PASSARGS, \
- mps, upT, lowT, maxDeletions, maxSplits, splitInInterfaceCells, \
- deleteInInterfaceCells, Inflow, CentPosRatio, ParticlesPerCell, \
- Threshold
PCDVC* PCDVC_New( Name name, Dimension_Index dim, int* res,
MaterialPointsSwarm* mps, double upT, double lowT,
@@ -141,7 +123,18 @@ PCDVC* PCDVC_New( Name name, Dimension_I
int ParticlesPerCell, double Threshold ) ;
-PCDVC* _PCDVC_New( PCDVC_DEFARGS );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define PCDVC_DEFARGS \
+ DVCWEIGHTS_DEFARGS
+
+ #define PCDVC_PASSARGS \
+ DVCWEIGHTS_PASSARGS
+
+PCDVC* _PCDVC_New( PCDVC_DEFARGS );
void _PCDVC_Init( void* pcdvc, MaterialPointsSwarm* mps, double upT, double lowT,
int maxDeletions, int maxSplits, Bool splitInInterfaceCells,
@@ -175,3 +168,4 @@ void _PCDVC_Calculate( void* pcdvc, void
void _PCDVC_Calculate( void* pcdvc, void* _swarm, Cell_LocalIndex lCell_I ) ;
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 Utils/tests/PCDVCSuite.c
--- a/Utils/tests/PCDVCSuite.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Utils/tests/PCDVCSuite.c Mon Nov 30 02:03:06 2009 +1100
@@ -343,3 +343,5 @@ void PCDVCSuite( pcu_suite_t* suite ) {
pcu_suite_setFixtures( suite, PCDVCSuite_Setup, PCDVCSuite_Teardown );
pcu_suite_addTest( suite, PCDVCSuite_Test );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/src/ConstantWeights.c
--- a/Weights/src/ConstantWeights.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/src/ConstantWeights.c Mon Nov 30 02:03:06 2009 +1100
@@ -71,12 +71,12 @@ ConstantWeights* ConstantWeights_New( Na
_ConstantWeights_Init( self );
}
-ConstantWeights* _ConstantWeights_New( CONSTANTWEIGHTS_DEFARGS ) {
+ConstantWeights* _ConstantWeights_New( CONSTANTWEIGHTS_DEFARGS ) {
ConstantWeights* self;
/* Allocate memory */
- assert( sizeOfSelf >= sizeof(ConstantWeights) );
- self = (ConstantWeights*)_WeightsCalculator_New( WEIGHTSCALCULATOR_PASSARGS );
+ assert( _sizeOfSelf >= sizeof(ConstantWeights) );
+ self = (ConstantWeights*)_WeightsCalculator_New( WEIGHTSCALCULATOR_PASSARGS );
/* General info */
@@ -121,22 +121,22 @@ void* _ConstantWeights_Copy( void* const
}
void* _ConstantWeights_DefaultNew( Name name ) {
- return (void*) _ConstantWeights_New(
- sizeof(ConstantWeights),
- ConstantWeights_Type,
- _ConstantWeights_Delete,
- _ConstantWeights_Print,
- _ConstantWeights_Copy,
- _ConstantWeights_DefaultNew,
- _ConstantWeights_AssignFromXML,
- _ConstantWeights_Build,
- _ConstantWeights_Initialise,
- _ConstantWeights_Execute,
- _ConstantWeights_Destroy,
- name,
- NON_GLOBAL,
- _ConstantWeights_Calculate,
- 0 );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(ConstantWeights);
+ Type type = ConstantWeights_Type;
+ Stg_Class_DeleteFunction* _delete = _ConstantWeights_Delete;
+ Stg_Class_PrintFunction* _print = _ConstantWeights_Print;
+ Stg_Class_CopyFunction* _copy = _ConstantWeights_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _ConstantWeights_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _ConstantWeights_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _ConstantWeights_Build;
+ Stg_Component_InitialiseFunction* _initialise = _ConstantWeights_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _ConstantWeights_Execute;
+ Stg_Component_DestroyFunction* _destroy = _ConstantWeights_Destroy;
+ AllocationType nameAllocationType = NON_GLOBAL;
+ WeightsCalculator_CalculateFunction* _calculate = _ConstantWeights_Calculate;
+
+ return (void*) _ConstantWeights_New( CONSTANTWEIGHTS_PASSARGS );
}
@@ -190,3 +190,5 @@ void _ConstantWeights_Calculate( void* c
*/
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/src/ConstantWeights.h
--- a/Weights/src/ConstantWeights.h Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/src/ConstantWeights.h Mon Nov 30 02:03:06 2009 +1100
@@ -71,15 +71,22 @@ struct ConstantWeights { __ConstantWeigh
** Constructors
*/
-#define CONSTANTWEIGHTS_DEFARGS \
- WEIGHTSCALCULATOR_DEFARGS
-#define CONSTANTWEIGHTS_PASSARGS \
- WEIGHTSCALCULATOR_PASSARGS
ConstantWeights* ConstantWeights_New( Name name, int dim );
-ConstantWeights* _ConstantWeights_New( CONSTANTWEIGHTS_DEFARGS );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define CONSTANTWEIGHTS_DEFARGS \
+ WEIGHTSCALCULATOR_DEFARGS
+
+ #define CONSTANTWEIGHTS_PASSARGS \
+ WEIGHTSCALCULATOR_PASSARGS
+
+ConstantWeights* _ConstantWeights_New( CONSTANTWEIGHTS_DEFARGS );
void _ConstantWeights_Init( void* constantWeights );
@@ -112,3 +119,4 @@ void _ConstantWeights_Calculate( void* c
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/src/DVCWeights.c
--- a/Weights/src/DVCWeights.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/src/DVCWeights.c Mon Nov 30 02:03:06 2009 +1100
@@ -87,12 +87,12 @@ DVCWeights* DVCWeights_New( Name name, D
_DVCWeights_Init( self, res );
}
-DVCWeights* _DVCWeights_New( DVCWEIGHTS_DEFARGS ) {
+DVCWeights* _DVCWeights_New( DVCWEIGHTS_DEFARGS ) {
DVCWeights* self;
/* Allocate memory */
- assert( sizeOfSelf >= sizeof(DVCWeights) );
- self = (DVCWeights*)_WeightsCalculator_New( WEIGHTSCALCULATOR_PASSARGS );
+ assert( _sizeOfSelf >= sizeof(DVCWeights) );
+ self = (DVCWeights*)_WeightsCalculator_New( WEIGHTSCALCULATOR_PASSARGS );
/* General info */
@@ -138,22 +138,22 @@ void* _DVCWeights_Copy( void* dvcWeights
}
void* _DVCWeights_DefaultNew( Name name ) {
- return (void*) _DVCWeights_New(
- sizeof(DVCWeights),
- DVCWeights_Type,
- _DVCWeights_Delete,
- _DVCWeights_Print,
- _DVCWeights_Copy,
- _DVCWeights_DefaultNew,
- _DVCWeights_AssignFromXML,
- _DVCWeights_Build,
- _DVCWeights_Initialise,
- _DVCWeights_Execute,
- _DVCWeights_Destroy,
- name,
- NON_GLOBAL,
- _DVCWeights_Calculate,
- 0, NULL );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(DVCWeights);
+ Type type = DVCWeights_Type;
+ Stg_Class_DeleteFunction* _delete = _DVCWeights_Delete;
+ Stg_Class_PrintFunction* _print = _DVCWeights_Print;
+ Stg_Class_CopyFunction* _copy = _DVCWeights_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _DVCWeights_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _DVCWeights_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _DVCWeights_Build;
+ Stg_Component_InitialiseFunction* _initialise = _DVCWeights_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _DVCWeights_Execute;
+ Stg_Component_DestroyFunction* _destroy = _DVCWeights_Destroy;
+ AllocationType nameAllocationType = NON_GLOBAL;
+ WeightsCalculator_CalculateFunction* _calculate = _DVCWeights_Calculate;
+
+ return (void*) _DVCWeights_New( DVCWEIGHTS_PASSARGS );
}
@@ -937,3 +937,5 @@ void _DVCWeights_Calculate( void* dvcWei
/*-------------------------------------------------------------------------------------------------------------------------
** Public Functions
*/
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/src/DVCWeights.h
--- a/Weights/src/DVCWeights.h Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/src/DVCWeights.h Mon Nov 30 02:03:06 2009 +1100
@@ -227,17 +227,22 @@ void _DVCWeights_Calculate3D(
** Constructors
*/
-#define DVCWEIGHTS_DEFARGS \
- WEIGHTSCALCULATOR_DEFARGS, \
- int *res
-#define DVCWEIGHTS_PASSARGS \
- WEIGHTSCALCULATOR_PASSARGS, \
- res
DVCWeights* DVCWeights_New( Name name, Dimension_Index dim, int *res ) ;
-DVCWeights* _DVCWeights_New( DVCWEIGHTS_DEFARGS );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define DVCWEIGHTS_DEFARGS \
+ WEIGHTSCALCULATOR_DEFARGS
+
+ #define DVCWEIGHTS_PASSARGS \
+ WEIGHTSCALCULATOR_PASSARGS
+
+DVCWeights* _DVCWeights_New( DVCWEIGHTS_DEFARGS );
void _DVCWeights_Init( void* dvcWeights, int *res ) ;
@@ -262,3 +267,4 @@ void _DVCWeights_Calculate( void* dvcWei
void _DVCWeights_Calculate( void* dvcWeights, void* _swarm, Cell_LocalIndex lCell_I ) ;
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/src/Finalise.c
--- a/Weights/src/Finalise.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/src/Finalise.c Mon Nov 30 02:03:06 2009 +1100
@@ -56,3 +56,5 @@ Bool PICellerator_Weights_Finalise( void
return True;
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/src/Init.c
--- a/Weights/src/Init.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/src/Init.c Mon Nov 30 02:03:06 2009 +1100
@@ -71,3 +71,5 @@ Bool PICellerator_Weights_Init( int* arg
return True;
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/src/IterativeWeights.c
--- a/Weights/src/IterativeWeights.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/src/IterativeWeights.c Mon Nov 30 02:03:06 2009 +1100
@@ -66,12 +66,12 @@ const Type IterativeWeights_Type = "Iter
** Constructors
*/
-IterativeWeights* _IterativeWeights_New( ITERATIVEWEIGHTS_DEFARGS ) {
+IterativeWeights* _IterativeWeights_New( ITERATIVEWEIGHTS_DEFARGS ) {
IterativeWeights* self;
/* Allocate memory */
- assert( sizeOfSelf >= sizeof(IterativeWeights) );
- self = (IterativeWeights*)_ConstantWeights_New( CONSTANTWEIGHTS_PASSARGS );
+ assert( _sizeOfSelf >= sizeof(IterativeWeights) );
+ self = (IterativeWeights*)_ConstantWeights_New( CONSTANTWEIGHTS_PASSARGS );
/* General info */
@@ -137,22 +137,22 @@ void* _IterativeWeights_Copy( void* iter
}
void* _IterativeWeights_DefaultNew( Name name ) {
- return (void*) _IterativeWeights_New(
- sizeof(IterativeWeights),
- IterativeWeights_Type,
- _IterativeWeights_Delete,
- _IterativeWeights_Print,
- _IterativeWeights_Copy,
- _IterativeWeights_DefaultNew,
- _IterativeWeights_AssignFromXML,
- _IterativeWeights_Build,
- _IterativeWeights_Initialise,
- _IterativeWeights_Execute,
- _IterativeWeights_Destroy,
- name,
- NON_GLOBAL,
- _IterativeWeights_Calculate,
- 0, NULL, 0, 0.0, 0.0);
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(IterativeWeights);
+ Type type = IterativeWeights_Type;
+ Stg_Class_DeleteFunction* _delete = _IterativeWeights_Delete;
+ Stg_Class_PrintFunction* _print = _IterativeWeights_Print;
+ Stg_Class_CopyFunction* _copy = _IterativeWeights_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _IterativeWeights_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _IterativeWeights_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _IterativeWeights_Build;
+ Stg_Component_InitialiseFunction* _initialise = _IterativeWeights_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _IterativeWeights_Execute;
+ Stg_Component_DestroyFunction* _destroy = _IterativeWeights_Destroy;
+ AllocationType nameAllocationType = NON_GLOBAL;
+ WeightsCalculator_CalculateFunction* _calculate = _IterativeWeights_Calculate;
+
+ return (void*) _IterativeWeights_New( ITERATIVEWEIGHTS_PASSARGS );
}
@@ -276,3 +276,5 @@ void IterativeWeights_ScaleForConstantCo
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/src/IterativeWeights.h
--- a/Weights/src/IterativeWeights.h Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/src/IterativeWeights.h Mon Nov 30 02:03:06 2009 +1100
@@ -75,18 +75,20 @@ struct IterativeWeights { __IterativeWei
** Constructors
*/
-#define ITERATIVEWEIGHTS_DEFARGS \
- CONSTANTWEIGHTS_DEFARGS, \
- WeightsCalculator* initialWeights, \
- Iteration_Index maxIterations, \
- double tolerance, \
- double alpha
-#define ITERATIVEWEIGHTS_PASSARGS \
- CONSTANTWEIGHTS_DEFARGS, \
- initialWeights, maxIterations, tolerance, alpha
-IterativeWeights* _IterativeWeights_New( ITERATIVEWEIGHTS_DEFARGS );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define ITERATIVEWEIGHTS_DEFARGS \
+ CONSTANTWEIGHTS_DEFARGS
+
+ #define ITERATIVEWEIGHTS_PASSARGS \
+ CONSTANTWEIGHTS_PASSARGS
+
+IterativeWeights* _IterativeWeights_New( ITERATIVEWEIGHTS_DEFARGS );
/* Stg_Class_Delete IterativeWeights implementation */
void _IterativeWeights_Delete( void* iterativeWeights );
@@ -116,3 +118,4 @@ void IterativeWeights_ScaleForConstantCo
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/src/MomentBalanceWeights.c
--- a/Weights/src/MomentBalanceWeights.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/src/MomentBalanceWeights.c Mon Nov 30 02:03:06 2009 +1100
@@ -72,12 +72,12 @@ MomentBalanceWeights* MomentBalanceWeigh
_MomentBalanceWeights_Init( self, backupWeights );
}
-MomentBalanceWeights* _MomentBalanceWeights_New( MOMENTBALANCEWEIGHTS_DEFARGS ) {
+MomentBalanceWeights* _MomentBalanceWeights_New( MOMENTBALANCEWEIGHTS_DEFARGS ) {
MomentBalanceWeights* self;
/* Allocate memory */
- assert( sizeOfSelf >= sizeof(MomentBalanceWeights) );
- self = (MomentBalanceWeights*)_WeightsCalculator_New( WEIGHTSCALCULATOR_PASSARGS );
+ assert( _sizeOfSelf >= sizeof(MomentBalanceWeights) );
+ self = (MomentBalanceWeights*)_WeightsCalculator_New( WEIGHTSCALCULATOR_PASSARGS );
/* General info */
@@ -130,22 +130,22 @@ void* _MomentBalanceWeights_Copy( void*
}
void* _MomentBalanceWeights_DefaultNew( Name name ) {
- return (void*) _MomentBalanceWeights_New(
- sizeof(MomentBalanceWeights),
- MomentBalanceWeights_Type,
- _MomentBalanceWeights_Delete,
- _MomentBalanceWeights_Print,
- _MomentBalanceWeights_Copy,
- _MomentBalanceWeights_DefaultNew,
- _MomentBalanceWeights_AssignFromXML,
- _MomentBalanceWeights_Build,
- _MomentBalanceWeights_Initialise,
- _MomentBalanceWeights_Execute,
- _MomentBalanceWeights_Destroy,
- name,
- NON_GLOBAL,
- _MomentBalanceWeights_Calculate,
- 0, NULL );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(MomentBalanceWeights);
+ Type type = MomentBalanceWeights_Type;
+ Stg_Class_DeleteFunction* _delete = _MomentBalanceWeights_Delete;
+ Stg_Class_PrintFunction* _print = _MomentBalanceWeights_Print;
+ Stg_Class_CopyFunction* _copy = _MomentBalanceWeights_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _MomentBalanceWeights_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _MomentBalanceWeights_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _MomentBalanceWeights_Build;
+ Stg_Component_InitialiseFunction* _initialise = _MomentBalanceWeights_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _MomentBalanceWeights_Execute;
+ Stg_Component_DestroyFunction* _destroy = _MomentBalanceWeights_Destroy;
+ AllocationType nameAllocationType = NON_GLOBAL;
+ WeightsCalculator_CalculateFunction* _calculate = _MomentBalanceWeights_Calculate;
+
+ return (void*) _MomentBalanceWeights_New( MOMENTBALANCEWEIGHTS_PASSARGS );
}
void _MomentBalanceWeights_AssignFromXML( void* momentBalanceWeights, Stg_ComponentFactory* cf, void* data ) {
@@ -480,3 +480,5 @@ void _MomentBalanceWeights_Calculate3D(
*/
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/src/MomentBalanceWeights.h
--- a/Weights/src/MomentBalanceWeights.h Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/src/MomentBalanceWeights.h Mon Nov 30 02:03:06 2009 +1100
@@ -67,13 +67,7 @@ extern const Type MomentBalanceWeights_T
struct MomentBalanceWeights { __MomentBalanceWeights };
- #define MOMENTBALANCEWEIGHTS_DEFARGS \
- WEIGHTSCALCULATOR_DEFARGS, \
- WeightsCalculator* backupWeights
- #define MOMENTBALANCEWEIGHTS_PASSARGS \
- WEIGHTSCALCULATOR_PASSARG, \
- backupWeights
/*---------------------------------------------------------------------------------------------------------------------
** Constructors
@@ -81,7 +75,18 @@ extern const Type MomentBalanceWeights_T
MomentBalanceWeights* MomentBalanceWeights_New( Name name, Dimension_Index dim, WeightsCalculator* backupWeights );
- MomentBalanceWeights* _MomentBalanceWeights_New( MOMENTBALANCEWEIGHTS_DEFARGS );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define MOMENTBALANCEWEIGHTS_DEFARGS \
+ WEIGHTSCALCULATOR_DEFARGS
+
+ #define MOMENTBALANCEWEIGHTS_PASSARGS \
+ WEIGHTSCALCULATOR_PASSARGS
+
+ MomentBalanceWeights* _MomentBalanceWeights_New( MOMENTBALANCEWEIGHTS_DEFARGS );
/* Stg_Class implementation */
void _MomentBalanceWeights_Delete( void* momentBalanceWeights );
@@ -121,3 +126,4 @@ extern const Type MomentBalanceWeights_T
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/src/VolumeWeights.c
--- a/Weights/src/VolumeWeights.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/src/VolumeWeights.c Mon Nov 30 02:03:06 2009 +1100
@@ -50,12 +50,12 @@ VolumeWeights* VolumeWeights_New( Name n
_VolumeWeights_Init( self, shape, mesh );
}
-VolumeWeights* _VolumeWeights_New( VOLUMEWEIGHTS_DEFARGS ) {
+VolumeWeights* _VolumeWeights_New( VOLUMEWEIGHTS_DEFARGS ) {
VolumeWeights* self;
/* Allocate memory */
- assert( sizeOfSelf >= sizeof(VolumeWeights) );
- self = (VolumeWeights*)_WeightsCalculator_New( WEIGHTSCALCULATOR_PASSARGS );
+ assert( _sizeOfSelf >= sizeof(VolumeWeights) );
+ self = (VolumeWeights*)_WeightsCalculator_New( WEIGHTSCALCULATOR_PASSARGS );
/* General info */
@@ -103,22 +103,22 @@ void* _VolumeWeights_Copy( void* weights
}
void* _VolumeWeights_DefaultNew( Name name ) {
- return (void*) _VolumeWeights_New(
- sizeof(VolumeWeights),
- VolumeWeights_Type,
- _VolumeWeights_Delete,
- _VolumeWeights_Print,
- _VolumeWeights_Copy,
- _VolumeWeights_DefaultNew,
- _VolumeWeights_AssignFromXML,
- _VolumeWeights_Build,
- _VolumeWeights_Initialise,
- _VolumeWeights_Execute,
- _VolumeWeights_Destroy,
- name,
- NON_GLOBAL,
- _VolumeWeights_Calculate,
- 0, NULL, NULL );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof(VolumeWeights);
+ Type type = VolumeWeights_Type;
+ Stg_Class_DeleteFunction* _delete = _VolumeWeights_Delete;
+ Stg_Class_PrintFunction* _print = _VolumeWeights_Print;
+ Stg_Class_CopyFunction* _copy = _VolumeWeights_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _VolumeWeights_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _VolumeWeights_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _VolumeWeights_Build;
+ Stg_Component_InitialiseFunction* _initialise = _VolumeWeights_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _VolumeWeights_Execute;
+ Stg_Component_DestroyFunction* _destroy = _VolumeWeights_Destroy;
+ AllocationType nameAllocationType = NON_GLOBAL;
+ WeightsCalculator_CalculateFunction* _calculate = _VolumeWeights_Calculate;
+
+ return (void*) _VolumeWeights_New( VOLUMEWEIGHTS_PASSARGS );
}
@@ -220,3 +220,5 @@ void _VolumeWeights_Calculate( void* wei
*/
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/src/VolumeWeights.h
--- a/Weights/src/VolumeWeights.h Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/src/VolumeWeights.h Mon Nov 30 02:03:06 2009 +1100
@@ -49,18 +49,22 @@ struct VolumeWeights { __VolumeWeights }
** Constructors
*/
-#define VOLUMEWEIGHTS_DEFARGS \
- WEIGHTSCALCULATOR_DEFARGS, \
- Stg_Shape* shape, \
- FeMesh* mesh
-#define VOLUMEWEIGHTS_PASSARGS \
- WEIGHTSCALCULATOR_PASSARGS, \
- shape, mesh
VolumeWeights* VolumeWeights_New( Name name, Dimension_Index dim, Stg_Shape* shape, FeMesh* mesh );
-VolumeWeights* _VolumeWeights_New( VOLUMEWEIGHTS_DEFARGS );
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
+ #define VOLUMEWEIGHTS_DEFARGS \
+ WEIGHTSCALCULATOR_DEFARGS
+
+ #define VOLUMEWEIGHTS_PASSARGS \
+ WEIGHTSCALCULATOR_PASSARGS
+
+VolumeWeights* _VolumeWeights_New( VOLUMEWEIGHTS_DEFARGS );
void _VolumeWeights_Init( void* weights, Stg_Shape* shape, FeMesh* mesh ) ;
@@ -85,3 +89,4 @@ void _VolumeWeights_Calculate( void* wei
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/src/WeightsCalculator.c
--- a/Weights/src/WeightsCalculator.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/src/WeightsCalculator.c Mon Nov 30 02:03:06 2009 +1100
@@ -62,12 +62,12 @@ const Type WeightsCalculator_Type = "Wei
*/
-WeightsCalculator* _WeightsCalculator_New( WEIGHTSCALCULATOR_DEFARGS ) {
+WeightsCalculator* _WeightsCalculator_New( WEIGHTSCALCULATOR_DEFARGS ) {
WeightsCalculator* self;
/* Allocate memory */
- assert( sizeOfSelf >= sizeof(WeightsCalculator) );
- self = (WeightsCalculator*)_Stg_Component_New( STG_COMPONENT_PASSARGS );
+ assert( _sizeOfSelf >= sizeof(WeightsCalculator) );
+ self = (WeightsCalculator*)_Stg_Component_New( STG_COMPONENT_PASSARGS );
/* General info */
@@ -456,3 +456,5 @@ void WeightsCalculator_CheckEmptyCell( v
}
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/src/WeightsCalculator.h
--- a/Weights/src/WeightsCalculator.h Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/src/WeightsCalculator.h Mon Nov 30 02:03:06 2009 +1100
@@ -76,17 +76,22 @@ extern const Type WeightsCalculator_Type
** Constructors
*/
+
+
+
+ #ifndef ZERO
+ #define ZERO 0
+ #endif
+
#define WEIGHTSCALCULATOR_DEFARGS \
- STG_COMPONENT_DEFARGS, \
- WeightsCalculator_CalculateFunction* _calculate, \
- int dim
+ STG_COMPONENT_DEFARGS, \
+ WeightsCalculator_CalculateFunction* _calculate
#define WEIGHTSCALCULATOR_PASSARGS \
- STG_COMPONENT_PASSARGS, \
- _calculate, \
- dim
+ STG_COMPONENT_PASSARGS, \
+ _calculate
- WeightsCalculator* _WeightsCalculator_New( WEIGHTSCALCULATOR_DEFARGS );
+ WeightsCalculator* _WeightsCalculator_New( WEIGHTSCALCULATOR_DEFARGS );
void _WeightsCalculator_Init( void* self , int dim );
@@ -131,3 +136,4 @@ extern const Type WeightsCalculator_Type
void WeightsCalculator_CheckEmptyCell( void* self, void* _swarm, Cell_LocalIndex lCell_I ) ;
#endif
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/tests/ConstantWeightsSuite.c
--- a/Weights/tests/ConstantWeightsSuite.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/tests/ConstantWeightsSuite.c Mon Nov 30 02:03:06 2009 +1100
@@ -271,3 +271,5 @@ void ConstantWeightsSuite( pcu_suite_t*
pcu_suite_addTest( suite, ConstantWeightsSuite_TestExponentialInterface );
pcu_suite_addTest( suite, ConstantWeightsSuite_TestCircleInterface );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/tests/DVCWeightsSuite.c
--- a/Weights/tests/DVCWeightsSuite.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/tests/DVCWeightsSuite.c Mon Nov 30 02:03:06 2009 +1100
@@ -542,3 +542,5 @@ void DVCWeightsSuite( pcu_suite_t* suite
pcu_suite_addTest( suite, DVCWeightsSuite_TestGetCentroids2D );
pcu_suite_addTest( suite, DVCWeightsSuite_TestDistanceSquared2D );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/tests/IterativeWeightsSuite.c
--- a/Weights/tests/IterativeWeightsSuite.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/tests/IterativeWeightsSuite.c Mon Nov 30 02:03:06 2009 +1100
@@ -117,3 +117,5 @@ void IterativeWeightsSuite( pcu_suite_t*
pcu_suite_addTest( suite, IterativeWeightsSuite_TestCircleInterface );
pcu_suite_addTest( suite, IterativeWeightsSuite_TestExponentialInterface );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 Weights/tests/MomentBalanceWeightsSuite.c
--- a/Weights/tests/MomentBalanceWeightsSuite.c Fri Nov 27 16:20:09 2009 +1100
+++ b/Weights/tests/MomentBalanceWeightsSuite.c Mon Nov 30 02:03:06 2009 +1100
@@ -116,3 +116,5 @@ void MomentBalanceWeightsSuite( pcu_suit
pcu_suite_addTest( suite, MomentBalanceWeightsSuite_TestExponentialInterface );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 libPICellerator/Toolbox/Toolbox.c
--- a/libPICellerator/Toolbox/Toolbox.c Fri Nov 27 16:20:09 2009 +1100
+++ b/libPICellerator/Toolbox/Toolbox.c Mon Nov 30 02:03:06 2009 +1100
@@ -78,3 +78,5 @@ Index PICellerator_Toolbox_Register( Plu
return PluginsManager_Submit( pluginsManager, PICellerator_Toolbox_Type, "0", _PICellerator_Toolbox_DefaultNew );
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 libPICellerator/src/Finalise.c
--- a/libPICellerator/src/Finalise.c Fri Nov 27 16:20:09 2009 +1100
+++ b/libPICellerator/src/Finalise.c Mon Nov 30 02:03:06 2009 +1100
@@ -65,3 +65,5 @@ Bool PICellerator_Finalise( void ) {
return False;
}
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 libPICellerator/src/Init.c
--- a/libPICellerator/src/Init.c Fri Nov 27 16:20:09 2009 +1100
+++ b/libPICellerator/src/Init.c Mon Nov 30 02:03:06 2009 +1100
@@ -88,3 +88,5 @@ Bool PICellerator_Init( int* argc, char*
}
return False;
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 libPICellerator/tests/LibPICelleratorSuite.c
--- a/libPICellerator/tests/LibPICelleratorSuite.c Fri Nov 27 16:20:09 2009 +1100
+++ b/libPICellerator/tests/LibPICelleratorSuite.c Mon Nov 30 02:03:06 2009 +1100
@@ -59,3 +59,5 @@ void LibPICelleratorSuite( pcu_suite_t*
pcu_suite_addTest( suite, LibPICelleratorSuite_TestDirectoryStgFEM);
pcu_suite_addTest( suite, LibPICelleratorSuite_TestDirectoryPICellerator);
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 plugins/CalculateParticleDisplacement/CalculateParticleDisplacement.c
--- a/plugins/CalculateParticleDisplacement/CalculateParticleDisplacement.c Fri Nov 27 16:20:09 2009 +1100
+++ b/plugins/CalculateParticleDisplacement/CalculateParticleDisplacement.c Mon Nov 30 02:03:06 2009 +1100
@@ -169,19 +169,23 @@ void _PICellerator_CalculateParticleDisp
void* _PICellerator_CalculateParticleDisplacement_DefaultNew( Name name ) {
- return _Codelet_New(
- sizeof( CalculateParticleDisplacementPlugin ),
- PICellerator_CalculateParticleDisplacement_Type,
- _Codelet_Delete,
- _Codelet_Print,
- _Codelet_Copy,
- _PICellerator_CalculateParticleDisplacement_DefaultNew,
- _PICellerator_CalculateParticleDisplacement_AssignFromXML,
- _Codelet_Build,
- _Codelet_Initialise,
- _Codelet_Execute,
- _Codelet_Destroy,
- name );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof( CalculateParticleDisplacementPlugin );
+ Type type = PICellerator_CalculateParticleDisplacement_Type;
+ Stg_Class_DeleteFunction* _delete = _Codelet_Delete;
+ Stg_Class_PrintFunction* _print = _Codelet_Print;
+ Stg_Class_CopyFunction* _copy = _Codelet_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _PICellerator_CalculateParticleDisplacement_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _PICellerator_CalculateParticleDisplacement_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _Codelet_Build;
+ Stg_Component_InitialiseFunction* _initialise = _Codelet_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _Codelet_Execute;
+ Stg_Component_DestroyFunction* _destroy = _Codelet_Destroy;
+
+ /* 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 = ZERO;
+
+ return _Codelet_New( CODELET_PASSARGS );
}
@@ -193,3 +197,5 @@ Index PICellerator_CalculateParticleDisp
return result;
}
+
+
diff -r fed10f57c2d4 -r d71e205639b6 plugins/Output/MaterialCentroid/MaterialCentroid.c
--- a/plugins/Output/MaterialCentroid/MaterialCentroid.c Fri Nov 27 16:20:09 2009 +1100
+++ b/plugins/Output/MaterialCentroid/MaterialCentroid.c Mon Nov 30 02:03:06 2009 +1100
@@ -119,19 +119,23 @@ void _PICellerator_MaterialCentroid_Assi
void* _PICellerator_MaterialCentroid_DefaultNew( Name name ) {
- return _Codelet_New(
- sizeof( Codelet ),
- PICellerator_MaterialCentroid_Type,
- _Codelet_Delete,
- _Codelet_Print,
- _Codelet_Copy,
- _PICellerator_MaterialCentroid_DefaultNew,
- _PICellerator_MaterialCentroid_AssignFromXML,
- _Codelet_Build,
- _Codelet_Initialise,
- _Codelet_Execute,
- _Codelet_Destroy,
- name );
+ /* Variables set in this function */
+ SizeT _sizeOfSelf = sizeof( Codelet );
+ Type type = PICellerator_MaterialCentroid_Type;
+ Stg_Class_DeleteFunction* _delete = _Codelet_Delete;
+ Stg_Class_PrintFunction* _print = _Codelet_Print;
+ Stg_Class_CopyFunction* _copy = _Codelet_Copy;
+ Stg_Component_DefaultConstructorFunction* _defaultConstructor = _PICellerator_MaterialCentroid_DefaultNew;
+ Stg_Component_ConstructFunction* _construct = _PICellerator_MaterialCentroid_AssignFromXML;
+ Stg_Component_BuildFunction* _build = _Codelet_Build;
+ Stg_Component_InitialiseFunction* _initialise = _Codelet_Initialise;
+ Stg_Component_ExecuteFunction* _execute = _Codelet_Execute;
+ Stg_Component_DestroyFunction* _destroy = _Codelet_Destroy;
+
+ /* 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 = ZERO;
+
+ return _Codelet_New( CODELET_PASSARGS );
}
@@ -143,3 +147,5 @@ Index PICellerator_MaterialCentroid_Regi
return result;
}
+
+
More information about the CIG-COMMITS
mailing list