void _Viscoelastic_ViscoelasticCantileverBeam_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
	UnderworldContext*  context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
	
	ContextEP_Append( context, AbstractContext_EP_FrequentOutput, CalcDeflectionAndCheckGravity );

	StgFEM_FrequentOutput_PrintString( context, "Deflection" );
}
void _Spherical_CubedSphereNusselt_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
   Spherical_CubedSphereNusselt*	self 	= (Spherical_CubedSphereNusselt*)component;
   UnderworldContext*			context;
   FieldVariable_Register*		fV_Register;
   FeVariable*				temperatureGradientsField;
   FeVariable*				velocityField;
   FeVariable*				temperatureField;

   self->context = (AbstractContext*)Stg_ComponentFactory_PluginConstructByKey( cf, self, (Dictionary_Entry_Key)"Context", UnderworldContext, True, data );

   self->gaussSwarm = Stg_ComponentFactory_PluginConstructByKey( cf, self, (Dictionary_Entry_Key)"GaussSwarm", Swarm, True, data );

   /* The PpcManager */
   self->mgr = Stg_ComponentFactory_PluginConstructByKey( cf, self, (Dictionary_Entry_Key)"Manager", PpcManager, False, data );
   if( !self->mgr  )
      self->mgr = Stg_ComponentFactory_ConstructByName( cf, (Name)"default_ppcManager", PpcManager, True, data  );

   // initialise as unfound ppc
   self->volAvgVD = self->volAvgW = self->volAvgT = self->vol = NULL;

   self->volAvgVD = Stg_ComponentFactory_PluginConstructByKey( cf, self, "volume_averaged_viscous_dissipation",PpcIntegral, False, data);
   self->volAvgW = Stg_ComponentFactory_PluginConstructByKey( cf, self, "volume_averaged_work_done",PpcIntegral, False, data);
   self->volAvgT = Stg_ComponentFactory_PluginConstructByKey( cf, self, "volume_averaged_temperature",PpcIntegral, True, data);
   self->vol = Stg_ComponentFactory_PluginConstructByKey( cf, self, "volume",PpcIntegral, True, data);

   self->Ra = Stg_ComponentFactory_PluginGetDouble( cf, self, (Dictionary_Entry_Key)"Ra", -2 );
   assert( self->Ra > -1 );

   StgFEM_FrequentOutput_PrintString( self->context, "<T'>" );
   StgFEM_FrequentOutput_PrintString( self->context, "NuU_av" );
   StgFEM_FrequentOutput_PrintString( self->context, "NuB_av" );

   StgFEM_FrequentOutput_PrintString( self->context, "out_max_VelMag" );
   StgFEM_FrequentOutput_PrintString( self->context, "in_max_VelMag" );

   // if ppcs found then add to FrequentOutput file
   if( self->vol ) {
      if( self->volAvgVD )
         StgFEM_FrequentOutput_PrintString( self->context, "volAvgVD" );
      if( self->volAvgW )
         StgFEM_FrequentOutput_PrintString( self->context, "volAvgW" );
   }
   
   context = (UnderworldContext*)self->context;
   fV_Register = context->fieldVariable_Register;
   /* Create Some FeVariables to calculate nusselt number */
   temperatureField = self->temperatureField = (FeVariable*)FieldVariable_Register_GetByName( fV_Register, "TemperatureField" );
   velocityField = self->velocityField = (FeVariable*)FieldVariable_Register_GetByName( fV_Register, "VelocityField" );
   temperatureGradientsField = self->temperatureGradientsField = (FeVariable*)FieldVariable_Register_GetByName( fV_Register, "TemperatureGradientsField" );
   
   self->mesh = ((FeVariable*)temperatureField)->feMesh;
   self->advectiveHeatFluxField = OperatorFeVariable_NewBinary(  
      "AdvectiveHeatFluxField", (DomainContext*)context, temperatureField, velocityField, "VectorScale" );

   self->temperatureTotalDerivField = OperatorFeVariable_NewBinary(  
      "TemperatureTotalDerivField", (DomainContext*)context, self->advectiveHeatFluxField, temperatureGradientsField, 
      "Subtraction" );
   
   /* Add functions to entry points */
   ContextEP_Append( self->context, AbstractContext_EP_FrequentOutput, Spherical_CubedSphereNusselt_Output );
   ContextEP_Append( self->context, AbstractContext_EP_FrequentOutput, Spherical_MaxVel_Output );

   // if the definition for the vd and adiabatic work exist add another hook
   if( self->vol && self->volAvgVD && self->volAvgW )
      ContextEP_Append( self->context, AbstractContext_EP_FrequentOutput, Spherical_Work_Output );
}
void Underworld_Mobility_PrintHeaderToFile( void* context ) {
   StgFEM_FrequentOutput_PrintString( context, "Mobility" );
}
Example #4
0
void Underworld_Vrms_PrintHeaderToFile( void* context ) {
   StgFEM_FrequentOutput_PrintString( context, "Vrms" );
}