Hi All,
I’m attempting to set an initial value for a Lagrange multiplier, defined as a function on a Real element space (using most recent dolfinx built from source). Normally I’d initialize by interpolating, but this doesn’t seem to work for real elements:
from dolfinx import mesh, fem
from mpi4py import MPI
import ufl
domain = mesh.create_unit_cube(MPI.COMM_WORLD, nx = 5, ny = 5, nz = 5,
cell_type=mesh.CellType.tetrahedron)
fe_p = ufl.FiniteElement("R", domain.ufl_cell(), 0)
V = fem.FunctionSpace(domain, fe_p)
def init_val(x):
values = np.zeros(x.shape)
return values
l_multiplier = fem.Function(V)
l_multiplier.interpolate(init_val)
RuntimeError: Cannot get interpolation points - no Basix element available. Maybe this is a mixed element?
Is there any way around this? Thanks!