OpenCMISS-Iron Internal API Documentation
Examples

How to add an example

Create example code

  • Copy an existing example folder to the same directory.
  • Rename the name of the folder
  • Rename the Fortran file in src folder
  • Note that the examples are able to be nested. In order to do this, in Linux, you need to add an EXAMPLE_PATH in the Makefile e.g., EXAMPLE_PATH=Bioelectrics/ for the Monodomain example. For the Visual Studio files it is best to edit the Fortran.vfproj files to ensure the library paths and object paths are correct.
  • Change the source code for the new example

Documenting the example

  • Add a Doxygen entry into the example source file using an example tag and including the path from examples directory.
  • Add an entry into the example source file using an htmlinclude tag to include the file generated when testing the example, e.g.
    \htmlinclude ClassicalField/AnalyticLaplace/history.html

Automated testing

If you want to add an example into the nightly or weekly builds in the buildbot system:

  • Add a file named "nightlytest.json" or "weeklytest.json" under the example directory.
  • The property file is written in json format as follows:
    {"example": {
    "globalTestDir" : the global test directory, e.g. "42testingPoints", the default is ""
    "test": [
    {
    "id": 1,
    "args": arguments passed into the test, e.g. "4 4 0 1", the default is "",
    "path": the path to the directory the test is executing from the globalTestDir, the default is the examplePath
    "processors": number of computational nodes running, the default is 1,
    "expectedPath": the path to the expected files from test.path, the default is unset,
    "outputPath": the path to the output directory from test.path, the default is unset,
    "tolerance": the tolerance allowed to compare the output with expected values, the default is "1e-7"}]
    }}