PCNN preconditioner and setting the interface
Barry Smith
bsmith at mcs.anl.gov
Tue Mar 24 14:40:31 CDT 2009
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.
>
>
> 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.
You are getting yourself confused thinking things are more
complicated than they really
are.
Barry
>
>
> Thanks
>
> 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