gmarkall / manycore_form_compiler

MCFC is deprecated. See https://code.launchpad.net/~grm08/ffc/pyop2
https://code.launchpad.net/~grm08/ffc/pyop2
GNU General Public License v3.0
3 stars 1 forks source link

Make numDimension, numNodesPerEle, numGaussPoints attributes of FormBackend #13

Closed kynan closed 13 years ago

kynan commented 13 years ago

This requires changing the way DimIndex, BasisIndex and GaussIndex work:

ElementIndex (specific to the CUDA backend) does not derive from CodeIndex anymore.

ExpressionBuilder and QuadratureExpressionBuilder now need to hold a handle to the FormBackend so they can call the build*Index methods. For the same reason this is also true for the Op2KernelParameterGenerator.

All induction variable methods have been removed and replaced by a call to the name() method of the corresponding Index.

ExpressionBuilder and QuadratureExpressionBuilder classes have been moved to expression.py.

gmarkall commented 13 years ago

Looks good. Just a couple of quick questions:

  1. Why does ElementIndex no longer derive from CodeIndex?
  2. There's some very long lines now, as a result of DimIndex(0) -> self._form.buildDimIndex(0) etc... It might be nicer if the longest ones were a little shorter (e.g. so they can be read without scrolling the github web interface would be enough).
kynan commented 13 years ago
  1. CodeIndex now has a member _extent which is returned by the extent() method as a Literal. ElementIndex.extent() however returns a Variable, so I felt there wasn't too much in common anymore.
  2. Forgot about that, will fix