> On Thu, 14 Apr 2011, Vikram Garg wrote:
>
>> All,
>>      We have recently added adjoint capability to libMesh. In matrix 
>> terms, this implies that after solving a system "Ax = b", PETSc will 
>> have to
>> solve "A^{t} z = q", where A^{t} is transpose(A).
>>
>> However, PETSc can use information it generated while solving "Ax = 
>> b" to quickly solve "A^{t} z = q". For example, if we solve "Ax = b" 
>> using LU
>> factorization, we have z = (A^{t})^{-1} q = (A^{-1})^{t} q = 
>> (L^{-1})^{T} (U^{-1})^{T} q. In this case, the transpose solution 
>> reduces to matrix
>> vector multiplies.
>>
>> The PETSc function that provides this kind of functionality is 
>> KSPSolveTranspose and it would be good to add an interface to it. 
>> Currently we have
>> the following interface planned:
>>
>> 1) Declare a new virtual function in linear_solver.h: virtual bool 
>> reuse_preconditioner()
>
> Two new virtual functions, to get into more detail: by default
> LinearSolver::adjoint_solve() would do the same get_transpose()
> hackery that we've currently got in the System::adjoint_solve()
> implementations, but the PetscLinearSolver specialization would just
> use KSPSolveTranspose directly.
>
>> 2) Define it in petsc_linear_solver.h as accessing a flag
>> 3) Rework petsc_linear_solver.C to accomodate the use of 
>> KSPSolveTranspose
>> 4) Add to examples, and verify performance improvement in 
>> adjoint_solve call


I currently use the same_preconditioner flag in LinearSolver a lot since 
I often do LU solves with multiple right-hand sides. This is especially 
useful if you're using a direct solver since if same_preconditioner = 
true then PETSc doesn't refactorize the matrix. It would be good to 
unify the API for these cases.



------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to