From a8b1322014623311fb1a2f5991c82cb0f1d8950e Mon Sep 17 00:00:00 2001 From: Ikrom Akramov Date: Fri, 12 Jan 2024 09:08:53 +0100 Subject: [PATCH] small edits for codecov --- .../Second_orderSDC/check_data_folder.py | 4 ++-- .../harmonic_oscillator_run_points.py | 15 ++++++++------- .../harmonic_oscillator_run_stab_interval.py | 19 ++++++++++--------- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/pySDC/projects/Second_orderSDC/check_data_folder.py b/pySDC/projects/Second_orderSDC/check_data_folder.py index f9088d4063..90b67bc0ef 100644 --- a/pySDC/projects/Second_orderSDC/check_data_folder.py +++ b/pySDC/projects/Second_orderSDC/check_data_folder.py @@ -1,6 +1,6 @@ -import os +import os # pragma: no cover -folder_name = "./data" +folder_name = "./data" # pragma: no cover # Check if the folder already exists if not os.path.isdir(folder_name): # pragma: no cover diff --git a/pySDC/projects/Second_orderSDC/harmonic_oscillator_run_points.py b/pySDC/projects/Second_orderSDC/harmonic_oscillator_run_points.py index 1ff96fa93a..25741c8a02 100644 --- a/pySDC/projects/Second_orderSDC/harmonic_oscillator_run_points.py +++ b/pySDC/projects/Second_orderSDC/harmonic_oscillator_run_points.py @@ -2,14 +2,15 @@ from pySDC.projects.Second_orderSDC.harmonic_oscillator_params import get_default_harmonic_oscillator_description from pySDC.projects.Second_orderSDC.stability_simulation import compute_and_generate_table -''' -This script generates table for the given points to compare in what quadrature type, -number of nodes and number of iterations the SDC iteration is stable or not. -Additional parameter: - To save the table set: save_points_table=True - Change filename: points_table_filename='FILENAME' by default: './data/point_table.txt' -''' + if __name__ == '__main__': + ''' + This script generates table for the given points to compare in what quadrature type, + number of nodes and number of iterations the SDC iteration is stable or not. + Additional parameter: + To save the table set: save_points_table=True + Change filename: points_table_filename='FILENAME' by default: './data/point_table.txt' + ''' # Get default parameters for the harmonic osicillator problem description = get_default_harmonic_oscillator_description() # Additonal params to compute stability points diff --git a/pySDC/projects/Second_orderSDC/harmonic_oscillator_run_stab_interval.py b/pySDC/projects/Second_orderSDC/harmonic_oscillator_run_stab_interval.py index 168e676958..6e7e1c2bca 100644 --- a/pySDC/projects/Second_orderSDC/harmonic_oscillator_run_stab_interval.py +++ b/pySDC/projects/Second_orderSDC/harmonic_oscillator_run_stab_interval.py @@ -2,16 +2,17 @@ from pySDC.projects.Second_orderSDC.harmonic_oscillator_params import get_default_harmonic_oscillator_description from pySDC.projects.Second_orderSDC.stability_simulation import compute_and_generate_table -''' -To compute maximum stable values for SDC and Picard iterations for the purely oscillatory case with -no damping (mu=0) -Additional parameter: - To save the table set: save_interval_file=True - Change filename: interval_filename='FILENAME' by default: './data/stab_interval.txt' -Output: - it generates to compare with different values of M (number of nodes) and K (maximal number of iterations) -''' + if __name__ == '__main__': + ''' + To compute maximum stable values for SDC and Picard iterations for the purely oscillatory case with + no damping (mu=0) + Additional parameter: + To save the table set: save_interval_file=True + Change filename: interval_filename='FILENAME' by default: './data/stab_interval.txt' + Output: + it generates to compare with different values of M (number of nodes) and K (maximal number of iterations) + ''' # Ger default parameters description = get_default_harmonic_oscillator_description() # Additional parameters to compute stability interval on the kappa