From 0ac827dd6944f78eae87b59c863253c2d510a166 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 22:36:00 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v6.0.0) - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 23.3.0 → 26.1.0](https://github.com/psf/black-pre-commit-mirror/compare/23.3.0...26.1.0) - [github.com/PyCQA/isort: 5.12.0 → 7.0.0](https://github.com/PyCQA/isort/compare/5.12.0...7.0.0) - [github.com/asottile/pyupgrade: v3.6.0 → v3.21.2](https://github.com/asottile/pyupgrade/compare/v3.6.0...v3.21.2) - [github.com/PyCQA/flake8: 6.0.0 → 7.3.0](https://github.com/PyCQA/flake8/compare/6.0.0...7.3.0) --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2bf8eed9db..af066cd988 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ exclude: configure|\.*.msh|\.*.rng|^h5hut/\.*|^libjudy\.*|^libmba2d\.*|^libmba3d\.*|^libspud\.*|^spatialindex-1.8.0\.* repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v6.0.0 hooks: - id: check-ast - id: check-builtin-literals @@ -19,21 +19,21 @@ repos: - id: mixed-line-ending exclude: ref_vtk_hexahedra.vtu - id: trailing-whitespace -- repo: https://github.com/psf/black - rev: 23.3.0 +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.1.0 hooks: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 7.0.0 hooks: - id: isort args: ["--profile", "black", "--filter-files"] - repo: https://github.com/asottile/pyupgrade - rev: v3.6.0 + rev: v3.21.2 hooks: - id: pyupgrade - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.3.0 hooks: - id: flake8 args: ["--max-line-length", "88", "--extend-ignore", "E203,E722"] From 000c38812cec68cd97e1efc29fb719161422edd7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 22:37:09 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/driven_cavity/driven_cavity.py | 12 +- examples/driven_cavity/generate_mesh | 2 +- examples/driven_cavity/plot_data | 6 +- examples/lock_exchange/plot_data.py | 12 +- examples/rotating_channel/plot_data | 6 +- .../Med-tides-probe.py | 2 +- examples/top_hat/visualise.py | 6 +- .../filters/boundary_marker_editor.py | 6 +- .../mayavi_amcg/filters/data_set_clipper.py | 1 + .../mayavi_amcg/filters/field_operations.py | 6 +- python/fluidity/diagnostics/annulus_mesh.py | 1 + python/fluidity/diagnostics/bounds.py | 1 + python/fluidity/diagnostics/elements.py | 1 + python/fluidity/diagnostics/era.py | 1 + python/fluidity/diagnostics/events.py | 1 + python/fluidity/diagnostics/filehandling.py | 1 + python/fluidity/diagnostics/fluiditytools.py | 1 + python/fluidity/diagnostics/gidtools.py | 1 + python/fluidity/diagnostics/mesh_halos.py | 1 + python/fluidity/diagnostics/meshes.py | 1 + python/fluidity/diagnostics/numbers.py | 1 + python/fluidity/diagnostics/polytools.py | 1 + python/fluidity/diagnostics/simplices.py | 1 + .../fluidity/diagnostics/structured_fields.py | 1 + python/fluidity/diagnostics/triangletools.py | 1 + python/fluidity/diagnostics/utils.py | 1 + python/fluidity/ocean_biology.py | 15 +-- python/fluidity/state_types.py | 4 + python/fluidity_tools.py | 2 +- python/organise_use_statements.py | 2 +- python/vtktools.py | 6 +- tests/channel-flow-dg/channel_viscous.py | 2 +- tests/diffusion-dg-stretched/generate_mesh | 2 +- .../generate_mesh | 2 +- .../generate_mesh | 2 +- .../get_cloud_front.py | 10 +- .../plot.py | 4 +- tests/netcdf_read_free_surface/height.py | 4 +- tests/python_validation/python_validate.py | 1 + .../test.py | 2 +- .../checkpoint/change_options | 6 +- .../triangle_remove_superposed_nodes2.py | 6 +- .../triangle_remove_superposed_nodes2.py | 6 +- .../triangle_remove_superposed_nodes2.py | 6 +- .../triangle_remove_superposed_nodes2.py | 6 +- tests/viscous_fs_simpletopbottom/solution.py | 120 ++++-------------- .../solution.py | 120 ++++-------------- .../solution.py | 120 ++++-------------- .../solution.py | 120 ++++-------------- .../solution.py | 120 ++++-------------- .../solution.py | 120 ++++-------------- tests/viscous_fs_zhong_spatial/solution.py | 120 ++++-------------- .../solution.py | 120 ++++-------------- .../solution.py | 120 ++++-------------- .../solution.py | 120 ++++-------------- tools/clean_mayavi_mesh.py | 2 +- tools/create_aligned_mesh.py | 2 +- tools/create_makefile.py | 2 +- tools/edge_length_distribution.py | 14 +- tools/gen_square_meshes.py | 1 + tools/interval.py | 14 +- tools/make_check_options.py | 8 +- tools/make_register_diagnostics.py | 8 +- tools/profiling-graph.py | 2 +- tools/pvtu2vtu.py | 1 + tools/radial_scale.py | 2 +- tools/stat2csv.py | 1 + tools/testharness.py | 4 +- tools/transform_mesh.py | 2 +- tools/unittestharness.py | 8 +- tools/vtudecomp.py | 1 + 71 files changed, 345 insertions(+), 1090 deletions(-) diff --git a/examples/driven_cavity/driven_cavity.py b/examples/driven_cavity/driven_cavity.py index 288d87a075..0ac4e5e7c2 100644 --- a/examples/driven_cavity/driven_cavity.py +++ b/examples/driven_cavity/driven_cavity.py @@ -160,7 +160,7 @@ def erturk_u(NN): ) velocity = u.ProbeData(pts, "Velocity") - (ilen, jlen) = velocity.shape + ilen, jlen = velocity.shape norm = 0.0 for i in range(ilen): diff = pts[i][3] - velocity[i][0] @@ -217,7 +217,7 @@ def erturk_v(NN): ) velocity = u.ProbeData(pts, "Velocity") - (ilen, jlen) = velocity.shape + ilen, jlen = velocity.shape norm = 0.0 for i in range(ilen): diff = pts[i][3] - velocity[i][1] @@ -269,7 +269,7 @@ def botella_u(NN): ) velocity = u.ProbeData(pts, "Velocity") - (ilen, jlen) = velocity.shape + ilen, jlen = velocity.shape norm = 0.0 for i in range(ilen): diff = pts[i][3] - velocity[i][0] @@ -320,7 +320,7 @@ def botella_v(NN): ) velocity = u.ProbeData(pts, "Velocity") - (ilen, jlen) = velocity.shape + ilen, jlen = velocity.shape norm = 0.0 for i in range(ilen): @@ -372,7 +372,7 @@ def botella_p1(NN): ) velocity = u.ProbeData(pts, "Velocity") - (ilen, jlen) = velocity.shape + ilen, jlen = velocity.shape pressure = u.ProbeData(pts, "Pressure") pts0 = np.array( @@ -430,7 +430,7 @@ def botella_p2(NN): ) velocity = u.ProbeData(pts, "Velocity") - (ilen, jlen) = velocity.shape + ilen, jlen = velocity.shape pressure = u.ProbeData(pts, "Pressure") pts0 = np.array( diff --git a/examples/driven_cavity/generate_mesh b/examples/driven_cavity/generate_mesh index 75bb3f77ef..83b13b9e94 100755 --- a/examples/driven_cavity/generate_mesh +++ b/examples/driven_cavity/generate_mesh @@ -12,7 +12,7 @@ optparser = OptionParser( description="""Generate the mesh files for a given resolution.""", ) -(options, argv) = optparser.parse_args() +options, argv = optparser.parse_args() try: NN = int(argv[0]) diff --git a/examples/driven_cavity/plot_data b/examples/driven_cavity/plot_data index ad5b8f12df..133fc74d11 100755 --- a/examples/driven_cavity/plot_data +++ b/examples/driven_cavity/plot_data @@ -7,11 +7,9 @@ import pylab def usage(): - print( - """plot_data + print("""plot_data - is a space-separated list of the inverse mesh spacing.""" - ) + is a space-separated list of the inverse mesh spacing.""") try: diff --git a/examples/lock_exchange/plot_data.py b/examples/lock_exchange/plot_data.py index 31ef812d59..92a127a4d6 100644 --- a/examples/lock_exchange/plot_data.py +++ b/examples/lock_exchange/plot_data.py @@ -15,12 +15,10 @@ def Froudenumber(flmlname): print("\n********** Calculating the Froude number\n") # warn user about assumptions - print( - """Froude number calculations makes three assumptions: + print("""Froude number calculations makes three assumptions: i) domain height = 0.1m ii) mid point domain is at x = 0.4 -iii) initial temperature difference is 1.0 degC""" - ) +iii) initial temperature difference is 1.0 degC""") domainheight = 0.1 domainmid = 0.4 rho_zero, T_zero, alpha, g = le_tools.Getconstantsfromflml(flmlname) @@ -184,11 +182,9 @@ def Froudenumber(flmlname): def mixing(flmlname): print("\n********** Calculating the mixing diagnostics\n") # warn user about assumptions - print( - """Background potential energy calculations makes two assumptions: + print("""Background potential energy calculations makes two assumptions: i) domain height = 0.1m -ii) initial temperature difference is 1.0 degC""" - ) +ii) initial temperature difference is 1.0 degC""") domainheight = 0.1 rho_zero, T_zero, alpha, g = le_tools.Getconstantsfromflml(flmlname) diff --git a/examples/rotating_channel/plot_data b/examples/rotating_channel/plot_data index 2a1cee0ecb..d206bc8c76 100755 --- a/examples/rotating_channel/plot_data +++ b/examples/rotating_channel/plot_data @@ -7,11 +7,9 @@ import pylab def usage(): - print( - """plot_data + print("""plot_data - is a space-separated list of layer counts.""" - ) + is a space-separated list of layer counts.""") try: diff --git a/examples/tides_in_the_Mediterranean_Sea/Med-tides-probe.py b/examples/tides_in_the_Mediterranean_Sea/Med-tides-probe.py index fb9684c30f..264c3cd6ac 100755 --- a/examples/tides_in_the_Mediterranean_Sea/Med-tides-probe.py +++ b/examples/tides_in_the_Mediterranean_Sea/Med-tides-probe.py @@ -75,7 +75,7 @@ ) M2amp = u.ProbeData(pts, "M2amp") -(ilen, jlen) = M2amp.shape +ilen, jlen = M2amp.shape S2amp = u.ProbeData(pts, "S2amp") K1amp = u.ProbeData(pts, "K1amp") O1amp = u.ProbeData(pts, "O1amp") diff --git a/examples/top_hat/visualise.py b/examples/top_hat/visualise.py index 04ce28965a..b961c548a4 100755 --- a/examples/top_hat/visualise.py +++ b/examples/top_hat/visualise.py @@ -6,11 +6,9 @@ try: import vtktools except ImportError: - sys.stderr.write( - """You need to add the path to /python/ + sys.stderr.write("""You need to add the path to /python/ to your PYTHONPATH environment variable, e.g.: - export PYTHONPATH=$PYTHONPATH:$HOME/svn/fluidity/python/\n""" - ) + export PYTHONPATH=$PYTHONPATH:$HOME/svn/fluidity/python/\n""") sys.exit(1) # open one of the vtus output by fluidity diff --git a/mayavi/mayavi_amcg/filters/boundary_marker_editor.py b/mayavi/mayavi_amcg/filters/boundary_marker_editor.py index 6d9e8c8159..4da88fb55d 100644 --- a/mayavi/mayavi_amcg/filters/boundary_marker_editor.py +++ b/mayavi/mayavi_amcg/filters/boundary_marker_editor.py @@ -193,9 +193,9 @@ def perform_mask(self): # value is the new cell_id of the corresponding cell in the masked grid self._cell_mappings = list( map( - lambda masked, cell_id: None - if masked - else unmasked_cells_list.insert_next_id(cell_id), + lambda masked, cell_id: ( + None if masked else unmasked_cells_list.insert_next_id(cell_id) + ), in_masked, cell_ids, ) diff --git a/mayavi/mayavi_amcg/filters/data_set_clipper.py b/mayavi/mayavi_amcg/filters/data_set_clipper.py index be886de214..c3a804cb4a 100644 --- a/mayavi/mayavi_amcg/filters/data_set_clipper.py +++ b/mayavi/mayavi_amcg/filters/data_set_clipper.py @@ -7,6 +7,7 @@ Wouldn't have been able to code this otherwise. """ + from traits.api import Button, Instance from traitsui.api import Group, Item, View from tvtk.api import tvtk diff --git a/mayavi/mayavi_amcg/filters/field_operations.py b/mayavi/mayavi_amcg/filters/field_operations.py index 5f9cee514f..6c350011c2 100644 --- a/mayavi/mayavi_amcg/filters/field_operations.py +++ b/mayavi/mayavi_amcg/filters/field_operations.py @@ -61,14 +61,12 @@ class FieldOperations(Filter): "z-component", "Python function", ) - custom_function = Code( - """ + custom_function = Code(""" # Define a single-line operation in terms of # the variable 'inputs' which is an array of # input arrays. math and numpy are imported. # The operation must return a single array. -""" - ) +""") # Input and output fields scale_factor = Float(1.0) diff --git a/python/fluidity/diagnostics/annulus_mesh.py b/python/fluidity/diagnostics/annulus_mesh.py index 9b3375001f..9456eaec80 100644 --- a/python/fluidity/diagnostics/annulus_mesh.py +++ b/python/fluidity/diagnostics/annulus_mesh.py @@ -15,6 +15,7 @@ """ Annulus meshing tools """ + import copy import math import unittest diff --git a/python/fluidity/diagnostics/bounds.py b/python/fluidity/diagnostics/bounds.py index 40c90c8f6e..4aafec43a2 100644 --- a/python/fluidity/diagnostics/bounds.py +++ b/python/fluidity/diagnostics/bounds.py @@ -15,6 +15,7 @@ """ Geometric bounds utilities """ + import unittest import fluidity.diagnostics.calc as calc diff --git a/python/fluidity/diagnostics/elements.py b/python/fluidity/diagnostics/elements.py index ce115fce1c..0c351b3985 100644 --- a/python/fluidity/diagnostics/elements.py +++ b/python/fluidity/diagnostics/elements.py @@ -15,6 +15,7 @@ """ Finite element element classes """ + import unittest import fluidity.diagnostics.debug as debug diff --git a/python/fluidity/diagnostics/era.py b/python/fluidity/diagnostics/era.py index d37a14218e..d5051bb3ec 100644 --- a/python/fluidity/diagnostics/era.py +++ b/python/fluidity/diagnostics/era.py @@ -15,6 +15,7 @@ """ ERA data set handling routines """ + import datetime import os import unittest diff --git a/python/fluidity/diagnostics/events.py b/python/fluidity/diagnostics/events.py index 6b322cc99d..0f98bce17f 100644 --- a/python/fluidity/diagnostics/events.py +++ b/python/fluidity/diagnostics/events.py @@ -15,6 +15,7 @@ """ Event handling tools """ + import unittest diff --git a/python/fluidity/diagnostics/filehandling.py b/python/fluidity/diagnostics/filehandling.py index 3021233985..b071bbcbdd 100644 --- a/python/fluidity/diagnostics/filehandling.py +++ b/python/fluidity/diagnostics/filehandling.py @@ -15,6 +15,7 @@ """ File handling routines """ + import glob import os import shutil diff --git a/python/fluidity/diagnostics/fluiditytools.py b/python/fluidity/diagnostics/fluiditytools.py index 5b6e5c5e0a..35576767cb 100644 --- a/python/fluidity/diagnostics/fluiditytools.py +++ b/python/fluidity/diagnostics/fluiditytools.py @@ -15,6 +15,7 @@ """ Fluidity related tools """ + import glob import os import subprocess diff --git a/python/fluidity/diagnostics/gidtools.py b/python/fluidity/diagnostics/gidtools.py index e7251464c0..4c9ecc8d0a 100644 --- a/python/fluidity/diagnostics/gidtools.py +++ b/python/fluidity/diagnostics/gidtools.py @@ -15,6 +15,7 @@ """ Tools for dealing with GiD files """ + import copy import os import tempfile diff --git a/python/fluidity/diagnostics/mesh_halos.py b/python/fluidity/diagnostics/mesh_halos.py index eb2ddfe33c..837518588d 100644 --- a/python/fluidity/diagnostics/mesh_halos.py +++ b/python/fluidity/diagnostics/mesh_halos.py @@ -19,6 +19,7 @@ """ Finite element halo classes """ + import os import tempfile import unittest diff --git a/python/fluidity/diagnostics/meshes.py b/python/fluidity/diagnostics/meshes.py index 4cffb9713b..09f9a33223 100644 --- a/python/fluidity/diagnostics/meshes.py +++ b/python/fluidity/diagnostics/meshes.py @@ -15,6 +15,7 @@ """ Finite element mesh classes """ + import unittest import fluidity.diagnostics.bounds as bounds diff --git a/python/fluidity/diagnostics/numbers.py b/python/fluidity/diagnostics/numbers.py index 3aee3251ec..9ee680c76b 100644 --- a/python/fluidity/diagnostics/numbers.py +++ b/python/fluidity/diagnostics/numbers.py @@ -15,6 +15,7 @@ """ Routines concerning dimensionless numbers """ + import math import unittest diff --git a/python/fluidity/diagnostics/polytools.py b/python/fluidity/diagnostics/polytools.py index b37d6c4103..2a71cdab39 100644 --- a/python/fluidity/diagnostics/polytools.py +++ b/python/fluidity/diagnostics/polytools.py @@ -15,6 +15,7 @@ """ Tools for dealing with .poly files. """ + import copy import os import subprocess diff --git a/python/fluidity/diagnostics/simplices.py b/python/fluidity/diagnostics/simplices.py index 444418aabf..6a56d41b49 100644 --- a/python/fluidity/diagnostics/simplices.py +++ b/python/fluidity/diagnostics/simplices.py @@ -19,6 +19,7 @@ """ Tools for dealing with tetrahedra """ + import unittest import fluidity.diagnostics.calc as calc diff --git a/python/fluidity/diagnostics/structured_fields.py b/python/fluidity/diagnostics/structured_fields.py index 8b02ab8fa5..05836ffcf0 100644 --- a/python/fluidity/diagnostics/structured_fields.py +++ b/python/fluidity/diagnostics/structured_fields.py @@ -15,6 +15,7 @@ """ Structured field classes """ + import copy import math import unittest diff --git a/python/fluidity/diagnostics/triangletools.py b/python/fluidity/diagnostics/triangletools.py index b70711d54d..cc7424bb11 100644 --- a/python/fluidity/diagnostics/triangletools.py +++ b/python/fluidity/diagnostics/triangletools.py @@ -15,6 +15,7 @@ """ Tools for dealing with triangle files """ + import os import sys import tempfile diff --git a/python/fluidity/diagnostics/utils.py b/python/fluidity/diagnostics/utils.py index ad6cd413a3..3085abde20 100644 --- a/python/fluidity/diagnostics/utils.py +++ b/python/fluidity/diagnostics/utils.py @@ -15,6 +15,7 @@ """ Some useful utility functions """ + import copy import time import unittest diff --git a/python/fluidity/ocean_biology.py b/python/fluidity/ocean_biology.py index 5f47d4f489..ce3142f4b2 100644 --- a/python/fluidity/ocean_biology.py +++ b/python/fluidity/ocean_biology.py @@ -68,9 +68,7 @@ def pznd(state, parameters): G_P = (g * p_P * P_n**2 * Z_n) / (k**2 + p_P * P_n**2 + p_D * D_n**2) # Zooplankton grazing of detritus. - G_D = (g * (1 - p_P) * D_n**2 * Z_n) / ( - k**2 + p_P * P_n**2 + p_D * D_n**2 - ) + G_D = (g * (1 - p_P) * D_n**2 * Z_n) / (k**2 + p_P * P_n**2 + p_D * D_n**2) # Death rate of phytoplankton. De_P = mu_P * P_n * P_n / (P_n + 0.2) @@ -327,12 +325,7 @@ def six_component(state, parameters): # Chl growth scaling factor # R_P=(theta_m/theta)*J*(Q_N+Q_A)/(alpha*I_n+1e-7) - R_P = ( - (theta_m / theta) - * (Q_N + Q_A) - * v - / (v**2 + alpha**2 * I_n**2) ** 0.5 - ) + R_P = (theta_m / theta) * (Q_N + Q_A) * v / (v**2 + alpha**2 * I_n**2) ** 0.5 # Primary production X_P = J * (Q_N + Q_A) * P_n @@ -350,9 +343,7 @@ def six_component(state, parameters): # G_D = (g * epsilon * (1 - p_P) * D_n**2 * Z_n) / ( # g + epsilon * (p_P * P_n**2 + p_D * D_n**2) # ) - G_D = (g * (1 - p_P) * D_n**2 * Z_n) / ( - epsilon + (p_P * P_n**2 + p_D * D_n**2) - ) + G_D = (g * (1 - p_P) * D_n**2 * Z_n) / (epsilon + (p_P * P_n**2 + p_D * D_n**2)) # Death rate of phytoplankton. # There is an additional linear term because we have a unified model diff --git a/python/fluidity/state_types.py b/python/fluidity/state_types.py index 5f7dc341a8..fdb5164454 100644 --- a/python/fluidity/state_types.py +++ b/python/fluidity/state_types.py @@ -145,6 +145,7 @@ def remap_ele(self, ele_number, mesh): class ScalarField(Field): "A scalar field" + description = "ScalarField" def __init__(self, n, v, ft, op): @@ -155,6 +156,7 @@ def __init__(self, n, v, ft, op): class VectorField(Field): "A vector field" + description = "VectorField" def __init__(self, n, v, ft, op, dim): @@ -166,6 +168,7 @@ def __init__(self, n, v, ft, op, dim): class TensorField(Field): "A tensor field" + description = "VectorField" def __init__(self, n, v, ft, op, dim0, dim1): @@ -337,6 +340,7 @@ def eval(self, x): class Transform: "Transform with information about the detwei and Jacobian" + # Note that so far only the dim == ldim == (2||3) have been tested def __init__(self, ele_num, field): diff --git a/python/fluidity_tools.py b/python/fluidity_tools.py index dc4bffe93e..7a2a36874f 100755 --- a/python/fluidity_tools.py +++ b/python/fluidity_tools.py @@ -507,7 +507,7 @@ def petsc_memory_stats(log): stats = {} for line in memory_profile.split("\n"): try: - (object, profile) = next(re.finditer(r"(\s.*?)([0-9]+.*)", line)).groups() + object, profile = next(re.finditer(r"(\s.*?)([0-9]+.*)", line)).groups() except StopIteration: continue profile = profile.split() diff --git a/python/organise_use_statements.py b/python/organise_use_statements.py index 9e61dee3a2..c983f3a258 100755 --- a/python/organise_use_statements.py +++ b/python/organise_use_statements.py @@ -249,7 +249,7 @@ def add_used(name, out, visited): default=os.path.dirname(os.path.realpath(__file__)) + "/../*/*.F90", ) - (options, args) = parser.parse_args() + options, args = parser.parse_args() tree, namelist = build_trees(glob.glob(options.path)) out = print_misplaced(tree, namelist, options.silent or options.graph, args) diff --git a/python/vtktools.py b/python/vtktools.py index 00ce8ca7c3..b00b2ae9c4 100644 --- a/python/vtktools.py +++ b/python/vtktools.py @@ -270,7 +270,7 @@ def ApplyProjection(self, projection_x, projection_y, projection_z): values.""" npoints = self.ugrid.GetNumberOfPoints() for i in range(npoints): - (x, y, z) = self.ugrid.GetPoint(i) + x, y, z = self.ugrid.GetPoint(i) new_x = eval(projection_x) new_y = eval(projection_y) new_z = eval(projection_z) @@ -282,7 +282,7 @@ def ApplyCoordinateTransformation(self, f): npoints = self.ugrid.GetNumberOfPoints() for i in range(npoints): - (x, y, z) = self.ugrid.GetPoint(i) + x, y, z = self.ugrid.GetPoint(i) newX = f(numpy.array([x, y, z]), t=0) self.ugrid.GetPoints().SetPoint(i, newX[0], newX[1], newX[2]) @@ -294,7 +294,7 @@ def ApplyEarthProjection(self): earth_radius = 6378000.0 for i in range(npoints): - (x, y, z) = self.ugrid.GetPoint(i) + x, y, z = self.ugrid.GetPoint(i) r = math.sqrt(x * x + y * y + z * z) depth = r - earth_radius diff --git a/tests/channel-flow-dg/channel_viscous.py b/tests/channel-flow-dg/channel_viscous.py index a28954132d..0034785e77 100644 --- a/tests/channel-flow-dg/channel_viscous.py +++ b/tests/channel-flow-dg/channel_viscous.py @@ -203,7 +203,7 @@ def plot_theory(): def plot_stored_results(): import pickle - (dx, error) = pickle.load(open("error_results")) + dx, error = pickle.load(open("error_results")) plot_results(dx, error) diff --git a/tests/diffusion-dg-stretched/generate_mesh b/tests/diffusion-dg-stretched/generate_mesh index 5b3ef14071..4c642865f9 100755 --- a/tests/diffusion-dg-stretched/generate_mesh +++ b/tests/diffusion-dg-stretched/generate_mesh @@ -13,7 +13,7 @@ optparser = OptionParser( + """number of layers and width.""", ) -(options, argv) = optparser.parse_args() +options, argv = optparser.parse_args() # try: layers = float(argv[0]) diff --git a/tests/mms_tracer_P1dg_cdg_diff_steady_3d_cjc/generate_mesh b/tests/mms_tracer_P1dg_cdg_diff_steady_3d_cjc/generate_mesh index 81b0556ccf..e59d54c946 100755 --- a/tests/mms_tracer_P1dg_cdg_diff_steady_3d_cjc/generate_mesh +++ b/tests/mms_tracer_P1dg_cdg_diff_steady_3d_cjc/generate_mesh @@ -13,7 +13,7 @@ optparser = OptionParser( + """typical edge length 1.0/layers.""", ) -(options, argv) = optparser.parse_args() +options, argv = optparser.parse_args() # try: layers = float(argv[0]) diff --git a/tests/mms_tracer_P1dg_cdg_diff_steady_3d_cjc_inhNmnnbc/generate_mesh b/tests/mms_tracer_P1dg_cdg_diff_steady_3d_cjc_inhNmnnbc/generate_mesh index 81b0556ccf..e59d54c946 100755 --- a/tests/mms_tracer_P1dg_cdg_diff_steady_3d_cjc_inhNmnnbc/generate_mesh +++ b/tests/mms_tracer_P1dg_cdg_diff_steady_3d_cjc_inhNmnnbc/generate_mesh @@ -13,7 +13,7 @@ optparser = OptionParser( + """typical edge length 1.0/layers.""", ) -(options, argv) = optparser.parse_args() +options, argv = optparser.parse_args() # try: layers = float(argv[0]) diff --git a/tests/mphase_rogue_shock_tube_dense_bed_nylon/get_cloud_front.py b/tests/mphase_rogue_shock_tube_dense_bed_nylon/get_cloud_front.py index f271da27d6..0d9d65f0c9 100644 --- a/tests/mphase_rogue_shock_tube_dense_bed_nylon/get_cloud_front.py +++ b/tests/mphase_rogue_shock_tube_dense_bed_nylon/get_cloud_front.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 """ - Python script to measure the position of the particle cloud front in - simulations of the shock tube experiment by Rogue et al. (1998). - Written by Christian Jacobs. +Python script to measure the position of the particle cloud front in +simulations of the shock tube experiment by Rogue et al. (1998). +Written by Christian Jacobs. """ import matplotlib.pyplot as plt @@ -75,7 +75,7 @@ def get_cloud_front(path_prefix, n_files, resolution, threshold): experimental_times = [] experimental_positions = [] for line in f: - (t, p) = line.split("\t") + t, p = line.split("\t") experimental_times.append(float(t)) experimental_positions.append(float(p) * 100) f.close() @@ -85,7 +85,7 @@ def get_cloud_front(path_prefix, n_files, resolution, threshold): experimental_times = [] experimental_positions = [] for line in f: - (t, p) = line.split("\t") + t, p = line.split("\t") experimental_times.append(float(t)) experimental_positions.append(float(p) * 100) f.close() diff --git a/tests/mphase_rogue_shock_tube_dense_bed_nylon/plot.py b/tests/mphase_rogue_shock_tube_dense_bed_nylon/plot.py index 0fdf060d12..f1b147d9a3 100644 --- a/tests/mphase_rogue_shock_tube_dense_bed_nylon/plot.py +++ b/tests/mphase_rogue_shock_tube_dense_bed_nylon/plot.py @@ -285,7 +285,7 @@ f = open("pressure_upstream.prn") i = 0 for line in f: - (t, p) = line.split("\t") + t, p = line.split("\t") experimental_t_upstream[i] = t experimental_p_upstream[i] = p i += 1 @@ -293,7 +293,7 @@ f = open("pressure_downstream.prn") i = 0 for line in f: - (t, p) = line.split("\t") + t, p = line.split("\t") experimental_t_downstream[i] = t experimental_p_downstream[i] = p i += 1 diff --git a/tests/netcdf_read_free_surface/height.py b/tests/netcdf_read_free_surface/height.py index 34a7a6a607..57346afa78 100755 --- a/tests/netcdf_read_free_surface/height.py +++ b/tests/netcdf_read_free_surface/height.py @@ -6,8 +6,6 @@ def function(position): xg = 3.0 * position[0] yg = 3.0 * position[1] h1 = multivariate_normal.pdf([xg, yg], cov=[[1, 0], [0, 1]]) - h2 = multivariate_normal.pdf( - [xg, yg], mean=[1, 1], cov=[[1.5**2, 0], [0, 0.5**2]] - ) + h2 = multivariate_normal.pdf([xg, yg], mean=[1, 1], cov=[[1.5**2, 0], [0, 0.5**2]]) h = 10.0 * (h1 - h2) return h diff --git a/tests/python_validation/python_validate.py b/tests/python_validation/python_validate.py index 127a8b88fd..9584cbf413 100644 --- a/tests/python_validation/python_validate.py +++ b/tests/python_validation/python_validate.py @@ -11,6 +11,7 @@ against python3 syntax. """ + import argparse import ast import os diff --git a/tests/shelf_meshtransform_freesurfaceinitialcondition/test.py b/tests/shelf_meshtransform_freesurfaceinitialcondition/test.py index d2e5d83167..78e36642f2 100755 --- a/tests/shelf_meshtransform_freesurfaceinitialcondition/test.py +++ b/tests/shelf_meshtransform_freesurfaceinitialcondition/test.py @@ -4,7 +4,7 @@ tolerance = 1.0e-12 u = vtktools.vtu("shelf_0.vtu") location = u.GetLocations() -(ilen, jlen) = location.shape +ilen, jlen = location.shape for i in range(ilen): if location[i, 0] + tolerance < 0.0: diff --git a/tests/square-convection/checkpoint/change_options b/tests/square-convection/checkpoint/change_options index da5ea5b511..ae228bd484 100755 --- a/tests/square-convection/checkpoint/change_options +++ b/tests/square-convection/checkpoint/change_options @@ -17,9 +17,9 @@ for i in range(len(flml_options) - 1): line = flml_options[i] if "" in line: # Change the simulation name - flml_options[ - i + 1 - ] = 'square-convection-picked-up\n' + flml_options[i + 1] = ( + 'square-convection-picked-up\n' + ) for i in range(len(flml_options)): if "" in flml_options[i]: diff --git a/tests/turbine_flux_dg_2d/mesh/scripts/triangle_remove_superposed_nodes2.py b/tests/turbine_flux_dg_2d/mesh/scripts/triangle_remove_superposed_nodes2.py index 0acde8c758..2a02da0cdc 100755 --- a/tests/turbine_flux_dg_2d/mesh/scripts/triangle_remove_superposed_nodes2.py +++ b/tests/turbine_flux_dg_2d/mesh/scripts/triangle_remove_superposed_nodes2.py @@ -71,14 +71,12 @@ ######################################################################################## if not len(sys.argv) == 3: - print( - """Usage: seperate_internal_boundary.py file boundary_id + print("""Usage: seperate_internal_boundary.py file boundary_id output fixed .ele and .node file with removed superposed nodes on the given boundary The nodes have to have a distance less than 1e-8 to be considered as superposed -The outout files will be have the suffix nosup""" - ) +The outout files will be have the suffix nosup""") exit() diff --git a/tests/turbine_flux_dg_2plus1/mesh/scripts/triangle_remove_superposed_nodes2.py b/tests/turbine_flux_dg_2plus1/mesh/scripts/triangle_remove_superposed_nodes2.py index 0acde8c758..2a02da0cdc 100755 --- a/tests/turbine_flux_dg_2plus1/mesh/scripts/triangle_remove_superposed_nodes2.py +++ b/tests/turbine_flux_dg_2plus1/mesh/scripts/triangle_remove_superposed_nodes2.py @@ -71,14 +71,12 @@ ######################################################################################## if not len(sys.argv) == 3: - print( - """Usage: seperate_internal_boundary.py file boundary_id + print("""Usage: seperate_internal_boundary.py file boundary_id output fixed .ele and .node file with removed superposed nodes on the given boundary The nodes have to have a distance less than 1e-8 to be considered as superposed -The outout files will be have the suffix nosup""" - ) +The outout files will be have the suffix nosup""") exit() diff --git a/tests/turbine_flux_penalty_2d/mesh/scripts/triangle_remove_superposed_nodes2.py b/tests/turbine_flux_penalty_2d/mesh/scripts/triangle_remove_superposed_nodes2.py index 0acde8c758..2a02da0cdc 100755 --- a/tests/turbine_flux_penalty_2d/mesh/scripts/triangle_remove_superposed_nodes2.py +++ b/tests/turbine_flux_penalty_2d/mesh/scripts/triangle_remove_superposed_nodes2.py @@ -71,14 +71,12 @@ ######################################################################################## if not len(sys.argv) == 3: - print( - """Usage: seperate_internal_boundary.py file boundary_id + print("""Usage: seperate_internal_boundary.py file boundary_id output fixed .ele and .node file with removed superposed nodes on the given boundary The nodes have to have a distance less than 1e-8 to be considered as superposed -The outout files will be have the suffix nosup""" - ) +The outout files will be have the suffix nosup""") exit() diff --git a/tests/turbine_flux_penalty_2plus1/mesh/scripts/triangle_remove_superposed_nodes2.py b/tests/turbine_flux_penalty_2plus1/mesh/scripts/triangle_remove_superposed_nodes2.py index 0acde8c758..2a02da0cdc 100755 --- a/tests/turbine_flux_penalty_2plus1/mesh/scripts/triangle_remove_superposed_nodes2.py +++ b/tests/turbine_flux_penalty_2plus1/mesh/scripts/triangle_remove_superposed_nodes2.py @@ -71,14 +71,12 @@ ######################################################################################## if not len(sys.argv) == 3: - print( - """Usage: seperate_internal_boundary.py file boundary_id + print("""Usage: seperate_internal_boundary.py file boundary_id output fixed .ele and .node file with removed superposed nodes on the given boundary The nodes have to have a distance less than 1e-8 to be considered as superposed -The outout files will be have the suffix nosup""" - ) +The outout files will be have the suffix nosup""") exit() diff --git a/tests/viscous_fs_simpletopbottom/solution.py b/tests/viscous_fs_simpletopbottom/solution.py index a409793ee0..3e067de78c 100644 --- a/tests/viscous_fs_simpletopbottom/solution.py +++ b/tests/viscous_fs_simpletopbottom/solution.py @@ -43,11 +43,7 @@ def t0_eta(): - (delta_rho * k**2 * mu + k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu + k * mu * rhog) * sinh(D * k) * cosh(D * k) - sqrt( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -61,11 +57,7 @@ def t0_eta(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 - 4 * delta_rho * rhog ) @@ -97,11 +89,7 @@ def t0_xi(): - (delta_rho * k**2 * mu + k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu + k * mu * rhog) * sinh(D * k) * cosh(D * k) + sqrt( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -115,11 +103,7 @@ def t0_xi(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 - 4 * delta_rho * rhog ) @@ -175,17 +159,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -273,17 +252,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -385,11 +359,7 @@ def nond_F(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -420,11 +390,7 @@ def nond_F(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -482,17 +448,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -522,17 +483,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -666,17 +622,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -797,17 +748,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -937,11 +883,7 @@ def nond_G(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -972,11 +914,7 @@ def nond_G(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -1040,17 +978,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -1106,17 +1039,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( diff --git a/tests/viscous_fs_simpletopbottom_explicit/solution.py b/tests/viscous_fs_simpletopbottom_explicit/solution.py index a409793ee0..3e067de78c 100644 --- a/tests/viscous_fs_simpletopbottom_explicit/solution.py +++ b/tests/viscous_fs_simpletopbottom_explicit/solution.py @@ -43,11 +43,7 @@ def t0_eta(): - (delta_rho * k**2 * mu + k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu + k * mu * rhog) * sinh(D * k) * cosh(D * k) - sqrt( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -61,11 +57,7 @@ def t0_eta(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 - 4 * delta_rho * rhog ) @@ -97,11 +89,7 @@ def t0_xi(): - (delta_rho * k**2 * mu + k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu + k * mu * rhog) * sinh(D * k) * cosh(D * k) + sqrt( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -115,11 +103,7 @@ def t0_xi(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 - 4 * delta_rho * rhog ) @@ -175,17 +159,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -273,17 +252,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -385,11 +359,7 @@ def nond_F(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -420,11 +390,7 @@ def nond_F(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -482,17 +448,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -522,17 +483,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -666,17 +622,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -797,17 +748,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -937,11 +883,7 @@ def nond_G(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -972,11 +914,7 @@ def nond_G(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -1040,17 +978,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -1106,17 +1039,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( diff --git a/tests/viscous_fs_simpletopbottom_explicit_testcv/solution.py b/tests/viscous_fs_simpletopbottom_explicit_testcv/solution.py index a409793ee0..3e067de78c 100644 --- a/tests/viscous_fs_simpletopbottom_explicit_testcv/solution.py +++ b/tests/viscous_fs_simpletopbottom_explicit_testcv/solution.py @@ -43,11 +43,7 @@ def t0_eta(): - (delta_rho * k**2 * mu + k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu + k * mu * rhog) * sinh(D * k) * cosh(D * k) - sqrt( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -61,11 +57,7 @@ def t0_eta(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 - 4 * delta_rho * rhog ) @@ -97,11 +89,7 @@ def t0_xi(): - (delta_rho * k**2 * mu + k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu + k * mu * rhog) * sinh(D * k) * cosh(D * k) + sqrt( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -115,11 +103,7 @@ def t0_xi(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 - 4 * delta_rho * rhog ) @@ -175,17 +159,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -273,17 +252,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -385,11 +359,7 @@ def nond_F(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -420,11 +390,7 @@ def nond_F(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -482,17 +448,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -522,17 +483,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -666,17 +622,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -797,17 +748,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -937,11 +883,7 @@ def nond_G(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -972,11 +914,7 @@ def nond_G(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -1040,17 +978,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -1106,17 +1039,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( diff --git a/tests/viscous_fs_simpletopbottom_explicit_varrho/solution.py b/tests/viscous_fs_simpletopbottom_explicit_varrho/solution.py index a409793ee0..3e067de78c 100644 --- a/tests/viscous_fs_simpletopbottom_explicit_varrho/solution.py +++ b/tests/viscous_fs_simpletopbottom_explicit_varrho/solution.py @@ -43,11 +43,7 @@ def t0_eta(): - (delta_rho * k**2 * mu + k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu + k * mu * rhog) * sinh(D * k) * cosh(D * k) - sqrt( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -61,11 +57,7 @@ def t0_eta(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 - 4 * delta_rho * rhog ) @@ -97,11 +89,7 @@ def t0_xi(): - (delta_rho * k**2 * mu + k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu + k * mu * rhog) * sinh(D * k) * cosh(D * k) + sqrt( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -115,11 +103,7 @@ def t0_xi(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 - 4 * delta_rho * rhog ) @@ -175,17 +159,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -273,17 +252,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -385,11 +359,7 @@ def nond_F(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -420,11 +390,7 @@ def nond_F(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -482,17 +448,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -522,17 +483,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -666,17 +622,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -797,17 +748,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -937,11 +883,7 @@ def nond_G(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -972,11 +914,7 @@ def nond_G(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -1040,17 +978,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -1106,17 +1039,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( diff --git a/tests/viscous_fs_simpletopbottom_testcv/solution.py b/tests/viscous_fs_simpletopbottom_testcv/solution.py index a409793ee0..3e067de78c 100644 --- a/tests/viscous_fs_simpletopbottom_testcv/solution.py +++ b/tests/viscous_fs_simpletopbottom_testcv/solution.py @@ -43,11 +43,7 @@ def t0_eta(): - (delta_rho * k**2 * mu + k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu + k * mu * rhog) * sinh(D * k) * cosh(D * k) - sqrt( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -61,11 +57,7 @@ def t0_eta(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 - 4 * delta_rho * rhog ) @@ -97,11 +89,7 @@ def t0_xi(): - (delta_rho * k**2 * mu + k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu + k * mu * rhog) * sinh(D * k) * cosh(D * k) + sqrt( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -115,11 +103,7 @@ def t0_xi(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 - 4 * delta_rho * rhog ) @@ -175,17 +159,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -273,17 +252,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -385,11 +359,7 @@ def nond_F(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -420,11 +390,7 @@ def nond_F(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -482,17 +448,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -522,17 +483,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -666,17 +622,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -797,17 +748,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -937,11 +883,7 @@ def nond_G(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -972,11 +914,7 @@ def nond_G(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -1040,17 +978,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -1106,17 +1039,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( diff --git a/tests/viscous_fs_simpletopbottom_varrho/solution.py b/tests/viscous_fs_simpletopbottom_varrho/solution.py index a409793ee0..3e067de78c 100644 --- a/tests/viscous_fs_simpletopbottom_varrho/solution.py +++ b/tests/viscous_fs_simpletopbottom_varrho/solution.py @@ -43,11 +43,7 @@ def t0_eta(): - (delta_rho * k**2 * mu + k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu + k * mu * rhog) * sinh(D * k) * cosh(D * k) - sqrt( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -61,11 +57,7 @@ def t0_eta(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 - 4 * delta_rho * rhog ) @@ -97,11 +89,7 @@ def t0_xi(): - (delta_rho * k**2 * mu + k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu + k * mu * rhog) * sinh(D * k) * cosh(D * k) + sqrt( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -115,11 +103,7 @@ def t0_xi(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 - 4 * delta_rho * rhog ) @@ -175,17 +159,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -273,17 +252,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -385,11 +359,7 @@ def nond_F(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -420,11 +390,7 @@ def nond_F(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -482,17 +448,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -522,17 +483,12 @@ def nond_F(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -666,17 +622,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -797,17 +748,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -937,11 +883,7 @@ def nond_G(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -972,11 +914,7 @@ def nond_G(x, t): + (delta_rho * k - k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 - 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 + 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -1040,17 +978,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog + sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( @@ -1106,17 +1039,12 @@ def nond_G(x, t): + delta_rho * k**2 + k**2 * rhog - sqrt( - (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 - 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - + 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k + 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) + ( diff --git a/tests/viscous_fs_zhong_spatial/solution.py b/tests/viscous_fs_zhong_spatial/solution.py index d4ce365d04..ff013cf65e 100644 --- a/tests/viscous_fs_zhong_spatial/solution.py +++ b/tests/viscous_fs_zhong_spatial/solution.py @@ -50,11 +50,7 @@ def t0_eta(): - (delta_rho * k**2 * mu - k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu - k * mu * rhog) * sinh(D * k) * cosh(D * k) - sqrt( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -68,11 +64,7 @@ def t0_eta(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 + 4 * delta_rho * rhog ) @@ -104,11 +96,7 @@ def t0_xi(): - (delta_rho * k**2 * mu - k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu - k * mu * rhog) * sinh(D * k) * cosh(D * k) + sqrt( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -122,11 +110,7 @@ def t0_xi(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 + 4 * delta_rho * rhog ) @@ -185,17 +169,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -283,17 +262,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -415,11 +389,7 @@ def nond_F(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -450,11 +420,7 @@ def nond_F(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -512,17 +478,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -552,17 +513,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -707,17 +663,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -838,17 +789,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -998,11 +944,7 @@ def nond_G(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -1033,11 +975,7 @@ def nond_G(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -1101,17 +1039,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -1167,17 +1100,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( diff --git a/tests/viscous_fs_zhong_spatial_explicit/solution.py b/tests/viscous_fs_zhong_spatial_explicit/solution.py index d4ce365d04..ff013cf65e 100644 --- a/tests/viscous_fs_zhong_spatial_explicit/solution.py +++ b/tests/viscous_fs_zhong_spatial_explicit/solution.py @@ -50,11 +50,7 @@ def t0_eta(): - (delta_rho * k**2 * mu - k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu - k * mu * rhog) * sinh(D * k) * cosh(D * k) - sqrt( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -68,11 +64,7 @@ def t0_eta(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 + 4 * delta_rho * rhog ) @@ -104,11 +96,7 @@ def t0_xi(): - (delta_rho * k**2 * mu - k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu - k * mu * rhog) * sinh(D * k) * cosh(D * k) + sqrt( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -122,11 +110,7 @@ def t0_xi(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 + 4 * delta_rho * rhog ) @@ -185,17 +169,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -283,17 +262,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -415,11 +389,7 @@ def nond_F(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -450,11 +420,7 @@ def nond_F(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -512,17 +478,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -552,17 +513,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -707,17 +663,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -838,17 +789,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -998,11 +944,7 @@ def nond_G(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -1033,11 +975,7 @@ def nond_G(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -1101,17 +1039,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -1167,17 +1100,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( diff --git a/tests/viscous_fs_zhong_spatial_explicit_varrho/solution.py b/tests/viscous_fs_zhong_spatial_explicit_varrho/solution.py index d4ce365d04..ff013cf65e 100644 --- a/tests/viscous_fs_zhong_spatial_explicit_varrho/solution.py +++ b/tests/viscous_fs_zhong_spatial_explicit_varrho/solution.py @@ -50,11 +50,7 @@ def t0_eta(): - (delta_rho * k**2 * mu - k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu - k * mu * rhog) * sinh(D * k) * cosh(D * k) - sqrt( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -68,11 +64,7 @@ def t0_eta(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 + 4 * delta_rho * rhog ) @@ -104,11 +96,7 @@ def t0_xi(): - (delta_rho * k**2 * mu - k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu - k * mu * rhog) * sinh(D * k) * cosh(D * k) + sqrt( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -122,11 +110,7 @@ def t0_xi(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 + 4 * delta_rho * rhog ) @@ -185,17 +169,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -283,17 +262,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -415,11 +389,7 @@ def nond_F(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -450,11 +420,7 @@ def nond_F(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -512,17 +478,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -552,17 +513,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -707,17 +663,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -838,17 +789,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -998,11 +944,7 @@ def nond_G(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -1033,11 +975,7 @@ def nond_G(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -1101,17 +1039,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -1167,17 +1100,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( diff --git a/tests/viscous_fs_zhong_spatial_varrho/solution.py b/tests/viscous_fs_zhong_spatial_varrho/solution.py index d4ce365d04..ff013cf65e 100644 --- a/tests/viscous_fs_zhong_spatial_varrho/solution.py +++ b/tests/viscous_fs_zhong_spatial_varrho/solution.py @@ -50,11 +50,7 @@ def t0_eta(): - (delta_rho * k**2 * mu - k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu - k * mu * rhog) * sinh(D * k) * cosh(D * k) - sqrt( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -68,11 +64,7 @@ def t0_eta(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 + 4 * delta_rho * rhog ) @@ -104,11 +96,7 @@ def t0_xi(): - (delta_rho * k**2 * mu - k**2 * mu * rhog) * D * cosh(D * k) ** 2 - (delta_rho * k * mu - k * mu * rhog) * sinh(D * k) * cosh(D * k) + sqrt( - ( - delta_rho**2 * k**2 - - 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 * cosh(D * k) ** 4 - 2 @@ -122,11 +110,7 @@ def t0_xi(): * sinh(D * k) * cosh(D * k) ** 3 + ( - ( - delta_rho**2 * k**2 - + 2 * delta_rho * k**2 * rhog - + k**2 * rhog**2 - ) + (delta_rho**2 * k**2 + 2 * delta_rho * k**2 * rhog + k**2 * rhog**2) * D**2 + 4 * delta_rho * rhog ) @@ -185,17 +169,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -283,17 +262,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -415,11 +389,7 @@ def nond_F(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -450,11 +420,7 @@ def nond_F(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -512,17 +478,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -552,17 +513,12 @@ def nond_F(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -707,17 +663,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -838,17 +789,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -998,11 +944,7 @@ def nond_G(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 - sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -1033,11 +975,7 @@ def nond_G(x, t): + (delta_rho * k + k * rhog) * cosh(k) ** 2 + sqrt( delta_rho**2 * k**2 * sinh(k) ** 4 - - 2 - * delta_rho**2 - * k**2 - * sinh(k) ** 2 - * cosh(k) ** 2 + - 2 * delta_rho**2 * k**2 * sinh(k) ** 2 * cosh(k) ** 2 + delta_rho**2 * k**2 * cosh(k) ** 4 + 2 * delta_rho * k**2 * rhog * sinh(k) ** 4 - 2 * delta_rho * k**2 * rhog * cosh(k) ** 4 @@ -1101,17 +1039,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog + sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( @@ -1167,17 +1100,12 @@ def nond_G(x, t): + delta_rho * k**2 - k**2 * rhog - sqrt( - (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) - * sinh(k) ** 4 + (delta_rho**2 + 2 * delta_rho * rhog + rhog**2) * sinh(k) ** 4 + delta_rho**2 * k**2 - 2 * delta_rho * k**2 * rhog + k**2 * rhog**2 + 2 - * ( - delta_rho**2 * k - - 2 * delta_rho * k * rhog - + k * rhog**2 - ) + * (delta_rho**2 * k - 2 * delta_rho * k * rhog + k * rhog**2) * sinh(k) * cosh(k) - ( diff --git a/tools/clean_mayavi_mesh.py b/tools/clean_mayavi_mesh.py index 1f8bdc85a4..3000de8d39 100755 --- a/tools/clean_mayavi_mesh.py +++ b/tools/clean_mayavi_mesh.py @@ -95,7 +95,7 @@ def process_file(inname, outname, options): optparser.set_defaults(dir=".", project="") - (options, argv) = optparser.parse_args() + options, argv = optparser.parse_args() try: infile = argv[0] diff --git a/tools/create_aligned_mesh.py b/tools/create_aligned_mesh.py index 8a77c77986..73b06ad36e 100755 --- a/tools/create_aligned_mesh.py +++ b/tools/create_aligned_mesh.py @@ -46,7 +46,7 @@ def write_side_boundary( + "Ox,Oy,Oz is the origin (defaults to 0,0,0)." ) -(options, argv) = optparser.parse_args() +options, argv = optparser.parse_args() if len(argv) < 7: optparser.print_help() diff --git a/tools/create_makefile.py b/tools/create_makefile.py index 79eeae6c36..203b2068b9 100755 --- a/tools/create_makefile.py +++ b/tools/create_makefile.py @@ -231,7 +231,7 @@ def handle_options(): default=False, ) - (options, argv) = optparser.parse_args() + options, argv = optparser.parse_args() return options diff --git a/tools/edge_length_distribution.py b/tools/edge_length_distribution.py index 1ebb608c36..3405883d92 100755 --- a/tools/edge_length_distribution.py +++ b/tools/edge_length_distribution.py @@ -210,7 +210,7 @@ def PlotCumulative(edge_lengths_all, options): optparser = usage() -(options, args) = optparser.parse_args() +options, args = optparser.parse_args() if len(args) < 1: optparser.print_help() @@ -234,21 +234,17 @@ def PlotCumulative(edge_lengths_all, options): try: time_log = open("edge_length_distribution_plots/time.log") except OSError: - print( - """ + print(""" No file 'edge_length_distribution_plots/time.log' -Try running WITHOUT option --plotonly""" - ) +Try running WITHOUT option --plotonly""") sys.exit(1) try: edge_lengths_log = open("edge_length_distribution_plots/edge_lengths.log") except OSError: - print( - """ + print(""" No file 'edge_length_distribution_plots/edge_lengths.log' -Try running WITHOUT option --plotonly""" - ) +Try running WITHOUT option --plotonly""") sys.exit(1) time = [] diff --git a/tools/gen_square_meshes.py b/tools/gen_square_meshes.py index 08672dcac0..f3988d23ca 100755 --- a/tools/gen_square_meshes.py +++ b/tools/gen_square_meshes.py @@ -2,6 +2,7 @@ """ Generate square meshes with random interior nodes """ + import copy import getopt import os diff --git a/tools/interval.py b/tools/interval.py index 4618514188..a60d6d631b 100755 --- a/tools/interval.py +++ b/tools/interval.py @@ -65,7 +65,7 @@ help="output 3d coordinates.", ) -(options, argv) = parser.parse_args() +options, argv = parser.parse_args() try: left = float(argv[0]) @@ -110,22 +110,18 @@ # Write the mesh file in Gmsh format meshfile = open(name + ".msh", "w") -meshfile.write( - """$MeshFormat +meshfile.write("""$MeshFormat 2.2 0 8 $EndMeshFormat $Nodes -""" -) +""") meshfile.write("%d\n" % (len(nodes))) for n in range(len(nodes)): meshfile.write("%d %.15f 0 0 \n" % (n + 1, nodes[n])) -meshfile.write( - """$EndNodes +meshfile.write("""$EndNodes $Elements -""" -) +""") meshfile.write("%d\n" % (len(eles) + 2)) # Mark first and last node meshfile.write("1 15 2 1 1 1\n") diff --git a/tools/make_check_options.py b/tools/make_check_options.py index 2235ae4d86..a563fb58cc 100755 --- a/tools/make_check_options.py +++ b/tools/make_check_options.py @@ -62,13 +62,9 @@ def safe_decode(x): ) # Ensure that the subroutine is legal in the trivial case. -output.write( - safe_decode( - """ +output.write(safe_decode(""" continue - """ - ) -) + """)) for module in module_list: output.write(safe_decode(" call " + module + "_check_options\n")) diff --git a/tools/make_register_diagnostics.py b/tools/make_register_diagnostics.py index 27b50f9aeb..d1d8105db1 100755 --- a/tools/make_register_diagnostics.py +++ b/tools/make_register_diagnostics.py @@ -62,13 +62,9 @@ def safe_decode(x): ) # Ensure that the subroutine is legal in the trivial case. -output.write( - safe_decode( - """ +output.write(safe_decode(""" continue - """ - ) -) + """)) for module in module_list: output.write(safe_decode(" call " + module + "_register_diagnostic\n")) diff --git a/tools/profiling-graph.py b/tools/profiling-graph.py index 21c6ae9992..c3589e50f9 100755 --- a/tools/profiling-graph.py +++ b/tools/profiling-graph.py @@ -54,7 +54,7 @@ def draw_graph(times, output): parser.add_option( "-o", "--output", dest="output", default="times.svg", help="output file" ) - (options, args) = parser.parse_args() + options, args = parser.parse_args() # get subs, files, output subs = options.subs.split(",") if len(args) > 0: diff --git a/tools/pvtu2vtu.py b/tools/pvtu2vtu.py index 4f3bd6424e..f6a3c75a81 100755 --- a/tools/pvtu2vtu.py +++ b/tools/pvtu2vtu.py @@ -4,6 +4,7 @@ """ Script to combine pvtus into vtus """ + import optparse import fluidity.diagnostics.debug as debug diff --git a/tools/radial_scale.py b/tools/radial_scale.py index 4ee8fa9d36..33ad0db5ae 100755 --- a/tools/radial_scale.py +++ b/tools/radial_scale.py @@ -35,7 +35,7 @@ npoints = vtu_object.ugrid.GetNumberOfPoints() for i in range(npoints): - (x, y, z) = vtu_object.ugrid.GetPoint(i) + x, y, z = vtu_object.ugrid.GetPoint(i) radius = sqrt(x**2 + y**2 + z**2) theta = acos(z / radius) phi = atan(y / x) diff --git a/tools/stat2csv.py b/tools/stat2csv.py index 3572421616..f1ee701e5a 100755 --- a/tools/stat2csv.py +++ b/tools/stat2csv.py @@ -8,6 +8,7 @@ """ stat to csv convertor for Fluidity output stat files. """ + import getopt import os import sys diff --git a/tools/testharness.py b/tools/testharness.py index 7fd9154ea0..afb3b4654e 100755 --- a/tools/testharness.py +++ b/tools/testharness.py @@ -472,7 +472,7 @@ def threadrun(self, queue): try: # pull a test number from the queue test_id = queue.get(timeout=0.1) - (dir, test) = self.tests[test_id] + dir, test = self.tests[test_id] except Queue.Empty: # If the queue is empty, we're done. sys.stdout = main_stdout @@ -588,7 +588,7 @@ def list(self): dest="exit_fails", help="Return failure count on exit", ) - (options, args) = parser.parse_args() + options, args = parser.parse_args() if len(args) > 0: parser.error("Too many arguments.") diff --git a/tools/transform_mesh.py b/tools/transform_mesh.py index a7155b40bb..85f3cba496 100755 --- a/tools/transform_mesh.py +++ b/tools/transform_mesh.py @@ -23,7 +23,7 @@ "%prog '(x,y,1000*z)' mesh.\n" ) -(options, argv) = optparser.parse_args() +options, argv = optparser.parse_args() if len(argv) != 2: optparser.print_help() diff --git a/tools/unittestharness.py b/tools/unittestharness.py index 58078be5c1..e9cae13344 100755 --- a/tools/unittestharness.py +++ b/tools/unittestharness.py @@ -14,9 +14,7 @@ def display_results(tests_results, error_list, skip_list): - print( - cleandoc( - f""" + print(cleandoc(f""" ########### # Results # ########### @@ -29,9 +27,7 @@ def display_results(tests_results, error_list, skip_list): \tErrors: {len(error_list)} \t\t{error_list}\n \tSkipped: {len(skip_list)} - \t\t{skip_list}""" - ) - ) + \t\t{skip_list}""")) def unittest_harness_no_output(tests): diff --git a/tools/vtudecomp.py b/tools/vtudecomp.py index c34d230520..c63b7b54d1 100755 --- a/tools/vtudecomp.py +++ b/tools/vtudecomp.py @@ -4,6 +4,7 @@ """ Tool to decompose a vtu using a given decomposed gmsh mesh """ + import glob import optparse import os