KSPSolveTranspose

Randall Mackie randy at geosystem.us
Mon Sep 25 19:54:50 CDT 2006


Barry,

Do I have to create A2 (or duplicate it or something)
before calling MatTranspose, or is it automatically created?
The documentation is unclear about this.

Randy


Barry Smith wrote:
>   Randy,
> 
>    Why not just call MatTranspose(A,A2,ierr)
>    call MatTranspose(P,P2,ierr)
>    KSPSetOperators(ksp,A2,P2... etc?
> 
> 
> 
> On Mon, 25 Sep 2006, Randall Mackie wrote:
> 
>> If one calls KSPSolveTranspose, how does PETSc actually do the solve?
>> Does it simply use the transpose of the pre-computed preconditioner
>> as the preconditioner for the Transpose solve, or does it recompute
>> the ILU of the transpose matrix? I suspect they are not the same.
> 
>    It uses MatMultTranspose() and PCApplyTranspose(). So, no it does not
> refactor the matrix.
> 
>    Barry
> 
>> As posted in earlier emails, the preconditioned and true residual numbers
>> don't seem correct to me, but the results are fine (I have other ways
>> to check the results).
>>
>> I've tried taking the transpose of the matrix within my Fortran
>> code, but I'm not quite sure how to get this to work. It requires
>> passing of a NULL pointer, but it's not clear how to do this
>> in Fortran.
>>
>> What I would like to do is to get the transpose of my matrix within
>> my code, and then do a KSPSolve on that to confirm whether the
>> residual numbers I'm getting from KSPSolveTranspose are correct.
>>
>> Any pointers on doing this would be appreciated.
>>
>> Randy
>>
>>
> 

-- 
Randall Mackie
GSY-USA, Inc.
PMB# 643
2261 Market St.,
San Francisco, CA 94114-1600
Tel (415) 469-8649
Fax (415) 469-5044

California Registered Geophysicist
License No. GP 1034




More information about the petsc-users mailing list