Skip to content

Adding a new example

John W. Peterson edited this page Feb 12, 2015 · 15 revisions

There are a few "boilerplate" steps required when adding a new example.

  1. Choose a category which fits your example (adaptivity, adjoints, etc), create a new directory, and add the necessary source and header files.
  2. Copy a Makefile.am from one of the other examples (e.g. examples/adjoints/adjoints_ex1/Makefile.am) to your new example. Fill in the install_dir, data, and CLEANFILES variables with values relevant to your example.
  3. Copy over a run.sh from one of the other examples (e.g. examples/adjoints/adjoints_ex1/run.sh) and update the example_name and example_dir variables appropriately.
  4. Add a line to the SUBDIRS variable in examples/Makefile.am for your new example
  5. Add a line to the AC_CONFIG_FILES section of configure.ac for your new example
  6. Run ./bootstrap at the top level
Clone this wiki locally