Hello <br><br>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. <br>
<br>I don't understand the difference between "is" and "is_local". Are you supposed to set 1 or both or neither? <br><br>As an example what I'm currently doing, for a given processor I want to split into ndom subdomains I don the following<br>
<br><br>PetscFortranAddr,dimension(:),allocatable :: is_local<br><br>allocate(is_local(ndom))<br>do nn=1,ndom ! Loop over block on this processor<br> ! create the index set for this domain -> Indicies contains the global indices for the the current subdomain -> Code not shown<br>
<br> call ISCreateGeneral(PETSC_COMM_WORLD,nindices,indices,is_local(nn),PETScIerr)<br>asdf<br><br> call PCASMSetLocalSubdomains(pc,ndom,PETSC_NULL_OBJECT,is_local,PETScIerr)<br><br><br>This dies with error code 85: Argument is null that should not be<br>
<br>The traceback I get is:<br><br>[0]PETSC ERROR: --------------------- Stack Frames ------------------------------------<br>[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,<br>[0]PETSC ERROR: INSTEAD the line number of the start of the function<br>
[0]PETSC ERROR: is given.<br>[0]PETSC ERROR: [0] PetscObjectReference line 112 src/sys/objects/inherit.c<br>[0]PETSC ERROR: [0] PCASMSetLocalSubdomains_ASM line 525 src/ksp/pc/impls/asm/asm.c<br>[0]PETSC ERROR: [0] PCASMSetLocalSubdomains line 699 src/ksp/pc/impls/asm/asm.c<br>
<br>I'm trying to use this with a block AIJ Matrix. Does the setlocalsubdomains work with block AIJ Matrices?<br><br>Thank you,<br><br>Gaetan<br>