diff --git a/src/runnables/compare.py b/src/runnables/compare.py index 1e0ab43..f4a2f7d 100644 --- a/src/runnables/compare.py +++ b/src/runnables/compare.py @@ -32,8 +32,9 @@ def test_order(errors, next_params): print(' ', ' -> '.join(map(str, param_chain))) e = np.array(error_chain, dtype=float) + print(' ', ' '.join([f'{i:16.12f}' for i in e])) ed = e[:-1] / e[1:] - print(' ', ' '.join([f'{i:6.2f}' for i in ed])) + print(' ', ' '.join([f'{i:16.12f}' for i in ed])) def test_solver(solver, Is, Ks): @@ -61,14 +62,14 @@ def test_solver(solver, Is, Ks): print() print(solver.__name__) - print('O(h_x, h_t) MAEL SHOULD BE >=2') - test_order(errors_mae_last, next_params=lambda params: (params[0] * 2, params[1] * 2)) + print('O(h_x, h_t) MAE SHOULD BE >=2') + test_order(errors_mae, next_params=lambda params: (params[0] * 2, params[1] * 2)) - print(f'O(h_x, h_t^2) MAEL SHOULD BE >=4') - test_order(errors_mae_last, next_params=lambda params: (params[0] * 4, params[1] * 2)) + print(f'O(h_x, h_t^2) MAE SHOULD BE >=4') + test_order(errors_mae, next_params=lambda params: (params[0] * 4, params[1] * 2)) - print(f'O(h_x^2, h_t) MAEL SHOULD BE >=4') - test_order(errors_mae_last, next_params=lambda params: (params[0] * 2, params[1] * 4)) + print(f'O(h_x^2, h_t) MAE SHOULD BE >=4') + test_order(errors_mae, next_params=lambda params: (params[0] * 2, params[1] * 4)) if __name__ == '__main__': @@ -76,11 +77,11 @@ if __name__ == '__main__': # Ks = [4, 8, 16, 32, 64, 128, 256, 512] # Is = [4, 8, 16, 32, 64, 128, 256, 512] # Ks = [32, 64, 128, 256, 512, 1024, 2048, 4096] - Is = [4, 8, 16, 32, 64] - Ks = [32, 64, 128, 256, 512, 1024] + Is = [4, 8, 16, 32, 64, 128, 256, 512, 1024] + Ks = [4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096] test_solver(solve_explicit, Is, Ks) - test_solver(solve_implicit, Is, Ks) + # test_solver(solve_implicit, Is, Ks) test_solver(solve_implicit_improved, Is, Ks) - test_solver(solve_crank_nicolson, Is, Ks) + # test_solver(solve_crank_nicolson, Is, Ks) test_solver(solve_crank_nicolson_improved, Is, Ks) diff --git a/Отчет_ЧММФ_Анурин_Гринина_Попов.docx b/Отчет_ЧММФ_Анурин_Гринина_Попов.docx index 1edd37e..ad7357c 100644 Binary files a/Отчет_ЧММФ_Анурин_Гринина_Попов.docx and b/Отчет_ЧММФ_Анурин_Гринина_Попов.docx differ diff --git a/Отчет_ЧММФ_Анурин_Гринина_Попов.pdf b/Отчет_ЧММФ_Анурин_Гринина_Попов.pdf index dfb9c62..ea29f97 100644 Binary files a/Отчет_ЧММФ_Анурин_Гринина_Попов.pdf and b/Отчет_ЧММФ_Анурин_Гринина_Попов.pdf differ