예제 #1
0
    def SetProjectParameters(self, parameters):
        self.project_parameters = parameters
        self.time_step = self.project_parameters["time_stepping"][
            "time_step"].GetDouble()
        self.end_time = self.project_parameters["problem_data"][
            "end_time"].GetDouble()
        self.do_print_results = self.project_parameters[
            "do_print_results_option"].GetBool()
        self.fluid_parameters = self.project_parameters['fluid_parameters']

        # First, read the parameters generated from the interface
        import KratosMultiphysics.SwimmingDEMApplication.swimming_dem_default_input_parameters as only_swimming_defaults
        import KratosMultiphysics.DEMApplication.dem_default_input_parameters as dem_defaults

        self.project_parameters.ValidateAndAssignDefaults(
            only_swimming_defaults.GetDefaultInputParameters())
        self.project_parameters["dem_parameters"].ValidateAndAssignDefaults(
            dem_defaults.GetDefaultInputParameters())

        # Second, set the default 'beta' parameters (candidates to be moved to the interface)
        self.SetBetaParameters()

        # Third, make sure the parameters passed to the different (sub-)analyses is coherent
        # with the general parameters
        self.ModifyInputParametersForCoherence()
예제 #2
0
 def GetDefaultInputParameters(self):
     import KratosMultiphysics.DEMApplication.dem_default_input_parameters as dem_default_input_parameters
     return dem_default_input_parameters.GetDefaultInputParameters()