Mixed FunctionSpace on mesh and boundary mesh

9 months ago by
Dear all,

is there a way to create a mixed FunctionSpace of sub spaces defined on a mesh *and* on (parts of) its boundary mesh?
I need to enforce a coupling condition on the boundary by means of a non-constant Lagrange multiplier.

from dolfin import *

mesh = UnitSquareMesh(4, 4)
bmesh = BoundaryMesh(mesh, 'exterior')

P = FiniteElement('P', mesh.ufl_cell(), 1)
M = FiniteElement('P', bmesh.ufl_cell(), 1)

W = FunctionSpace(mesh, MixedElement([P, M]))

This fails with the error: UFLException: Sub elements must live on the same cell.

Community: FEniCS Project

Have you tried restricting the integration of your Lagrange-multiplier term to the exterior?

written 9 months ago by pf4d  
How so? Creating the MixedElement fails, didn't get to integrate anything.
written 9 months ago by David Nolte  
Just create your Lagrange multiplier function as a normal function over P, but only integrate the Lagrange multiplier functional over the boundary.
written 9 months ago by pf4d  
I see. But this would result in a highly underdetermined problem, wouldn't it? There are no conditions for all the interior DOFs of the Lagrange multiplier.
written 9 months ago by David Nolte  
Adjoining Lagrange multipliers to the PDE will typically require new solution methods.  That said, if your functional does not include any Lagrange-multiplier interior terms, these unused interior terms are not specified in the form and hence will not affect your solution on the boundaries.
written 9 months ago by pf4d  
Also, this may be of use to you:

written 9 months ago by pf4d  
Ok, thanks. I'll have a look at dolfin-adjoint.
written 9 months ago by David Nolte  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »