void _VectorAssemblyTerm_NA__Fn_AssignFromXML( void* forceTerm, Stg_ComponentFactory* cf, void* data ) { VectorAssemblyTerm_NA__Fn* self = (VectorAssemblyTerm_NA__Fn*)forceTerm; /* Construct Parent */ _ForceTerm_AssignFromXML( self, cf, data ); }
void _SUPGAdvDiffTermPpc_AssignFromXML( void* residual, Stg_ComponentFactory* cf, void* data ) { SUPGAdvDiffTermPpc* self = (SUPGAdvDiffTermPpc*)residual; PpcManager* mgr = NULL; /* Construct Parent */ _ForceTerm_AssignFromXML( self, cf, data ); /* The PpcManager */ mgr = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Manager", PpcManager, False, data ); if ( !mgr ) mgr = Stg_ComponentFactory_ConstructByName( cf, (Name)"default_ppcManager", PpcManager, True, data ); _SUPGAdvDiffTermPpc_Init( self, mgr, Stg_ComponentFactory_ConstructByNameWithKeyFallback( cf, self->name, (Dictionary_Entry_Key)"default_EnergyEqn", (Dictionary_Entry_Key)"EnergyEqn", AdvectionDiffusionSLE, True, data ), Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"VelocityField", FeVariable, True, data ), Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"PhiField", FeVariable, True, data ), Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"UpwindXiFunction", "Exact" ), PpcManager_GetPpcFromDict( mgr, cf, self->name, (Dictionary_Entry_Key)"DiffusivityLabel", "DiffusivityLabel" ) ); }
void _ThermalBuoyancyForceTerm_AssignFromXML( void* forceTerm, Stg_ComponentFactory* cf, void* data ) { ThermalBuoyancyForceTerm* self = (ThermalBuoyancyForceTerm*)forceTerm; FeVariable* temperatureField; double rayleighNumber; /* Construct Parent */ _ForceTerm_AssignFromXML( self, cf, data ); temperatureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"TemperatureField", FeVariable, True, data ) ; rayleighNumber = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"Ra", 0.0 ); _ThermalBuoyancyForceTerm_Init( self, temperatureField, rayleighNumber ); }
void _BuoyancyForceTermPpc_AssignFromXML( void* _self, Stg_ComponentFactory* cf, void* data ) { BuoyancyForceTermPpc* self = (BuoyancyForceTermPpc*)_self; PpcManager* mgr = NULL; /* Construct Parent */ _ForceTerm_AssignFromXML( self, cf, data ); /* The PpcManager */ mgr = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Manager", PpcManager, False, data ); if( !mgr ) mgr = Stg_ComponentFactory_ConstructByName( cf, (Name)"default_ppcManager", PpcManager, True, data ); self->density_id = PpcManager_GetPpcFromDict( mgr, cf, self->name, (Dictionary_Entry_Key)"DensityLabel", "DensityLabel" ); _BuoyancyForceTermPpc_Init( self, mgr ); }
void _GALEDivergenceForce_AssignFromXML( void* forceTerm, Stg_ComponentFactory* cf, void* data ) { GALEDivergenceForce* self = (GALEDivergenceForce*)forceTerm; Dictionary* dict; Stg_Shape* domainShape=NULL; FeMesh* geometryMesh=NULL; GALEStressBC_Entry force; char *type; /* Construct Parent */ _ForceTerm_AssignFromXML( self, cf, data ); dict = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( cf->componentDict, self->name ) ); domainShape = Stg_ComponentFactory_ConstructByKey( cf, self->name, "DomainShape", Stg_Shape, True, data ) ; type = Stg_ComponentFactory_GetString( cf, self->name, "force_type", "" ); if(!strcasecmp(type,"double") || !strcasecmp(type,"float")) { force.type = GALEStressBC_Double; force.DoubleValue = Stg_ComponentFactory_GetDouble( cf, self->name, "force_value", 0.0 ); } else if(!strcasecmp(type,"func")) { char *funcName = Stg_ComponentFactory_GetString( cf, self->name, "force_value", "" ); Index cfIndex; cfIndex = ConditionFunction_Register_GetIndex ( condFunc_Register, funcName); force.type = GALEStressBC_ConditionFunction; if ( cfIndex == (unsigned)-1 ) { Stream* errorStr = Journal_Register( Error_Type, self->type ); Journal_Printf( errorStr, "Error- in %s: While parsing " "definition of GALEDivergenceForce, the cond. func. " " \"%s\" - wasn't found in the c.f. register.\n", __func__, funcName ); Journal_Printf( errorStr, "(Available functions in the C.F. register are: "); ConditionFunction_Register_PrintNameOfEachFunc ( condFunc_Register, errorStr ); Journal_Printf( errorStr, ")\n"); assert(0); } force.CFIndex = cfIndex; } else if(strlen(type)==0) { Stream* errorStr = Journal_Register( Error_Type, self->type ); Journal_Printf( errorStr, "Error- in %s: While parsing " "definition of GALEDivergenceForce, force_type is not specified.\nSupported types are \"double\" and \"function\".\n", __func__); assert(0); } else { Stream* errorStr = Journal_Register( Error_Type, self->type ); Journal_Printf( errorStr, "Error- in %s: While parsing " "definition of GALEDivergenceForce, the type of condition \"%s\"\nis not supported. Supported types are \"double\" and \"function\".\n", __func__, type ); assert(0); } geometryMesh=Stg_ComponentFactory_ConstructByKey( cf, self->name, "GeometryMesh", FeMesh, True, data ) ; _GALEDivergenceForce_Init( self, domainShape, geometryMesh, force); }