[petsc-users] ILU and Block Gauss Seidel smoothing

Barry Smith bsmith at mcs.anl.gov
Mon Jun 20 15:20:06 CDT 2011


  I would suggest implementing your own PCSHELL that contains the four factored matrices and orders. The PCSetUp() you write would compute the orderings and call the Mat factorization routines. The PCApply() you write would do the appropriate applications of the triangular solves. The PCILU in PETSc is just for one ordering and factorization so is not a good starting point for your algorithm.

   Barry

On Jun 20, 2011, at 8:48 AM, Jed Brown wrote:

> On Mon, Jun 20, 2011 at 16:26, Gianluca Meneghello <gianmail at gmail.com> wrote:
> My goal is to perform some relaxation sweeps for each ordering at each
> level of a multigrid process, probably using ksptype PREONLY and
> pctype ILU.
> Is that possible?
> 
> Yes, but you would need to perform a separate factorization for each ordering. Also, the orderings that are not aligned with the grid in memory will have poor performance. This is a general problem with using different orderings.
> 
> Is there the equivalent of -pc_sor_its with ILU
> (-pc_ilu_its maybe)?
> 
> -ksp_type richardson is the same thing, put it inside -pc_type bjacobi for -pc_sor_lits. (-pc_sor_its is just a lower overhead way to do that cycling).
> 
> 
> I also have the problem that in order to build the ordering I would
> need to have access to a structure containing some grid informations,
> and it seems I cannot pass that structure to the YourOrdering function
> you suggested.
> 
> You can PetscObjectCompose() your structure to the Mat. You might need PetscContainerCreate() to wrap your struct.
>  
> 
> I guess a solution for me could be to build the IS from an external
> function (not used by petsc) and then attach them directly to the mat
> structure. I also guess that the one to use are the ones at line 36 of
> 
> No, those slots are not public. Use PetscObjectCompose().



More information about the petsc-users mailing list