# Error in assign function

289
views
0
12 months ago by
Hi, I have applied constrained after initial solution and tried to assign function for next step calculation but getting error: Unable to successfully call PETSc function 'VecCopy'.
h2 = NN.vector().array()
h1 = PP.vector().array()
parray[h1 <= h2]= 0.0
p.vector().set_local(parray)

pold.assign(p)​

Do we have to convert p to something else ......
any suggestions..

Thanks for the help
assign(pold,p)​
written 12 months ago by Jakob Maljaars
It works but for the next step solution I am getting error in solver_p.solve() as Unable to successfully call PETSc function 'KSPSolve'. PETSc error code is: 73.

I need to solve for the next step....

Thanks for the help
written 12 months ago by hirshikesh
pold.apply('insert')​