Creating a new application directory

Copying an existing example

The simplest approach to implementing something new is to start with a Clawpack example and modify the code appropriately.

For existing examples, see the applications in $CLAW/apps, which can be perused at Applications gallery.

See also the Examples from the book FVMHP.

Rather than modifying one of the examples in place, it is best to copy it to a new directory. There is a directory $CLAW/myclaw at the top level of Clawpack that can be used to put your own work. This way if you use the Python server (see Starting a Python web server) you can view your files and plots via the web address http://localhost:50005/myclaw/...

If your myclaw directory is located elsewhere, you can also create a symbolic link from the top claw level to the actual location and the above address should still work.

In unix/linux you can copy a directory recursively (with all subdirectories intact) using the cp -r command, e.g.

$ cp -r $CLAW/apps/advection/1d/example1  path-to-newdir

for example.

Table Of Contents

Previous topic

Examples from the book FVMHP

Next topic

Saving and sharing results

This Page