assembleVectorComplete

Matthew Knepley knepley at gmail.com
Mon Aug 20 06:52:14 CDT 2007


On 8/19/07, Randall Mackie <randy at geosystem.us> wrote:
> Normally, one uses ghosted values to compute a function on the locally
> owned part of the grid. I have a slightly different need where on the
> locally owned part of the grid, I want to compute some local quantities
> AS WELL as the ghost quantities, if that's where they wind up.
>
> Can I do the following:
>
> call VecGetArray(localVec....)
>
> set the values into the vector I want, including any ghost points that
> are necessary
>
> then
>
> call assembleVectorComplete(globalVec,localVec, INSERT_VALUES)

This call only works if you are using the experimental Mesh object.

> ????
>
> The alternate way I can see would be to zero out a global vector,
> then make calls to DALocalToGlobalBegin and DALocalToGlobalEnd,
> which ADDS in the ghost values.

This is in essence what you want. So, for the ghost values, how do you
determine who computes the value? Addition makes sense in that both
local and ghost contributions arise. So, if there is no local contribution,
set it to zero, and then the ghost value just adds in.

  Thanks,

    Matt

> Thanks in advance.
>
> Randy
>
> --
> Randall Mackie
> GSY-USA, Inc.
> PMB# 643
> 2261 Market St.,
> San Francisco, CA 94114-1600
> Tel (415) 469-8649
> Fax (415) 469-5044
>
> California Registered Geophysicist
> License No. GP 1034
>
>


-- 
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




More information about the petsc-users mailing list