dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #09164
Re: trilinos demo: applying bc's
On ti., 2008-08-19 at 14:59 -0500, Catherine Micek wrote:
> Hi,
>
> I have been looking at demo3.py in the dolfin demos in "sandbox/la/
> trilinos/", which solves the Stokes system using preconditioners and
> an iterative solver. I can follow the code until it gets to applying
> the boundary conditions:
>
> # apply bc
> for bc in bcs:
> bc.apply(A00, b0, a00)
> bc.zero(A01, a00)
>
> Why do you apply the second command as "bc.zero(A01, a00)?" I would
> have guessed something more like "bc.zero(A01, a01)." Perhaps the
> better question is more general: how do the bc.apply and bc.zero
> commands work?
>
> Thanks!
> Katy
bc.apply(A00, b0, a00)
will set the Dirichlet boundary conditions by seting
the part of A00 on the boundary to the identity and put
the boundary conditions in b0.
bc.zero(A01, a00) will zero out the part on the boundary.
Together these to commands create an identity matrix for
the part on the boundary for the block matrix.
Kent
Follow ups
References