On Tue, 14 Sep 2010, Tim Kroeger wrote:

> I suggest to make two methods, one of which takes a vector and the other 
> takes a set.  Then, the set-taking method will by default just convert the 
> set to a vector and call the vector-taking method.  Roy, what do you think?

I think this is one of those cases like our send_list accumulation
where the most efficient way to build the (conceptual) set is to build
a vector of non-unique indices and then sort|uniq it after we're done.
If the user wants to play with the indexing order for efficiency, then
having a way to convey the order is a bonus, but in any case there'd
be no reason to pass a set at all.  Even my initial idea of using one
container to signify dof ids and a different container to signify
subdomain ids was a lousy one; if we're not going to make some modular
Subdomain class, then it would be much less confusing to just use two
different method names, e.g. solve_on_dofs(vector&) and
solve_on_subdomains(vector&).

> Yes, that's a good point.  Also, if the same solver object is used to solve 
> different systems, there seems to be no reason to use SAME_NONZERO_PATTERN 
> here.  An further more, if some grid refinement/coarsening has taken place in 
> the meantime, the nonzero pattern is definitely not the same as before.  I 
> really don't know why SAME_NONZERO_PATTERN has been used here originally. 
> Roy, can you comment on this?

Hmm... according to svn blame, David is using SAME_NONZERO_PATTERN
there because it's what I did nearby, and I'm using it because it's
what Ben did first...

And if I had to guess I'd say that Ben did it because the way he'd
construct a separate preconditioning matrix is to make a copy
of the system matrix with the same sparsity pattern but different
data.  We'd have to add a bit of cached information if we wanted to
quickly test whether two arbitrary PetscMatrix objects corresponded to
the same sparsity pattern, so the best fix is probably just to switch
those calls to DIFFERENT_NONZERO_PATTERN for now.

> I know that libMesh uses some external libraries for load balancing in 
> general, but I have never dealt directly with that part of code, so I don't 
> know whether and, if yes, how to involve it here.

Even though you'd need to get a new partition the subdomain for
optimal scaling, in most cases you'd probably do better using the
existing partitioning and accepting a significant imbalance than
running in serial and being completely imbalanced.

> But, of course, if a NULL pointer is used, which means 
> solve on the entire domain

Do we need that semantic?  I'd just use a reference instead of a
pointer; we've already got a function for solving on the entire
domain.
---
Roy

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to