clawpack/pyclaw — pull request #114 by ketch (2011-12-20 08:36:00+00:00)
Title: Solver attributes

This patch changes the way solver attributes are set. Instead of building up a list of required attributes and default values that is applied by the superclass (pyclaw.solver.Solver.__init__()), we now just assign the attributes in a straightforward way in the __init__() for each subclass. The attributes that are common to all solvers are set in pyclaw.solver.Solver.__init__(). This code is easier to follow and seems to function in an equivalent way.

Furthermore, this change allows a user-interface improvement that is also implemented in the patch. Namely, no new solver attributes can be created after Solver.__init__(). Attempting to create one raises an exception. This is helpful because it is easy to mistype a solver attribute in a script and then wonder why the code doesn't seem to do anything (this has happened already many times).

@mandli, please review and comment as the code being replaced here is yours.