For some reason, memory usage started accumulating after introducing the new interpolate function. It seems to be related to PETSc vectors not being automatically freed from memory. In this PR we make sure this is done by manually calling .destroy on the generated vectors.
For some reason, memory usage started accumulating after introducing the new interpolate function. It seems to be related to PETSc vectors not being automatically freed from memory. In this PR we make sure this is done by manually calling
.destroy
on the generated vectors.Before patch https://github.com/ComputationalPhysiology/simcardems/assets/2010323/6feefabe-1983-4f92-81d9-8bed6aca20e7
After patch https://github.com/ComputationalPhysiology/simcardems/assets/2010323/de0cd3a1-83aa-496c-9e5d-360ced8427be