Mathematical redundancies in DielectricFunction
DielectricFunction can calculate polarizability either via chi or via dielectric matrix. The formalism is probably similar but the code paths are very different, probably more different than they need to be.
Someone who knows about response theory could look at it and we would try to find a representation that is less redundant. The code is also clearly closely related, so there is some near-code-duplication involved as well, but usually in small chunks.
Maybe the optimal solution is not to have a class for each quantity but instead some suitable generalization, or just a different set of such classes.
Edited by Ask Hjorth Larsen