Skip to content

Commit

Permalink
Use UFL element hashing instead of FInAT element hashing
Browse files Browse the repository at this point in the history
* Fixes #3732.
  • Loading branch information
connorjward committed Oct 18, 2024
1 parent e27b702 commit 424718e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions firedrake/output/vtk_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,11 @@ def __init__(self, filename, project_output=False, comm=None, mode="w",
def _prepare_output(self, function, max_elem):
from firedrake import FunctionSpace, VectorFunctionSpace, \
TensorFunctionSpace, Function
from tsfc.finatinterface import create_element as create_finat_element

name = function.name()
# Need to project/interpolate?
# If space is not the max element, we must do so.
finat_elem = function.function_space().finat_element
if finat_elem == create_finat_element(max_elem):
if function.function_space().ufl_element() == max_elem:
return OFunction(array=get_array(function),
name=name, function=function)
# OK, let's go and do it.
Expand Down

0 comments on commit 424718e

Please sign in to comment.