From 4ab008c20830c5f583fbac9d95dd8c416655a0a9 Mon Sep 17 00:00:00 2001 From: Thomas Baumann Date: Wed, 11 Jan 2023 11:46:57 +0100 Subject: [PATCH 1/2] Ran spell checker on tutorials --- pySDC/tutorial/step_1/B_spatial_accuracy_check.py | 2 +- pySDC/tutorial/step_1/README.rst | 2 +- pySDC/tutorial/step_2/README.rst | 2 +- pySDC/tutorial/step_3/A_getting_statistics.py | 2 +- pySDC/tutorial/step_3/B_adding_statistics.py | 2 +- pySDC/tutorial/step_3/C_study_collocations.py | 2 +- pySDC/tutorial/step_4/B_multilevel_hierarchy.py | 2 +- pySDC/tutorial/step_4/C_SDC_vs_MLSDC.py | 2 +- pySDC/tutorial/step_5/A_multistep_multilevel_hierarchy.py | 2 +- pySDC/tutorial/step_5/B_my_first_PFASST_run.py | 4 ++-- pySDC/tutorial/step_5/C_advection_and_PFASST.py | 2 +- pySDC/tutorial/step_6/A_run_non_MPI_controller.py | 2 +- pySDC/tutorial/step_7/C_pySDC_with_PETSc.py | 2 +- pySDC/tutorial/step_8/B_multistep_SDC.py | 2 +- pySDC/tutorial/step_8/C_iteration_estimator.py | 4 ++-- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pySDC/tutorial/step_1/B_spatial_accuracy_check.py b/pySDC/tutorial/step_1/B_spatial_accuracy_check.py index 1d5c713a54..1b9d57cc7b 100644 --- a/pySDC/tutorial/step_1/B_spatial_accuracy_check.py +++ b/pySDC/tutorial/step_1/B_spatial_accuracy_check.py @@ -150,7 +150,7 @@ def plot_accuracy(results): # create new figure plt.figure() - # take x-axis limits from nvars_list + some spacning left and right + # take x-axis limits from nvars_list + some spacing left and right plt.xlim([min(nvars_list) / 2, max(nvars_list) * 2]) plt.xlabel('nvars') plt.ylabel('abs. error') diff --git a/pySDC/tutorial/step_1/README.rst b/pySDC/tutorial/step_1/README.rst index 21d789f0d1..87adaa5ab2 100644 --- a/pySDC/tutorial/step_1/README.rst +++ b/pySDC/tutorial/step_1/README.rst @@ -91,6 +91,6 @@ Important things to note: order in time with a 2nd order stencil in space. - Orders of convergence are not as stable as for the space-only test. One of the problems of this example is that we are actually trying to - compute 0 very, very thorougly... + compute 0 very, very thoroughly... .. include:: doc_step_1_D.rst diff --git a/pySDC/tutorial/step_2/README.rst b/pySDC/tutorial/step_2/README.rst index 5b767844c5..66658f03a4 100644 --- a/pySDC/tutorial/step_2/README.rst +++ b/pySDC/tutorial/step_2/README.rst @@ -86,6 +86,6 @@ Important things to note: iteration counts for now. We will deal with these later. - This example is the prototype for a user to work with pySDC. Most of the logic and most of the data structures are hidden, but all - relevant parameters are accessable using the ``description``. + relevant parameters are accessible using the ``description``. .. include:: doc_step_2_C.rst diff --git a/pySDC/tutorial/step_3/A_getting_statistics.py b/pySDC/tutorial/step_3/A_getting_statistics.py index 5c3bd25e87..deffb269b1 100644 --- a/pySDC/tutorial/step_3/A_getting_statistics.py +++ b/pySDC/tutorial/step_3/A_getting_statistics.py @@ -21,7 +21,7 @@ def main(): f.write(out + '\n') print(out) - # filter statistics by first time intervall and type (residual) + # filter statistics by first time interval and type (residual) residuals = get_sorted(stats, time=0.1, type='residual_post_iteration', sortby='iter') for item in residuals: diff --git a/pySDC/tutorial/step_3/B_adding_statistics.py b/pySDC/tutorial/step_3/B_adding_statistics.py index e9df27dddb..1240ec2bee 100644 --- a/pySDC/tutorial/step_3/B_adding_statistics.py +++ b/pySDC/tutorial/step_3/B_adding_statistics.py @@ -11,7 +11,7 @@ def main(): """ - A simple tets program to retrieve user-defined statistics from a run + A simple test program to retrieve user-defined statistics from a run """ Path("data").mkdir(parents=True, exist_ok=True) diff --git a/pySDC/tutorial/step_3/C_study_collocations.py b/pySDC/tutorial/step_3/C_study_collocations.py index 184706c107..18a28ce152 100644 --- a/pySDC/tutorial/step_3/C_study_collocations.py +++ b/pySDC/tutorial/step_3/C_study_collocations.py @@ -10,7 +10,7 @@ def main(): """ - A simple test program to show th eenergy deviation for different quadrature nodes + A simple test program to show the energy deviation for different quadrature nodes """ stats_dict = run_simulation() diff --git a/pySDC/tutorial/step_4/B_multilevel_hierarchy.py b/pySDC/tutorial/step_4/B_multilevel_hierarchy.py index 77ccf3158d..6c35e33242 100644 --- a/pySDC/tutorial/step_4/B_multilevel_hierarchy.py +++ b/pySDC/tutorial/step_4/B_multilevel_hierarchy.py @@ -47,7 +47,7 @@ def main(): description['level_params'] = level_params # pass level parameters description['step_params'] = step_params # pass step parameters description['space_transfer_class'] = mesh_to_mesh # pass spatial transfer class - description['space_transfer_params'] = space_transfer_params # pass paramters for spatial transfer + description['space_transfer_params'] = space_transfer_params # pass parameters for spatial transfer # now the description contains more or less everything we need to create a step with multiple levels S = step(description=description) diff --git a/pySDC/tutorial/step_4/C_SDC_vs_MLSDC.py b/pySDC/tutorial/step_4/C_SDC_vs_MLSDC.py index 881b47dfe3..cd7c45c146 100644 --- a/pySDC/tutorial/step_4/C_SDC_vs_MLSDC.py +++ b/pySDC/tutorial/step_4/C_SDC_vs_MLSDC.py @@ -73,7 +73,7 @@ def main(): description_mlsdc['level_params'] = level_params # pass level parameters description_mlsdc['step_params'] = step_params # pass step parameters description_mlsdc['space_transfer_class'] = mesh_to_mesh # pass spatial transfer class - description_mlsdc['space_transfer_params'] = space_transfer_params # pass paramters for spatial transfer + description_mlsdc['space_transfer_params'] = space_transfer_params # pass parameters for spatial transfer # instantiate the controller (no controller parameters used here) controller_sdc = controller_nonMPI(num_procs=1, controller_params=controller_params, description=description_sdc) diff --git a/pySDC/tutorial/step_5/A_multistep_multilevel_hierarchy.py b/pySDC/tutorial/step_5/A_multistep_multilevel_hierarchy.py index 8de1819a43..0c51932aed 100644 --- a/pySDC/tutorial/step_5/A_multistep_multilevel_hierarchy.py +++ b/pySDC/tutorial/step_5/A_multistep_multilevel_hierarchy.py @@ -47,7 +47,7 @@ def main(): description['level_params'] = level_params # pass level parameters description['step_params'] = step_params # pass step parameters description['space_transfer_class'] = mesh_to_mesh # pass spatial transfer class - description['space_transfer_params'] = space_transfer_params # pass paramters for spatial transfer + description['space_transfer_params'] = space_transfer_params # pass parameters for spatial transfer # instantiate controller controller = controller_nonMPI(num_procs=10, controller_params={}, description=description) diff --git a/pySDC/tutorial/step_5/B_my_first_PFASST_run.py b/pySDC/tutorial/step_5/B_my_first_PFASST_run.py index 72f4cda566..05559a205e 100644 --- a/pySDC/tutorial/step_5/B_my_first_PFASST_run.py +++ b/pySDC/tutorial/step_5/B_my_first_PFASST_run.py @@ -55,7 +55,7 @@ def main(): description['level_params'] = level_params # pass level parameters description['step_params'] = step_params # pass step parameters description['space_transfer_class'] = mesh_to_mesh # pass spatial transfer class - description['space_transfer_params'] = space_transfer_params # pass paramters for spatial transfer + description['space_transfer_params'] = space_transfer_params # pass parameters for spatial transfer # set time parameters t0 = 0.0 @@ -119,7 +119,7 @@ def main(): assert err < 1.3505e-04, "ERROR: error is too high, got %s" % err assert np.ptp(niters) <= 1, "ERROR: range of number of iterations is too high, got %s" % np.ptp(niters) - assert np.mean(niters) <= 5.0, "ERROR: mean number of iteratiobs is too high, got %s" % np.mean(niters) + assert np.mean(niters) <= 5.0, "ERROR: mean number of iterations is too high, got %s" % np.mean(niters) f.close() diff --git a/pySDC/tutorial/step_5/C_advection_and_PFASST.py b/pySDC/tutorial/step_5/C_advection_and_PFASST.py index 3ccde084ff..251368992d 100644 --- a/pySDC/tutorial/step_5/C_advection_and_PFASST.py +++ b/pySDC/tutorial/step_5/C_advection_and_PFASST.py @@ -56,7 +56,7 @@ def main(): description['level_params'] = level_params # pass level parameters description['step_params'] = step_params # pass step parameters description['space_transfer_class'] = mesh_to_mesh # pass spatial transfer class - description['space_transfer_params'] = space_transfer_params # pass paramters for spatial transfer + description['space_transfer_params'] = space_transfer_params # pass parameters for spatial transfer # set time parameters t0 = 0.0 diff --git a/pySDC/tutorial/step_6/A_run_non_MPI_controller.py b/pySDC/tutorial/step_6/A_run_non_MPI_controller.py index 58bb7cd10e..bc6202029b 100644 --- a/pySDC/tutorial/step_6/A_run_non_MPI_controller.py +++ b/pySDC/tutorial/step_6/A_run_non_MPI_controller.py @@ -122,7 +122,7 @@ def set_parameters_ml(): description['level_params'] = level_params # pass level parameters description['step_params'] = step_params # pass step parameters description['space_transfer_class'] = mesh_to_mesh # pass spatial transfer class - description['space_transfer_params'] = space_transfer_params # pass paramters for spatial transfer + description['space_transfer_params'] = space_transfer_params # pass parameters for spatial transfer # set time parameters t0 = 0.0 diff --git a/pySDC/tutorial/step_7/C_pySDC_with_PETSc.py b/pySDC/tutorial/step_7/C_pySDC_with_PETSc.py index 2cf58e2468..686ebf5ec8 100644 --- a/pySDC/tutorial/step_7/C_pySDC_with_PETSc.py +++ b/pySDC/tutorial/step_7/C_pySDC_with_PETSc.py @@ -85,7 +85,7 @@ def main(): description['level_params'] = level_params # pass level parameters description['step_params'] = step_params # pass step parameters description['space_transfer_class'] = mesh_to_mesh_petsc_dmda # pass spatial transfer class - description['space_transfer_params'] = space_transfer_params # pass paramters for spatial transfer + description['space_transfer_params'] = space_transfer_params # pass parameters for spatial transfer # set time parameters t0 = 0.0 diff --git a/pySDC/tutorial/step_8/B_multistep_SDC.py b/pySDC/tutorial/step_8/B_multistep_SDC.py index df9a00338a..b0e34e213a 100644 --- a/pySDC/tutorial/step_8/B_multistep_SDC.py +++ b/pySDC/tutorial/step_8/B_multistep_SDC.py @@ -53,7 +53,7 @@ def main(): description['level_params'] = level_params # pass level parameters description['step_params'] = step_params # pass step parameters description['space_transfer_class'] = mesh_to_mesh # pass spatial transfer class - description['space_transfer_params'] = space_transfer_params # pass paramters for spatial transfer + description['space_transfer_params'] = space_transfer_params # pass parameters for spatial transfer # set up parameters for PFASST run problem_params['nvars'] = [63, 31] diff --git a/pySDC/tutorial/step_8/C_iteration_estimator.py b/pySDC/tutorial/step_8/C_iteration_estimator.py index 16cca59e83..cfacc0eab1 100644 --- a/pySDC/tutorial/step_8/C_iteration_estimator.py +++ b/pySDC/tutorial/step_8/C_iteration_estimator.py @@ -75,7 +75,7 @@ def setup_diffusion(dt=None, ndim=None, ml=False): description['convergence_controllers'] = convergence_controllers if ml: description['space_transfer_class'] = mesh_to_mesh # pass spatial transfer class - description['space_transfer_params'] = space_transfer_params # pass paramters for spatial transfer + description['space_transfer_params'] = space_transfer_params # pass parameters for spatial transfer return description, controller_params @@ -141,7 +141,7 @@ def setup_advection(dt=None, ndim=None, ml=False): description['convergence_controllers'] = convergence_controllers if ml: description['space_transfer_class'] = mesh_to_mesh # pass spatial transfer class - description['space_transfer_params'] = space_transfer_params # pass paramters for spatial transfer + description['space_transfer_params'] = space_transfer_params # pass parameters for spatial transfer return description, controller_params From ee6bbde1391bb802642fc4ab1f46c550ddf82628 Mon Sep 17 00:00:00 2001 From: Thomas Baumann Date: Wed, 11 Jan 2023 12:02:12 +0100 Subject: [PATCH 2/2] Ran spellchecker on all core modules --- pySDC/core/BaseTransfer.py | 2 +- pySDC/core/Collocation.py | 2 +- pySDC/core/Controller.py | 4 ++-- pySDC/core/Hooks.py | 2 +- pySDC/core/Lagrange.py | 2 +- pySDC/core/Step.py | 2 +- pySDC/core/Sweeper.py | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pySDC/core/BaseTransfer.py b/pySDC/core/BaseTransfer.py index f3cc0c3f0c..54d140c0db 100644 --- a/pySDC/core/BaseTransfer.py +++ b/pySDC/core/BaseTransfer.py @@ -83,7 +83,7 @@ def restrict(self): """ Space-time restriction routine - The routine applies the spatial restriction operator to teh fine values on the fine nodes, then reevaluates f + The routine applies the spatial restriction operator to the fine values on the fine nodes, then reevaluates f on the coarse level. This is used for the first part of the FAS correction tau via integration. The second part is the integral over the fine values, restricted to the coarse level. Finally, possible tau corrections on the fine level are restricted as well. diff --git a/pySDC/core/Collocation.py b/pySDC/core/Collocation.py index d7a7383fee..3a796c9558 100644 --- a/pySDC/core/Collocation.py +++ b/pySDC/core/Collocation.py @@ -90,7 +90,7 @@ def __init__(self, num_nodes=None, tleft=0, tright=1, node_type='LEGENDRE', quad self.node_type = node_type self.quad_type = quad_type - # Instanciate attributes + # Instantiate attributes self.nodeGenerator = NodesGenerator(self.node_type, self.quad_type) if self.node_type == 'EQUID': self.order = num_nodes diff --git a/pySDC/core/Controller.py b/pySDC/core/Controller.py index 469297e126..c5257d2316 100644 --- a/pySDC/core/Controller.py +++ b/pySDC/core/Controller.py @@ -40,7 +40,7 @@ def __init__(self, controller_params, description): controller_params (dict): parameter set for the controller and the steps """ - # check if we have a hook on this list. if not, use default class. + # check if we have a hook on this list. If not, use default class. controller_params['hook_class'] = controller_params.get('hook_class', hookclass.hooks) self.__hooks = controller_params['hook_class']() @@ -262,7 +262,7 @@ def add_convergence_controller(self, convergence_controller, description, params Args: convergence_controller (pySDC.ConvergenceController): The convergence controller to be added description (dict): The description object used to instantiate the controller - params (dict): Parametes for the convergence controller + params (dict): Parameters for the convergence controller allow_double (bool): Allow adding the same convergence controller multiple times Returns: diff --git a/pySDC/core/Hooks.py b/pySDC/core/Hooks.py index 0d05f27372..5268278529 100644 --- a/pySDC/core/Hooks.py +++ b/pySDC/core/Hooks.py @@ -26,7 +26,7 @@ class hooks(object): __num_restarts (int): number of restarts of the current step logger: logger instance for output __stats (dict): dictionary for gathering the statistics of a run - __entry (namedtuple): statistics entry containign all information to identify the value + __entry (namedtuple): statistics entry containing all information to identify the value """ def __init__(self): diff --git a/pySDC/core/Lagrange.py b/pySDC/core/Lagrange.py index e3ed2b869b..1c7e0e4105 100644 --- a/pySDC/core/Lagrange.py +++ b/pySDC/core/Lagrange.py @@ -43,7 +43,7 @@ def computeFejerRule(n): v1 = np.empty(len(v0) - 1, dtype=complex) np.conjugate(v0[:0:-1], out=v1) v1 += v0[:-1] - # -- Compute inverse fourier transform + # -- Compute inverse Fourier transform w = np.fft.ifft(v1) if max(w.imag) > 1.0e-15: raise ValueError(f'Max imaginary value to important for ifft: {max(w.imag)}') diff --git a/pySDC/core/Step.py b/pySDC/core/Step.py index 56bc17cfca..1c804d9c77 100644 --- a/pySDC/core/Step.py +++ b/pySDC/core/Step.py @@ -137,7 +137,7 @@ def __generate_hierarchy(self, descr): # generate list of dictionaries out of the description descr_list = self.__dict_to_list(descr_new) - # sanity check: is there a base_transfer class? is there one even if only a single level is specified? + # sanity check: is there a base_transfer class? Is there one even if only a single level is specified? if len(descr_list) > 1 and not descr_new['space_transfer_class']: msg = 'need %s to instantiate step, only got %s' % ('space_transfer_class', str(descr_new.keys())) self.logger.error(msg) diff --git a/pySDC/core/Sweeper.py b/pySDC/core/Sweeper.py index 59f77220ef..6e0f0efe1a 100644 --- a/pySDC/core/Sweeper.py +++ b/pySDC/core/Sweeper.py @@ -67,7 +67,7 @@ def __init__(self, params): if not coll.right_is_node and not self.params.do_coll_update: self.logger.warning( - 'we need to do a collocation update here, since the right end point is not a node. ' 'Changing this!' + 'we need to do a collocation update here, since the right end point is not a node. Changing this!' ) self.params.do_coll_update = True