Skip to content

Commit

Permalink
Add sobolev space HCurlDiv
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed May 6, 2024
1 parent fbd288e commit c177d80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions ufl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
- HCurl
- HEin
- HDivDiv
- HCurlDiv
* Pull backs::
Expand Down Expand Up @@ -279,7 +280,7 @@
tanh, tr, transpose, variable)
from ufl.pullback import (AbstractPullback, MixedPullback, SymmetricPullback, contravariant_piola, covariant_piola,
double_contravariant_piola, double_covariant_piola, identity_pullback, l2_piola)
from ufl.sobolevspace import H1, H2, L2, HCurl, HDiv, HDivDiv, HEin, HInf
from ufl.sobolevspace import H1, H2, L2, HCurl, HDiv, HDivDiv, HCurlDiv, HEin, HInf
from ufl.split_functions import split
from ufl.tensors import as_matrix, as_tensor, as_vector, unit_matrices, unit_matrix, unit_vector, unit_vectors
from ufl.utils.sequences import product
Expand All @@ -288,7 +289,7 @@
'product',
'as_cell', 'AbstractCell', 'Cell', 'TensorProductCell',
'AbstractDomain', 'Mesh', 'MeshView',
'L2', 'H1', 'H2', 'HCurl', 'HDiv', 'HInf', 'HEin', 'HDivDiv',
'L2', 'H1', 'H2', 'HCurl', 'HDiv', 'HInf', 'HEin', 'HDivDiv', 'HCurlDiv',
'identity_pullback', 'l2_piola', 'contravariant_piola', 'covariant_piola',
'double_contravariant_piola', 'double_covariant_piola',
'l2_piola', 'MixedPullback', 'SymmetricPullback', 'AbstractPullback',
Expand Down
4 changes: 3 additions & 1 deletion ufl/sobolevspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def __init__(self, name, parents=None):
"HCurl": 0,
"HEin": 0,
"HDivDiv": 0,
"HCurlDiv": 0,
"DirectionalH": 0
}[self.name]

Expand Down Expand Up @@ -151,7 +152,7 @@ def __lt__(self, other):

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

0 comments on commit c177d80

Please sign in to comment.