From 246cf659fd4bf1fb5523ddaac47a7bfef406f640 Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Wed, 10 Jan 2024 09:40:32 -0800 Subject: [PATCH 1/3] fix split_bases and split_indices for ElementVector --- skfem/assembly/basis/abstract_basis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skfem/assembly/basis/abstract_basis.py b/skfem/assembly/basis/abstract_basis.py index 8b21baa7..1a1c7962 100644 --- a/skfem/assembly/basis/abstract_basis.py +++ b/skfem/assembly/basis/abstract_basis.py @@ -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(( @@ -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 From dea9d74f62bfbe2ba587642f5a35653998fb9d6f Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Wed, 10 Jan 2024 11:01:04 -0800 Subject: [PATCH 2/3] add entry to changelog for ElementVector-fix --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3037aa00..462f118b 100644 --- a/README.md +++ b/README.md @@ -236,6 +236,7 @@ with respect to documented and/or tested features. `MeshTet2` and `MeshHex2` - Fixed: `ElementGlobal` now uses outward normals to initialize DOFs on boundary facets +- Fixed: `ElementVector` works also for split_bases/split_indices in case `mesh.dim() != elem.dim` ### [8.1.0] - 2023-06-16 From 8b47502db955fa22ae5f047d65c0467eaafe6bbe Mon Sep 17 00:00:00 2001 From: kinnala Date: Wed, 10 Jan 2024 23:21:34 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 462f118b..ed6c6225 100644 --- a/README.md +++ b/README.md @@ -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 @@ -236,7 +240,6 @@ with respect to documented and/or tested features. `MeshTet2` and `MeshHex2` - Fixed: `ElementGlobal` now uses outward normals to initialize DOFs on boundary facets -- Fixed: `ElementVector` works also for split_bases/split_indices in case `mesh.dim() != elem.dim` ### [8.1.0] - 2023-06-16