Copying this to libmesh-devel; there's a non-trivial chance that
others there might disagree with me.

On Wed, 2 Jun 2010, Boyce Griffith wrote:

> On 6/2/10 3:52 PM, Boyce Griffith wrote:
> 
>> OK, then I have mis-understood what close() does --- I think I thought
>> it was equivalent to VecAssemblyBegin() + VecAssemblyEnd(), but looking
>> at the code it obviously also updates any ghost values.
>
> Looking at the class documentation for NumericVector/PetscVector --- I wonder 
> if it is worth indicating somewhere that implementations of 
> NumericVector::close() are also responsible for updating/synchronizing ghost 
> values (if any)?

Definitely.  Pending any discussion here I'll update those.

> I don't normally think of VecGhostUpdateBegin()/VecGhostUpdateEnd()
> as being assembly-related functions per se.

No, but conceptually I've been thinking of close() as "get the vector
into a parallel-consistent state" - that would include both assembling
additions from other processors and simply copying data owned by other
processors.

> Alternatively, I wonder if the interface might be clearer if assembly and 
> ghost-filling were separate member functions, although that change would have 
> the potential to wreak havoc on application codes.

We did have those as separate functions before - the assembly gets
done on a PARALLEL vector like solution and then localized onto a
separate SERIAL vector like current_local_solution.  But our end goal
is to get rid of the underlying current_local_solution data storage,
and leave it as an interface to a ghosted solution for backwards
compatibility.  I don't see any advantage to keeping those two steps
separate, but I may be missing something obvious.
---
Roy

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to