Skip to content
Snippets Groups Projects
Commit 0f957482 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Rewrite accumulation term splitting to not use FunctionView

The introduction of FunctionView turned out to be a major problem
with more complicated forms. The original idea was to preserver the
structure of the finite element in a way, that loops over components
of a mixed element are realized by actual loops (treating them with
free indices and such). However, this causes quite some nightmares and
was never implemented as generically as needed (I even doubt that is
possible).

However, there is another option, which is to unroll any such loops
on a symbolic level. While this may sound like a bad idea at first
there is some really positive aspects about it:
* ListTensor and ComponentTensor nodes collapse completely (and would
  otherwise have a big nightmare potential)
* Symbolic zeroes do not generate code - important in hyperbolic problems
  where the system matrices are quite sparse or for axiparallel grids,
  where geometric quantities have many zeroes.
* The compiler would unroll these small loops anyway.
* TSFC (and I guess also FFC) do it the same way.

Implementing this required me to redo the form splitting algorithm.
I rethought it and integrated it into the main ufl->loopy visitor.
parent bf22f935
No related branches found
No related tags found
No related merge requests found
Showing
with 846 additions and 750 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment