Skip to content

Commit 546e8e8

Browse files
Merge pull request #13432 from KratosMultiphysics/FixUpdateOrderInAnalysisStage
[Core][Analysis stage] Attempting to solve #13350 finally merging!!
2 parents d1d3d0a + e449f47 commit 546e8e8

55 files changed

Lines changed: 6783 additions & 800 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci_apps_linux.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"MPMApplication",
2424
"ChimeraApplication",
2525
"StatisticsApplication",
26-
"SwimmingDEMApplication",
2726
"ConstitutiveLawsApplication",
2827
"RomApplication",
2928
"ShallowWaterApplication",

.github/workflows/ci_apps_windows.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"MappingApplication",
1717
"CoSimulationApplication",
1818
"StatisticsApplication",
19-
"SwimmingDEMApplication",
2019
"ShapeOptimizationApplication",
2120
"ConstitutiveLawsApplication",
2221
"RANSApplication",

.github/workflows/configure.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\MPMApplication;
2626
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\MappingApplication;
2727
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\CoSimulationApplication;
2828
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\StatisticsApplication;
29-
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\SwimmingDEMApplication;
29+
@REM set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\SwimmingDEMApplication;
3030
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\ShapeOptimizationApplication;
3131
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\ConstitutiveLawsApplication;
3232
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\RANSApplication;

.github/workflows/configure_research_applications.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ add_app ${KRATOS_APP_DIR}/PoromechanicsApplication;
3939
add_app ${KRATOS_APP_DIR}/RANSApplication;
4040
add_app ${KRATOS_APP_DIR}/ShallowWaterApplication;
4141
add_app ${KRATOS_APP_DIR}/ShapeOptimizationApplication;
42-
add_app ${KRATOS_APP_DIR}/SwimmingDEMApplication;
42+
# add_app ${KRATOS_APP_DIR}/SwimmingDEMApplication;
4343
add_app ${KRATOS_APP_DIR}/SystemIdentificationApplication;
4444

4545
# Clean

applications/CoSimulationApplication/python_scripts/base_classes/co_simulation_coupled_solver.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ def Predict(self):
177177
solver.Predict()
178178

179179
def InitializeSolutionStep(self):
180+
# First we call the Predict the analysis_stage InitializeSolutionStep definition
181+
self.Predict()
182+
183+
# Now we execute the corresponding InitializeSolutionStep functions of the solvers, predictors and coupling operations
180184
for solver in self.solver_wrappers.values():
181185
solver.InitializeSolutionStep()
182186

applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_disp_ref_aitken.dat

Lines changed: 151 additions & 151 deletions
Large diffs are not rendered by default.

applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_disp_ref_mvqn.dat

Lines changed: 151 additions & 151 deletions
Large diffs are not rendered by default.

applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_fluid_ref_aitken.dat

Lines changed: 151 additions & 151 deletions
Large diffs are not rendered by default.

applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_fluid_ref_mvqn.dat

Lines changed: 151 additions & 151 deletions
Large diffs are not rendered by default.

applications/CoSimulationApplication/tests/test_mok_fsi.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ class TestMokFSI(co_simulation_test_case.CoSimulationTestCase):
1717

1818
def setUp(self):
1919
self.err_tol = "1e-6"
20+
self.relative_err_tol = "1e-9"
2021
if not have_fsi_dependencies:
2122
self.skipTest("FSI dependencies are not available!")
2223

23-
2424
def test_mok_fsi_mvqn(self):
2525
self.accelerator_type = "mvqn"
2626

@@ -54,7 +54,6 @@ def test_mok_fsi_block_mvqn(self):
5454
self.__DumpUpdatedCFDSettings()
5555
self._runTest()
5656

57-
5857
def test_mok_fsi_block_ibqnls(self):
5958
self.accelerator_type = "block_ibqnls"
6059
self.err_tol = "6e-5"
@@ -112,7 +111,6 @@ def test_mok_fsi_mvqn_external_structure_mpi(self):
112111
num_procs = KM.Testing.GetDefaultDataCommunicator().Size()
113112
self._runTestWithExternal(["mpiexec", "-np", str(num_procs), GetPython3Command(), "testing_structural_mechanics_analysis_with_co_sim_io.py", "--using-mpi", ext_parameter_file_name])
114113

115-
116114
def __ManipulateCFDSettings(self):
117115
self.cosim_parameters["solver_settings"]["convergence_accelerators"][0]["type"].SetString(self.accelerator_type)
118116
self.cosim_parameters["solver_settings"]["solvers"]["fluid"]["solver_wrapper_settings"]["input_file"].SetString(self.cfd_tes_file_name)
@@ -161,14 +159,15 @@ def __AddTestingToCFD(self):
161159
"MESH_VELOCITY_Y"]
162160
}
163161
},{
164-
"python_module" : "compare_two_files_check_process",
165-
"kratos_module" : "KratosMultiphysics",
166-
"process_name" : "CompareTwoFilesCheckProcess",
167-
"Parameters" :{
168-
"output_file_name" : "fsi_mok/fsi_mok_cfd_results_disp.dat",
169-
"reference_file_name" : \""""+disp_ref_file_name.replace("\\", "\\\\")+"""\",
170-
"comparison_type" : "dat_file_variables_time_history",
171-
"tolerance" : """+self.err_tol+"""
162+
"python_module" : "compare_two_files_check_process",
163+
"kratos_module" : "KratosMultiphysics",
164+
"process_name" : "CompareTwoFilesCheckProcess",
165+
"Parameters" :{
166+
"output_file_name" : "fsi_mok/fsi_mok_cfd_results_disp.dat",
167+
"reference_file_name" : \""""+disp_ref_file_name.replace("\\", "\\\\")+"""\",
168+
"comparison_type" : "dat_file_variables_time_history",
169+
"relative_tolerance" : """+self.relative_err_tol+""",
170+
"tolerance" : """+self.err_tol+"""
172171
}
173172
},{
174173
"kratos_module" : "KratosMultiphysics",
@@ -191,16 +190,17 @@ def __AddTestingToCFD(self):
191190
"MESH_VELOCITY_Y"]
192191
}
193192
},{
194-
"python_module" : "compare_two_files_check_process",
195-
"kratos_module" : "KratosMultiphysics",
196-
"process_name" : "CompareTwoFilesCheckProcess",
197-
"Parameters" :{
198-
"output_file_name" : "fsi_mok/fsi_mok_cfd_results_fluid.dat",
199-
"reference_file_name" : \""""+fluid_ref_file_name.replace("\\", "\\\\")+"""\",
200-
"comparison_type" : "dat_file_variables_time_history",
201-
"tolerance" : """+self.err_tol+"""
193+
"python_module" : "compare_two_files_check_process",
194+
"kratos_module" : "KratosMultiphysics",
195+
"process_name" : "CompareTwoFilesCheckProcess",
196+
"Parameters" :{
197+
"output_file_name" : "fsi_mok/fsi_mok_cfd_results_fluid.dat",
198+
"reference_file_name" : \""""+fluid_ref_file_name.replace("\\", "\\\\")+"""\",
199+
"comparison_type" : "dat_file_variables_time_history",
200+
"tolerance" : """+self.err_tol+"""
202201
}
203-
}]"""))
202+
}
203+
]"""))
204204

205205
def __DumpUpdatedCFDSettings(self):
206206
with open(self.cfd_tes_file_name, 'w') as parameter_output_file:
@@ -216,6 +216,6 @@ def tearDownClass(cls):
216216
super(TestMokFSI,cls).tearDownClass()
217217
kratos_utils.DeleteFileIfExisting(GetFilePath(cls.cfd_tes_file_name))
218218

219-
220219
if __name__ == '__main__':
220+
KM.Logger.GetDefaultOutput().SetSeverity(KM.Logger.Severity.WARNING)
221221
KratosUnittest.main()

0 commit comments

Comments
 (0)