how to free memory for direct solver

More
5 years 1 month ago #1912 by Guosheng Fu
Hello,

I have limited ram in my computer and encountered a memory problem for time dependent simulation.
Basically, I am reassembling a time dependent linear system and apply direct solver in each time step.
Now, for a particular size problem, a single matrix factorization eat up most of my memory (80%).
As I am reassembling the matrix and recomputing the matrix factorization, the old one still occupies that 80% memory, and the direct solver fails to proceed.
Is there a simple trick to clear the memory of the old matrix factorization?
In matlab, I can simply do clear(inva).... I was wondering about the analog in python...

Best,
Guosheng
More
5 years 1 month ago #1913 by hvwahl
Hi Guosheng,

I think that pythons "del" command should work, i.e., if inv = a.mat.Inverse(X.FreeDofs()) call "del inv" and whatever else you want to get rid of at then end of each time step.

Best wishes,
Henry
More
5 years 1 month ago #1916 by Guosheng Fu
Thanks, Henry. It works.
Time to create page: 0.120 seconds