[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to visit the variable "bs" in pmat of preconditioner
- To: petsc-users@xxxxxxxxxxx
- Subject: Re: how to visit the variable "bs" in pmat of preconditioner
- From: "Matthew Knepley" <knepley@xxxxxxxxx>
- Date: Wed, 2 Jan 2008 13:36:55 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=AZGAwp2BJMATnLpGYjijOgbvX1IpsWmui5kaQ4jpX4s=; b=xRhKVjOyU8afxTGYw/L1/2QN8u/ioulnbsk8qk3XTDt3L7qom2ADl8iC/WRUDnIiaAKBaEmvqQhw6FK/HcsdJyi87iRmnYFpPNL+IrQaqEqppx8OhTbmteZHTUaFcHfNw7CddAC/CRdaLAsZq6tOoCGMzNe75O43VP5suq9FBJY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Oxbczu2yIsSzP725v917uCuHQkAGRCoGxQOMfav3T6yiv/dKGVYkKFVeetbFTV+uZ7dxyyZMnke0J387402eWp3NBxFR/h7DGmVCuMG7Q9bEHIalsLGgQMTjOKaTzNCpdUKAEy/Z0jtQ1TobGAuCUvxxUi45b1iFQY5SgybJa34=
- In-reply-to: <7ff0ee010801021127r189f58eelc1c4e23496be8209@mail.gmail.com>
- References: <7ff0ee010712202316i57a8927ehfaaa933bc7c17304@mail.gmail.com> <219D5EF9-DFFB-409A-B2E3-825C64F1E54E@mcs.anl.gov> <7ff0ee010801021127r189f58eelc1c4e23496be8209@mail.gmail.com>
- Reply-to: petsc-users@xxxxxxxxxxx
- Sender: owner-petsc-users@xxxxxxxxxxx
On Jan 2, 2008 1:27 PM, Yujie <recrusader@xxxxxxxxx> wrote:
> Dear Barry:
>
> Thank you for your reply. Further problem is whether I only set the block
> size of Mat using MatSetBlockSize() in Processor 0 when I run my code on
> Cluster? thank a lot.
All processors must set the correct block size.
Matt
> Happy new year:).
>
> Regards,
> Yujie
>
> On 12/21/07, Barry Smith <bsmith@xxxxxxxxxxx> wrote:
> >
> > pmat is the matrix you set with KSPSetOperators() so you just need
> > to set block size of that matrix.
> >
> > On Dec 21, 2007, at 1:16 AM, Yujie wrote:
> >
> > > hi, everyone
> > >
> > > now, I want to use Hypre package via PETSc in third package. I need
> > > to visit the variable "bs" in Mat struct. In hypre.c, this variable
> > > may let BoomerAMG know the block size of Mat. The code is as follows:
> > >
> > > 127: /* special case for BoomerAMG */
> > > 128: if (jac->setup == HYPRE_BoomerAMGSetup) {
> > > 129: MatGetBlockSize(pc->pmat,&bs);
> > > 130: if (bs > 1) {
> > > 131: HYPRE_BoomerAMGSetNumFunctions(jac->hsolver,bs);
> > > 132: }
> > > 133: };
> > >
> > > However, I can't visit this variable. Now, I have get the pointer of
> > > PC I use. I can't visit the variable pmat in my code. I can't find
> > > any function to realize this function from PETSc manual.
> > > Could you give me some advice about how to do?
> > >
> > > Merry X'mas!
> > >
> > > Regards,
> > > Yujie
> > >
> >
> >
>
>
--
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