Skip to content

Commit

Permalink
Generalize bounds of bc for arbitrary partitioning in `test_assembly_…
Browse files Browse the repository at this point in the history
…domains.py` (#3118)

* Generalize bounds of bc for arbitrary partitioning. Resolves #3117

* Ruff formatting
  • Loading branch information
jorgensd committed Apr 2, 2024
1 parent 6189a7e commit f55ca1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/test/unit/fem/test_assemble_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down Expand Up @@ -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)))
Expand Down

0 comments on commit f55ca1a

Please sign in to comment.