Pyclaw Controller Class

The pyclaw controller object is a convenience class for running simulations based on the classic clawpack formats and output specifications. It allows for a variety of output time specifications, output styles and other ways to keep a simulation organized.

The main way to use a Controller object then is to provide it with an appropriate Solver and initial Solution object. Then specify what kind of output you would like different than the defaults (see Controller for details on what those are). Then simply call run() in order to run the desired simulation.

>>> import pyclaw.controller as controller
>>> claw = controller.Controller()            # Instantiate a new controller
>>> claw.solver = my_solver                   # Assign a solver              
>>> claw.solution = my_initial_solution       # Assign an initial condition  

Here we would set a variety of run parameters such as tfinal, keep_copy if we wanted to plot the solutions immediately, or output_format to specify a format other than ascii or no output files if we are going to use keep_copy = True. After we are all set up we just need to call the controller’s run() method and off we go.

>>> claw.run() 

Please see the PyClaw tutorial: Solve the acoustics equations for a detailed example of how this would work in its entirety.

pyclaw.controller.Controller

System Message: WARNING/2 (/var/folders/_s/dx0xgftn3_x04rdx0_w5nq7w0000gn/T/tmpoB5Tktsphinxcontrib_versioning/56744eeda50bfc1d8fec79d45060637228943b2f/doc/pyclaw/controller.rst, line 46)

autodoc: failed to import class u’Controller’ from module u’pyclaw.controller’; the following exception was raised: Traceback (most recent call last): File “/usr/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py”, line 551, in import_object __import__(self.modname) ImportError: No module named pyclaw.controller