Skip to content

Commit c177d80

Browse files
committed
Add sobolev space HCurlDiv
1 parent fbd288e commit c177d80

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ufl/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
- HCurl
7575
- HEin
7676
- HDivDiv
77+
- HCurlDiv
7778
7879
7980
* Pull backs::
@@ -279,7 +280,7 @@
279280
tanh, tr, transpose, variable)
280281
from ufl.pullback import (AbstractPullback, MixedPullback, SymmetricPullback, contravariant_piola, covariant_piola,
281282
double_contravariant_piola, double_covariant_piola, identity_pullback, l2_piola)
282-
from ufl.sobolevspace import H1, H2, L2, HCurl, HDiv, HDivDiv, HEin, HInf
283+
from ufl.sobolevspace import H1, H2, L2, HCurl, HDiv, HDivDiv, HCurlDiv, HEin, HInf
283284
from ufl.split_functions import split
284285
from ufl.tensors import as_matrix, as_tensor, as_vector, unit_matrices, unit_matrix, unit_vector, unit_vectors
285286
from ufl.utils.sequences import product
@@ -288,7 +289,7 @@
288289
'product',
289290
'as_cell', 'AbstractCell', 'Cell', 'TensorProductCell',
290291
'AbstractDomain', 'Mesh', 'MeshView',
291-
'L2', 'H1', 'H2', 'HCurl', 'HDiv', 'HInf', 'HEin', 'HDivDiv',
292+
'L2', 'H1', 'H2', 'HCurl', 'HDiv', 'HInf', 'HEin', 'HDivDiv', 'HCurlDiv',
292293
'identity_pullback', 'l2_piola', 'contravariant_piola', 'covariant_piola',
293294
'double_contravariant_piola', 'double_covariant_piola',
294295
'l2_piola', 'MixedPullback', 'SymmetricPullback', 'AbstractPullback',

ufl/sobolevspace.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def __init__(self, name, parents=None):
5252
"HCurl": 0,
5353
"HEin": 0,
5454
"HDivDiv": 0,
55+
"HCurlDiv": 0,
5556
"DirectionalH": 0
5657
}[self.name]
5758

@@ -151,7 +152,7 @@ def __lt__(self, other):
151152

152153
if other in [HDiv, HCurl]:
153154
return all(self._orders[i] >= 1 for i in self._spatial_indices)
154-
elif other.name in ["HDivDiv", "HEin"]:
155+
elif other.name in ["HDivDiv", "HCurlDiv", "HEin"]:
155156
# Don't know how these spaces compare
156157
return NotImplementedError(f"Don't know how to compare with {other.name}")
157158
else:
@@ -171,3 +172,4 @@ def __str__(self):
171172
HInf = SobolevSpace("HInf", [H2, H1, HDiv, HCurl, L2])
172173
HEin = SobolevSpace("HEin", [L2])
173174
HDivDiv = SobolevSpace("HDivDiv", [L2])
175+
HCurlDiv = SobolevSpace("HCurlDiv", [L2])

0 commit comments

Comments
 (0)