Block-smoothers with variable block size

Satish Balay balay at mcs.anl.gov
Fri Mar 21 09:47:32 CDT 2008


On Fri, 21 Mar 2008, Nicolas Tardieu wrote:

> Dear Barry,
> 
> I have a few questions about inodes :
> - can the user specify the inodes sizes (it seems to me this is an automatic
> PETSc feature to gain performance, right?)?

Inode code checks the assembled matrix for consequitive rows with
'same column' values to determine the inode sizes. So this is
automatically done - and the user does not specify it.

> - can the inodes have different sizes?

Yes, you can have the first 3 rows with the same column entries, the
next 4 rows with the same column entries, and the next 2 rows etc.. In
this case - the inode structure would be [3,4,2] for a matrix of size
9-rows.

Satish

> 
> Otherwise I plan to define a new matrix type MATSEQVBAIJ (VB for variable
> block) based on MATSEQAIJ with an additional attribute defining the block
> sizes.
> 
> Thanks,
> 
> Nicolas
> 
> 2008/3/20, Barry Smith <bsmith at mcs.anl.gov>:
> >
> >
> >    DON"T USE GREP! Use etags
> > # To access the tags in EMACS, type M-x visit-tags-table and specify
> > # the file petsc/TAGS.
> > # 1) To move to where a PETSc function is defined, enter M-. and the
> > #     function name.
> > # 2) To search for a string and move to the first occurrence,
> > #     use M-x tags-search and the string.
> > #     To locate later occurrences, use M-,
> >
> >    It may not be in petsc-2.3.3 you may need to use petsc-dev
> > http://www-unix.mcs.anl.gov/petsc/petsc-as/developers/index.html
> >
> > it is in src/mat/impls/aij/seq/inode.c
> >
> >
> >
> >     Barry
> >
> >
> >
> > On Mar 20, 2008, at 1:52 PM, Nicolas Tardieu wrote:
> >
> > > Dear Barry,
> > >
> > > Thank you very much for your quick answer.
> > > I am searching for MatRelax_Inode in PETSc src directory using grep.
> > > But I just can't find it! Please note I am using 2.3.3p6
> > > Could you please tell me where this routine is?
> > >
> > > Nicoals
> > >
> > > 2008/3/20, Barry Smith <bsmith at mcs.anl.gov>:
> > >     Nicolas,
> > >
> > >      Actually we are very close to this. Check out the routine
> > > MatRelax_Inode() which is for AIJ matrices.
> > > For the block size it uses the inode size. If your matrix has inodes
> > > that match the blocks you want
> > > then everything is there already just use the PCSOR.
> > >
> > >      If you do not have inodes then you can mimic the MatRelax_Inode()
> > > code to make a new
> > > routine MatPBRelax_SeqAIJ(). If you do implement this we'd love to add
> > > it to PETSc.
> > >
> > >
> > >      Please let us know if you have additional questions.
> > >
> > >
> > >     Barry
> > >
> > >
> > >
> > >
> > > On Mar 20, 2008, at 1:07 PM, Nicolas Tardieu wrote:
> > >
> > > > Dear PETSc experts,
> > > >
> > > > I am currently designing a multigrid PC that needs to operate on
> > > > variable block size matrices. I know PETSc does not support this
> > > > feature.
> > > > So, I will do it "by hand".  Neverthless I would like to be able to
> > > > use some smoothers like Jacobi or SOR in their block version.
> > > >
> > > > What is the best solution that would work both in sequential and
> > > > parallel?
> > > >
> > > > - define some MATSHELL that handle variable block size
> > > >     -> will I be able to use in some way a block Jacobi or SOR?
> > > >     -> would it be possible to use CSR inside the MATSHELL and
> > > > manage the variable blocks.
> > > >
> > > > - use a AIJ matrix and manage the blocks using some indirection
> > > > mechanism and reprogram Jacobi or SOR
> > > >
> > > >
> > > >
> > > > Thank you,
> > > >
> > > > Nicolas
> > > >
> > >
> > >
> >
> >
> 




More information about the petsc-users mailing list