Hey guys, I am running a code to compute time dependent functions using implicit Euler scheme and I need to convert the function solution into a vector using the Function.vector() attribute as you can see an example below:
self._etaf = etaf0.copy()
#Building local base functions etaf
A = assemble(self._aa)
Af = A.copy()
self._fv = assemble(self._LL)
[bc.apply(Af, self._fv) for bc in self._bcs]
U = self._etaf.vector()
solve(Af, U, self._fv)
In my case etaf0 is a copy of Function(V) where V is the mesh. The forms self._aa and self._LL are defined and U is the vector. When I run lots of iterations, I have to write U everytime to solve the linear system Af*U = fv. However, I am getting the following message at some point of the iterations
Unable to successfully call PETSc function ‘VecCreate’
Does anyone know why this is happening? If this was answered somewhere else I would be thankful to get the link to it.
Thank ypu very much in advance!