void _RefinedRegionsGeometry_Construct( void* refinedRegionsGeometry, Stg_ComponentFactory *cf, void* data ) { RefinedRegionsGeometry* self = (RefinedRegionsGeometry*)refinedRegionsGeometry; IJK size; int shift; Dimension_Index dim; Dimension_Index dim_I; self->dictionary = Dictionary_GetDictionary( cf->componentDict, self->name ); /* Get Size from Dictionary */ dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, "dim", 0 ); size[ I_AXIS ] = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "sizeI", 1 ); size[ J_AXIS ] = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "sizeJ", 1 ); size[ K_AXIS ] = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "sizeK", 1 ); if ( dim == 2 ) size[ K_AXIS ] = 1; /* Shift the size if nessesary */ shift = Stg_ComponentFactory_GetInt( cf, self->name, "sizeShift", 0 ); for ( dim_I = I_AXIS ; dim_I < dim ; dim_I++ ) size[ dim_I ] += shift; _Geometry_Init( (Geometry*)self ); _RefinedRegionsGeometry_Init( self, size ); }
void _lucViewport_AssignFromXML( void* viewport, Stg_ComponentFactory* cf, void* data ) { lucViewport* self = (lucViewport*) viewport; DrawingObject_Index drawingObjectCount; lucDrawingObject** drawingObjectList; lucCamera* camera; /* TODO Construct Parent */ self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data ); if ( !self->context ) self->context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data ); camera = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Camera", lucCamera, True, data ) ; drawingObjectList = Stg_ComponentFactory_ConstructByList( cf, self->name, (Dictionary_Entry_Key)"DrawingObject", Stg_ComponentFactory_Unlimited, lucDrawingObject, True, &drawingObjectCount, data ); _lucViewport_Init( self, camera, drawingObjectList, drawingObjectCount, Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"title", ""), Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"axis", False ), Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"axisLength", 0.2 ), Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"antialias", True ), Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"rulers", False ), Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"timestep", False ), Stg_ComponentFactory_GetInt( cf, self->name, (Dictionary_Entry_Key)"border", 0), Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"borderColour", "#888888" ), Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"disable", False ), Stg_ComponentFactory_GetInt( cf, self->name, (Dictionary_Entry_Key)"margin", 32), Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"nearClipPlane", 0 ), Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"farClipPlane", 0 ), Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"scaleX", 1.0 ), Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"scaleY", 1.0 ), Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"scaleZ", 1.0 )); Memory_Free( drawingObjectList ); }
void _SLE_Solver_AssignFromXML( void* sleSolver, Stg_ComponentFactory* cf, void* data ) { SLE_Solver* self = (SLE_Solver*)sleSolver; Bool useStatSolve; int nStatReps; self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", FiniteElementContext, False, data ); if( !self->context ) self->context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", FiniteElementContext, True, data ); useStatSolve = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"statSolve", False ); nStatReps = Stg_ComponentFactory_GetInt( cf, self->name, (Dictionary_Entry_Key)"statReps", 0 ); _SLE_Solver_Init( self, useStatSolve, nStatReps ); }