PCNN preconditioner and setting the interface

Andreas Grassl Andreas.Grassl at student.uibk.ac.at
Fri Apr 3 04:29:31 CDT 2009


Barry Smith schrieb:
> 
> On Mar 24, 2009, at 11:34 AM, Andreas Grassl wrote:
> 
>> Barry Smith schrieb:
>>>
>>> On Mar 24, 2009, at 8:45 AM, Andreas Grassl wrote:
>>>
>>>> Hello,
>>>>
>>>> I'm working with a FE-Software where I get out the element stiffness
>>>> matrices and the element-node correspondency to setup the stiffness
>>>> matrix for solving with PETSc.
>>>>
>>>> I'm currently fighting with the interface definition. My
>>>> LocalToGlobalMapping for test-purposes was the "identity"-IS, but I
>>>> guess this is far from the optimum, because nowhere is defined a node
>>>> set of interface nodes.
>>>>
>>>> How do I declare the interface? Is it simply a reordering of the nodes,
>>>> the inner nodes are numbered first and the interface nodes last?
>>>
>>>   Here's the deal. Over all the processors you have to have a single
>>> GLOBAL numbering of the
>>> nodes. The first process starts with 0 and each process starts off with
>>> one more than then previous process had.
>>
>> I am confused now, because after you said to use MatSetValuesLocal() to
>> put the values in the matrix, i thought local means the unique
>> (sequential) numbering independent of the processors in use and global a
>> processor-specific (parallel) numbering.
> 
>    No, each process has its own independent local numbering from 0 to
> nlocal-1
> the islocaltoglobalmapping you create gives the global number for each
> local number.
>>
>>
>> So the single GLOBAL numbering is the numbering obtained from the
>> FE-Software represented by {0,...,23}
>>
>> 0  o  o  O  o  5
>>         |
>> 6  o  o  O  o  o
>>         |
>> O--O--O--O--O--O
>>         |
>> o  o  o  O  o  23
>>
>> And I set the 4 different local numberings {0,...,11}, {0,...,8},
>> {0,...7}, {0,...,5} with the call of ISLocalToGlobalMappingCreate?
>>
>> How do I set the different indices?
>> {0,1,2,3,6,7,8,9,12,13,14,15} would be the index vector for the upper
>> left subdomain and {3,9,12,13,14,15} the index vector for the interface
>> f it.
> 
>    I don't understand your figure, but I don't think it matters.

It is a 2D grid arising from a FE-discretization with 4 node-elements. The small
o-nodes are inner nodes, the big O-nodes are interface nodes, numbered row-wise
from upper left to lower right. Let's assume this node numbers correspond to the
DOF-number in the system of equation and we don't regard the boundary for now,
so I receive a 24x24 Matrix which has to be partitioned into 4 subdomains.

>>
>>
>> The struct PC_IS defined in src/ksp/pc/impls/is/pcis.h contains IS
>> holding such an information (I suppose at least), but I have no idea how
>> to use them efficiently.
>>
>> Do I have to manage a PC_IS object for every subdomain?
> 
>    In the way it is implemented EACH process has ONE subdomain. Thus
> each process has
> ONE local to global mapping.

Is there a possibility to set this mentioned mapping from my global view? Or do
I have to assemble the matrix locally?

> 
>    You are getting yourself confused thinking things are more
> complicated than they really
> are.

I'll try to change my point of view to understand the things easier ;-)

cheers

ando

-- 
 /"\                               Grassl Andreas
 \ /    ASCII Ribbon Campaign      Uni Innsbruck Institut f. Mathematik
  X      against HTML email        Technikerstr. 13 Zi 709
 / \                               +43 (0)512 507 6091


More information about the petsc-users mailing list