[petsc-dev] coding style

Barry Smith bsmith at mcs.anl.gov
Thu Aug 18 12:48:06 CDT 2016


> On Aug 18, 2016, at 11:52 AM, Jed Brown <jed at jedbrown.org> wrote:
> 
> Barry Smith <bsmith at mcs.anl.gov> writes:
> 
>>   Seems reasonable. Note for SNES we have something similar in that user can solve either F(x) = b or F(x) - b = 0 depending on if they provide the b explicitly.
> 
> I'd just say that the algorithm should still work correctly if the user
> doesn't separate everything since that can be inefficient (multiple
> communications and passes over memory) and/or unnatural.  How does the
> algorithm work if the user has only g(x)?  Would they need to define
> 
>  H := \nabla^2 g(x)
>  f(x) = g(x) - x'*H*x
> 
> so that you can put it back together?

  No, don't want to require that.




More information about the petsc-dev mailing list