Defining my own reordering method for ILU

Barry Smith bsmith at mcs.anl.gov
Wed Feb 21 11:27:24 CST 2007


  Laslo,

   You can do your ordering up front to generate an index set.
But you will still need to write a routine MatOrdering_MyOrdering() that 
returns the isrow and iscol, then register the routine
with MatOrderingRegisterDynamic(). Then use PCFactorSetMatOrdering()
to tell the PC to use your new ordering routine. 

To have the preconditioner reuse the reordering for several matrices
use PCFactorSetReuseOrdering(). 

  Good luck,

   Barry

I know it is a little strange to need to provide the call back function
MatOrdering_MyOrdering() that simply returns the ordering you already
created but that is the only way to get the ordering into the right
place inside the PC objects.

The MatOrdering_MyOrdering() simply sets the isrow and iscol pointer
and returns.

On Wed, 21 Feb 2007, Laslo Tibor Diosady wrote:

> Hi,
> 
> I want to be able to define an ordering type for the ILU factorization
> to be used as a preconditioner to GMRES. I have successfully used
> PCFactorSetMatOrdering(), to set standard types, however I have my own
> reordering method which I would like to be able to use.
> 
> Since my reordering method is based on information not found within the
> matrix and I may want to solve several different systems with the same
> ordering, what I really want to be able to do is create an index set in
> advance and pass it is to be used for the reordering.
> 
> Is this possible, and how would you suggest I go about doing this?
> 
> Thanks,
> 
> Laslo
> 
> 




More information about the petsc-users mailing list