That sounds fine to me, it won't affect the current behavior for 
multiple rhs's. Do you plan to make same_preconditioner protected rather 
than public now?


On 04/22/2011 04:41 PM, Vikram Garg wrote:
> Alright, will this work ?
>
> 1) Declare two new virtual functions in linear_solver.h: virtual bool
> reuse_preconditioner() and LinearSolver::adjoint_solve(). If the user
> wants to reuse preconditioners either for a different rhs or solving a
> transpose matrix he/she calls reuse_preconditioner to set
> same_preconditioner to true. If same_preconditioner is true and the
> user calls adjoint_solve, PETSc uses KSPSolveTranspose, otherwise the
> regular ImplicitSystem::adjoint_solve is called.
>
> 2) Define the new functions in linear_solver.h/.C
>
> 3) 3) Rework petsc_linear_solver.C to accomodate the use of KSPSolveTranspose
>
> 4) Add to examples, and verify performance improvement in adjoint_solve call
>
> Thanks.
>
>
> On Fri, Apr 15, 2011 at 3:35 PM, Roy Stogner<[email protected]>  wrote:
>> On Fri, 15 Apr 2011, Vikram Garg wrote:
>>
>>> So we would just have to know whether the function calling PETSc is
>>> trying to solve the transpose or a different rhs. Do we want to pass
>>> a vector of bools ? One for the reuse_preconditioner flag, and one
>>> to check whether we are doing the transpose or a different rhs ?
>> Definitely not a vector of bools; we can have accessors for more than
>> one flag.
>>
>> I wouldn't implement the second distinction as a flag, but as a
>> separate function call: LinearSolver::adjoint_solve().
>> ---
>> Roy
>>
>
>

------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to