diff -Nru ufl-2019.2.0~git20210211.d60cd09/ChangeLog.rst ufl-2021.1.0/ChangeLog.rst --- ufl-2019.2.0~git20210211.d60cd09/ChangeLog.rst 2021-02-11 00:12:36.000000000 +0000 +++ ufl-2021.1.0/ChangeLog.rst 2021-04-23 09:41:47.000000000 +0000 @@ -1,10 +1,10 @@ Changelog ========= -2019.2.0.dev0 +2021.1.0 ------------- -- No changes yet. +- Mixed dimensional domain support 2019.1.0 (2019-04-17) --------------------- diff -Nru ufl-2019.2.0~git20210211.d60cd09/debian/changelog ufl-2021.1.0/debian/changelog --- ufl-2019.2.0~git20210211.d60cd09/debian/changelog 2021-02-16 17:04:24.000000000 +0000 +++ ufl-2021.1.0/debian/changelog 2021-10-20 21:38:39.000000000 +0000 @@ -1,8 +1,35 @@ -ufl (2019.2.0~git20210211.d60cd09-1build1) hirsute; urgency=medium +ufl (2021.1.0-4) unstable; urgency=medium - * No change rebuild with fixed ownership. + * release ufl 2021.1 to unstable - -- Dimitri John Ledkov Tue, 16 Feb 2021 17:04:24 +0000 + -- Drew Parsons Wed, 20 Oct 2021 23:38:39 +0200 + +ufl (2021.1.0-3) experimental; urgency=medium + + * debian patch fix_global_derivatives_PR63.patch applies upstream + PR#63 to fix handling of global derivatives that triggered an + Exception in ffcx causing dolfinx tests to fail. + * update debian/copyright + * update Build-Depends: python3-all:any (>= 3.6) + + -- Drew Parsons Mon, 11 Oct 2021 19:49:23 +0200 + +ufl (2021.1.0-2) experimental; urgency=medium + + * debian patch prism_PR58.patch adds the prism (wedge) cell. + Upstream PR#58. + * Standards-Version: 4.6.0 + + -- Drew Parsons Thu, 09 Sep 2021 12:12:07 +0300 + +ufl (2021.1.0-1) experimental; urgency=medium + + * New upstream release. + * Remove signature file (pgpsigurlmangle=*.asc) from debian/watch, + together with debian/upstream/signing-key.asc. + Signed release file not provided by github infrastructure. + + -- Drew Parsons Tue, 11 May 2021 15:02:04 +0200 ufl (2019.2.0~git20210211.d60cd09-1) unstable; urgency=medium diff -Nru ufl-2019.2.0~git20210211.d60cd09/debian/control ufl-2021.1.0/debian/control --- ufl-2019.2.0~git20210211.d60cd09/debian/control 2021-02-16 17:04:24.000000000 +0000 +++ ufl-2021.1.0/debian/control 2021-10-20 21:38:39.000000000 +0000 @@ -1,17 +1,16 @@ Source: ufl Section: python Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian Science Team +Maintainer: Debian Science Team Uploaders: Johannes Ring , Drew Parsons Build-Depends: debhelper-compat (= 13), dh-python, - python3-all (>= 3.4), + python3-all:any (>= 3.6), python3-setuptools, python3-numpy, python3-pytest -Standards-Version: 4.5.1 +Standards-Version: 4.6.0 Homepage: http://fenicsproject.org Vcs-Git: https://salsa.debian.org/science-team/fenics/ufl.git Vcs-Browser: https://salsa.debian.org/science-team/fenics/ufl diff -Nru ufl-2019.2.0~git20210211.d60cd09/debian/copyright ufl-2021.1.0/debian/copyright --- ufl-2019.2.0~git20210211.d60cd09/debian/copyright 2021-02-13 01:12:19.000000000 +0000 +++ ufl-2021.1.0/debian/copyright 2021-10-20 21:38:39.000000000 +0000 @@ -5,32 +5,50 @@ Source: https://github.com/FEniCS/ufl Files: * -Copyright: 2008-2011, Martin Sandve Alnes - 2004-2011, Anders Logg +Copyright: 2008-2016, Martin Sandve Alnes + 2004-2016, Anders Logg + 2004-2021 Kristian B. Ølgaard , + Garth N. Wells , + Marie E. Rognes , + Kent-Andre Mardal , + Johan Hake , + David Ham , + Florian Rathgeber , + Andrew T. T. McRae , + Lawrence Mitchell , + Johannes Ring , + Aslak Bergersen , + Chris Richardson , + Massimiliano Leoni , + Jan Blechta , + Graham Markall , + Lizao Li , + Miklos Homolya , + Matthias Liertzer , + Maximilian Albert , + Corrado Maurini , + Jack S. Hale , + Tuomas Airaksinen , + Reuben W. Hill License: LGPL-3+ -Files: doc/sphinx/scripts/generate_index.py - scripts/makedoc - ufl/algorithms/elementtransformations.py - ufl/feec.py - demo/FEEC.ufl - demo/MixedElasticity.ufl - demo/VectorLaplaceGradCurl.ufl -Copyright: 2007-2011, Marie E. Rognes +Files: demo/MixedElasticity.ufl +Copyright: 2008-2010, Marie E. Rognes License: LGPL-3+ -Files: demo/QuadratureElement.ufl - demo/RestrictedElement.ufl -Copyright: 2008-2009, Kristian B. Oelgaard +Files: demo/MixedPoisson.ufl +Copyright: 2006-2009, Anders Logg + 2006-2009, Marie Rognes License: LGPL-3+ -Files: doc/sphinx/scripts/generate_modules.py -Copyright: 2008, Société des arts technologiques (SAT), http://www.sat.qc.ca/ - 2010, Thomas Waldmann -License: GPL-2+ +Files: demo/PoissonDG.ufl +Copyright: 2006-2007, Kristiand Oelgaard + 2006-2007, Anders Logg +License: LGPL-3+ -Files: ufl/algorithms/expand_indices.py -Copyright: 2008-2011, Martin Sandve Alnes +Files: demo/QuadratureElement.ufl + demo/RestrictedElement.ufl +Copyright: 2008-2009, Kristian B. Oelgaard License: LGPL-3+ Files: demo/StokesEquation.ufl @@ -38,54 +56,29 @@ 2005-2009, Harish Narayanan License: LGPL-3+ -Files: ufl/permutation.py -Copyright: 2008-2011, Anders Logg - 2008-2011, Kent-Andre Mardal -License: LGPL-3+ - Files: demo/SubDomains.ufl Copyright: 2008, Anders Logg 2008, Kristian B. Oelgaard License: LGPL-3+ -Files: demo/MixedPoisson.ufl -Copyright: 2006-2009, Anders Logg - 2006-2009, Marie Rognes +Files: demo/VectorLaplaceGradCurl.ufl +Copyright: 2007, Marie E. Rognes License: LGPL-3+ -Files: demo/PoissonDG.ufl -Copyright: 2006-2007, Kristiand Oelgaard - 2006-2007, Anders Logg +Files: ufl/permutation.py +Copyright: 2008-2011, Anders Logg + 2008-2011, Kent-Andre Mardal License: LGPL-3+ -Files: doc/sphinx/source/_themes/fenics/static/fenics.css_t - doc/sphinx/source/_themes/fenics/layout.html -Copyright: 2007-2011, the Sphinx team -License: BSD-2-clause - All rights reserved. - . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - . - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - . - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - . - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Files: ufl/algorithms/elementtransformations.py +Copyright: 2007-2011, Marie E. Rognes + 2015, Jan Blechta +License: LGPL-3+ + +Files: ufl/algorithms/expand_indices.py +Copyright: 2008-2016, Martin Sandve Alnes + 2009, Anders Logg +License: LGPL-3+ License: LGPL-3+ This package is free software; you can redistribute it and/or modify @@ -105,20 +98,3 @@ On Debian systems the full text of the GNU Lesser General Public License, version 3 can be found in the file '/usr/share/common-licenses/LGPL-3'. - -License: GPL-2+ - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - . - This package is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this package. If not, see . - . - On Debian systems the full text of the GNU General Public License, - version 2 can be found in the file '/usr/share/common-licenses/GPL-2'. diff -Nru ufl-2019.2.0~git20210211.d60cd09/debian/patches/fix_global_derivatives_PR63.patch ufl-2021.1.0/debian/patches/fix_global_derivatives_PR63.patch --- ufl-2019.2.0~git20210211.d60cd09/debian/patches/fix_global_derivatives_PR63.patch 1970-01-01 00:00:00.000000000 +0000 +++ ufl-2021.1.0/debian/patches/fix_global_derivatives_PR63.patch 2021-10-20 21:38:39.000000000 +0000 @@ -0,0 +1,94 @@ +From f3a45e3db83d803f2486576e4911d2fc4882cf4a Mon Sep 17 00:00:00 2001 +From: Joe Dean +Date: Mon, 5 Jul 2021 21:49:55 +0100 +Subject: [PATCH 01/10] Refactor duplicate code + +--- + ufl/algorithms/apply_derivatives.py | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +Index: ufl/ufl/algorithms/apply_derivatives.py +=================================================================== +--- ufl.orig/ufl/algorithms/apply_derivatives.py 2021-10-11 19:23:10.890764270 +0200 ++++ ufl/ufl/algorithms/apply_derivatives.py 2021-10-11 19:23:10.890764270 +0200 +@@ -489,14 +489,16 @@ + # --- Specialized rules for geometric quantities + + def geometric_quantity(self, o): +- """Default for geometric quantities is dg/dx = 0 if piecewise constant, otherwise keep Grad(g). ++ """Default for geometric quantities is do/dx = 0 if piecewise constant, ++ otherwise transform derivatives to reference derivatives. + Override for specific types if other behaviour is needed.""" + if is_cellwise_constant(o): + return self.independent_terminal(o) + else: +- # TODO: Which types does this involve? I don't think the +- # form compilers will handle this. +- return Grad(o) ++ domain = o.ufl_domain() ++ K = JacobianInverse(domain) ++ Do = grad_to_reference_grad(o, K) ++ return Do + + def jacobian_inverse(self, o): + # grad(K) == K_ji rgrad(K)_rj +@@ -504,9 +506,7 @@ + return self.independent_terminal(o) + if not o._ufl_is_terminal_: + error("ReferenceValue can only wrap a terminal") +- r = indices(len(o.ufl_shape)) +- i, j = indices(2) +- Do = as_tensor(o[j, i] * ReferenceGrad(o)[r + (j,)], r + (i,)) ++ Do = grad_to_reference_grad(o, o) + return Do + + # TODO: Add more explicit geometry type handlers here, with +@@ -550,9 +550,7 @@ + error("ReferenceValue can only wrap a terminal") + domain = f.ufl_domain() + K = JacobianInverse(domain) +- r = indices(len(o.ufl_shape)) +- i, j = indices(2) +- Do = as_tensor(K[j, i] * ReferenceGrad(o)[r + (j,)], r + (i,)) ++ Do = grad_to_reference_grad(o, K) + return Do + + def reference_grad(self, o): +@@ -564,9 +562,7 @@ + error("ReferenceGrad can only wrap a reference frame type!") + domain = f.ufl_domain() + K = JacobianInverse(domain) +- r = indices(len(o.ufl_shape)) +- i, j = indices(2) +- Do = as_tensor(K[j, i] * ReferenceGrad(o)[r + (j,)], r + (i,)) ++ Do = grad_to_reference_grad(o, K) + return Do + + # --- Nesting of gradients +@@ -595,6 +591,26 @@ + facet_avg = GenericDerivativeRuleset.independent_operator + + ++def grad_to_reference_grad(o, K): ++ """Relates grad(o) to reference_grad(o) using the Jacobian inverse. ++ ++ Args ++ ---- ++ o: Operand ++ K: Jacobian inverse ++ ++ Returns ++ ------- ++ Do: grad(o) written in terms of reference_grad(o) and K ++ ++ """ ++ r = indices(len(o.ufl_shape)) ++ i, j = indices(2) ++ # grad(o) == K_ji rgrad(o)_rj ++ Do = as_tensor(K[j, i] * ReferenceGrad(o)[r + (j,)], r + (i,)) ++ return Do ++ ++ + class ReferenceGradRuleset(GenericDerivativeRuleset): + def __init__(self, topological_dimension): + GenericDerivativeRuleset.__init__(self, diff -Nru ufl-2019.2.0~git20210211.d60cd09/debian/patches/prism_PR58.patch ufl-2021.1.0/debian/patches/prism_PR58.patch --- ufl-2019.2.0~git20210211.d60cd09/debian/patches/prism_PR58.patch 1970-01-01 00:00:00.000000000 +0000 +++ ufl-2021.1.0/debian/patches/prism_PR58.patch 2021-10-20 21:38:39.000000000 +0000 @@ -0,0 +1,70 @@ +From 4bd990a3318f821f22d683a2316d4ebbea25bc49 Mon Sep 17 00:00:00 2001 +From: Chris Richardson +Date: Thu, 20 May 2021 08:55:33 +0100 +Subject: [PATCH] Some experimenting with prism cells + +--- + ufl/__init__.py | 3 ++- + ufl/cell.py | 1 + + ufl/finiteelement/elementlist.py | 2 +- + ufl/objects.py | 1 + + 4 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/ufl/__init__.py b/ufl/__init__.py +index fb38de048..42df82a4c 100644 +--- a/ufl/__init__.py ++++ b/ufl/__init__.py +@@ -349,7 +349,7 @@ + # Predefined convenience objects + from ufl.objects import ( + vertex, interval, triangle, tetrahedron, +- quadrilateral, hexahedron, facet, ++ quadrilateral, hexahedron, prism, facet, + i, j, k, l, p, q, r, s, + dx, ds, dS, dP, + dc, dC, dO, dI, dX, +@@ -413,6 +413,7 @@ + 'dc', 'dC', 'dO', 'dI', 'dX', + 'ds_b', 'ds_t', 'ds_tb', 'ds_v', 'dS_h', 'dS_v', + 'vertex', 'interval', 'triangle', 'tetrahedron', ++ 'prism', + 'quadrilateral', 'hexahedron', 'facet', + 'i', 'j', 'k', 'l', 'p', 'q', 'r', 's', + 'e', 'pi', +diff --git a/ufl/cell.py b/ufl/cell.py +index 3262858e2..6669e52fe 100644 +--- a/ufl/cell.py ++++ b/ufl/cell.py +@@ -85,6 +85,7 @@ def __lt__(self, other): + "triangle": (3, 3, 1), + "quadrilateral": (4, 4, 1), + "tetrahedron": (4, 6, 4, 1), ++ "prism": (6, 9, 5, 1), + "hexahedron": (8, 12, 6, 1)} + + # Mapping from cell name to topological dimension +diff --git a/ufl/finiteelement/elementlist.py b/ufl/finiteelement/elementlist.py +index f38c20373..7bbf33d6a 100644 +--- a/ufl/finiteelement/elementlist.py ++++ b/ufl/finiteelement/elementlist.py +@@ -94,7 +94,7 @@ def show_elements(): + cubes = ("interval", "quadrilateral", "hexahedron") + any_cell = (None, + "vertex", "interval", +- "triangle", "tetrahedron", ++ "triangle", "tetrahedron", "prism", + "quadrilateral", "hexahedron") + + # Elements in the periodic table # TODO: Register these as aliases of +diff --git a/ufl/objects.py b/ufl/objects.py +index 38cd0734e..f08373c4d 100644 +--- a/ufl/objects.py ++++ b/ufl/objects.py +@@ -33,6 +33,7 @@ + interval = Cell("interval", 1) + triangle = Cell("triangle", 2) + tetrahedron = Cell("tetrahedron", 3) ++prism = Cell("prism", 3) + quadrilateral = Cell("quadrilateral", 2) + hexahedron = Cell("hexahedron", 3) + diff -Nru ufl-2019.2.0~git20210211.d60cd09/debian/patches/series ufl-2021.1.0/debian/patches/series --- ufl-2019.2.0~git20210211.d60cd09/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ ufl-2021.1.0/debian/patches/series 2021-10-20 21:38:39.000000000 +0000 @@ -0,0 +1,2 @@ +prism_PR58.patch +fix_global_derivatives_PR63.patch diff -Nru ufl-2019.2.0~git20210211.d60cd09/debian/upstream/signing-key.asc ufl-2021.1.0/debian/upstream/signing-key.asc --- ufl-2019.2.0~git20210211.d60cd09/debian/upstream/signing-key.asc 2021-02-13 01:12:19.000000000 +0000 +++ ufl-2021.1.0/debian/upstream/signing-key.asc 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQENBFm3qPYBCADLVRsKIH2xwxzrRyax3SXsd3pcV1K0fAXC8C1P32wh5o8NLX80 -QGNWKIln4kdrYtL5MHChZipNFmYCRT/vrFOaVftj/TM2QebOBwoGVIhQ2ueIQ9mO -GYTKKwNLPugUTf04l/+37B/WX/t8JsWfo1EVQ6FRjdY1P7iQpWDzhSMouKJE3+Xy -SH3Okh/OiumPSM/fNGLN6b/OE0K6BBH/RWWJVT/cbdSm3FrjYflTPPtP9yLWRj0o -TW81E7lYiKPL6pzi7kVtxicUu8MzOPpESBDty8M/xUmkdVzUU5E7NkRFnkCjhoJF -scLwdpdLRWaaLqAYp6W5puU/95X6Ddn9utLFABEBAAG0SkZFbmlDUyBQcm9qZWN0 -IFN0ZWVyaW5nIENvdW5jaWwgPGZlbmljcy1zdGVlcmluZy1jb3VuY2lsQGdvb2ds -ZWdyb3Vwcy5jb20+iQE+BBMBAgAoBQJZt6j2AhsDBQkDwmcABgsJCAcDAgYVCAIJ -CgsEFgIDAQIeAQIXgAAKCRC+0GEG3SK6szJ2B/9Zxea+l83Q9il/Z21VFZRWBETx -y189cqlOeVsMPJm/KpSDtjAC1iJWi9ogN2zyZej/m8Su+eAJ7QUHgz8StJUXOO6J -Y7OZ/v/SlJbf6ADcT9p981H9gFzufzU6NqjynFQRLjaApToZtSiAM4lsL21zk8Z+ -B7SMSouKGGn/ODWuZeVA1QT6pJTAX31lT1oFbdPRHc4j41qU+ogyjcwPh2dYFOBc -ZEp5XyU+7ZCGK1A2p/0i6orXBUVKw/1zm9jCSwxgd5FpEvnB6BXvHV3lXdiqxJuN -Xr+3OBoq0k5vQPkBKTDhvCf3UFEODJ98mFAKD1zezLTex+3yzOSmXpoLXTEcuQEN -BFm3qPYBCACqGoAPALpcUGwMgullThXVEEUJ2WY7wXoNvX6qAZ0gyf/vkJnuNyQH -Qd6ZJJVLzP28vHGLkftqcyjVLlu6Ok7dTrFobXTEeR9GO2cqxccfVTUUbURQ65kl -QhL6g+w/MeLtvMdAomClODvz7jRGAZUsezQcWrFnT8R25S94O4kPfky7fP+gNcwM -YT4SyScFvFTFGy6PSjnGIzGQUchBQRam56K8tP2FrCOMIWryeXjTcyixJPFfzmc3 -N3ifnTQPtu7VQtUkmq6L6dBtf8cCvi42Cnscq6HmcgGqkZTm81af/FPOI5SoY+gZ -8Oiur4KnOhkHJDg0+MzM8sKYVHmUf84hABEBAAGJASUEGAECAA8FAlm3qPYCGwwF -CQPCZwAACgkQvtBhBt0iurPTYwgAyIKm3ySpEcJlIVquiq9Xx52yCtdaNfIkwLOo -GwoTF4uIxGLWHNZn7nMn3HNMLxohNpuVmbDW++bK1ui0eqzeAFkvjCULwFU5RRsW -lVgN5xxtmjuSsVZBuE4KZMQevv6HcUUe6nEMERHUnujJdJKydXPOrWC3/+B/NYUR -8KoUFPL1+4si2wIdFOQZ8194Ic/JA4/FBhwMKG/rNNvRU2MNAzWzZCP7V0FeRLUs -fIsWs/CSG7SnPKs3o45D9tSiKVcBUilTbJYwmUnmTCwYD71OWa3q8t1ZmvHY/XMk -BSGJR5XcHeZKG/tjm5aSVp8yLsP4xEiRZcAFapBcMnaSDOTWOA== -=vY8l ------END PGP PUBLIC KEY BLOCK----- diff -Nru ufl-2019.2.0~git20210211.d60cd09/debian/watch ufl-2021.1.0/debian/watch --- ufl-2019.2.0~git20210211.d60cd09/debian/watch 2021-02-13 01:12:19.000000000 +0000 +++ ufl-2021.1.0/debian/watch 2021-10-20 21:38:39.000000000 +0000 @@ -1,4 +1,4 @@ version=4 -opts="pgpsigurlmangle=s/$/.asc/ filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%ufl-$1.tar.gz%" \ +opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%ufl-$1.tar.gz%" \ https://github.com/FEniCS/ufl/tags \ (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate diff -Nru ufl-2019.2.0~git20210211.d60cd09/setup.py ufl-2021.1.0/setup.py --- ufl-2019.2.0~git20210211.d60cd09/setup.py 2021-02-11 00:12:36.000000000 +0000 +++ ufl-2021.1.0/setup.py 2021-04-23 09:41:47.000000000 +0000 @@ -3,18 +3,13 @@ from setuptools import setup import sys -module_name = "ufl" - -if sys.version_info < (3, 5): - print("Python 3.5 or higher required, please upgrade.") +if sys.version_info < (3, 6): + print("Python 3.6 or higher required, please upgrade.") sys.exit(1) -version = "2019.2.0.dev0" +version = "2021.1.0" -url = "https://bitbucket.org/fenics-project/{}/".format(module_name) -tarball = None -if 'dev' not in version: - tarball = url + "downloads/fenics-{}-{}.tar.gz".format(module_name, version) +url = "https://github.com/FEniCS/ufl" CLASSIFIERS = """\ Development Status :: 5 - Production/Stable @@ -27,8 +22,10 @@ Operating System :: Microsoft :: Windows Programming Language :: Python Programming Language :: Python :: 3 -Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 +Programming Language :: Python :: 3.7 +Programming Language :: Python :: 3.8 +Programming Language :: Python :: 3.9 Topic :: Scientific/Engineering :: Mathematics Topic :: Software Development :: Libraries :: Python Modules """ @@ -37,10 +34,9 @@ name="fenics-ufl", version=version, description="Unified Form Language", - author="Martin Sandve Alnæs, Anders Logg", + author="FEniCS Project Team", author_email="fenics-dev@googlegroups.com", url=url, - download_url=tarball, classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f], packages=[ "ufl", diff -Nru ufl-2019.2.0~git20210211.d60cd09/ufl/finiteelement/hdivcurl.py ufl-2021.1.0/ufl/finiteelement/hdivcurl.py --- ufl-2019.2.0~git20210211.d60cd09/ufl/finiteelement/hdivcurl.py 2021-02-11 00:12:36.000000000 +0000 +++ ufl-2021.1.0/ufl/finiteelement/hdivcurl.py 2021-04-23 09:41:47.000000000 +0000 @@ -86,3 +86,36 @@ def shortstr(self): "Format as string for pretty printing." return "HCurlElement(%s)" % str(self._element.shortstr()) + + +class WithMapping(FiniteElementBase): + """Specify an alternative mapping for the wrappee. For example, + to use identity mapping instead of Piola map with an element E, + write + remapped = WithMapping(E, "identity") + """ + def __init__(self, wrapee, mapping): + self._repr = "WithMapping(%s, %s)" % (repr(wrapee), mapping) + self._mapping = mapping + self.wrapee = wrapee + + def __getattr__(self, attr): + try: + return getattr(self.wrapee, attr) + except AttributeError: + raise AttributeError("'%s' object has no attribute '%s'" % + (type(self).__name__, attr)) + + def mapping(self): + return self._mapping + + def reconstruct(self, **kwargs): + mapping = kwargs.pop("mapping", self._mapping) + wrapee = self.wrapee.reconstruct(**kwargs) + return type(self)(wrapee, mapping) + + def __str__(self): + return "WithMapping(%s, mapping=%s)" % (self.wrapee, self._mapping) + + def shortstr(self): + return "WithMapping(%s, %s)" % (self.wrapee.shortstr(), self._mapping) diff -Nru ufl-2019.2.0~git20210211.d60cd09/ufl/finiteelement/__init__.py ufl-2021.1.0/ufl/finiteelement/__init__.py --- ufl-2019.2.0~git20210211.d60cd09/ufl/finiteelement/__init__.py 2021-02-11 00:12:36.000000000 +0000 +++ ufl-2021.1.0/ufl/finiteelement/__init__.py 2021-04-23 09:41:47.000000000 +0000 @@ -22,7 +22,7 @@ from ufl.finiteelement.enrichedelement import NodalEnrichedElement from ufl.finiteelement.restrictedelement import RestrictedElement from ufl.finiteelement.tensorproductelement import TensorProductElement -from ufl.finiteelement.hdivcurl import HDivElement, HCurlElement +from ufl.finiteelement.hdivcurl import HDivElement, HCurlElement, WithMapping from ufl.finiteelement.brokenelement import BrokenElement from ufl.finiteelement.facetelement import FacetElement from ufl.finiteelement.interiorelement import InteriorElement @@ -43,4 +43,5 @@ "BrokenElement", "FacetElement", "InteriorElement", + "WithMapping" ] diff -Nru ufl-2019.2.0~git20210211.d60cd09/ufl/__init__.py ufl-2021.1.0/ufl/__init__.py --- ufl-2019.2.0~git20210211.d60cd09/ufl/__init__.py 2021-02-11 00:12:36.000000000 +0000 +++ ufl-2021.1.0/ufl/__init__.py 2021-04-23 09:41:47.000000000 +0000 @@ -277,7 +277,7 @@ MixedElement, VectorElement, TensorElement, EnrichedElement, \ NodalEnrichedElement, RestrictedElement, TensorProductElement, \ HDivElement, HCurlElement, BrokenElement, \ - FacetElement, InteriorElement + FacetElement, InteriorElement, WithMapping # Hook to extend predefined element families from ufl.finiteelement.elementlist import register_element, show_elements # , ufl_elements @@ -378,7 +378,7 @@ 'MixedElement', 'VectorElement', 'TensorElement', 'EnrichedElement', 'NodalEnrichedElement', 'RestrictedElement', 'TensorProductElement', 'HDivElement', 'HCurlElement', - 'BrokenElement', 'FacetElement', 'InteriorElement', + 'BrokenElement', 'FacetElement', 'InteriorElement', "WithMapping", 'register_element', 'show_elements', 'FunctionSpace', 'MixedFunctionSpace', 'Argument', 'TestFunction', 'TrialFunction',