~mapdes/ffc/pyop2-iterationspace-extensions

Viewing all changes in revision 1802.

  • Committer: Florian Rathgeber
  • Date: 2013-01-18 17:55:44 UTC
  • Revision ID: f.rathgeber10@imperial.ac.uk-20130118175544-v048o3tld89s0ibs
Using the pyop2 backend, compile form returns a dict instead of string

The PyOP2 iteration space concept allows optimisation of putting code
at the right depth of the generated loop nest s.t. it is executed the
minimum number of times necessary. To enable that flexibility it is
necessary to return pieces of code generated by FFC that should be
placed at different depths in the loop nest as separate pieces of code
instead of returning a single monolithic kernel function as it is
normally the case with FFC.

As a first step we split the kernel body into three parts:
* declarations of (global) constants s.a. basis functions and
  quadrature weights
* computations that do not vary over an element and hence should only
  be done once per element i.e. computation of the Jacobian
* the actual expression for local assembly of the integral for a given
  pair i,j of basis functions

These are returned separately as part of a dictionary (instead of a
single string) that also contains the monolithic kernel function as
before for backwards compatibility and for benchmarking purposes.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: