← Back to team overview

dolfin team mailing list archive

Re: [Question #129296]: defining a discrete function

 

Question #129296 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/129296

Jack requested for more information:
Thanks again, Johan, works brilliantly.

If I may just impose on you again.

The only part of my code that now breaks down with MPI is where I have
to allocate to each member of a std::vector, the corresponding values
from a Function u, i.e.,

int j = 0;
for (std::vector<foo*>::iterator p = instances.begin(); p != instances.end(); ++p) {
	(*p)->set_value( u.vector()[j] );
	++j;
}

Is there a way to reduce this to the local size of the u vector and
associate the correct local range?

Many thanks

Jack

-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.



Follow ups

References