This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Edge Interpolant

+4 votes

Suppose we are trying to compute an integral-based edge interpolant on a 3D domain. We would have to solve the following system.

Given $u_0$, find $u$ in the lowest order Nedelec $H(curl)$ of the 1st kind such that $$\langle (u - u_0) \cdot t, v \rangle_{edge} = 0$$ for any $v \in DG_0(edge)$, where $t$ is the unit tangent to each edge.

However...

  • It is not clear how to define Measure(edge), nor tangent $t$.
  • To define, $DG_0(edge)$, we attempted to use FunctionSpace(Restriction(mesh, domain, "edge"), DG, 0), but this is not yet supported.
  • We could try FunctionSpace(mesh, "N2curl", 1, "edge") with $v \cdot t$ in place of $v$ in the system.

In application, this kind of interpolant inside a system appears in systems like the Reissner-Mindlin equations. The case of facet however has been resolved in 1. A good enough approach would be to simply use interpolate() on a trial and a test function, but FEniCS does not allow that.

asked Dec 3, 2013 by vincentqb FEniCS Novice (230 points)
edited May 3, 2014 by vincentqb

Could you elaborate a bit on what you mean by "simply use project() on a trial and test function, but FEniCS does not allow that anymore"? For instance, what was the previously allowed, good enough, code?

Unfortunately, I cannot find the example I had in mind. I withdraw this particular statement, and edited the question accordingly. The code I had in mind was following this recent post.

V = FunctionSpace(mesh, 'N1curl', 1)
W = VectorFunctionSpace(mesh, 'Lagrange', 2)
v = TrialFunction(V)
w = TestFunction(W)

v * project(w, V) * dx

Ok, note that

f = project(w, V)

is equivalent to

u = TrialFunction(V)
q = Argument(V)
f = Function(V)
solve(inner(u, q)*dx == inner(w, q)*dx, f)

Good point, thank you. I am looking for interpolate, rather than project. I've updated the question to reflect that. The code I would look for then would be the following.

V = FunctionSpace(mesh, 'N1curl', 1)
W = VectorFunctionSpace(mesh, 'Lagrange', 2)
v = TrialFunction(V)
w = TestFunction(W)

v * interpolate(w, V) * dx
...