def __init__(self, model, custom_settings): self._validate_settings_in_baseclass = True # To be removed eventually # Construct the base solver. super(ContactStaticMechanicalSolver, self).__init__(model, custom_settings) self.contact_settings = self.settings["contact_settings"] # Linear solver settings if self.settings.Has("linear_solver_settings"): self.linear_solver_settings = self.settings[ "linear_solver_settings"] else: self.linear_solver_settings = KM.Parameters("""{}""") # Setting default configurations true by default auxiliar_methods_solvers.AuxiliarSetSettings(self.settings, self.contact_settings) # Setting echo level self.echo_level = self.settings["echo_level"].GetInt() # Initialize the processes list self.processes_list = None # Initialize the post process self.post_process = None KM.Logger.PrintInfo( "::[Contact Mechanical Static Solver]:: ", "Construction of ContactMechanicalSolver finished")
def __init__(self, model, custom_settings): ## Settings string in json format contact_settings = auxiliar_methods_solvers.AuxiliarExplicitContactSettings( ) ## Overwrite the default settings with user-provided parameters self.settings = custom_settings self.validate_and_transfer_matching_settings(self.settings, contact_settings) self.contact_settings = contact_settings["contact_settings"] # Construct the base solver. super(ContactExplicitMechanicalSolver, self).__init__(model, self.settings) # Setting default configurations true by default auxiliar_methods_solvers.AuxiliarSetSettings(self.settings, self.contact_settings) # Getting delta_time_factor_for_contact self.delta_time_factor_for_contact = self.contact_settings[ "delta_time_factor_for_contact"].GetDouble() # Setting echo level self.echo_level = self.settings["echo_level"].GetInt() KM.Logger.PrintInfo( "::[Contact Mechanical Explicit Dynamic Solver]:: ", "Construction of ContactMechanicalSolver finished")
def __init__(self, model, custom_settings): # Construct the base solver. super(ContactExplicitMechanicalSolver, self).__init__(model, custom_settings) self.contact_settings = self.settings["contact_settings"] # Setting default configurations true by default auxiliar_methods_solvers.AuxiliarSetSettings(self.settings, self.contact_settings) # Getting delta_time_factor_for_contact self.delta_time_factor_for_contact = self.contact_settings["delta_time_factor_for_contact"].GetDouble() # Setting echo level self.echo_level = self.settings["echo_level"].GetInt() KM.Logger.PrintInfo("::[Contact Mechanical Explicit Dynamic Solver]:: ", "Construction of ContactMechanicalSolver finished")
def __init__(self, model, custom_settings): ## Settings string in json format contact_settings = auxiliar_methods_solvers.AuxiliarContactSettings() ## Overwrite the default settings with user-provided parameters self.settings = custom_settings self.validate_and_transfer_matching_settings(self.settings, contact_settings) self.contact_settings = contact_settings["contact_settings"] # Linear solver settings if self.settings.Has("linear_solver_settings"): self.linear_solver_settings = self.settings[ "linear_solver_settings"] else: self.linear_solver_settings = KM.Parameters("""{}""") # Construct the base solver. super(ContactStaticMechanicalSolver, self).__init__(model, self.settings) # Setting default configurations true by default auxiliar_methods_solvers.AuxiliarSetSettings(self.settings, self.contact_settings) # Setting echo level self.echo_level = self.settings["echo_level"].GetInt() # Initialize the processes list self.processes_list = None # Initialize the post process self.post_process = None KM.Logger.PrintInfo( "::[Contact Mechanical Static Solver]:: ", "Construction of ContactMechanicalSolver finished")