void _GeneralSwarm_AssignFromXML( void* swarm, Stg_ComponentFactory* cf, void* data ) { GeneralSwarm* self = (GeneralSwarm*) swarm; EscapedRoutine* escapedRoutine; _Swarm_AssignFromXML( self, cf, data ); escapedRoutine = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"EscapedRoutine", EscapedRoutine, False, data ); _GeneralSwarm_Init( self, escapedRoutine ); }
MaterialPointsSwarm* MaterialPointsSwarm_New( Name name, AbstractContext* context, void* cellLayout, void* particleLayout, Dimension_Index dim, SizeT particleSize, EscapedRoutine* escapedRoutine, Material* material, Variable_Register* swarmVariable_Register, ExtensionManager_Register* extensionMgr_Register, Materials_Register* materials_Register, MPI_Comm comm, void* ics_dummy ) { /* 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 = NON_GLOBAL /* default value NON_GLOBAL */; 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, cellLayout, particleLayout, dim, particleSize, cellParticleTblDelta, extraParticlesFactor, extensionMgr_Register, swarmVariable_Register, False, comm, ics_dummy ); _GeneralSwarm_Init( self, escapedRoutine ); _MaterialPointsSwarm_Init( self, material, materials_Register ); return self; }