From ec5af2358908858a3dc60595916c354e5de06e67 Mon Sep 17 00:00:00 2001 From: Joost van Zwieten Date: Mon, 12 Jul 2021 15:29:58 +0200 Subject: [PATCH] fix periodic mesh.line If a periodic `mesh.line` is created, the basis that is used to build the geometry should be nonperiodic. Since the topology is a `StructuredTopology`, the basis accepts a *list* of periodic dimension indices for parameter `periodic`, not a boolean. This patch fixes the mistake by passing an empty list to `topo.basis` instead of `False`. --- nutils/mesh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nutils/mesh.py b/nutils/mesh.py index 64e8cbe54..b8b7abc14 100644 --- a/nutils/mesh.py +++ b/nutils/mesh.py @@ -87,7 +87,7 @@ def line(nodes, periodic=False, bnames=None): uniform = numpy.equal(nodes, offset + numpy.arange(nelems+1) * scale).all() root = transform.Identifier(1, 'line') domain = topology.StructuredLine(root, 0, nelems, periodic=periodic, bnames=bnames) - geom = function.rootcoords(1) * scale + offset if uniform else domain.basis('std', degree=1, periodic=False).dot(nodes) + geom = function.rootcoords(1) * scale + offset if uniform else domain.basis('std', degree=1, periodic=[]).dot(nodes) return domain, geom def newrectilinear(nodes, periodic=None, bnames=[['left','right'],['bottom','top'],['front','back']]):