Im using Python37 through Jupyter Notebook with the netgen/ngsolve packages to do finite elements, this part is working but I want to be able to approximate the memory usage of my code. If you are aware of a way to have python profile it please let me know but I couldn’t find a way that would work with my set up. If not I would like to know how ngsolve stores its sparse matrices, and how to calculate that?
Hi,
some classes have implemented a memory profiling interface (BilinearForm, LinearForm, GridFunction,…)
You can get it by calling the memory property of them for example:
a = BilinearForm(fes)
...
a.Assemble()
print(a.__memory__)