On Mon 2009-04-06 11:30, Matthew Knepley wrote: > On Mon, Apr 6, 2009 at 10:13 AM, Anders Logg <[email protected]> wrote: > > On Mon, Apr 06, 2009 at 10:01:24AM -0500, Robert Kirby wrote: > > I see two reasons why to do symmetric BC if you can. > > 1.) If CG is applicable, it will almost always work better than GMRES, > both in > > terms of convergence rate and memory usage (no Hessenberg matrix). A > simple > > way to check this without any substantial code development is to do > Nitsche BC > > for Poisson and compare CG and GMRES > > Symmetric applications of BCs is already in place: > > A, b = assemble_system(a, L, bc) > > The dofs are kept (not eliminated) but the BC is applied to ensure > that A remains symmetric (if symmetric). > > > This is impossible in parallel.
It is possible if you think ahead. At the beginning of function evaluation and assembly, you map in the correct Dirichlet values. Then, before calling MatSetValues, make sure that those indices are negative (or remove them from the element matrix) so that nothing is assembled into those rows and colums. At the end, set the diagonal entry to 1. Mapping in correct Dirichlet values at the start of function evaluation is essential so that the corresponding columns of the Jacobian are columns of the identity. Jed
pgp8cJHE7nT20.pgp
Description: PGP signature
_______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
