clawpack/pyclaw — pull request #391 by memmett (2014-04-29 17:15:36+00:00)
Title: Move logic of which pyclaw to import (pyclaw vs petclaw) to run_app_from_main.

This PR moves the

if use_petsc:
import clawpack.petclaw as pyclaw
else:
from clawpack import pyclaw

logic that is current present in most (all?) examples into the 'run_app_from_main' utility. This will allow new backends to be tested without repeating the above logic in every application. For example, suppose a new backend called 'boxclaw' is created. Currently one would have to change the above code snippet to:

if use_petsc:
import clawpack.petclaw as pyclaw
elif use_boxlib:
import clawpack.boxclaw as pyclaw
else:
from clawpack import pyclaw

in every example.

At this time I have only modified one example to demonstrate the intended usage.