I am modifying PetscDiffSolve to be able to reuse the preconditioner. However, 
every time PetscDiffSolver::solve() is called, a new SNES is created by calling 
PetscDiffSolver::init(), why is this? I don’t understand this coupling. I 
believe the solver should be initialized elsewhere or maybe include a flag to 
avoid reinitialization?

Miguel

From: John Peterson <[email protected]<mailto:[email protected]>>
Date: Monday, November 14, 2016 at 8:47 AM
To: Roy Stogner <[email protected]<mailto:[email protected]>>
Cc: Miguel Salazar <[email protected]<mailto:[email protected]>>, 
"[email protected]<mailto:[email protected]>"
 
<[email protected]<mailto:[email protected]>>
Subject: Re: [Libmesh-users] Recycling preconditioned in system_of_equations7.C



On Fri, Nov 11, 2016 at 3:00 PM, Roy Stogner 
<[email protected]<mailto:[email protected]>> wrote:

On Thu, 10 Nov 2016, Salazar De Troya, Miguel wrote:

> This example runs several linear solves because there is a nonlinear
> solver below a continuation scheme. I figured that it would be
> possible to reuse the preconditioner and see savings so I included
> the lines:
>
> LinearSolver<Number> * linear_solver = system.get_linear_solver();
>
> linear_solver->reuse_preconditioner(reuse_preconditioner);

Ironically, this may be the converse of the problem you last asked
about.  get_linear_solver() is usefully defined in
DifferentiableSystem and its subclasses, as well as in
LinearImplicitSystem, but it's just a memory leak (which ought to
throw an error in the newest master/HEAD!) in NonlinearImplicitSystem
at the moment.

It's only deprecated as of Oct 27.  The plan was to keep it deprecated for a 
while and eventually make it into an error, but I'd be OK with accelerating the 
timeline for that.

--
John
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to