On Thu, 22 Jan 2009, Roy Stogner wrote:
> Currently, ex10 on 2 CPUs dies after the first refinement, when
> operator() fails at TransientSystem::old_local_solution.operator()(i),
> where i is outside of the local dofs on that processor, because at the
> time the _global_to_local_map is empty.
> I think I understand why it's failing now: because although with the
> patch we initialize old_local_solution as a ghosted vector in
> TransientSystem::init_data(), those vectors are getting reinitialized
> as distributed vectors in System::project_vector() - the code tests
> size() against local_size() to determine whether a vector is serial or
> distributed, and when it sees a ghost vector it incorrectly concludes
> the latter.
I invented two new methods in NumericVector that might help you: One
is NumericVector::is_ghosted(), that you can use to query whether a
given vector does contain ghost dofs, and the other is
NumericVector::init(const NumericVector&), which will initialize the
vector using the same storage scheme (i.e. parallel/serial/ghosted) as
its argument. See attached patch (which unfortunately again includes
your patch, but you get quite am impression about what I changed if
you diff the two patches against each other).
> The offending code is lines 100-118 of system_projection.C, which I
> think is some of the least comprehensible code I've ever added to
> libMesh. And off the top of my head I'm not sure what the right
> solution is.
So there's no reason for me to be worried if I don't understand that
code, is there? (-:
Do my new methods help?
Dr. Tim Kroeger
tim.kroeger@... Phone +49-421-218-7710
tim.kroeger@... Fax +49-421-218-4236
Fraunhofer MEVIS, Institute for Medical Image Computing
Universitaetsallee 29, 28359 Bremen, Germany