OpenPNM
OpenPNM copied to clipboard
Add back `remove` and `purge_object` methods
These methods would have been handy for me recently. Would we consider adding these back? I ran into a situation where my algorithm was not running do to nans in the conductance model. It was a problem with the geometry. So to trouble shoot I wanted to export to paraview, but when I tried exporting the project I couldn't because the algorithm had not been run yet! (The reason why it can't export is because there is no alg.soln, which project_to_xdmf
uses to see if it contains transient data or not.) So anyway I wanted to simply delete the algorithm and export without it but there was no way of doing this. But perhaps the problem is with how we check for transient data on our algs.
Yes, I think as you mentioned yourself, the problem is how we check for transient data, so I'd say that needs to be refactored.
I have actually fixed this sorta...the Transport
alg now puts soln = {}
on self during init, so this allows you to export even if the alg has not been run.
I like that solution.