> On Jul 21, 2016, at 11:38 AM, Eduardo Jourdan <[email protected]>
> wrote:
>
> Thank you for the quick answer.
>
> I didn't realize that I could use PC without KSP interface. I also think that
> it is what I wanted. Nevertheless, as long as I figured out from the source
> code, PcApply for PCSOR basically do some interface and preparations and then
> calls MatSOR. I saw that depending on the matrix ('BAIJ, SBAIJ, and AIJ
> matrices with Inodes') it does SOR smoothing or block SOR smoothing.
>
> I think that in my case the seqaij matrix with bs=4 had Inodes with size 4.
> That is why calling MatSOR with seqaij or calling with seqbaij converted from
> the seqaij seem to give the same result.
> However, with the matrix seqaij with bs = 16 I can guess that the rows inside
> a block dont have the same nonzero pattern, so Inodes size are different from
> block size. I happened to see the follow note in the MatSOR website page:
> "Developer Note: We should add block SOR support for AIJ matrices with block
> size set to great than one and no inodes ". This may be the reason why seqaij
> and seqbaij are leading to different results with my matrix of bs = 16. I
> think that answer all may previous questions. I am sorry, I've got confused
> and wrote MatSolve instead of MatSOR in my previous email, what changes it
> completely.
Your analysis is correct. In general PCSOR will produce different
convergence histories for AIJ and BIJ block size > 1. The BAIJ may convergence
(due to the blocking) when the AIJ does not; I suppose the opposite may be
possible but seems unlikely.
Barry
>
> Best Regards
>
> Eduardo
>
>
>
>
>
> 2016-07-20 0:03 GMT-03:00 Matthew Knepley <[email protected]>:
> On Tue, Jul 19, 2016 at 8:17 PM, Eduardo Jourdan <[email protected]>
> wrote:
> Hi all,
>
> I would like to perform a specific number (for instance 4 of forward and
> backward sweeps with a seqaij matrix with block size 4, vectors b and x.
> Also, I need to do this same procedure with another matrix seqaij block size
> 16. I would appreciate if someone knows the best way to do it.
>
> It sounds like you want PCSOR and PCApply, not MatSolve.
>
> Thanks,
>
> Matt
>
> 1 - I've been trying to use MatSolve. For the bs=4 it seems to work, but with
> the other matrix with bs=16 the residue diverges. When I call matConvert to
> convert the later matrix for a seqbaij with bs=16 the result changes and the
> linear residue is reduced. It is supposed to happen or it is more possible
> that i am doing something wrong?
>
> 2 - MatSolve for seqbaij and seqaij with the same block sizes gives the same
> results in terms of solution (not performace, memory) ?
>
> 3 - Can do I do a specific number of sweeps as told before with the KSP/PC
> interface?
>
> 4 - I saw the manual for the MatSolve and It says that it is for factored
> matrix. Can I use a matrix just after the MatAssembly calls?
>
> Best regards,
>
> Eduardo Jourdan
>
>
>
> --
> What most experimenters take for granted before they begin their experiments
> is infinitely more interesting than any results to which their experiments
> lead.
> -- Norbert Wiener
>