@@ -47,7 +47,9 @@ class FormIR(typing.NamedTuple):
47
47
num_coefficients : int
48
48
num_constants : int
49
49
name_from_uflfile : str
50
- function_spaces : dict [str , tuple [str , str , str , int , basix .CellType , basix .LagrangeVariant ]]
50
+ function_spaces : dict [
51
+ str , tuple [str , str , str , int , basix .CellType , basix .LagrangeVariant , tuple [int ]]
52
+ ]
51
53
original_coefficient_position : list [int ]
52
54
coefficient_names : list [str ]
53
55
constant_names : list [str ]
@@ -90,9 +92,7 @@ class ElementIR(typing.NamedTuple):
90
92
signature : str
91
93
cell_shape : str
92
94
topological_dimension : int
93
- geometric_dimension : int
94
95
space_dimension : int
95
- value_shape : tuple [int , ...]
96
96
reference_value_shape : tuple [int , ...]
97
97
degree : int
98
98
num_sub_elements : int
@@ -174,7 +174,9 @@ class ExpressionIR(typing.NamedTuple):
174
174
coefficient_names : list [str ]
175
175
constant_names : list [str ]
176
176
needs_facet_permutations : bool
177
- function_spaces : dict [str , tuple [str , str , str , int , basix .CellType , basix .LagrangeVariant ]]
177
+ function_spaces : dict [
178
+ str , tuple [str , str , str , int , basix .CellType , basix .LagrangeVariant , tuple [int ]]
179
+ ]
178
180
name_from_uflfile : str
179
181
original_coefficient_positions : list [int ]
180
182
@@ -289,7 +291,6 @@ def _compute_element_ir(element, element_numbers, finite_element_names):
289
291
ir ["signature" ] = repr (element )
290
292
ir ["cell_shape" ] = element .cell_type .name
291
293
ir ["topological_dimension" ] = cell .topological_dimension ()
292
- ir ["geometric_dimension" ] = cell .geometric_dimension ()
293
294
ir ["space_dimension" ] = element .dim + element .num_global_support_dofs
294
295
ir ["element_type" ] = element .ufcx_element_type
295
296
ir ["lagrange_variant" ] = element .lagrange_variant
@@ -298,7 +299,6 @@ def _compute_element_ir(element, element_numbers, finite_element_names):
298
299
ir ["basix_cell" ] = element .cell_type
299
300
ir ["discontinuous" ] = element .discontinuous
300
301
ir ["degree" ] = element .degree
301
- ir ["value_shape" ] = element .value_shape
302
302
ir ["reference_value_shape" ] = element .reference_value_shape
303
303
304
304
ir ["num_sub_elements" ] = element .num_sub_elements
@@ -662,19 +662,23 @@ def _compute_form_ir(
662
662
if not str (name ).isidentifier ():
663
663
raise ValueError (f'Function name "{ name } " must be a valid object identifier.' )
664
664
el = function .ufl_function_space ().ufl_element ()
665
- cmap = function .ufl_function_space ().ufl_domain ().ufl_coordinate_element ()
665
+ space = function .ufl_function_space ()
666
+ domain = space .ufl_domain ()
667
+ cmap = domain .ufl_coordinate_element ()
666
668
# Default point spacing for CoordinateElement is equispaced
667
669
if not isinstance (cmap , basix .ufl ._ElementBase ) and cmap .variant () is None :
668
670
cmap ._sub_element ._variant = "equispaced"
669
671
family = cmap .family_name
670
672
degree = cmap .degree
673
+ value_shape = space .value_shape
671
674
fs [name ] = (
672
675
finite_element_names [el ],
673
676
dofmap_names [el ],
674
677
family ,
675
678
degree ,
676
679
cmap .cell_type ,
677
680
cmap .lagrange_variant ,
681
+ value_shape ,
678
682
)
679
683
680
684
form_name = object_names .get (id (form_data .original_form ), form_id )
@@ -782,10 +786,21 @@ def _compute_expression_ir(
782
786
if not str (name ).isidentifier ():
783
787
raise ValueError (f'Function name "{ name } " must be a valid object identifier.' )
784
788
el = function .ufl_function_space ().ufl_element ()
785
- cmap = function .ufl_function_space ().ufl_domain ().ufl_coordinate_element ()
789
+ space = function .ufl_function_space ()
790
+ domain = space .ufl_domain ()
791
+ cmap = domain .ufl_coordinate_element ()
786
792
family = cmap .family_name
787
793
degree = cmap .degree
788
- fs [name ] = (finite_element_names [el ], dofmap_names [el ], family , degree )
794
+ value_shape = space .value_shape
795
+ fs [name ] = (
796
+ finite_element_names [el ],
797
+ dofmap_names [el ],
798
+ family ,
799
+ degree ,
800
+ cmap .cell_type ,
801
+ cmap .lagrange_variant ,
802
+ value_shape ,
803
+ )
789
804
790
805
expression_name = object_names .get (id (original_expression ), index )
791
806
0 commit comments