On Wed, 16 Nov 2016, Salazar De Troya, Miguel wrote:
The TimeSolver in DifferentiableSystem has both a DiffSolver and a
LinearSolver. The DiffSolver is used in the regular primal/forward solve()
and the LinearSolver in the adjoint_solve(). It would be convenient to
reuse the forward preconditioner in the adjoint solve, and it seems that
there is a method for that in LinearSolver::reuse_preconditioner(bool ),
but it is not the case actually. Both DiffSolver and LinearSolver don¹t
seem to have a way to talk to each other so there is not really a
preconditioner reusing between them. The reuse_preconditioner is only used
between adjoint solves.
Can anyone confirm that this is the case?
I'm afraid so.
And if so, how can I fix this?
I'd say:
Add a DiffSolver::linear_solver() API for returning a reference to a
LinearSolver, and add NewtonSolver and PetscDiffSolver
implementations.
Replace the current TimeSolver::linear_solver() implementation with
one that merely calls _diff_solver->linear_solver().
---
Roy
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users