From f55ca1a8f432be76d7e3838f76e072bf54a87c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Schartum=20Dokken?= Date: Tue, 2 Apr 2024 16:43:54 +0200 Subject: [PATCH] Generalize bounds of bc for arbitrary partitioning in `test_assembly_domains.py` (#3118) * Generalize bounds of bc for arbitrary partitioning. Resolves #3117 * Ruff formatting --- python/test/unit/fem/test_assemble_domains.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/test/unit/fem/test_assemble_domains.py b/python/test/unit/fem/test_assemble_domains.py index 99e38d7c0e4..61deef1f873 100644 --- a/python/test/unit/fem/test_assemble_domains.py +++ b/python/test/unit/fem/test_assemble_domains.py @@ -89,7 +89,7 @@ def test_assembly_dx_domains(mode, meshtags_factory): A2.scatter_reverse() assert np.allclose(A.data, A2.data) - bc = dirichletbc(Function(V), np.arange(30)) + bc = dirichletbc(Function(V), np.arange(V.dofmap.index_map.size_local // 2, dtype=np.int32)) # Assemble vector L = form(ufl.inner(w, v) * (dx(1) + dx(2) + dx(3))) @@ -158,7 +158,7 @@ def right(x): w = Function(V) w.x.array[:] = 0.5 - bc = dirichletbc(Function(V), np.arange(30)) + bc = dirichletbc(Function(V), np.arange(V.dofmap.index_map.size_local // 2, dtype=np.int32)) # Assemble matrix a = form(w * ufl.inner(u, v) * (ds(1) + ds(2) + ds(3) + ds(6)))