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:
Code:
a = BilinearForm(fes)
...
a.Assemble()
print(a.__memory__)
gives something like
Code:
[('SparseMatrix bf biform_from_py low-order', 1352, 1), ('SparseMatrix bf biform_from_py', 24200, 1)]
meaning that the sparse matrix uses 24200 bytes in 1 block and the low order matrix (used in some preconditioners,...) needs 1352 bytes in 1 block.
Best
Christopher