[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Global to Local Vector Mapping
- To: petsc-users@xxxxxxxxxxx
- Subject: Re: Global to Local Vector Mapping
- From: "Matthew Knepley" <knepley@xxxxxxxxx>
- Date: Mon, 3 Dec 2007 12:03:50 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=r+8B4b4dKxD3n9n0VjyhgrMBrgHebDieRie+OCyU2rw=; b=UX7wTWicsJRYqWuwkMP80bCNSn1zvwz5swsX9CRAJeyu+LrKLESbPUERPghUTuvNCstKfESED7fBktuUK082qGLwVizvdtud8F7CjRH8rcZhl2ho7L0vdzq0c0dtj0zj2aaWC12VNN+HnYvYm2rW7/g+EUvYMLbN3kqWSwvcoz0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=x/CW03++O14mFu1dNU4C/M1zohrqLswA/QKr4YUawi/tSKkOnIUFivEuvtQ5uCuLWB5MXL7JviRlRTO2aY9cFtVeVTXVYAEk/DoDbbFoqVbK6VseLfqVjLpFsC2PTJGDfd36+XFzDhNjkZj/o+nLo+OAhcoQdFvMaVZ2IWoRTNo=
- In-reply-to: <47544193.6050501@ichec.ie>
- References: <47544193.6050501@ichec.ie>
- Reply-to: petsc-users@xxxxxxxxxxx
- Sender: owner-petsc-users@xxxxxxxxxxx
On Dec 3, 2007 11:49 AM, Tim Stitt <timothy.stitt@xxxxxxxx> wrote:
> Hi all,
>
> Is there a quick way to map a global index for a parallel vector to a
> local mapping tuple (p,i) were 'p' represents the process containing the
> value and 'i' is the local index number on that process?
PetscMapGetGlobalRange(&v->map,const &range);
for(p = 0; p < numProcs; ++p) if (range[p+1] > globalInd) break;
localInd = globalInd - range[p];
Matt
> As always, thanks in advance for any information provided.
>
> Tim.
>
> --
> Dr. Timothy Stitt <timothy_dot_stitt_at_ichec.ie>
> HPC Application Consultant - ICHEC (www.ichec.ie)
>
> Dublin Institute for Advanced Studies
> 5 Merrion Square - Dublin 2 - Ireland
>
> +353-1-6621333 (tel) / +353-1-6621477 (fax)
>
>
--
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