# Typo in solve arguments in Chapter 1

Bug #931284 reported by Anders Logg on 2012-02-13
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Confirmed
Medium
Unassigned

### Bug Description

Reported by Fredrik Valdmanis:

=== modified file 'tex/1.tex'
--- tex/1.tex 2011-11-17 12:37:20 +0000
+++ tex/1.tex 2012-02-10 13:09:41 +0000
@@ -671,7 +671,7 @@
LU factorization (ILU) is a popular and
robust all-round preconditioner, so let us try the CG--ILU pair:
\begin{python}
-solve(a == L, u, bc)
+solve(a == L, u, bc,
solver_parameters={"linear_solver": "cg",
"preconditioner": "ilu"})

Anders Logg (logg) on 2012-02-13
 Changed in fenics-book: status: New → Confirmed importance: Undecided → Medium
 Garth Wells (garth-wells) wrote on 2012-02-13: Re: [Bug 931284] [NEW] Typo in solve arguments in Chapter 1 #1

On 13 February 2012 07:46, Anders Logg <email address hidden> wrote:
> Public bug reported:
>
> Reported by Fredrik Valdmanis:
>
> === modified file 'tex/1.tex'
> --- tex/1.tex   2011-11-17 12:37:20 +0000
> +++ tex/1.tex   2012-02-10 13:09:41 +0000
> @@ -671,7 +671,7 @@
>  LU factorization (ILU) is a popular and
>  robust all-round preconditioner, so let us try the CG--ILU pair:
>  \begin{python}
> -solve(a == L, u, bc)
> +solve(a == L, u, bc,
>       solver_parameters={"linear_solver": "cg",
>                          "preconditioner": "ilu"})
>

Will this work? Is there are guarantee that solve(a == L, bc) will use
symmetric application of the bcs?

Garth

> ** Affects: fenics-book
>     Importance: Medium
>         Status: Confirmed
>
> ** Changed in: fenics-book
>       Status: New => Confirmed
>
> ** Changed in: fenics-book
>   Importance: Undecided => Medium
>
> --
> You received this bug notification because you are a member of FEniCS
> Book Editors, which is subscribed to FEniCS Book Project.
>
> Title:
>  Typo in solve arguments in Chapter 1
>

 Anders Logg (logg) wrote on 2012-02-13: #2

On Mon, Feb 13, 2012 at 07:57:56AM -0000, Garth Wells wrote:
> On 13 February 2012 07:46, Anders Logg <email address hidden> wrote:
> > Public bug reported:
> >
> > Reported by Fredrik Valdmanis:
> >
> > === modified file 'tex/1.tex'
> > --- tex/1.tex   2011-11-17 12:37:20 +0000
> > +++ tex/1.tex   2012-02-10 13:09:41 +0000
> > @@ -671,7 +671,7 @@
> >  LU factorization (ILU) is a popular and
> >  robust all-round preconditioner, so let us try the CG--ILU pair:
> >  \begin{python}
> > -solve(a == L, u, bc)
> > +solve(a == L, u, bc,
> >       solver_parameters={"linear_solver": "cg",
> >                          "preconditioner": "ilu"})
> >
>
> Will this work? Is there are guarantee that solve(a == L, bc) will
> use symmetric application of the bcs?

The solver will only do a symmetric application if the "symmetric"
parameter is set, so it should be

solve(a == L, u, bc,
solver_parameters={"symmetric": True,
"linear_solver": "cg",
"preconditioner": "ilu"})

--
Anders