MeshParticleLayout* MeshParticleLayout_New( Name name, Particle_InCellIndex cellParticleCount, unsigned int seed ) { MeshParticleLayout* self = (MeshParticleLayout*) _MeshParticleLayout_DefaultNew( name ); _MeshParticleLayout_Init( self, cellParticleCount, seed ); return self; }
void _MeshParticleLayout_Construct( void* meshParticleLayout, Stg_ComponentFactory* cf, void* data ) { MeshParticleLayout* self = (MeshParticleLayout*)meshParticleLayout; Particle_InCellIndex cellParticleCount; unsigned int seed; cellParticleCount = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "cellParticleCount", 0 ); seed = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "seed", 13 ); _MeshParticleLayout_Init( self, cellParticleCount, seed ); self->mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, "mesh", Mesh, True, data ); }
MeshParticleLayout* _MeshParticleLayout_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, ParticleLayout_SetInitialCountsFunction* _setInitialCounts, ParticleLayout_InitialiseParticlesFunction* _initialiseParticles, PerCellParticleLayout_InitialCountFunction* _initialCount, PerCellParticleLayout_InitialiseParticlesOfCellFunction* _initialiseParticlesOfCell, Name name, Bool initFlag, Particle_InCellIndex cellParticleCount, unsigned int seed ) { MeshParticleLayout* self; /* Allocate memory */ self = (MeshParticleLayout*)_PerCellParticleLayout_New( _sizeOfSelf, type, _delete, _print, _copy, _defaultConstructor, _construct, _build, _initialise, _execute, _destroy, _setInitialCounts, _initialiseParticles, _initialCount, _initialiseParticlesOfCell, name, initFlag, GlobalCoordSystem, False ); if ( initFlag ) { _MeshParticleLayout_Init( self, cellParticleCount, seed ); } return self; }
MeshParticleLayout* MeshParticleLayout_New( Name name, AbstractContext* context, CoordSystem coordSystem, Bool weightsInitialisedAtStartup, Mesh* mesh, Particle_InCellIndex cellParticleCount, unsigned int seed, unsigned int filltype ) { MeshParticleLayout* self = (MeshParticleLayout*) _MeshParticleLayout_DefaultNew( name ); _ParticleLayout_Init( self, context, coordSystem, weightsInitialisedAtStartup ); _PerCellParticleLayout_Init( self ); _MeshParticleLayout_Init( self, mesh, cellParticleCount, seed, filltype ); return self; }
void _MeshParticleLayout_AssignFromXML( void* meshParticleLayout, Stg_ComponentFactory* cf, void* data ) { MeshParticleLayout* self = (MeshParticleLayout*)meshParticleLayout; Particle_InCellIndex cellParticleCount; unsigned int seed; unsigned int filltype; Mesh* mesh = NULL; _PerCellParticleLayout_AssignFromXML( self, cf, data ); cellParticleCount = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"cellParticleCount", 0 ); seed = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"seed", 13 ); mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"FeMesh", Mesh, True, data ); // filltype, 0=sobol, 1=random filltype = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"filltype", 0 ); _MeshParticleLayout_Init( self, mesh, cellParticleCount, seed, filltype ); }