Skip to content

Refactor Source object away

A residual issue from the XML --> JSON refactor was that the ambiguous Source interface stuck around. We've organized the ERF into SourceTrees with branches of RuptureSets, which is a clear nomenclature. But hidden from the user is that a RuptureSet is iterable over Sources, which are in turn iterable over Ruptures, which doesn't make a lot of sense; it's an extra and unnecessary class layer and we have effectively paired classes of, for example, FaultRuptureSet and FaultSource. Furthermore, a FaultRuptureSet and InterfaceRuptureSet always just iterate over a singleton List<Source>. For gridded sources, the PointSource class hierarchy makes sense, so we'll keep that, but we'll likely need a RuptureSet implementation that provides accessors to the individual underlying PointSources.