This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Problem running in parallel with initial guess

+1 vote

Hi, I have working code in FEnics to solve a coupled problem but for the problem to converge i give non zero initial guess as suggested in forum here. Using this my problem converges but i am not able to run it in parallel as FEnics gives an error on the guess which is

u.vector().set_local(rand(u.vector().size()))
u.vector().apply("")

and the error i get is :

u.vector().set_local(rand(u.vector().size()))
RuntimeError: 

I would appreciate any help in this regard.
Thanks.

asked Feb 15, 2017 by kaushikv123 FEniCS Novice (390 points)

Hi, you need local_size.

Thanks MiroK. It worked.

...