On Wed, 1 Sep 2010, Derek Gaston wrote:

> Essentially, you're suggesting a std::map between vector name and
> ParallelType?

No need - just check NumericVector::type() for each.

> Then you can pass ParallelType into add_vector()?

Right.

> And like you mention you'll need member variables for the parallel
> type of "solution" and "rhs".

rhs (and adjoint_solution, and everything other than solution)
currently gets created via add_vector, so if anyone wants to enforce
non-default vector behavior they can just create the vector themselves
before ExplicitSystem::init (or ImplicitSystem::adjoint_solve,
whatever) gets to it.

Solution is now kind of an ugly special-case.  Originally we had
several vectors that weren't created via add_vector, and I changed
that, but now I don't remember why I didn't change solution along with
them.  Maybe now's the right time to do that?  And then we don't need
any member variables - the user can just do an add_vector() with
whatever options they prefer.  We'd also get to (have to!) simplify a
lot of code which currently looks like "do X to solution, then loop
over all other vectors and do X to each"; it would instead just "loop
over all vectors and do X to each"
---
Roy

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