[petsc-users] PCASMSetLocalSubdomains Question

Gaetan Kenway kenway at utias.utoronto.ca
Thu Mar 10 14:44:32 CST 2011


Hello

I am trying to setup a Additive Schwartz Preconditioner using multiple
blocks on each processor. My code is a 3D Multiblock CFD code and what I am
trying to do is to put each CFD block into its own subdomain, even if there
are more than 1 block on each processor. The PETSc help on this function
wasn't helpful nor was the one example.

I don't understand the difference between "is" and "is_local". Are you
supposed to set 1 or both or neither?

As an example what I'm currently doing, for a given processor I want to
split into ndom subdomains I don the following


PetscFortranAddr,dimension(:),allocatable :: is_local

allocate(is_local(ndom))
do nn=1,ndom ! Loop over block on this processor
    ! create the index set for this domain -> Indicies contains the global
indices for the the current subdomain -> Code not shown

    call
ISCreateGeneral(PETSC_COMM_WORLD,nindices,indices,is_local(nn),PETScIerr)
asdf

 call PCASMSetLocalSubdomains(pc,ndom,PETSC_NULL_OBJECT,is_local,PETScIerr)


This dies with error code 85:  Argument is null that should not be

The traceback I get is:

[0]PETSC ERROR: ---------------------  Stack Frames
------------------------------------
[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,
[0]PETSC ERROR:       INSTEAD the line number of the start of the function
[0]PETSC ERROR:       is given.
[0]PETSC ERROR: [0] PetscObjectReference line 112 src/sys/objects/inherit.c
[0]PETSC ERROR: [0] PCASMSetLocalSubdomains_ASM line 525
src/ksp/pc/impls/asm/asm.c
[0]PETSC ERROR: [0] PCASMSetLocalSubdomains line 699
src/ksp/pc/impls/asm/asm.c

I'm trying to use this with a block AIJ Matrix. Does the setlocalsubdomains
work with block AIJ Matrices?

Thank you,

Gaetan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110310/a9c0d6f9/attachment.htm>


More information about the petsc-users mailing list