On Thu, Mar 10, 2011 at 2:44 PM, Gaetan Kenway <span dir="ltr">&lt;<a href="mailto:kenway@utias.utoronto.ca">kenway@utias.utoronto.ca</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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&#39;t helpful nor was the one example. <br>

<br>I don&#39;t understand the difference between &quot;is&quot; and &quot;is_local&quot;. Are you supposed to set 1 or both or neither? <br></blockquote><div><br></div><div>If you want multiple blocks/process AND you want to be able to do RASM, then you need to specify both</div>
<div><br></div><div>  1) the overlapping blocks</div><div><br></div><div>  2) the non-overlapping parts</div><div><br></div><div>You need 2), because I have no idea how to calculate 2) given only 1). We could have an alternative interface that</div>
<div>took 2) and an overlap, and figured it out, however currently that only works for 1 block/process, and specfiying</div><div>both 1) and 2) is more general (I needed it for a specific PC).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
As an example what I&#39;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 -&gt; Indicies contains the global indices for the the current subdomain -&gt; 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>
</blockquote><div><br></div><div>This should work. Something is wrong with the Fortran translation. Are you using 3.1 or dev? It looks correct in dev.</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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&#39;m trying to use this with a block AIJ Matrix. Does the setlocalsubdomains work with block AIJ Matrices?<br><br>Thank you,<br><font color="#888888"><br>Gaetan<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>