From 9e11150af6bb8834d71c701d71eedcb897cce1db Mon Sep 17 00:00:00 2001 From: Joost van Zwieten Date: Mon, 12 Jul 2021 16:08:03 +0200 Subject: [PATCH] align periodic arg of mesh.newrectlin with rectlin --- nutils/mesh.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nutils/mesh.py b/nutils/mesh.py index 5d1b74eb7..febd5bf1a 100644 --- a/nutils/mesh.py +++ b/nutils/mesh.py @@ -92,11 +92,8 @@ def line(nodes, periodic=False, bnames=None, *, space: str = 'X'): def newrectilinear(nodes, periodic=None, bnames=[['left','right'],['bottom','top'],['front','back']]): if periodic is None: - periodic = numpy.zeros(len(nodes), dtype=bool) - else: - periodic = numpy.asarray(periodic) - assert len(periodic) == len(nodes) and periodic.ndim == 1 and periodic.dtype == bool - dims = [line(nodesi, periodici, bnamesi) for nodesi, periodici, bnamesi, namei in zip(nodes, periodic, tuple(bnames)+(None,)*len(nodes))] + periodic = [] + dims = [line(nodesi, i in periodic, bnamesi) for i, (nodesi, bnamesi) in zip(nodes, tuple(bnames)+(None,)*len(nodes))] domain, geom = dims.pop(0) for domaini, geomi in dims: domain = domain * domaini