A ListTensor wraps a list of expressions into a tensor valued
expression of one higher rank. This commit adds supported for these to
MCFC.
When a ListTensor is encountered in the expression tree, capture its
subordinated expressions and build an initialiser for a fixed size of
the dimension of the ListTensor with these expressions. Push this
initialiser on a subexpression stack.
Subscript this array with an index over dimensions and push that on
the expression stack. In the loop over dimensions for the expression,
the appropriate expression of the ListTensor is thereby accessed.
Add a test case based on the Euler-advection test.
Note: This has only been tested with scalar expressions below the
ListTensor and may well break for higher rank.
A ListTensor wraps a list of expressions into a tensor valued expression of one higher rank. This commit adds supported for these to MCFC.
When a ListTensor is encountered in the expression tree, capture its subordinated expressions and build an initialiser for a fixed size of the dimension of the ListTensor with these expressions. Push this initialiser on a subexpression stack.
Subscript this array with an index over dimensions and push that on the expression stack. In the loop over dimensions for the expression, the appropriate expression of the ListTensor is thereby accessed.
Add a test case based on the Euler-advection test.
Note: This has only been tested with scalar expressions below the ListTensor and may well break for higher rank.