Inheritance
Following the DRY principle,
torusgrid uses multiple inheritance to ensure that the same
functionality is implemented only once. So, for example, RealGrid1D has
RealGrid and Grid1D as base classes, where the latter is an abstract base
class for 1D grid interfaces. The complete inheritance diagram is shown below.
