ufl team mailing list archive
-
ufl team
-
Mailing list archive
-
Message #00193
Re: Dirichlet boundary conditions
> If we should add notation for boundary conditions to UFL, then I think
> it must also be supported through the UFC interface so that the
> assembler may assemble the correct matrix/vector directly (without
> zeroing out entries in a separate step).
I don't understand what you mean with this. It has to be a separate step
that is performed after the tabulate_tensor functions.
>
> Regarding the notation, maybe it should be a constraint on the
> function spaces. Take for example Poisson with u = g on the boundary:
>
> Find u in H^1_g : a(v, u) = L(v) for all v in H^1_0
>
> The boundary conditions are part of the test and trial spaces
> (subscripts g and 0 on H^1). We could do something like
>
> V = FunctionSpace("Lagrange", "triangle", 1) # test space
> W = FunctionSpace("Lagrange", "triangle", 1) # trial space
> V.restrict(g)
> W.restrict(0)
>
> a = dot(grad(v), grad(u))*dx
> L = v*f*dx
>
We could do that.
Boundary conditions are usually part of the test and trial space, but this
is just short-hand
notation. Either you can say
Find u in H^1_g : a(v, u) = L(v) for all v in H^1_0
where H^1_g are the functions in H^1 with Tu=g on \partial \Omega
(and similar with H^1_0)
or you can say
Find u in H^1 : a(v, u) = L(v) for all v in H^1 with Tu = g on \partial
\Omega
(and similar with v).
It is just that H^1_0 is so established that we hardly think of traces.
But I think
T(i) * u == g
looks good, it can also be done on the test or trial space
V = FunctionSpace("Lagrange", "triangle", 1)
T(i)* V == g
But we can also do restrict (in both cases).
Kent
Follow ups
References
-
Dirichlet boundary conditions
From: Kent-Andre Mardal, 2008-06-19
-
Re: Dirichlet boundary conditions
From: Martin Sandve Alnæs, 2008-06-19
-
Re: Dirichlet boundary conditions
From: Kent-Andre Mardal, 2008-06-19
-
Re: Dirichlet boundary conditions
From: Martin Sandve Alnæs, 2008-06-19
-
Re: Dirichlet boundary conditions
From: Kent-Andre Mardal, 2008-06-19
-
Re: Dirichlet boundary conditions
From: Martin Sandve Alnæs, 2008-06-19
-
Re: Dirichlet boundary conditions
From: Kent-Andre Mardal, 2008-06-19
-
Re: Dirichlet boundary conditions
From: Martin Sandve Alnæs, 2008-06-19
-
Re: Dirichlet boundary conditions
From: kent-and, 2008-06-20
-
Re: Dirichlet boundary conditions
From: Anders Logg, 2008-06-20