Bool StgDomainMesh_Init( int* argc, char** argv[] ) { Mesh_VerboseConfig = Journal_Register( Info_Type, (Name)"Mesh_VerboseConfig" ); Mesh_Debug = Journal_Register( Debug_Type, (Name)"Mesh" ); Mesh_Warning = Journal_Register( Error_Type, (Name)"Mesh" ); Mesh_Error = Journal_Register( Error_Type, (Name)"Mesh" ); Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Mesh_Algorithms_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)Mesh_Algorithms_New ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), Mesh_HexAlgorithms_Type, "0", (Stg_Component_DefaultConstructorFunction*)Mesh_HexAlgorithms_New ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Mesh_CentroidAlgorithms_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)Mesh_CentroidAlgorithms_New ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), Mesh_RegularAlgorithms_Type, "0", (Stg_Component_DefaultConstructorFunction*)Mesh_RegularAlgorithms_New ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), CartesianGenerator_Type, "0", (Stg_Component_DefaultConstructorFunction*)_CartesianGenerator_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Mesh_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)Mesh_New ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), MeshVariable_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)MeshVariable_New ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), Remesher_Type, "0", (Stg_Component_DefaultConstructorFunction*)_Remesher_DefaultNew ); RegisterParent( Mesh_ElementType_Type, Stg_Class_Type ); RegisterParent( Mesh_HexType_Type, Mesh_ElementType_Type ); RegisterParent( Mesh_CentroidType_Type, Mesh_ElementType_Type ); RegisterParent( Mesh_Algorithms_Type, Stg_Component_Type ); RegisterParent( Mesh_HexAlgorithms_Type, Mesh_Algorithms_Type ); RegisterParent( Mesh_CentroidAlgorithms_Type, Mesh_Algorithms_Type ); RegisterParent( Mesh_RegularAlgorithms_Type, Mesh_Algorithms_Type ); RegisterParent( MeshTopology_Type, Stg_Component_Type ); RegisterParent( Mesh_Type, Stg_Component_Type ); RegisterParent( MeshGenerator_Type, Stg_Component_Type ); RegisterParent( CartesianGenerator_Type, MeshGenerator_Type ); RegisterParent( MeshVariable_Type, Variable_Type ); RegisterParent( Remesher_Type, Stg_Component_Type ); return True; }
/** Initialises the Linear Algebra package, then any init for this package such as streams etc */ Bool StgFEM_SLE_ProvidedSystems_Energy_Init( int* argc, char** argv[] ) { Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* initialise this level's streams */ StgFEM_SLE_ProvidedSystems_Energy_Debug = Stream_RegisterChild( StgFEM_SLE_Debug, "ProvidedSystems_Energy" ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Energy_SLE_Solver_Type , (Name)"0", Energy_SLE_Solver_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), Energy_SLE_Type , "0", _Energy_SLE_DefaultNew ); RegisterParent( Energy_SLE_Type, SystemLinearEquations_Type ); RegisterParent( Energy_SLE_Solver_Type, SLE_Solver_Type ); return True; }
/* * Initialises the Linear Algebra package, then any init for this package * such as streams etc. */ Bool StgFEM_Assembly_Init( int* argc, char** argv[] ) { Stg_ComponentRegister* componentRegister = Stg_ComponentRegister_Get_ComponentRegister(); int tmp; /* DO NOT CHANGE OR REMOVE */ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); tmp = Stream_GetPrintingRank( Journal_Register( InfoStream_Type, (Name)"Context" ) ); Stream_SetPrintingRank( Journal_Register( InfoStream_Type, (Name)"Context" ), 0 ); Stream_Flush( Journal_Register( InfoStream_Type, (Name)"Context" ) ); Stream_SetPrintingRank( Journal_Register( InfoStream_Type, (Name)"Context" ), tmp ); /* initialise this level's streams */ StgFEM_Assembly_Debug = Stream_RegisterChild( StgFEM_Debug, "Assembly" ); Stg_ComponentRegister_Add( componentRegister, ThermalBuoyancyForceTerm_Type, (Name)"0", _ThermalBuoyancyForceTerm_DefaultNew ); Stg_ComponentRegister_Add( componentRegister, GradientStiffnessMatrixTerm_Type, (Name)"0", _GradientStiffnessMatrixTerm_DefaultNew ); Stg_ComponentRegister_Add( componentRegister, DivergenceMatrixTerm_Type, (Name)"0", _DivergenceMatrixTerm_DefaultNew ); Stg_ComponentRegister_Add( componentRegister, LaplacianStiffnessMatrixTerm_Type, (Name)"0", _LaplacianStiffnessMatrixTerm_DefaultNew ); Stg_ComponentRegister_Add( componentRegister, IsoviscousStressTensorTerm_Type, (Name)"0", _IsoviscousStressTensorTerm_DefaultNew ); Stg_ComponentRegister_Add( componentRegister, MassMatrixTerm_Type, (Name)"0", _MassMatrixTerm_DefaultNew ); RegisterParent( ThermalBuoyancyForceTerm_Type, ForceTerm_Type ); RegisterParent( GradientStiffnessMatrixTerm_Type, StiffnessMatrixTerm_Type ); RegisterParent( DivergenceMatrixTerm_Type, StiffnessMatrixTerm_Type ); RegisterParent( LaplacianStiffnessMatrixTerm_Type, StiffnessMatrixTerm_Type ); RegisterParent( IsoviscousStressTensorTerm_Type, StiffnessMatrixTerm_Type ); RegisterParent( MassMatrixTerm_Type, StiffnessMatrixTerm_Type ); return True; }
void _StgFEM_Document_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) { Codelet* self = (Codelet*)component; AbstractContext* context; ConditionFunction* condFunc; Dictionary* pluginDict = Codelet_GetPluginDictionary( component, cf->rootDict ); DocumentationComponentFactory* dcf; Stream* componentListStream; context = (AbstractContext*)Stg_ComponentFactory_ConstructByName( cf, Dictionary_GetString( pluginDict, (Dictionary_Entry_Key)"Context" ), AbstractContext, True, data ); /* Print list of all components */ componentListStream = Journal_Register( Info_Type, (Name)"componentList" ); Stream_RedirectFile_WithPrependedPath( componentListStream, context->outputPath, "ComponentList.txt" ); Stg_ComponentRegister_PrintAllTypes( Stg_ComponentRegister_Get_ComponentRegister(), componentListStream ); /* Print info for one component */ dcf = DocumentationComponentFactory_New( ); Stream_RedirectFile_WithPrependedPath( dcf->infoStream, context->outputPath, "Documentation.txt" ); DocumentationComponentFactory_DocumentType( dcf, Dictionary_GetString( context->dictionary, (Dictionary_Entry_Key)"documentType" ) ); exit( EXIT_SUCCESS ); }
Bool PICellerator_Utils_Init( int* argc, char** argv[] ) { Stg_ComponentRegister* componentsRegister = Stg_ComponentRegister_Get_ComponentRegister(); Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); Stg_ComponentRegister_Add( componentsRegister, PCDVC_Type, (Name)"0", _PCDVC_DefaultNew ); RegisterParent( PCDVC_Type, DVCWeights_Type ); return True; }
Bool StgDomainUtils_Init( int* argc, char** argv[] ) { Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), DomainContext_Type, (Name)"0", (void* (*)(Name))_DomainContext_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), DofLayout_Type, "0", (void* (*)(Name))_DofLayout_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), FieldVariable_Type, (Name)"0", (void* (*)(Name))_FieldVariable_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), TimeIntegrator_Type, (Name)"0", (void* (*)(Name))_TimeIntegrator_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), TimeIntegrand_Type, "0", (void* (*)(Name))_TimeIntegrand_DefaultNew ); RegisterParent( DomainContext_Type, AbstractContext_Type ); RegisterParent( DofLayout_Type, Stg_Component_Type ); RegisterParent( FieldVariable_Type, Stg_Component_Type ); RegisterParent( FieldVariable_Register_Type, NamedObject_Register_Type ); RegisterParent( TimeIntegrand_Type, Stg_Component_Type ); RegisterParent( TimeIntegrator_Type, Stg_Component_Type ); return True; }
/** Initialises the Linear Algebra package, then any init for this package such as streams etc */ Bool StgFEM_SLE_ProvidedSystems_StokesFlow_Init( int* argc, char** argv[] ) { Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */ /* initialise this level's streams */ StgFEM_SLE_ProvidedSystems_StokesFlow_Debug = Stream_RegisterChild( StgFEM_SLE_Debug, "ProvidedSystems_StokesFlow" ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Stokes_SLE_Type , (Name)"0", _Stokes_SLE_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), Stokes_SLE_UzawaSolver_Type , "0", _Stokes_SLE_UzawaSolver_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Stokes_SLE_PenaltySolver_Type , (Name)"0", Stokes_SLE_PenaltySolver_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), UzawaPreconditionerTerm_Type , "0", _UzawaPreconditionerTerm_DefaultNew ); RegisterParent( Stokes_SLE_Type, SystemLinearEquations_Type ); RegisterParent( Stokes_SLE_PenaltySolver_Type, SLE_Solver_Type ); RegisterParent( Stokes_SLE_UzawaSolver_Type, SLE_Solver_Type ); RegisterParent( UzawaPreconditionerTerm_Type, StiffnessMatrixTerm_Type ); return True; }
Bool Solvers_Assembly_Init( int* argc, char** argv[] ) { Stg_ComponentRegister* componentRegister = Stg_ComponentRegister_Get_ComponentRegister(); Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); Stg_ComponentRegister_Add( componentRegister, PressMassMatrixTerm_Type, (Name)"0", _PressMassMatrixTerm_DefaultNew ); RegisterParent( PressMassMatrixTerm_Type, StiffnessMatrixTerm_Type ); Stg_ComponentRegister_Add( componentRegister, VelocityMassMatrixTerm_Type, (Name)"0", _VelocityMassMatrixTerm_DefaultNew ); RegisterParent( VelocityMassMatrixTerm_Type, StiffnessMatrixTerm_Type ); Stg_ComponentRegister_Add( componentRegister, Matrix_NaiNbj_Type, (Name)"0", _Matrix_NaiNbj_DefaultNew ); RegisterParent( Matrix_NaiNbj_Type, StiffnessMatrixTerm_Type ); Stg_ComponentRegister_Add( componentRegister, ViscousPenaltyConstMatrixCartesian_Type, (Name)"0", _ViscousPenaltyConstMatrixCartesian_DefaultNew ); RegisterParent( ViscousPenaltyConstMatrixCartesian_Type, ConstitutiveMatrix_Type ); return True; }
Bool JAMBox_Components_Init() { Stg_ComponentRegister* componentRegister = Stg_ComponentRegister_Get_ComponentRegister(); Journal_Printf( Journal_Register( Debug_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */ /* Setup some streams for you to use */ JAMBoxInfo = Journal_Register( Info_Type, (Name)"JAMBoxInfo" ); JAMBoxDebug = Journal_Register( Debug_Type, (Name)"JAMBoxDebug" ); JAMBoxError = Journal_Register( Error_Type, (Name)"JAMBoxError" ); /* Register your components here */ Stg_ComponentRegister_Add( componentRegister, JAMBoxExampleComponent_Type, (Name)"0", _JAMBoxExampleComponent_DefaultNew ); /* Register Parents for type checking */ RegisterParent( JAMBoxExampleComponent_Type, Stg_Component_Type ); return True; }
void HierarchyTable_PrintChildren( void* hierarchyTable, Type parentType, Stream* stream ) { HierarchyTable* self = (HierarchyTable*) hierarchyTable; HashTable_Entry* hashTableEntry; Index entry_I; Stg_ComponentRegister* componentRegister = Stg_ComponentRegister_Get_ComponentRegister(); Journal_Printf( stream, "%s \t\t\t (%s Class)\n", parentType, ( Stg_ComponentRegister_Get( componentRegister, parentType, "0" ) ? "Concrete" : "Abstract" ) ); Stream_Flush( stream ); Stream_Indent( stream ); for ( entry_I = 0 ; entry_I < self->max ; entry_I++ ) { hashTableEntry = self->entries[ entry_I ]; while( hashTableEntry ){ if ( (Type) hashTableEntry->data == parentType ) { HierarchyTable_PrintChildren( self, (Type)hashTableEntry->key, stream ); } hashTableEntry = hashTableEntry->next; } } Stream_UnIndent( stream ); }
Bool Geothermal_Base_Init( int* argc, char** argv[] ) { VariableCondition_Register_Add( variableCondition_Register, DiscreetPointsVC_Type, DiscreetPointsVC_Factory ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), ThermalDataShape_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)_ThermalDataShape_DefaultNew); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), ThermalDataMaterial_Type, "0", (Stg_Component_DefaultConstructorFunction*)_ThermalDataMaterial_DefaultNew); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), ConductivityMaterialManager_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)_ConductivityMaterialManager_DefaultNew); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), IrregularQuadGenerator_Type, "0", (Stg_Component_DefaultConstructorFunction*) IrregularQuadGenerator_New); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), IrregularTriGenerator_Type, "0", (Stg_Component_DefaultConstructorFunction*) IrregularTriGenerator_New); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), Mesh_SimplexAlgorithms_Type, "0", (Stg_Component_DefaultConstructorFunction*) Mesh_SimplexAlgorithms_New); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), FieldVariableSurfaceAdaptor_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*) FieldVariableSurfaceAdaptor_New); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), FieldVariableSurfaceAdaptorSimple_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*) FieldVariableSurfaceAdaptorSimple_New); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), IrregularMeshGaussLayout_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*) _IrregularMeshGaussLayout_DefaultNew); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), DiscreetPointsVC_Type, "0", (Stg_Component_DefaultConstructorFunction*) _DiscreetPointsVC_DefaultNew); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), FeVariable_IrregTri_Type, "0", (Stg_Component_DefaultConstructorFunction*) _FeVariable_IrregTri_DefaultNew); RegisterParent( FeVariable_IrregTri_Type, FeVariable_Type); RegisterParent( ThermalDataShape_Type, Stg_Shape_Type ); RegisterParent( ThermalDataMaterial_Type, Stg_Component_Type ); RegisterParent( ConductivityMaterialManager_Type, Stg_Component_Type ); RegisterParent( IrregularQuadGenerator_Type, MeshGenerator_Type ); RegisterParent( IrregularTriGenerator_Type, MeshGenerator_Type ); RegisterParent( Mesh_SimplexType_Type, Mesh_ElementType_Type ); RegisterParent( Mesh_SimplexAlgorithms_Type, Mesh_Algorithms_Type ); RegisterParent( FieldVariableSurfaceAdaptor_Type, MeshAdaptor_Type ); RegisterParent( FieldVariableSurfaceAdaptorSimple_Type, MeshAdaptor_Type ); RegisterParent( DiscreetPointsVC_Type, VariableCondition_Type ); RegisterParent( IrregularMeshGaussLayout_Type, GaussParticleLayout_Type ); /*RegisterParent( MaterialLayer_Type, Stg_Component_Type );*/ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), ConstantField_Type, (Name)"0", _ConstantField_DefaultNew ); RegisterParent( ConstantField_Type, FeVariable_Type ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), ShapedMaterial_Type, (Name)"0", _ShapedMaterial_DefaultNew ); RegisterParent(ShapedMaterial_Type, Material_Type); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), MaterialRegisterShape_Type, (Name)"0", _MaterialRegisterShape_DefaultNew ); RegisterParent(MaterialRegisterShape_Type, Stg_Shape_Type); return True; }
void Stg_ComponentFactory_CreateComponents( Stg_ComponentFactory *self ) { Dictionary_Entry* componentDictEntry = NULL; Dictionary* currComponentDict = NULL; Type componentType = NULL; Name componentName = NULL; Stg_Component_DefaultConstructorFunction* componentConstructorFunction; Index component_I; Stream* stream; assert( self ); stream = self->infoStream; if( self->componentDict ){ Stream_Indent( stream ); /* add the contexts to the live component register first (so these get constructed/built/initialised first) */ for( component_I = 0; component_I < Dictionary_GetCount( self->componentDict ) ; component_I++ ){ componentDictEntry = self->componentDict->entryPtr[ component_I ]; currComponentDict = Dictionary_Entry_Value_AsDictionary( componentDictEntry->value ); componentType = Dictionary_GetString( currComponentDict, "Type" ); componentName = componentDictEntry->key; if( strcmp( componentType, "DomainContext" ) && strcmp( componentType, "FiniteElementContext" ) && strcmp( componentType, "PICelleratorContext" ) ) continue; if( LiveComponentRegister_Get( self->LCRegister, componentName ) != NULL ) { Journal_RPrintf( Journal_Register( Error_Type, self->type ), "Error in func %s: Trying to instantiate two components with the name of '%s'\n" "Each component's name must be unique.\n", __func__, componentName ); exit(EXIT_FAILURE); } /* Print Message */ /* Journal_Printf( stream, "Instantiating %s as %s\n", componentType, componentName ); */ /* Get Default Constructor for this type */ componentConstructorFunction = Stg_ComponentRegister_AssertGet( Stg_ComponentRegister_Get_ComponentRegister(), componentType, "0" ); /* Add to register */ LiveComponentRegister_Add( self->LCRegister, (Stg_Component*)componentConstructorFunction( componentName ) ); } /* now add the rest of the components */ for( component_I = 0; component_I < Dictionary_GetCount( self->componentDict ) ; component_I++ ){ componentDictEntry = self->componentDict->entryPtr[ component_I ]; currComponentDict = Dictionary_Entry_Value_AsDictionary( componentDictEntry->value ); componentType = Dictionary_GetString( currComponentDict, "Type" ); componentName = componentDictEntry->key; if( !strcmp( componentType, "DomainContext" ) || !strcmp( componentType, "FiniteElementContext" ) || !strcmp( componentType, "PICelleratorContext" ) ) continue; if( LiveComponentRegister_Get( self->LCRegister, componentName ) != NULL ) { Journal_RPrintf( Journal_Register( Error_Type, self->type ), "Error in func %s: Trying to instantiate two components with the name of '%s'\n" "Each component's name must be unique.\n", __func__, componentName ); exit(EXIT_FAILURE); } Journal_Firewall( strcmp( componentType, "" ), NULL, "In func %s: Component with name '%s' does not have a 'Type' specified.\n" "This is sometimes caused by incorrect or missing 'mergeType' resulting in clobbered input file components.\n" "You may need to add 'mergeType=\"merge\"' to this component. Please check your input file.", __func__, componentName); /* Print Message */ /* Journal_Printf( stream, "Instantiating %s as %s\n", componentType, componentName ); */ /* Get Default Constructor for this type */ componentConstructorFunction = Stg_ComponentRegister_AssertGet( Stg_ComponentRegister_Get_ComponentRegister(), componentType, "0" ); /* Add to register */ LiveComponentRegister_Add( self->LCRegister, (Stg_Component*)componentConstructorFunction( componentName ) ); } Stream_UnIndent( stream ); } else{ Journal_Printf( stream, "No Stg_Component List found..!\n" ); } }
Bool DiscretisationUtils_Init( int* argc, char** argv[] ) { Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */ VariableCondition_Register_Add( variableCondition_Register, AllElementsVC_Type, AllElementsVC_Factory ); VariableCondition_Register_Add( variableCondition_Register, AllNodesVC_Type, AllNodesVC_Factory ); VariableCondition_Register_Add( variableCondition_Register, WallVC_Type, WallVC_Factory ); VariableCondition_Register_Add( variableCondition_Register, CornerVC_Type, CornerVC_Factory ); VariableCondition_Register_Add( variableCondition_Register, InnerWallVC_Type, InnerWallVC_Factory ); VariableCondition_Register_Add( variableCondition_Register, ShapeVC_Type, ShapeVC_Factory ); VariableCondition_Register_Add( variableCondition_Register, FrictionVC_Type, FrictionVC_Factory ); VariableCondition_Register_Add( variableCondition_Register, SplitFrictionWallVC_Type, SplitFrictionWallVC_Factory ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), AllElementsVC_Type, "0", (Stg_Component_DefaultConstructorFunction*)AllElementsVC_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), AllNodesVC_Type, "0", (Stg_Component_DefaultConstructorFunction*)AllNodesVC_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), DofLayout_Type, "0", (Stg_Component_DefaultConstructorFunction*)DofLayout_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), FieldVariable_Type, "0", (Stg_Component_DefaultConstructorFunction*)FieldVariable_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), OperatorFieldVariable_Type, "0", (Stg_Component_DefaultConstructorFunction*)OperatorFieldVariable_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), WallVC_Type, "0", (Stg_Component_DefaultConstructorFunction*)WallVC_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), CornerVC_Type, "0", (Stg_Component_DefaultConstructorFunction*)CornerVC_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), InnerWallVC_Type, "0", (Stg_Component_DefaultConstructorFunction*)InnerWallVC_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), ShapeVC_Type, "0", _ShapeVC_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), FrictionVC_Type, "0", (Stg_Component_DefaultConstructorFunction*)FrictionVC_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), SplitFrictionWallVC_Type, "0", (Stg_Component_DefaultConstructorFunction*)SplitFrictionWallVC_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Remesher_Type, "0", (Stg_Component_DefaultConstructorFunction*)_Remesher_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), StripRemesher_Type, "0", (Stg_Component_DefaultConstructorFunction*)_StripRemesher_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), CellRemesher_Type, "0", (Stg_Component_DefaultConstructorFunction*)_CellRemesher_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), TimeIntegrator_Type,"0", _TimeIntegrator_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), TimeIntegratee_Type,"0", _TimeIntegratee_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), ShapeAdvector_Type,"0", _ShapeAdvector_DefaultNew ); RegisterParent( DiscretisationContext_Type, AbstractContext_Type ); RegisterParent( Operator_Type, Stg_Object_Type ); RegisterParent( AllElementsVC_Type, VariableCondition_Type ); RegisterParent( AllNodesVC_Type, VariableCondition_Type ); RegisterParent( WallVC_Type, VariableCondition_Type ); RegisterParent( CornerVC_Type, VariableCondition_Type ); RegisterParent( InnerWallVC_Type, VariableCondition_Type ); RegisterParent( ShapeVC_Type, VariableCondition_Type ); RegisterParent( FrictionVC_Type, VariableCondition_Type ); RegisterParent( SplitFrictionWallVC_Type, VariableCondition_Type ); RegisterParent( DofLayout_Type, Stg_Component_Type ); RegisterParent( MeshCoarsener_Hexa_Type, Stg_Component_Type ); RegisterParent( Sync_Type, Stg_Component_Type ); RegisterParent( Remesher_Type, Stg_Component_Type ); RegisterParent( StripRemesher_Type, Remesher_Type ); RegisterParent( CellRemesher_Type, Remesher_Type ); RegisterParent( FieldVariable_Type, Stg_Component_Type ); RegisterParent( OperatorFieldVariable_Type, FieldVariable_Type ); RegisterParent( FieldVariable_Register_Type, NamedObject_Register_Type ); RegisterParent( LinearRegression_Type, Stg_Class_Type ); RegisterParent( TimeIntegratee_Type, Stg_Component_Type ); RegisterParent( TimeIntegrator_Type, Stg_Component_Type ); RegisterParent( ShapeAdvector_Type, Stg_Component_Type ); return True; }
Bool BaseContext_Init( int* argc, char** argv[] ) { Stream* typedStream; /* DO NOT CHANGE OR REMOVE */ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* Create global ConditionFunction register. */ condFunc_Register = ConditionFunction_Register_New(); /* Create global AnalyticFunction register. */ analyticFunc_Register = AnalyticFunction_Register_New(); /* Create global VariableCondition register. */ variableCondition_Register = VariableCondition_Register_New(); VariableCondition_Register_Add( variableCondition_Register, SetVC_Type, SetVC_Factory ); VariableCondition_Register_Add( variableCondition_Register, CompositeVC_Type, CompositeVC_Factory ); VariableCondition_Register_Add( variableCondition_Register, VariableAllVC_Type, VariableAllVC_Factory ); typedStream = VariableDumpStream_New( VariableDumpStream_Type ); Stream_Enable( typedStream, True ); Stream_SetLevel( typedStream, 1 ); Stream_SetFile( typedStream, stJournal->stdOut ); Journal_RegisterTypedStream( typedStream ); /* Adding default constructors of various components to the Stg_ComponentRegister */ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Variable_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)_Variable_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), CompositeVC_Type, "0", (Stg_Component_DefaultConstructorFunction*)_CompositeVC_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), SetVC_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)_SetVC_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), VariableAllVC_Type, "0", (Stg_Component_DefaultConstructorFunction*)_VariableAllVC_DefaultNew ); Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), DynamicVC_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)_DynamicVC_DefaultNew ); /* Register Parents for All Classes */ RegisterParent( Variable_Type, Stg_Component_Type ); RegisterParent( VariableCondition_Register_Type, Stg_Class_Type ); RegisterParent( VariableDumpStream_Type, CStream_Type ); RegisterParent( Variable_Register_Type, Stg_Class_Type ); RegisterParent( VariableCondition_Type, Stg_Component_Type ); RegisterParent( ConditionFunction_Type, Stg_Class_Type ); RegisterParent( ConditionFunction_Register_Type, Stg_Class_Type ); RegisterParent( CompositeVC_Type, VariableCondition_Type ); RegisterParent( DynamicVC_Type, VariableCondition_Type ); RegisterParent( VariableAllVC_Type, VariableCondition_Type ); RegisterParent( AbstractContext_Type, Stg_Component_Type ); RegisterParent( ContextEntryPoint_Type, EntryPoint_Type ); return True; }