[petsc-users] Regarding SNESSetFunction and SNESSetJacobian

Jed Brown jed at jedbrown.org
Sat Oct 10 14:45:16 CDT 2020


Barry Smith <bsmith at petsc.dev> writes:

>     I'm sorry, I made a small mistake in my previous email. It is 
>
>    F'(x) = A(x) + A'(x)x - b'(x)   not F'(x) = A(x) + A'(x)x + b'(x) 

I find this much easier to write in variational notation:

F(x) = A(x) x - b(x)

F'(x) dx = A(x) dx + (A'(x) dx) x - b'(x) dx


Note that A'(x) is a third order tensor so A'(x) dx is a second order tensor (i.e., a matrix).  As such, one never wants to represent A'(x) on its own, or even A'(x) dx for that matter.  This is one reason I dislike this notation.  For any given example, it's often possible to write the operator dx \mapsto (A'(x) dx) x in an intuitive way, but it can take thought and this tends to be more circuitous than working with F(x) directly.


More information about the petsc-users mailing list