[dune-pdelab] Sign convention for linear problems

Christian Engwer christian.engwer at uni-muenster.de
Wed May 24 13:41:38 CEST 2017


Hi Oli,

On Wed, May 24, 2017 at 10:00:21AM +0200, Oliver Sander wrote:
> Dear pdelab team,
> 
> I have found out that the ConvectionDiffusionFEM LocalOperator assembles
> the residual in the form
> 
>   r(x) = Ax - b.
> 
> Consequently, the GridOperator::jacobian method gives me the stiffness matrix,
> and GridOperator::residual gives me the negative(!) load vector.
> 
> Now I am wondering: ConvectionDiffusionFEM may just as well return the residual as
> 
>   r(x) = b - Ax.
> 
> For nonlinear problem this sign choice doesn't matter at all, but for linear ones
> it matters a little bit.  Is there a general rule whether LocalOperators for linear
> problems should compute Ax-b rather than b-Ax?  Or is each LocalOperator free to
> pick its own sign convention?  Is this documented anywhere?

It is intended in the first version. This fact is used in the
StationaryLinearProblemSolver, where the RHS is computed as "b = - go.residual(u)".

Regarding your last question, I doubt that this is documented
anywhere.

Christian




More information about the dune-pdelab mailing list