def __init__(self, settings, model, solver_name):
        super().__init__(settings, model, solver_name)

        model_part_utilities.CreateModelPartsFromCouplingDataSettings(
            self.settings["data"], self.model, self.name)
        model_part_utilities.AllocateHistoricalVariablesFromCouplingDataSettings(
            self.settings["data"], self.model, self.name)
Exemplo n.º 2
0
    def test_CreateModelPartsFromCouplingDataSettings(self):
        model_part_utilities.CreateModelPartsFromCouplingDataSettings(self.data_settings, self.model, "dummy_solver_name")

        # make sure the original settings are not modified
        self.assertFalse(self.data_settings["disp"].Has("location"))

        self.assertTrue(self.model.HasModelPart("Structure"))
        self.assertTrue(self.model.HasModelPart("Structure.Interface"))
        self.assertTrue(self.model.HasModelPart("Structure.GENERIC_FSI.subinterface"))
        self.assertTrue(self.model.HasModelPart("aux_model_part"))
Exemplo n.º 3
0
    def __init__(self, settings, model, solver_name):
        super(ExternalSolverWrapper, self).__init__(settings, model, solver_name)

        settings_defaults = KM.Parameters("""{
            "import_meshes"    : [ ],
            "export_data"      : [ ],
            "import_data"      : [ ]
        }""")

        self.settings["solver_wrapper_settings"].ValidateAndAssignDefaults(settings_defaults)

        model_part_utilities.CreateModelPartsFromCouplingDataSettings(self.settings["data"], self.model, self.name)
        model_part_utilities.AllocateHistoricalVariablesFromCouplingDataSettings(self.settings["data"], self.model, self.name)