Helper class to unpack a (set of) symbol(s) to find all instances of a class. Uses caching to speed up the process.
Unpack a list of symbols. See SymbolUnpacker.unpack()
list_of_symbols (list of pybamm.Symbol) – List of symbols to unpack
Set of unpacked symbols with class in self.classes_to_find
list of pybamm.Symbol
This function recurses down the tree, unpacking the symbols and saving the ones that have a class in self.classes_to_find.
symbol (list of pybamm.Symbol) – The symbols to unpack
List of unpacked symbols with class in self.classes_to_find
list of pybamm.Symbol