Skip to content

Commit 82a1970

Browse files
authored
Merge pull request #150 from scientificcomputing/dokken/deactivate-complex-interpolation-matrix
Deactivate complex interpolation matrix
2 parents 0abb68e + 3bdf1a3 commit 82a1970

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ build-backend = "scikit_build_core.build"
1010

1111
[project]
1212
name = "scifem"
13-
version = "0.13.0"
13+
version = "0.13.1"
1414
description = "Scientific tools for finite element methods"
1515
readme = "README.md"
1616
requires-python = ">=3.10"
@@ -138,7 +138,7 @@ tag = true
138138
sign_tags = false
139139
tag_name = "v{new_version}"
140140
tag_message = "Bump version: {current_version} → {new_version}"
141-
current_version = "0.13.0"
141+
current_version = "0.13.1"
142142

143143

144144
[[tool.bumpversion.files]]

src/scifem/interpolation.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ def prepare_interpolation_data(
3232
Returns:
3333
Interpolation data per cell, as an numpy array.
3434
"""
35+
if np.issubdtype(dolfinx.default_scalar_type, np.complexfloating):
36+
raise NotImplementedError("No complex support")
37+
3538
try:
3639
q_points = Q.element.interpolation_points()
3740
except TypeError:

tests/test_interpolation.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
import numpy as np
77

88

9+
@pytest.mark.skipif(
10+
np.issubdtype(dolfinx.default_scalar_type, np.complexfloating), reason="No complex support"
11+
)
912
@pytest.mark.parametrize(
1013
"cell_type",
1114
[
@@ -60,6 +63,9 @@ def test_interpolation_matrix(use_petsc, cell_type, degree):
6063
np.testing.assert_allclose(q.x.array, q_ref.x.array, rtol=1e-12, atol=1e-13)
6164

6265

66+
@pytest.mark.skipif(
67+
np.issubdtype(dolfinx.default_scalar_type, np.complexfloating), reason="No complex support"
68+
)
6369
@pytest.mark.skipif(
6470
not hasattr(dolfinx.fem, "discrete_gradient"),
6571
reason="Cannot verify without discrete gradient from DOLFINx",
@@ -136,6 +142,9 @@ def test_discrete_gradient(degree, use_petsc, cell_type):
136142
np.testing.assert_allclose(w.x.array, w_ref.x.array, rtol=1e-11, atol=1e-12)
137143

138144

145+
@pytest.mark.skipif(
146+
np.issubdtype(dolfinx.default_scalar_type, np.complexfloating), reason="No complex support"
147+
)
139148
@pytest.mark.skipif(
140149
not hasattr(dolfinx.fem, "discrete_curl"),
141150
reason="Cannot verify without discrete curl from DOLFINx",

0 commit comments

Comments
 (0)