Skip to content

Commit

Permalink
fix split_bases and split_indices for ElementVector (#1091)
Browse files Browse the repository at this point in the history
  • Loading branch information
HelgeGehring authored Jan 10, 2024
1 parent 58f9a88 commit 04722c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
with respect to documented and/or tested features.

### Unreleased

- Fixed: `ElementVector` works also for split_bases/split_indices in case `mesh.dim() != elem.dim`

### [9.0.0] - 2023-12-24

- Removed: Python 3.7 support
Expand Down
4 changes: 2 additions & 2 deletions skfem/assembly/basis/abstract_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def split_indices(self) -> List[ndarray]:
e.interior_dofs])
return output
elif isinstance(self.elem, ElementVector):
ndims = self.mesh.dim()
ndims = self.elem.dim
e = self.elem.elem
for k in range(ndims):
output.append(np.concatenate((
Expand All @@ -359,7 +359,7 @@ def split_bases(self) -> List['AbstractBasis']:
elif isinstance(self.elem, ElementVector):
return [type(self)(self.mesh, self.elem.elem, self.mapping,
quadrature=self.quadrature)
for _ in range(self.mesh.dim())]
for _ in range(self.elem.dim)]
return [self]

@property
Expand Down

0 comments on commit 04722c1

Please sign in to comment.