gmarkall/manycore_form_compiler — pull request #67 by gmarkall (2012-04-24 09:55:05+00:00)
Title: Multiple integrals

Support code generation for multiple integrals per form. Changes are:

* Refactor the form backends so that most of the functions are passed the integral as a parameter rather than the entire form, to make it easy to distinguish which integral they're supposed to be working with.
* Add a loop to the `compile` function of the form backend, that iterates over the form's integrals and calls `_compile_integral` (which now does most of the work that was done by the `compile` function).
* Edit the assembler so that it also iterates over integrals in a similar way. This required some re-ordering of function calls in the `run_model_` function.

At first it may seem odd that all the parameters of the kernels for each integral in a form take the same parameters, regardless of which coefficients they use. However, this is because the coefficients are stored per-form in the form data. Similar behaviour can be observed in FFC - all of the coefficients must be passed to the `tabulate_tensor` function even if it doesn't need all the coefficients for that integral.

Because these changes involved modification of the generated code, the changes have been tested first on the buildbot - all tests have passed on the devtests-grm08 and fluidity-dev-grm08 queues.