dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #18439
Re: [Question #110430]: Plot boundary conditions
On Tue, Jun 01, 2010 at 09:33:18AM -0000, bluejerry wrote:
> Question #110430 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/110430
>
> Status: Answered => Solved
>
> bluejerry confirmed that the question is solved:
> To plot the boundary conditions (as projected to the Vector Space)
>
> For the system Ax=b with boundary conditions bc; I first assembled A and
> b, then applied the boundary condition, e.g.,
>
> A = assemble(a)
> b = assemble(b)
> bc.apply(A,b)
>
> then created a function u in the Vector Space V; and set the vector of u
> equal bo b
>
> u = Function(V)
> u.vector()[:] = b
>
> u can now be plotted using plot(u)
>
> This will plot the Vector Space with only the applied Dirichlet boundary
> conditions applied.
That's a good idea.
An even easier way is the following:
u = Function(V)
bc.apply(u.vector())
plot(u)
I think I will add this to the plot functions to enable direct
plotting of boundary conditions:
plot(bc)
--
Anders
Attachment:
signature.asc
Description: Digital signature
Follow ups
References