Skip to content

Commit

Permalink
Resolve #3167 (#3389)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgensd committed Sep 12, 2024
1 parent 840a21f commit 3d14ec5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions python/dolfinx/fem/bcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,21 @@ def function_space(self) -> dolfinx.fem.FunctionSpace:
"""The function space on which the boundary condition is defined"""
return self._cpp_object.function_space

def dof_indices(self) -> tuple[np.ndarray, int]:
"""Access dof indices `(local indices, unrolled)`, including ghosts, to
which a Dirichlet condition is applied, and the index to the first
non-owned (ghost) index. The array of indices is sorted.
Note:
The returned array is read-only.
Returns:
Sorted array of dof indices (unrolled) and index to the
first entry in the dof index array that is not owned. Entries
`dofs[:pos]` are owned and entries `dofs[pos:]` are ghosts.
"""
return self._cpp_object.dof_indices()


def dirichletbc(
value: typing.Union[Function, Constant, np.ndarray],
Expand Down

0 comments on commit 3d14ec5

Please sign in to comment.