Error in assign function


95
views
0
3 months ago by
hsk  
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
Community: FEniCS Project
How about
assign(pold,p)​
written 3 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 3 months ago by hsk  
What if you add
pold.apply('insert')​
after the assign command?
If that does not work, please post a MWE
written 3 months ago by Jakob Maljaars  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »