def _set_time_integration_methods(self): scalar_integration_methods, component_integration_methods = self._get_time_integration_methods( ) # second: for the same method the parameters (already calculated) scalar_integration_methods_container = KratosSolid.ScalarTimeIntegrationMethods( ) for dof, method in scalar_integration_methods.items(): method.SetParameters( self.process_info ) #set same parameters to all methods from process_info values scalar_integration_methods_container.Set(dof, method) component_integration_methods_container = KratosSolid.ComponentTimeIntegrationMethods( ) for dof, method in component_integration_methods.items(): method.SetParameters( self.process_info ) #set same parameters to all methods from process_info values component_integration_methods_container.Set(dof, method) # set time integration methods (for scalars and components) to process_info for processes access if (len(scalar_integration_methods)): scalar_integration_methods_container.AddToProcessInfo( KratosSolid.SCALAR_TIME_INTEGRATION_METHODS, scalar_integration_methods_container, self.process_info) component_integration_methods_container.AddToProcessInfo( KratosSolid.COMPONENT_TIME_INTEGRATION_METHODS, component_integration_methods_container, self.process_info)
def SetTimeIntegration(self): self.fix_time_integration = False self.TimeIntegrationMethod = None time_integration_container = KratosSolid.ComponentTimeIntegrationMethods( ) if (time_integration_container.HasProcessInfo( KratosSolid.COMPONENT_TIME_INTEGRATION_METHODS, self.model_part.ProcessInfo)): time_integration_methods = time_integration_container.GetFromProcessInfo( KratosSolid.COMPONENT_TIME_INTEGRATION_METHODS, self.model_part.ProcessInfo) if (time_integration_methods.Has(self.variable_name)): self.TimeIntegrationMethod = time_integration_methods.Get( self.variable_name).Clone() else: method_variable_name = time_integration_methods.GetMethodVariableName( self.variable_name) if (method_variable_name != self.variable_name): self.TimeIntegrationMethod = time_integration_methods.Get( method_variable_name).Clone() if (self.TimeIntegrationMethod != None): self.fix_time_integration = True #set input variable input_variable = KratosMultiphysics.KratosGlobals.GetVariable( self.variable_name) self.TimeIntegrationMethod.SetInputVariable(input_variable)