[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to visit the variable "bs" in pmat of preconditioner



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.

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
>