-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check for custom quadrature for each integral, not each form #622
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR does currently not work with the main branch, mwe:
import dolfinx as df
import ufl
import numpy as np
import mpi4py
import basix.ufl
msh = df.mesh.create_unit_square(mpi4py.MPI.COMM_WORLD, 10, 10)
CG2_vect = df.fem.functionspace(msh, ("Lagrange", 1))
Qe = basix.ufl.quadrature_element(msh.topology.cell_name(), value_shape=(), scheme="default", degree=1)
Quad = df.fem.functionspace(msh, Qe)
u = df.fem.Function(Quad)
v = ufl.TrialFunction(CG2_vect)
dx_m = ufl.Measure("dx",domain=msh, metadata={"quadrature_degree": 1, "quadrature_scheme": "default"})
ds = ufl.Measure("ds", domain=msh)
residual = u * v * dx_m
vol = df.fem.form(residual)
residual = v * ds
surf = df.fem.form(residual)
residual = u * v * dx_m + v * ds
vol_surf = df.fem.form(residual)
vol_v = df.fem.assemble_vector(vol)
sur_v = df.fem.assemble_vector(surf)
vol_surf = df.fem.assemble_vector(vol_surf)
assert np.allclose(vol_v.x.array+sur_v.x.array, vol_surf.x.array)
Same error as in FEniCS/dolfinx#2664
I've added this code to dolfinx as a test in FEniCS/dolfinx#2870. That test should now pass with FEniCS/basix#733 and this PR |
Issue is fixed by FEniCS/basix#733
See FEniCS/dolfinx#2664