From 5c376fd7e5a1ce6e04487ddcd41db7f8e4eee983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20He=C3=9F?= <rene.hess@iwr.uni-heidelberg.de> Date: Fri, 25 Nov 2016 15:02:25 +0100 Subject: [PATCH] Pytest --- python/dune/perftool/loopy/buffer.py | 2 +- python/dune/perftool/pdelab/localoperator.py | 4 ++-- python/dune/perftool/sumfact/basis.py | 2 +- python/dune/perftool/sumfact/sumfact.py | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/python/dune/perftool/loopy/buffer.py b/python/dune/perftool/loopy/buffer.py index d7e6c97a..4f583266 100644 --- a/python/dune/perftool/loopy/buffer.py +++ b/python/dune/perftool/loopy/buffer.py @@ -39,7 +39,7 @@ class FlipFlopBuffer(object): dim = formdata.geometric_dimension # TODO: doc! - storage_shape = (self.base_storage_size,) + (1,)*(dim-1) + storage_shape = (self.base_storage_size,) + (1,) * (dim - 1) # Construct the temporary and return it temporary_variable(name, diff --git a/python/dune/perftool/pdelab/localoperator.py b/python/dune/perftool/pdelab/localoperator.py index e13ab528..80b81e9b 100644 --- a/python/dune/perftool/pdelab/localoperator.py +++ b/python/dune/perftool/pdelab/localoperator.py @@ -604,8 +604,8 @@ class LoopyKernelMethod(ClassMember): if initializer_list: content[-1] = content[-1] + " :" for init in initializer_list[:-1]: - content.append(" "*4 + init + ",") - content.append(" "*4 + initializer_list[-1]) + content.append(" " * 4 + init + ",") + content.append(" " * 4 + initializer_list[-1]) content.append('{') if kernel is not None: diff --git a/python/dune/perftool/sumfact/basis.py b/python/dune/perftool/sumfact/basis.py index 03665d47..8005716a 100644 --- a/python/dune/perftool/sumfact/basis.py +++ b/python/dune/perftool/sumfact/basis.py @@ -122,7 +122,7 @@ def pymbolic_trialfunction(element, restriction, component): rows = quadrature_points_per_direction() cols = basis_functions_per_direction() a_matrix = AMatrix(theta, rows, cols) - a_matrices = (a_matrix,)*dim + a_matrices = (a_matrix,) * dim # Flip flop buffers for sumfactorization buffer_name = name_sumfact_base_buffer() diff --git a/python/dune/perftool/sumfact/sumfact.py b/python/dune/perftool/sumfact/sumfact.py index 04a18a7b..a6991a86 100644 --- a/python/dune/perftool/sumfact/sumfact.py +++ b/python/dune/perftool/sumfact/sumfact.py @@ -135,14 +135,14 @@ def generate_accumulation_instruction(visitor, accterm, measure, subdomain_id): a_matrices = tuple(a_matrices) else: - a_matrices = (theta_matrix,)*dim + a_matrices = (theta_matrix,) * dim # Initialize a base storage for this buffer and get a temporay pointing to it temp = initialize_buffer(buf, base_storage_size=product(max(mat.rows, mat.cols) for mat in a_matrices), num=2 ).get_temporary(shape=(quadrature_points_per_direction(),) * dim, - dim_tags=",".join(['f']*dim)) + dim_tags=",".join(['f'] * dim)) # Replace gradient iname with correct index for assignement replace_dict = {} @@ -280,7 +280,7 @@ def sum_factorization_kernel(a_matrices, buf, insn_dep=frozenset({}), additional dim = formdata.geometric_dimension out_shape = tuple(mat.rows for mat in a_matrices) - dim_tags = ",".join(['f']*dim) + dim_tags = ",".join(['f'] * dim) out = get_buffer_temporary(buf, shape=out_shape, dim_tags=dim_tags) -- GitLab