Skip to content

Commit e7b4f12

Browse files
committed
Various
1 parent 8e091c5 commit e7b4f12

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

python/dolfinx/fem/assemble.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2018-2022 Garth N. Wells, Jack S. Hale
1+
# Copyright (C) 2018-2022 Garth N. Wells, Jack S. Hale and Paul T. Kühner
22
#
33
# This file is part of DOLFINx (https://www.fenicsproject.org)
44
#
@@ -110,7 +110,7 @@ def create_vector(V: FunctionSpace, dtype: npt.DTypeLike = default_scalar_type)
110110
"""
111111
# Can just take the first dofmap here, since all dof maps have the same
112112
# index map in mixed-topology meshes
113-
dofmap = V.dofmaps[0] # type: ignore[attr-defined]
113+
dofmap = V.dofmaps[0]
114114
return la.vector(dofmap.index_map, dofmap.index_map_bs, dtype=dtype)
115115

116116

@@ -303,8 +303,10 @@ def assemble_matrix(
303303
The returned matrix is not finalised, i.e. ghost values are not
304304
accumulated.
305305
"""
306-
bcs = [] if bcs is None else bcs
307-
A: la.MatrixCSR = create_matrix(a, block_mode)
306+
if bcs is None:
307+
bcs = []
308+
309+
A = create_matrix(a, block_mode)
308310
_assemble_matrix_csr(A, a, bcs, diag, constants, coeffs)
309311
return A
310312

0 commit comments

Comments
 (0)