On Aug 31, 2010, at 10:18 AM, Roy Stogner wrote:

> In theory, assuming your Vec v is already ghosted, all you need is:
> PetscVector<Number> wrapper(v);
> and then use wrapper.  The constructor PetscVector::PetscVector(Vec v)
> checks to see whether v is ghosted, serial, or parallel (and how big v
> is) and updates our metadata cache accordingly.  We do assume that v
> has already been initialized and isn't in mid-assembly, which should
> be true in your callback function.

This is what I tried first.... and it failed.  I think that one of these 
vectors is not ghosted already.  Just to be clear... this is in a function that 
I've set as a callback using SNESLineSearchSetPostCheck... and the two vectors 
I'm working with are the updated solution and the newton increment.

Based on your explanation, I'm going to see if one of the vectors is already 
ghosted... and if it is then it will work fine.  The _other_ one I'll use the 
current_local_solution trick on.  This is a bit of a hack though....

> 2. How well tested is this code path?  You might be the second or even
> first guinea pig.

Someone has to be!

Derek
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to