[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Further question about PC with Jaocbi Row Sum
- To: petsc-users@xxxxxxxxxxx
- Subject: Re: Further question about PC with Jaocbi Row Sum
- From: Shi Jin <jinzishuai@xxxxxxxxx>
- Date: Fri, 11 Apr 2008 14:40:10 -0700 (PDT)
- Cc: jinzishuai@xxxxxxxxx
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Message-ID; b=Z51Ku+fbMPp8kJuoinNJJdFH0b87mCWrZJZ/SfDFRwdQOHpwWZ5/9uAvobIUsqHl2frKkqqpK8eISW3SwTnkFk0K5MF+7GkBanFz3mHQfWaSnmmxcN6nHRA5PuTXKUVpPeLGQh4D7Tk3EaTwnr1rP7u1M/E/OoDGmfZvbcCZy5Q=;
- Reply-to: petsc-users@xxxxxxxxxxx
- Sender: owner-petsc-users@xxxxxxxxxxx
Thank you very much.
-pc_type jacobi -ksp_type preonly
does exactly what I want, even in parallel.
Shi
----- Original Message ----
> From: Hong Zhang <hzhang@xxxxxxxxxxx>
> >Suppose I have a diagonal matrix, what is the best way to invert it in PETSc?
> > Do I have to install the external packages superlu_dist or mumps?
> > I realized that LU or Cholesky decomposition does not work with MPIAIJ
> matrices.
> > I also know the best way is probably to directly call Vector operations
> directly.
> > However, I want to keep the same KSPSolve structure so that the same code can
> be used for non-diagonal MPIAIJ matrices without changing each call to
> KSPSolve.
> > Thank you very much.
>
> Without changing your application code, i.e., keep the same KSPSolve
> structure,
> running it with the option
> '-pc_type jacobi'
> actually inverts the diagonal matrix, in both sequential and parallel
> cases.
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com