Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix split_bases and split_indices for ElementVector #1091

Merged
merged 3 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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