You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In dune-fem we have not been able to upgrade to ufl beyond 22.2.0 because of the Constant (now having a domain) and the domain check being enforced in domain.py:221: (join_domains).
In our case this is, for example, the case when a Constant representing the time step dt is used in two different forms.
I think this is also related to the discussion in #267.
The following code triggers the problem:
import basix.ufl
import ufl
# Bulk problem: u - tau laplace u = u_n + tau f.
# but only setting up right hand side forcing 'tau f'
#
bc_el = basix.ufl.element("Lagrange", "triangle", 1, shape=(2, ))
bdomain = ufl.Mesh(bc_el)
# issue here: constant defined on bulk domain
tau = ufl.Constant(bdomain)
bel = basix.ufl.element("Lagrange", "triangle", 1)
bV = ufl.FunctionSpace(bdomain, bel)
bL = tau*ufl.inner(ufl.Coefficient(bV), ufl.TestFunction(bV)) * ufl.dx
#############################################################
# Surface problem: w - tau laplace w = w_n + tau g
# but only setting up right hand side forcing 'tau g'
sc_el = basix.ufl.element("Lagrange", "triangle", 1, shape=(3, ))
sdomain = ufl.Mesh(sc_el)
# issue here: can't use constant from bulk problem - using 'sdomain' works
# tau = ufl.Constant(sdomain)
sel = basix.ufl.element("Lagrange", "triangle", 1)
sV = ufl.FunctionSpace(sdomain, sel)
# This line results in
# ValueError: Found domains with different geometric dimensions.
sL = tau*ufl.inner(ufl.Coefficient(sV), ufl.TestFunction(sV)) * ufl.dx
The text was updated successfully, but these errors were encountered:
In dune-fem we have not been able to upgrade to ufl beyond
22.2.0
because of theConstant
(now having a domain) and the domain check being enforced in domain.py:221: (join_domains
).In our case this is, for example, the case when a
Constant
representing the time stepdt
is used in two different forms.I think this is also related to the discussion in #267.
The following code triggers the problem:
The text was updated successfully, but these errors were encountered: