On Tue, Sep 9, 2008 at 9:46 AM, Roy Stogner <[EMAIL PROTECTED]> wrote:
>
> On Tue, 9 Sep 2008, Benjamin Kirk wrote:
>
>> That is my thinking.  The System::project_vector() code does some all-to-all
>> communication,
>
> Would you take a look at that patch of mine?  I thought it removed
> half of the all-to-all communication (the global vector of old degrees
> of freedom, but not the global vector used by
> enforce_constraints_exactly), but there wasn't any significant
> difference in total runtime (and there were some strange differences
> in PerfLog output) on Tim's problem.

[
Roy,
Did you send a patch to the list? I'm going back through my email but
not seeing it...  Depending on what the patch changes, the rest of
this email might be irrelevant ;-)
]

Are we concerned about code like this (I assume we are getting here in
project_vector) :

      for (unsigned int i=0; i!=new_v.size(); i++)
        if (new_vector(i) != 0.0)
          new_v.set(i, new_vector(i));

This is calling the virtual functions "set()" and "operator()" inside
an O(N dofs) loop, it can't be all that fast.  Communication-wise, it
is probably OK (does not send tons of small messages) because PETSc
caches the values until close() is called.  Would it be worthwhile
having a new interface

NumericVector<T>::set_nonzero( const NumericVector<T> &V)

which basically does that loop internally?

As an aside, I noticed that in the PetscVector implementation, our
calls to VecSetValues only ever set one value at a time, even in
add_vector()... was the ability to set multiple values broken in Petsc
at some point?

-- 
John

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to