← Back to team overview

ufl team mailing list archive

Re: Dirichlet boundary conditions

 

2008/6/23 Anders Logg <logg@xxxxxxxxx>:
> On Mon, Jun 23, 2008 at 01:22:13PM +0200, kent-and@xxxxxxxxx wrote:
>
>> > Maybe we can do:
>> >
>> > V = FiniteElement("Lagrange", "triangle", 1)
>> > Vg = Restricted(V, g, i) # subspace of V with u=g on dS_i
>> > u = TrialFunction(Vg)
>> > f = Function(V)
>> >
>> >
>>
>> I like the abstraction/name trace better than restriction, but no hard
>> feelings.
>> It could also be 'Constraints'.
>>
>> Kent
>
> How about this:
>
> A FunctionSpace is created from a FiniteElement and a set of
> Constraints, so we may do things like
>
>  element = FiniteElement("Lagrange", "triangle", 1)
>  constraints = (Trace(u, s0) == g, Trace(u, s1) == h)
>
>  V = FunctionSpace(element, constraints)
>
> We can let __eq__ in Trace return a Constraint object.

Looks good to me. So should a BasisFunction always be defined on a
FunctionSpace instead of an element? Or is "BasisFunction(element)" a
shortcut for "BasisFunction(FunctionSpace(element))" then?

We still need to support components like:

constraint = Trace(u[0], s0) == g
V = FunctionSpace(element, constraint)

I don't think we have to support arbitrary expressions in place of g.

--
Martin


References