[petsc-users] global index distributed arrays
Mohamad M. Nasr-Azadani
mmnasr at gmail.com
Fri Dec 10 19:14:01 CST 2010
I am not sure why you would need to access regions outside your local piece.
For instance,
consider how we treat boundary conditions. This is access to a fixed index,
but we check on
each process
if (i == i_bc) { <apply BC> }
Can't you do the same thing with your extra rows?
Matt
Well, my story is a bit complicated.
Now that you asked, I would like to have your opinion too.
So, what I am trying to to is to use STAR stenctil to descretize and solve
Poisson type equations. So far so good, I can take care of the regular nodes
with 3D DA's and width=1. The problems rises for some nodes that are
neighboring solid boundaries.
Those nodes, do not follow Poisson equation anymore and they just obey some
interpolation equations which might need nodes in the BOX stencil of
width=3.
I am restricted by memory requirements, and try to avoid creating my matrix
using a 3D DA BOX_STENCIL and width=3. That would cost a lot and soon I need
to launch simulations with O(10^8) grid points.
So, I thought, I create my matrix using STAR_STENCIL and width=1 and just
manually insert the new nonzeros into the matrix.
Since the number of those nodes is not that many, I thought it would be a
good approach.
Thanks if you think you could guide me here too.
Thanks for your help too,
Mohamad
On Fri, Dec 10, 2010 at 5:01 PM, Matthew Knepley <knepley at gmail.com> wrote:
> On Sat, Dec 11, 2010 at 12:56 AM, Jed Brown <jed at 59a2.org> wrote:
>
>> On Sat, Dec 11, 2010 at 01:53, Matthew Knepley <knepley at gmail.com> wrote:
>>
>>> What are you guys talking about? He is asking ("global index for any
>>> given 3-d index") for a map
>>>
>>> (i, j, k) --> ((k*N + j)*M + i)*C + c
>>>
>>> I can't imagine what you are searching for? The process which owns a
>>> given index does not involve a search.
>>>
>>
>> The "global index" is in the "PETSc ordering". He wants this index for an
>> arbitrary (i,j,k) which are not in the ghosted patch of the current process.
>> You either have to store the full mapping, on search lx,ly,lz to locate the
>> owner, then compute the index relative to that process. I don't think that
>> code exists in PETSc. It wouldn't be too hard to write, but it's not the
>> most beautiful thing to do.
>>
>
> I am not sure why you would need to access regions outside your local
> piece. For instance,
> consider how we treat boundary conditions. This is access to a fixed index,
> but we check on
> each process
>
> if (i == i_bc) { <apply BC> }
>
> Can't you do the same thing with your extra rows?
>
> Matt
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101210/4dad3c2e/attachment.htm>
More information about the petsc-users
mailing list